emavgl / oinkoin

Oinkoin is a flutter app for helping you managing your expenses. No internet required.
GNU General Public License v3.0
139 stars 8 forks source link

Added English GB localisation #121

Closed Sgt-Spaghetti closed 4 months ago

Sgt-Spaghetti commented 4 months ago

I have added a en_GB localisation file with all the occurrences of "color" changed to "colour". I also changed mentions of "en" to "en_US" and "en_GB" in the android/app/src/main/res/xml/locales_config.xml file, and I changed the supported locales section in main.dart to include en US and en GB separately. Finally, i added changed the dropdown options in customization_page.dart to include both localisations, called "English (US)" and "English (UK)", pointing to "en_US" and "en_GB" respectively.

I hope this can also change the date format from m/d/y to d/m/y through the use of the localisation codes, and also change the currency symbol from $ to £ .

Many thanks for reading this, and I hope these changes do not negatively impact the app.

emavgl commented 4 months ago

Hi, thanks for opening the PR and thanks for the contribution. It is a bit of a busy time for me, but I'll have a look asap.

You mention

and also change the currency symbol from $ to £.

Where is it changed? Oinkoin it is currency agnostic, and the currency symbol should not used anywhere.

Sgt-Spaghetti commented 4 months ago

My apologies - this is not changed anywhere directly. I saw a reference to currency locales in the lib/main.dart from Venetian, but it must be something else.

emavgl commented 4 months ago

No problem. I see where the confusion comes from: the currency locale mentioned there is on the number formats, rather than on the symbols (for example, when using the , or . as decimal separator).

I checked the PR and it seems good to me. I needed to add the locale also in Crowdin and it may takes some time for sync. I'll keep you updated, thanks for the contribution!

emavgl commented 4 months ago

I have added the assets/locales/en_GB.json from Crowdin. I see changes like

<<<<<<< your changes
    "Choose a colour": "Choose a colour",
=======
    "Choose a color": "Choose a color",
>>>>>>> master

However, the left side string should still be the US version, which is used by i18n library for matching the strings used in the code, while the right side must be the translated strings (the GB version).

Also, it seems that there are still untranslated strings with "Color" in the file.

However, for Crowdin sync to work - all the translations must be managed within Crowdin itself. So my suggestions would be:

Then Crowdin sync will take place

Sgt-Spaghetti commented 4 months ago

I have fixed and then removed the assets/locales/en_GB.json file, and added translations to Crowdin.

emavgl commented 4 months ago

Merged the changes from Crowdin. The PR looks good to me :) . Did you have a way to run the application and verify everything is working as expected? If not, I'll do it over the weekend.

Sgt-Spaghetti commented 4 months ago

Thank you! Unfortunately I don't have a way to run it right now, although I am trying to set up flutter. It will probably be faster for you to do it over the weekend 🙈