Skip to content

Translating

github-actions[bot] edited this page Nov 29, 2026 · 2 revisions

Translating

Italiano: Tradurre

Azeroth Threatwarden speaks English and Italian. A new language is one file and one line: no code to change. It may be partial: whatever it lacks shows in English. This page is about the texts of the addon; this manual stays in English and Italian.

New in v0.8.0: adding a language this way is checked offline only, not verified in the game. Up to v0.7.0 a new language also needed a change in the code.

Where the texts are

In AzerothThreatwarden/Locales/: one file for each language, named after the game's language code (deDE, frFR, esES, ptBR…). enUS.lua is the base; every other file translates its keys.

Adding a language

  1. Copy enUS.lua to <code>.lua, for example deDE.lua.
  2. In the first line of the table, write your code: ns.Locale.Register("deDE", {.
  3. Set LANGUAGE_NAME to the name of your language in your language ("Deutsch"): the Language card shows it.
  4. Translate the texts between the quotes. Keep the keys on the left as they are, one KEY = "text", per line. Delete the lines you do not translate: they show in English and keep following it when it changes.
  5. In AzerothThreatwarden/AzerothThreatwarden.toc, add Locales\deDE.lua right after the other lines of Locales\.

Optionally, add ## Notes-deDE: … to the same file: the description in the game's list of addons.

Rules for the texts

  • Placeholders (%s, %d, %.1f, %%) are filled with names and numbers. Keep the same ones, in the same order as in English, and write a percent sign as the English line does. If your grammar needs another order, rephrase the sentence.
  • No colour or picture codes (|c, |r, |T), no empty text, no space at either end, and only keys that exist in English.
  • Tone: clear, short, with a light fantasy voice, not too technical. Say only what the addon knows: a prediction stays may and about, never will; an unknown value is unknown.
  • The Coach and the alerts (keys starting with COACH_ and ALERT_): never name a class, an ability, a spell, an item or a stance, never give a cause, never blame anyone, never ask to write to others. The one advice about spells is the generic lower ranks, without a number; a tank is never told to stop or ease off. The Coach's messages should stay short (about 60 characters).
  • Words of the game: write them as the game does in your language. Threat and Aggro may stay in English if your players say them so.
  • Short places: the state words, the three tabs of the small window (Monitor, Reports, Settings) and the small marks (keys starting with MARK_) must stay short; the tests say which one does not fit.

Checking your file

With Python, from the folder of the repository:

python -I -X utf8 tools/check_addon.py
python -m pip install --user lupa==2.8
python -X utf8 Tests/run_tests.py test_locales
python -X utf8 Tests/run_tests.py test_ui_texts
python -X utf8 Tests/run_tests.py test_coach_wording

check_addon.py refuses unknown keys, wrong placeholders, colour codes, empty texts, a missing LANGUAGE_NAME and a wrong place in the TOC; the missing keys are only counted, as a warning. The tests check that the short words fit and the rules of the Coach that a program can check (English class and ability names, numbers). The rest is read by a person: if your language has its own class and ability names, say so in the pull request so they join the test's list.

Trying it in the game

Copy the addon folder into Interface/AddOns and start the game (a new file needs a restart; later changes need only /reload). A client in your language uses it by itself; otherwise choose it in Settings → Language and press Reload now. Walk through the window, the settings and a demo fight, and look for text that is cut.

Limit: the addon has not been tried with alphabets other than Latin. Its own fonts may lack their letters; the setting Font → Game font may help. Say in the pull request what you saw.

Sending it

Open a pull request on GitHub with your file and the TOC line. Sign off your commits (git commit -s, the Developer Certificate of Origin); your work is released under the GNU GPL v3.0. Put no personal data in the files or the pull request. See CONTRIBUTING.

Clone this wiki locally