AncientBeast icon indicating copy to clipboard operation
AncientBeast copied to clipboard

game translations

Open DreadKnight opened this issue 9 years ago • 17 comments

Game and/or website could be translated by community at some point into several popular languages. This tool could probably be used https://poeditor.com - as it's free for approved open source projects.

Here's how GameJolt handles poeditor string translations within their own GitHub repository https://github.com/gamejolt/translations/tree/18d747de8c732f43301d84c03f62c51cc75b3c84


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

DreadKnight avatar Mar 30 '16 14:03 DreadKnight

Seems Gnome-Shell does things in a very similar way https://github.com/GNOME/gnome-shell/tree/master/po

DreadKnight avatar Mar 31 '16 10:03 DreadKnight

The main issue with translations is that I have a tendency to use twitter like descriptions for unit abilities and such, so translating stuff which change the length of strings, not fitting within cards anymore.

An idea would be to not translate the text displayed initially within the cards themselves, but only show translations on the A card when an ability from the B card is hovered/clicked, this way it will be easier for people not speaking the same language to play the game on the same machine (playing with random strangers); when it comes to the ability tooltips displayed in-game on hover for the active unit, those could easily include translations. The issue regarding ability details in the same card area should be kept in mind when implementing this, #864.

DreadKnight avatar Mar 31 '16 10:03 DreadKnight

Since TBS games are quite popular with russians, this guy might be helpful https://www.reddit.com/r/INAT/comments/510sm2/unpaidpaid_russian_translation_looks_for_a_game/

DreadKnight avatar Sep 04 '16 05:09 DreadKnight

https://www.reddit.com/r/INAT/comments/5ahzun/will_translate_your_game_into_russian_for_free/

DreadKnight avatar Nov 06 '16 09:11 DreadKnight

A solution for the pipeline workflow would be using this tool at it supports po files and git integration https://weblate.org

DreadKnight avatar Nov 10 '17 15:11 DreadKnight

Another translation platform that offers free licences for open source projects is https://crowdin.com

DreadKnight avatar Nov 21 '17 14:11 DreadKnight

This phaser plugin could be used if it actually brings important things to the table https://github.com/orange-games/phaser-i18next

DreadKnight avatar Nov 24 '17 01:11 DreadKnight

http://rasmusrasmussen.com/2017/10/06/how-to-translate-a-game-13-the-process http://rasmusrasmussen.com/2017/10/13/how-to-translate-a-game-23-preparation-and-tools http://rasmusrasmussen.com/2017/10/30/how-to-translate-a-game-33-gamemaker-studio-2-example

DreadKnight avatar Dec 03 '17 00:12 DreadKnight

I could help with the translations and can recommend crowdin or weblate.

ghost avatar Oct 13 '18 13:10 ghost

@jony0008 It will take a while for translations to happen probably. Thanks for the recommendations, will look into them when the time comes. Which languages you would be able to help with btw?

DreadKnight avatar Oct 13 '18 21:10 DreadKnight

@DreadKnight I see. I can help with the Swedish translation.

ghost avatar Oct 14 '18 05:10 ghost

@jony0008 That's cool. Good news: more people showed up recently with interest in translating (into Spanish) so I'll get things going with the workflow for this.

DreadKnight avatar Oct 23 '18 08:10 DreadKnight

@jony0008 this is now closer on the roadmap, I've added the ids for the pre-match menu, feel free to translate https://github.com/FreezingMoon/AncientBeast/blob/master/assets/translations/en/pre-match.json

DreadKnight avatar Oct 31 '18 17:10 DreadKnight

Is this still open? I saw this in the code:

// TODO: Move strings to external file in order to be able to support translations

FWIW, one handy way to handle translations in code is to leave user-facing strings in place, but wrap them in a function, often t("string to translate") or tr("string to translate"). The function returns the translation in the user's language if one exists. Otherwise it returns the original string.

It tends to be a lot handier than the equivalent: translations.[user.language].greetingString;

It lets programmers make new strings without a lot of fuss, as they simply type the primary language string out in the code.

And if you want to get all the t() strings to put in a spreadsheet for translators, it'd be pretty easy to write a regex to find them.

andretchen0 avatar Mar 25 '23 05:03 andretchen0

Is this still open? I saw this in the code:

// TODO: Move strings to external file in order to be able to support translations

FWIW, one handy way to handle translations in code is to leave user-facing strings in place, but wrap them in a function, often t("string to translate") or tr("string to translate"). The function returns the translation in the user's language if one exists. Otherwise it returns the original string.

It tends to be a lot handier than the equivalent: translations.[user.language].greetingString;

It lets programmers make new strings without a lot of fuss, as they simply type the primary language string out in the code.

And if you want to get all the t() strings to put in a spreadsheet for translators, it'd be pretty easy to write a regex to find them.

Indeed, I'm aware; there are probably already npm packages out there to create a task to scan code in order to generate a dictionary type of list that would serve as a template to be forked and translated in any language.

What I also liked about this approach is that besides avoiding a lot of the fuss of separating strings, it could way easier avoid having orphaned entries in the translation files, so in case the code gets removed, the string would be as well.

Only issue I see is if tweaking an already translated string a bit, but I think the advanced online editors dealt with this type of stuff rather nicely.

DreadKnight avatar Mar 25 '23 11:03 DreadKnight

Even with a suitable package or a regex, stuff like this would probably need to be included in the nodejs game building functions nicely, like scan for new strings, changes or removals and the template could probably mark new/changed as well. Might have to take a peek and see if .po template/translation files have support for string statuses (another string status would be translated/completed).

Edit: seems po files don't include status, translation services do that sort of thing on their own using databases and such.

DreadKnight avatar Mar 25 '23 11:03 DreadKnight

A problematic thing for the UI is that I've been very tweeterish about the ability stuff on the cards (I have OCDs), those might be displayed in English and have some translation balloons displayed on click/hover (on top of the artwork card).

DreadKnight avatar Mar 25 '23 12:03 DreadKnight