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

Trying to make zh-CN & zh-TW locales for the mod #6

Open
AmCh-Q opened this issue Mar 14, 2017 · 5 comments
Open

Trying to make zh-CN & zh-TW locales for the mod #6

AmCh-Q opened this issue Mar 14, 2017 · 5 comments

Comments

@AmCh-Q
Copy link

AmCh-Q commented Mar 14, 2017

Hi, I had been trying to translate your mod into zh-CN (Mandarin Chinese, for mainland China) and zh-TW (Traditional Chinese, for Taiwan, Hong Kong, Macau, etc.); you are welcomed to merge this into your mod, and if you wish so, I can help translating future mods into Chinese.
I'm not sure if this should be submitted as a pull request or an issue, I decided to submit it here anyway.
zh-CN.txt
zh-TW.txt
(GitHub doesn't allow me to submit .cfg files so I changed them to .txt)
(On the other hand, I'm not a programmer so I can't figure out what exactly is going on, but I can't use these translations in the game because there seems to be some sort of encoding/syntax error, either in the translated file themselves or the mod in handling locale files. ANSI encoding doesn't support Chinese characters so I have to use UTF-8 just like all the other translations are using, but when I do, errors pop out when I start the game.)

@lossycrypt
Copy link

Try using "UTF-8 without Byte-Order-Marker", Depending on your editor it might be called "BOM", "Signature" or something else.

@AmCh-Q
Copy link
Author

AmCh-Q commented Mar 16, 2017

Thanks, tried it with Notepad++, that fixed the problem, now I can see translated item names in the game (although for some unknown reason, the re-encoded files, when opened in the vanilla Notepad, show garbled texts(not that it affects gameplay, though)).
zh-TW.txt
zh-CN.txt

@avosirenfal
Copy link
Contributor

I was waiting for time to look into this, but I'll just merge it since you tested it. Thank you so much for the translation, that's awesome of you to do. I hope the Chinese community likes the mod :)

@AmCh-Q
Copy link
Author

AmCh-Q commented Mar 16, 2017

Thanks, I'll let my Chinese friends who are playing Factorio learn about this mod.
There is another (minor) problem. I couldn't figure out how to translate the messages/items that's not included in the locale file.
For example, whenever you call [player.print()] in your code directly and print something in English, such as [player.print(string.format("%s's external connection is blocked."))] in line 268 of [factory.lua], I couldn't translate them since they are not included in a locale file, unless I just edit the code directly (which means removing the original English texts).
Same goes with the ['left', 'top', 'right', 'bottom'] in line 278 and the memes (I don't think most Chinese can get that meme even if I try to translate it, though).
I hope that in a later update (when you have time) you can migrate those strings into the locale file, so I can just submit pull requests for future translations.

@avosirenfal
Copy link
Contributor

avosirenfal commented Mar 16, 2017

I forgot about that. I'll take care of it soon

@avosirenfal avosirenfal reopened this Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants