codinguser / gnucash-android

Gnucash for Android mobile companion application.
Apache License 2.0
1.23k stars 540 forks source link

Default accounts are created in English when no region-specific is available #621

Closed rivaldi8 closed 7 years ago

rivaldi8 commented 7 years ago

Steps to reproduce the behaviour

  1. Set the phone locale to a language variant for which default accounts aren't translated. For examples Spanish (United States).
  2. Load default accounts: Settings > Accounts > Create default accounts.

Expected behaviour

Default accounts for locale Spanish (Spain) are loaded, as it's the closest translation available.

Actual behaviour

Default accounts for default locale English are loaded instead.

Software specifications

rivaldi8 commented 7 years ago

Renaming app/src/main/res/raw-es-rES to raw-es solves the problem.

I see all raw and lots of values resources have this problem. I think we should rename all of them removing the region-specific suffix (raw-fr-rFR to raw-fr, values-pt-rPT to values-pt and so on). @codinguser what do you think?

codinguser commented 7 years ago

I think we can definitely do that for the raw values. If there are region specific files, we should use them, otherwise, we can rename one folder to the basic locale (without region eg. raw-pt or raw-es) as a fallback for all the other locales where we do not have specifics.

I am more concerned about doing this for the languages though. Language is tricky, and sometimes there are big differences between the regions, even though it is the same basic language.

But I must admit that there are more benefits than downsides to covering a basic locale. I'll try to see if it is possible to make it work through CrowdIn. (I'd hate to have to mess up the translation workflow).

If you don't mind, assign this task to me and I'll handle it.

rivaldi8 commented 7 years ago

Yes, I agree some languages may be tricky, but we can alway adjust it depending on the feedback of the users. The problem, as you say, will be not messing up CrowdIn translations.

rivaldi8 commented 7 years ago

I've found this option in Crowdin settings (Export section) that may help:

Automatically fill in regional dialects Untranslated strings of regional dialects (e.g. Argentine Spanish) will automatically include completed translations from the primary language (Spanish).

codinguser commented 7 years ago

I'll check that out when pulling translations for next update. Then we can just have all regional dialects covered in one go. Thanks!