Scenario translation
From Unknown Horizons - Wiki
Create yaml file
This article explains how to build translated scenario files. It assumes you use a git clone of UH. All paths are, unless specified otherwise, relative to this clone's master directory. You might need to replace python2 calls by python2.6 or python2.7.
- Input
- one or more .po files that contain translation strings of a particular scenario
- Output
- Files in
content/scenarios/ that can be started via GUI and command line
- Download all tutorial .po files you wish to test from our tutorial project at pootle.
- Create a new directory
tutdir/ in your UH main directory (where
development/ is located) and move all these .po files in there.
- In the main UH directory (where
development/ is located) run Please note these three things:user@pc: unknown-horizons$sh development/create_scenario_pot.sh tutorial tutdir/
- This should create the files
tutorial_fi.yaml,
tutorial_gd.yaml and
tutorial_hu.yaml in
unknown-horizons/content/scenarios/. Start these via our GUI or using the command line flag user@pc: unknown-horizons$python2 ./run_uh.py --start-scenario tutorial_gd
- Now you can check if all headings and message bodies fit the logbook space (some headings most likely won't).
- Important: You can edit the yaml files on the fly, but not modify logbook entries after they have been written. To check this, please continue reading.
Preview translated strings
This article explains how to build translated scenario files. It assumes you use a git clone of UH. All paths are, unless specified otherwise, relative to this clone's master directory.
- Input
- translated .yaml scenario files that contain strings you want to check
- Output
- A logbook widget that allows you to browse all entries and modify the yaml.
- In the main UH directory (where
run_uh.py is located) run after you compiled the scenario files according to the above.user@pc: unknown-horizons$python2 ./run_uh.py --string-previewer- Select the scenario you want to check. Close the logbook and click on load/reload after editing.
- Browse through the pages and look for headings that are too wide or entries too verbose.
- Fix them in the yaml file (which will look ugly) to test and fix in pootle when you're satisfied.