emavgl / oinkoin

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

Add Multi-Language Support #3

Closed StefanoBerlato closed 4 years ago

StefanoBerlato commented 4 years ago

As per title, I would start thinking about multi-language support, if you are ok I can take care of it.

emavgl commented 4 years ago

Assigned!

StefanoBerlato commented 4 years ago

I started following this official guide (https://flutter.dev/docs/development/accessibility-and-localization/internationalization).

StefanoBerlato commented 4 years ago

The official guide is ok but a bit messy and the code boilerplate, I would like to leverage a dedicated package flutter. There are two packages suitable for i18n (i.e., score > 90 and author verified), I chose the one with the highest number of likes (https://pub.dev/packages/i18n_extension).

StefanoBerlato commented 4 years ago

I18n is working, now we just have to keep track of the new strings we add to the app and translate them. As of now, the supported languages are:

We can both take care of English and Italian. I will take care of Spanish and French, while you can take care of German (so you learn a bit 😛 )

freacore commented 11 months ago

What files exactly do I have to translate? Because there is no german or spanish available yet.

emavgl commented 11 months ago

Hi @freacore, that's right, just English and Italian are currently supported. You are of course welcome to contribute. We are using this library https://pub.dev/packages/i18n_extension - you basically have to look for files with the extensions .i18n. In those you can find the strings in the two available languages.

For example: https://github.com/emavgl/oinkoin/blob/master/lib/records/i18n/records-page.i18n.dart

Here you have for example:

      {
        "en_us": 'Add a new record',
        "it_it": "Aggiungi un nuovo movimento.",
      }

and if you want to provide a German translation, you just add

      {
        "en_us": 'Add a new record',
        "it_it": "Aggiungi un nuovo movimento.",
        "de": "HERE YOUR GERMAN TRANSLATION"
      }

Eventually, we will need to add German as supported Locale here https://github.com/emavgl/oinkoin/blob/master/lib/main.dart#L65

nizarus commented 11 months ago

Hi, Why not using a translation platform like https://weblate.org/ so the application can be translated by the community in multiple languages

emavgl commented 11 months ago

Thanks, I am not familiar with weblate and I will look at it, together with crowdin. The format used in this app is not a standard and it can be of difficult integration. So I was thinking to put all the strings in a single file like en.json, it.json, de.json and so on. Then those websites should be able to work with them.

emavgl commented 11 months ago

Hi there, I have recently added an integration with the platform Crowdin for the translation. It should facilitate the translations of new strings. You can find the link here https://github.com/emavgl/oinkoin#translation - let me know if there are any issue (login etc)

cc: @nizarus @freacore

nizarus commented 11 months ago

I can help in French and Arabic translation. Please activate them in Crowdin.

emavgl commented 11 months ago

@nizarus just added :) do you require any additional permissions?

nizarus commented 11 months ago

@emavgl done 👍

emavgl commented 11 months ago

Thank you so much @nizarus - I have released a new version and it got already approved in Google Play. You can find your translation in https://github.com/emavgl/oinkoin/releases/tag/1.0.31

nizarus commented 11 months ago

I detected a wrong French translation and I updated it on Crowdin. Also the format in 'Recurrent Records' pane should be updated to display the whole message. See : Screenshot_2023-12-18-10-46-21-61_0f5c2f5270a23bdff84fc4b805035205

emavgl commented 11 months ago

Thanks, merged with the PR https://github.com/emavgl/oinkoin/pull/38 They will be released, together with the 'Recurrent Records' pane in the next release :)

emavgl commented 11 months ago

I have created the following threads on Github discussions page: https://github.com/emavgl/oinkoin/discussions/categories/translations - so that we leave this issue closed, and we have always going discussions there.