Jump to content

[tool] po file (tooltip, input, etc) utility for module localizations


uboats

Recommended Posts

Hi,

 

Recently, I wrote an app to extract all key text (tooltip, input, options, quickstart miz name, module introduction, weapons in coremods etc), and generate the po file for localizations.

 

NOTE: to make desired text able to be localized, all the key text (tooltip, input name, category, options, quickstart miz name, weapon names, introduction) must be bracketed by _()

 

Now, program is upgraded to GUI version!!!

 

v3.0: can parse device init lua

v2.6: add support of f-14 and mig-19

v2.5: fix bugs, add support for more modules

v2.4: add optionDb.lua analysis

v2.3: fixed training mission name/description extraction

v2.2: fixed bugs for input

v2.1: add training mission, and err log

v2.0: GUI ver

v1.10: add support for non A/C module

v1.09: add Macro_sequence.lua parser

v1.08: fix '\n' in key bug *important*

v1.07: add unitpayloads extraction without declaring in entry.lua or using _()

v1.06: add sorting (keys in same category (tooltip, input etc) are placed together in po); bug fix

v1.05: add support of module radio cmd, and all dcs comm radio cmds are ignored

v1.04: fixed a bug for searching input lua files

v1.03: now all common input keys will be ignored to avoid duplicated translation (save your time)

 

feature:

1. extract all desired text (for localization) and build po file [open by poedit.exe]
2. update existing po files without deleting already translated entries

 

usage:

1. put the exe under the root of desired module folder 
   (e.g. /Mods/aircraft/L-39C/po_extractor.exe)

2. [i]create po file[/i]:
 2.1 double click the exe file to open the GUI window, select desired entries
 2.2 click Run, and it will create a xxx.po file 
       for that module (xx is the updateid of the module)

3. [i]update po file[/i]:
 3.1 after receiving po files with keys translated from translators, put those po file 
      under the root of that module folder (where the exe file exists)
 3.2 run the exe. If key names are modified (changed, deleted, added), 
      then the po will be updated accordingly 
      (delete, add, keep existing translated keys(if key name not changed) )

 

Look forward to the localization not only for ED's modules, but also community modules

 

1. To translate, you need poedit to open po file

2. after translation, compile to po to mo file, and move it to 'XXX/l10n/LC/LC_MESSAGES/' and rename it 'messages.mo'. Replace /LC/ by any locale (en, ru, de, fr, es, cn, it, cs), e.g. xxx/l10n/ru/LC_MESSAGES/

3. guarantee that the locale in Config/lang.cfg is same as LC of the path.

 

P.S: if no po file created, please run it as admin or run it under CMD

 

download

 

:):):):):)

 

1.jpg

2.png


Edited by uboats

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...
  • 5 months later...
  • 2 years later...
  • 5 months later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...