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

multi language translate to traditional chinese #57

Closed
terryhcw opened this issue Oct 19, 2021 · 4 comments
Closed

multi language translate to traditional chinese #57

terryhcw opened this issue Oct 19, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@terryhcw
Copy link

Hi all,
I want to help add one more language to Maily. I had test and make some change of character in chinese, which it is work and can run in the android simulator. But after few hours of work, it can not compile again and run in the simulator.
I get the following error message :

Generating synthetic localizations package failed with 1 error:

Exception: The following .arb file's locale could not be determined:
D:\GitHub\enough_mail_app\enough_mail_app\lib/l10n\app_ct.arb
Make sure that the locale is specified in the file's '@@Locale' property or as part of the filename (e.g. file_en.arb)

Does it mean I did not use the same standard code for chinese language? In my environment I use 'ct' for traditional chinese, 

I had add app.ct.arb file in the "lib/l10n" directory and also add app_localizations_ct.dart file in the "flutter_gen/gen_l10n" directory. Also I has add and change some code in "app_localizations.dart" to support this language.

 If I'm working on a work way, please add the relate language in the project, Then I will translate the language file to chinese. If possible, I can help to translate it simplifies chinese and Traditonal chinese or some degree extend to Hong Kong and Taiwan style for Traditional Chinese

 Regards

Terry Ho

@robert-virkus
Copy link
Member

robert-virkus commented Oct 19, 2021

Hi Terry,

this is great news, I would love to support Chinese!
In regards to your build error, I am unsure what the cause for this is. Maily uses the "standard" way of Flutter localization. As far as I know the generic language tag for Chinese is "zh", have you tried using zh instead of ct so that your file's name would be app_zh.arb?
As Chinese has many different scripts, here's also some documentation about the definition options:
https://flutter.dev/docs/development/accessibility-and-localization/internationalization#advanced-locale-definition

In any case, please consider creating a pull request even in a non-working state, we can then resolve this together.

@robert-virkus robert-virkus added the enhancement New feature or request label Oct 19, 2021
@terryhcw
Copy link
Author

Hi robert,
I take your advise which change to correct language tag "zh', Now it is working.

I'm new to Flutter and Github. So I don't know how to make a pull request. Also I had download Github desktop, which show me which line I had change and which file I had add. But I don't how to make it upload into your project. I think it need some time for me to test and dig out how to do it.

I would like to learn more about Flutter, so I hope my work in Maily, will make me know more about flutter and develop Maily to support desktop and add more function on it.

Regards
Terry Ho

@robert-virkus
Copy link
Member

Maily may not be the best place to learn about good architecture, as this has been a learning place for me, too. I plan to improve the architecture in the future.
For now I would love to integrate your translations, feel free to send them to me directly: robert(at)enough(dot)de

Thanks,
Robert

@terryhcw
Copy link
Author

Hi Robert,
Ok, I will sent to you, I will send a testing file to you, which mainly complete the welcome and setting screen, If it is ok, then I will finish the rest in ASAP.

 Regards

Terry Ho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants