Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically decide which translations are finished #9019

merged 2 commits into from Apr 22, 2021


Copy link

@frosch123 frosch123 commented Apr 11, 2021

Motivation / Problem

Currently OpenTTD distinguishes finished and unfinished translations by putting the translation files into different folders.

  • Moving languages from one category to the other is a big hassle. (esp. in coordination with eints)
  • Unfinished languages are not compiled, and not part of the nightly or any releases.
  • There is no easy way for translators to test unfinished languages.


The manual sorting into "finished" and "unfinished" is dropped.

  • All languages are compiled.
  • The language selection dropdown displays a completion percentage for each language (not shown for mostly complete languages, with less than missing_strings_threshold missing strings)
  • A language is automatically treated as "unfinished", if the translation is less than 75% complete. (quite a low threshold actually)
    • Unfinished languages are never auto-picked by OpenTTD, even if they match the locale.
    • In release builds, unfinished languages are not offered in the Game Options.
    • In nightly builds, all languages are offered in Game Options.
    • In both release and nightly builds, unfinished translations can be used by editing openttd.cfg


  • After this PR, all files from /src/lang/unfinished should be moved to /src/lang. But since this requires coordination with eints (for the last time), it is not part of this PR.
  • I considered not building and bundling unfinished translations for release builds, but this seems to lead to build-dependency hell: suddenly the strgen run depends on findversion, so translations are built on every run.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')
Copy link

@LordAro LordAro commented Apr 11, 2021

Does this change which translations are considered "incomplete" at all?

Copy link
Member Author

@frosch123 frosch123 commented Apr 11, 2021

From the languages, that are currently considered "unfinished":

  • Frisian will make it to "finished" with 82%. (after all files from /src/lang/unfinished are moved to /src/lang, see "limitations")
  • Persian is very close at 73%.

Of the languages, that are currently considered "finished", all remain as "finished", but some are close to drop out:

  • Esperanto: 78%
  • Faroese: 81%
  • Malay: 84%
  • Icelandic: 86%
  • Tamil: 87%
  • All other languages are at ≥90% completion.

src/settings_gui.cpp Show resolved Hide resolved
src/settings_gui.cpp Outdated Show resolved Hide resolved
src/strings.cpp Outdated Show resolved Hide resolved
@frosch123 frosch123 force-pushed the unfinishedlangs2 branch from 83a702e to 924b0dd Apr 17, 2021
frosch123 added 2 commits Apr 17, 2021
Unfinished translations are not auto-picked from the locale.
In release builds, unfinished translations are not offered in the GUI.
Unfinished translations are available in non-release builds, or by editing openttd.cfg.
@frosch123 frosch123 force-pushed the unfinishedlangs2 branch from 924b0dd to 48cedb7 Apr 17, 2021
@frosch123 frosch123 merged commit 37222c3 into OpenTTD:master Apr 22, 2021
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants