Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add key_is_before_tag option, add string_keys_utils to be used like a… #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

salvprest
Copy link

…n singleton to take advantage of the new logic
This commit add a new option key_is_before_tag, if is checked the string before the tag ($$ for example) is used in the csv like a key, and the string after the tag is registered like the translated phrase.
for example:
"start_text$$hey! Is nice to see you again"
become in the csv:

key en
start_text hey! Is nice to see you again

in this way we create clean keys and at the same time we write in code the string for one of the translated languages.
To take advantage of this new functionality I have writen a singleton: string_keys_utils
this singleton have two functions;

sk("start_text$$hey! Is nice to see you again") ## return: start_text
sktr("start_text$$hey! Is nice to see you again") ## return: hey! Is nice to see you again

where is showed what they return with the csv above.
two news filters are added to take advantage of these two functions.

…n singleton to take advantage of the new logic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant