Opened 20 years ago

Closed 13 years ago

Last modified 5 years ago

#7350 closed feature request (fixed)

GUI: Add support for translation to other languages

Reported by: SF/simsaw Owned by: sev-
Priority: low Component: GUI
Version: Keywords:
Cc: Game:

Description

It would be really good if you could add a translation option for your ScummVM f.e. to German. I think of the following:

There are external translated files which can be used to have ScummVM in another language. To get this file there first has to be a created translation source which will be send to the translator. After finishing of the translation it will be send back and compiled to a translation file.

With the file setup.exe which should be added to ScummVM then the user can select a language. The language will be shown by the flag of the country and the word for that language in this language. For example:

(English/American flag) English (German flag) Deutsch (French flag) Français

Could this be added to ScummVM?

Ticket imported from: #887623. Ticket imported from: feature-requests/166.

Change History (15)

comment:1 by Kirben, 20 years ago

Summary: Translation of the ScummVM platformGUI: Add support for translation to other languages

comment:2 by SF/chomo, 20 years ago

could be

comment:3 by fingolfin, 18 years ago

Priority: normallow

comment:4 by fingolfin, 18 years ago

There are many tools out there that allow localizing software, e.g. gettext, but also many more (I investigated quite some at some point).

Of course that would also require adding lots of custom fonts, or maybe a truetype based font rendere (like Pentagram does), to allow rendering all those non-ASCII chars.

So, at least these things would have to be done: 1) New fonts / new font renderer 2) Load all text strings from a data file, possible with the help of some existing lib (like gettext) 3) Get people do good quality localizations (not everybody is capable of that, not even every native speaker) 4) Get people to actively maintain those localizations

Currently, though, I think it's of a rather low priority for us, I'd rather see us spend energy on some other areas... but if somebody is interested in researching this, feel free to do so (but make sure to *talk to the team* about it -- if you just submit a patch out of the blue, it is quite likely to be rejected)...

comment:5 by sev-, 18 years ago

Now we have proper Latin-1 fonts since 0.9.0. So localization could be really implemented.

I think, proper way would be to introduce some kind of .ini file which could be used as part of theme. And if you will need some non-Latin-1 glyphs like Cyrillic, you may put fonts for that encoding in your GUI theme pack.

What needs to be done is to go through GUI calls (not that difficult) and change calls to strings. gettext approach could be used, i.e. intead of

"Message" write _("Message")

or something like that, so you can use hash array to substitute your localization.

comment:6 by SF/simsaw, 18 years ago

That would be really good if somebody of your team would be so kind to implent it. My translation way I do for the moment is still to change the source code and then compile which I don't do often, because it takes so long and is uncomfortable. By that I think I remember that I had to change some length thing, too, so that I could avoid a bug with volume setting (wasn't able to set it to 0 if I didn't), but I can't quite remember... Maybe such modifications must be done with the translation file, too. Do you think it's likely that such an implentation will be added in near future?

comment:7 by SF/krischn, 18 years ago

This discussion looks kinda techy to me. Anyways, if some day you succeed in implementing this feature, you could be as kind as to tell me. My mother tongue is German, and I'm pretty sure I would be able to localize this to French as well. Just drop me a mail then. Btw, I'm studying to be a translator, doing localizations is part of this. I'm a PRO, understand ;-)

comment:8 by SF/saulob, 17 years ago

Ok, that would be nice.

Right now I translated ScummVM to my language (Portuguese-BR) and I edited 14 files for all the strings, I translated all the interface, all the help, all the credits. Everything.

Would be nice to have a simple file.

comment:9 by jvprat, 17 years ago

I've been doing a prototype based on the proposal written to -devel. I've separated it in 3 files just for readability. All three patches have to be applied in order to get it working.

translation-infrastructure.patch: It's what does the work. translation-marked-messages.patch: It marks several strings from the source code for translation translation-example-po.patch: It contains example translation files for catalan and spanish (just to test, not complete at all)

Since I couldn't attach anything to this report, I've posted them here: http://jvprat.com/tmp/scummvm-translation/

It's currently aiming at having a different font for each character set. If later there's a rework on the GUI to support unicode font rendering, the only change needed here would be to convert the po files to the desired character set.

As I said it's just a prototype to let you cast your opinions and rants about it. Here's the current status:

FEATURES: - can be disabled (no extra charge for small devices) - uses po2c to build a cpp file that contains the translations - no extra runtime dependencies - po files have to be coded in the character set of the GUI font - optional support for detecting locale language at runtime - optional support for converting messages to terminal character set (which can be different than the GUI one)

TODO: - add a GUI option to select the language in the misc tab - get a list of supported languages - change font when selecting a language (one can get the translation character set) - use configuration to use previously selected language ("" uses the system default) - mark all the translatable strings - change size of some GUI labels to let translations longer than the original

QUESTIONS: - which strings should be translated? All? Just the user-visible (excluding debugging and internal error ones)? - there are LOTS of debugging/internal error ones that will never be seen by the end user and will confuse translators

Please, let me know your opinions, both constructive and destructive ;) (if you prefer another approach)

comment:10 by sev-, 17 years ago

I recommend to open a separate patch tracker item and attach your patches there. Then provide that patch number in this feature request. That's usual practice.

comment:11 by fingolfin, 17 years ago

Yes, please follow Eugene's advice.

comment:12 by jvprat, 17 years ago

Ok, sorry. I've just posted it as patch #1739965.

comment:13 by sev-, 13 years ago

Yay, this has been implemented! Currently ScummVM has been translated into 15 languages.

comment:14 by sev-, 13 years ago

Owner: set to sev-
Resolution: fixed
Status: newclosed

comment:15 by digitall, 5 years ago

Component: GUI
Note: See TracTickets for help on using tickets.