[ scummvm-Patches-3044975 ] Use data file for translations

SourceForge.net noreply at sourceforge.net
Sat Aug 14 18:45:25 CEST 2010


Patches item #3044975, was opened at 2010-08-14 16:45
Message generated for change (Tracker Item Submitted) made by criezy
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=3044975&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thierry Crozat (criezy)
Assigned to: Thierry Crozat (criezy)
Summary: Use data file for translations

Initial Comment:
To avoid using memory for all the existing translations the attached patches replace the static arrays generated by po2c by a translations.dat file. The TranslationManager instance loads the list of language from the translations.dat file when it is constructed. Then when a language is set it loads the translation for that language from the same file.

I have split the changes in two patches:
+ translations_dat_tool.diff adds a create_translations tool that generate the translations.dat file.
+ translations_dat.diff modifies the TranslationManager in ScummVM

Currently it still uses po2c so that I didn't have to implement the po file parser in the create_translations tool. That means that to update the translations we still need perl and we need to recompile the create_translations tool. To ease the test of translations I would like to get read of po2c altogether and implement the po files parsing directly in the create_translations tool. I have kept that for later though as I don't think it is critical.

To generate translations.dat, just execute 'make update-translations' (as before except that now we do not need to recompile ScummVM afterward). The file is generated in gui/themes/

I didn't include gui/themes/translations.dat in the patches, but it should also be committed to the repository.

I am adding the patches there so that I can get some feedback before committing.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=3044975&group_id=37116




More information about the Scummvm-tracker mailing list