Repository navigation
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 tov0.7.0a new language also needed a change in the code.
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.
- Copy
enUS.luato<code>.lua, for exampledeDE.lua. - In the first line of the table, write your code:
ns.Locale.Register("deDE", {. - Set
LANGUAGE_NAMEto the name of your language in your language ("Deutsch"): the Language card shows it. - 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. - In
AzerothThreatwarden/AzerothThreatwarden.toc, addLocales\deDE.luaright after the other lines ofLocales\.
Optionally, add ## Notes-deDE: … to the same file: the description in the game's list of addons.
-
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_andALERT_): 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.
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.
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.
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.
Azeroth Threatwarden · fan-made addon for World of Warcraft: Forever, not affiliated with Blizzard Entertainment · addon fatto dai fan, non affiliato a Blizzard Entertainment · Repository · Feedback