scelis / twine

Twine is a command line tool for managing your strings and their translations.
Other
840 stars 151 forks source link

Android output path for default language #276

Closed jonasrottmann closed 5 years ago

jonasrottmann commented 5 years ago

This addresses https://github.com/scelis/twine/issues/225 and changes the android formatter to behave like suggested in https://github.com/scelis/twine/issues/225#issuecomment-393457223.

Now the android formatter takes the --developer-language flag into account when it is used in conjunction with generate_all_localization_files.

The brings the behavior in line with the documentation of --developer-language:

When generating files this language will be used as default language and its translations will be used if a definition is not localized for the output language.

-- cli.rb

On android the default language lives in the folder res/values/ (no language specifier):

Android loads the default strings from res/values/strings.xml

-- developer.android.com

It now also works analogous to determine_language_given_path where the default language is already considered.

scelis commented 5 years ago

Thank you for this!