Skip to content

Latest commit

 

History

History
62 lines (49 loc) · 2.97 KB

TRANSLATING.md

File metadata and controls

62 lines (49 loc) · 2.97 KB

Adding a new language

Adding a language can mean adding data in another language or adding translation files for UI translations. Both don't need to be present for a language.

Translators may add their name to translations/TRANSLATORS file to get credit for their work on the application's About page.

Please ask for further clarifications if something is not clear.

Adding data in new language

To add data in another language take a look at yaml files in assets directory. Wikipedia is of great help here as it usually contains list of sovereign states but be sure to double check on each country's page that the names are correct.

Start from data_en-GB.yaml by copying it to new name with the right language code and translate all country names (name and alt fields), capital cities and regions.

name field contains short name commonly used in the language and alt field may contain longer official name if it is different from the value in name field. capital field contains list of capital cities of the country. Do not add or remove them while translating.

other field is a bit special, it contains altenative names or spellings for the country in the language. This is good place to add former names of a country. other field is currently not used by the application but that will eventually change. other values can be added and remove as needed.

region field is continent or other region (Oceania) containing the country. In the end there should be six unique regions. Please stick to the region in the source file even if you disagree (e.g. in case of some transcontinental country). You can always file issue report if you find a mistake.

It is very important to leave iso field untouched as it contains country's ISO code used internally by the application.

Do not remove or add any other lines or list items than alt or other. If you find something wrong, please file an issue report. Note that different language Wikipedias may disagree on things like number of capital cities.

alt should be only specified if it differs from name. other list can be specified as needed and its length may vary. Feel free to add or remove them both for any country.

Finally add the language to assets/data.yaml. Put the name of the language (in the language) to name field, its ISO code to code and link to Wikipedia in that language to url. Hopefully there is Wikipedia written in the language and covering all of the countries in the world.

Once everything is ready please create a pull request or an issue report containing the new file and changes to data.yaml to add data in the new language.

Adding UI translations

Add the language to countryquiz.pro TRANSLATIONS variable and build the app once in Sailfish SDK. This should generate ts file for the language. Edit this file with Qt Linguist to add translations. Create a pull request or an issue report containing the new file to add the new language.