ErLinErYi / PlantsVsZombies

PlantsVsZombies game made by cocos2dx 3.16 (c++)
Apache License 2.0
1.77k stars 279 forks source link

Translation #11

Open nagayev opened 3 years ago

nagayev commented 3 years ago

Hello. I want to translate this game to Russian. How can I do it?

nagayev commented 3 years ago

I remember you promise push update with JSON language file, but I can't see it.

ErLinErYi commented 3 years ago

The new version is not finished yet, it will take some time. New content is being done.

---Original--- From: "Marat Nagayev"<notifications@github.com> Date: Tue, Feb 9, 2021 18:05 PM To: "ErLinErYi/PlantsVsZombies"<PlantsVsZombies@noreply.github.com>; Cc: "Subscribed"<subscribed@noreply.github.com>; Subject: Re: [ErLinErYi/PlantsVsZombies] Translation (#11)

I remember you promise push update with JSON language file, but I can't see it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nagayev commented 3 years ago

@ErLinErYi Okey. Could you split changes to commits, please? Your last commit is incredibly large.

c-sanchez commented 3 years ago

Hi @ErLinErYi, your game is really great, very well done. Now about translation, I would like translate the game in Spanish, however for now I'm not sure if start translating the language.json file because to be honest I found this a bit weird. Please make the main Language as English, this make the things easier for translation, and for now the jsong files have:

"language": ["中文", "english"],

Here the first language section is Chinese, so to start translate (generally speaking) we need down up to English language section. Then, in the English section we have also this ["String Base (in Chinese)", "String Translation", 0, 0, 0, 0],

This makes things a bit complicated for those who want to translate the game, since English is usually the base language for translations.

And if I'm not mistaken, certain parts of the game still can't be translated, like the main menu buttons.

Best regards, and thank you so much by make this great work again :)

nagayev commented 3 years ago

@c-sanchez Hello. Where can I find language.json file? is it already in master?

ErLinErYi commented 3 years ago

Thank you for your letter.  If you want to add a new language, you can add it directly. for example: "Language": ["中文", "English", "Spanish"]

Then you need to translate the text you need. The following figures are described in the .TXT file in the same level directory of the JSON file.

Since I didn't have to do a multilingual version at the beginning, I directly used Chinese in the code. After that, we took Chinese as the foundation. In fact, it doesn't matter if you can't understand the first string. It's only for the program to read, it's just a code, that's all. When it is displayed later, the translated text will be displayed. JSON files come with English translations, although these English translations may not be very accurate. If you need to translate other languages, you can take the translated English as the basis for translation. There is no way to translate some pictures. This can only replace pictures, which is not supported at present. These problems will be solved later.

------------------ 原始邮件 ------------------ 发件人: "ErLinErYi/PlantsVsZombies" @.>; 发送时间: 2021年6月6日(星期天) 晚上11:34 @.>; @.**@.>; 主题: Re: [ErLinErYi/PlantsVsZombies] Translation (#11)

Hi @ErLinErYi, your game is really great, very well done. Now about translation, I would like translate the game in Spanish, however for now I'm not sure if start translating the language.json file because to be honest I found this a bit weird. Please make the main Language as English, this make the things easier for translation, and for now the jsong files have:

"language": ["中文", "english"],

Here the first language section is Chinese, so to start translate (generally speaking) we need down up to English language section. Then, in the English section we have also this ["String Base (in Chinese)", "String Translation", 0, 0, 0, 0],

This makes things a bit complicated for those who want to translate the game, since English is usually the base language for translations.

And if I'm not mistaken, certain parts of the game still can't be translated, like the main menu buttons.

Best regards, and thank you so much by make this great work again :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ErLinErYi commented 3 years ago

You need to download the latest version and find the language folder in the installation directory after installation, which contains the language.json file.

------------------ 原始邮件 ------------------ 发件人: "ErLinErYi/PlantsVsZombies" @.>; 发送时间: 2021年6月7日(星期一) 晚上7:40 @.>; @.**@.>; 主题: Re: [ErLinErYi/PlantsVsZombies] Translation (#11)

@c-sanchez Hello. Where can I find language.json file? is it already in master?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nagayev commented 3 years ago

@ErLinErYi Thanks

c-sanchez commented 3 years ago

@ErLinErYi Well I think it's better keep the english languague as base, but I guess is ok anyway. I am going to translate the game in Spanish but can you keep these files updated? I mean, if with any update something is changed, added or removed, do you have any system to automatically add it to the translations?

By example in programs many times is used the GNU Gettext format (PO / POT files) https://www.drupal.org/community/contributor-guide/reference-information/localize-drupal-org/working-with-offline/po-and#:~:text=pot%20(portable%20object%20template)%20extensions,translations%20to%20a%20particular%20language. That facilitates the task of updating all new strings.

Just a curiosity on my part.

Btw I just saw the notification of a new update for the game, but when I try to update (with "Download" or "Downloader") the game closes automatically (crashes).

I guess I'd better wait for you to upload the update in a compressed file. Regards.