marcrobledo / savegame-editors

A compilation of console savegame editors made with HTML5 technologies.
https://www.marcrobledo.com/savegame-editors/
Other
1.11k stars 229 forks source link

TOTK: Provide support for Multi Language Translation #244

Open tingod opened 1 year ago

tingod commented 1 year ago

First great thanks for your excellent editors, which has been used by me since BOTW, I love it. I'd like to give support for multi language translation for TOTK version, and below is a ZH version as a try.

https://github.com/marcrobledo/savegame-editors/commit/3101fcbae611205e9102eb18f97e1dec6da9616f

Not sure it's the best way but please do reach me if you need.

eUnisk commented 1 year ago

Great work tingod! Totk has multi-language translations. Is there a way to extract an item list in multi translations from the game image? We can create a database from it. So that all the totk projects can use it.

tingod commented 1 year ago

Updated multi language support by add a JS file, restrict it in less modification to the original sources of TOTK save editor.

https://github.com/tingod/savegame-editors/commit/a8b3d54851452cbfe2d258671ed5c73c8a0071f2

Is this helpful to you if you have a plan to multi language support? @marcrobledo

tingod commented 1 year ago

Great work tingod! Totk has multi-language translations. Is there a way to extract an item list in multi translations from the game image? We can create a database from it. So that all the totk projects can use it.

I didn't try to extract lists from the game image, but check internet resources instead at now. My language database is still under collection as some of the words is not exact yet.

marcrobledo commented 1 year ago

Is this helpful to you if you have a plan to multi language support? @marcrobledo

It wasn't on my plans, but this definitively will help people! :-)

However, this isn't exactly the best way to add internationalization+localization to an app, it would be hard to mantain a branch for each language. I'd like to start working on this as soon as possible, but I can't promise.

tingod commented 1 year ago

Is this helpful to you if you have a plan to multi language support? @marcrobledo

It wasn't on my plans, but this definitively will help people! :-)

However, this isn't exactly the best way to add internationalization+localization to an app, it would be hard to mantain a branch for each language. I'd like to start working on this as soon as possible, but I can't promise.

Thanks for considering the enhancement and you are right there must be better ways for the localization. Looking forward to your next step and please reach me if you need support. BTW, I collected a localization data sheet with 14 languages of TOTK, please tell me if it's useful to you.

image

eUnisk commented 1 year ago

Is this helpful to you if you have a plan to multi language support? @marcrobledo

It wasn't on my plans, but this definitively will help people! :-) However, this isn't exactly the best way to add internationalization+localization to an app, it would be hard to mantain a branch for each language. I'd like to start working on this as soon as possible, but I can't promise.

Thanks for considering the enhancement and you are right there must be better ways for the localization. Looking forward to your next step and please reach me if you need support. BTW, I collected a localization data sheet with 14 languages of TOTK, please tell me if it's useful to you.

image

Hi tingod, you did an amazing job. Do you consider creating a GitHub repository to publish your datasheet? I think that's very useful to all the totk projects.

marcrobledo commented 1 year ago

Thanks for considering the enhancement and you are right there must be better ways for the localization. Looking forward to your next step and please reach me if you need support. BTW, I collected a localization data sheet with 14 languages of TOTK, please tell me if it's useful to you.

It will!

tingod commented 1 year ago

Alright, I put the data below. @marcrobledo @eUnisk

marcrobledo commented 1 year ago

Added a language selector in the new settings tab!

It only translates the item names for now. In a future, I'll try to make it so it translates the entire UI.

Thank you @tingod !

PD: I'm so sorry for not using your changes, but I wanted to leave it as easy as possible for people to contribute with translations.

tingod commented 1 year ago

It only translates the item names for now. In a future, I'll try to make it so it translates the entire UI. This is quite helpful and thank you for this!

PD: I'm so sorry for not using your changes, but I wanted to leave it as easy as possible for people to contribute with translations. Not a problem! I know my change is just for a temporary use, your solution is the best way as now. Thanks again!

marcrobledo commented 1 year ago

Basic UI localization is possible now!

Any HTML element with data-translate attribute can be translated by adding the respective string to your language file in locale/ folder.

Any PR with new translations will be welcome ^_^

eUnisk commented 1 year ago

I made a CSV file, to include all the data-translate strings (127 in total) from index.html, which should be handy for anyone doing the localization job.

I'll find some time to do the Chinese version little by little.

data-translation_table.csv

eUnisk commented 1 year ago

Basic UI localization is possible now!

Any HTML element with data-translate attribute can be translated by adding the respective string to your language file in locale/ folder.

Any PR with new translations will be welcome ^_^

I tried to edit zelda-totk.locale.zh.js, and add a few new lines like the one below but it doesn't work. The editor wouldn't load any translation at all. Everything is back to English.

I used the windows notebook to edit.

I got it, for property name with space, you need to use ""

Armors:'防具',
Bows:'弓箭',
Food:'料理',
Home:'主页',
Horses:'马匹',
"Key items":'重要物品',
"Master editor":'大师成就编辑器',
Materials:'材料',
Settings:'设置',
Shields:'盾',
Weapons:'武器',
"Zonai devices":'左纳乌装置',
marcrobledo commented 1 year ago

FYI, there has been a huge UI overhaul in a8585e4 and lots of strings have changed :-(

Also, if you search _( in the sourcecode, you will find more translatable texts!

marcrobledo commented 1 year ago

@eUnisk since there has been lots of modifications lately, I've decided to prepare the spanish translation file myself with all the translatable strings.

Hope this helps you to improve your chinese translation for the new version :-)

eUnisk commented 1 year ago

@eUnisk since there has been lots of modifications lately, I've decided to prepare the spanish translation file myself with all the translatable strings.

Hope this helps you to improve your chinese translation for the new version :-)

Hi, where can I find all the new translatable strings?

marcrobledo commented 1 year ago

Hi, where can I find all the new translatable strings?

https://github.com/marcrobledo/savegame-editors/blob/master/zelda-totk/locale/zelda-totk.locale.es.js

eUnisk commented 1 year ago

Oh, great and thanks!

On Mon, 10 July 2023, 2:31 am Marc Robledo, @.***> wrote:

Hi, where can I find all the new translatable strings?

https://github.com/marcrobledo/savegame-editors/blob/master/zelda-totk/locale/zelda-totk.locale.es.js

— Reply to this email directly, view it on GitHub https://github.com/marcrobledo/savegame-editors/issues/244#issuecomment-1627765875, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2D4V5JN73QMG7W5FYY3QBDXPLMFDANCNFSM6AAAAAAYOH5Y2Q . You are receiving this because you were mentioned.Message ID: @.***>