Data:WikiTranslations

From Heroes of Might and Magic: Olden Era Official Wiki
Revision as of 16:15, 27 May 2026 by Aurelain (talk | contribs) (Switched to WikiTranslation)


Across the wiki, various templates such as infoboxes are used to programmatically query the Help:Cargo database for game data. These infoboxes are set up to automatically translate their contents into various languages, but at times there are terms which have not been translated in the game files (or more specifically, have not been translated in a manner which isolates the term to itself rather than as part of a grammatical sentence). In addition, there occasionally exist terms which are not game concepts which need to be presented, such as "internal ID".

This article and its children are the solution to that translation issue. Each of these sub-pages defines


Schema

Each individual term which needs to be translated has its own invocation of the Template:TranslationDef template. This template is normally used throughout the Help:ObeliskBot data import process to store all sorts of game terms (over 75,000 individual translations), but we can also use it here.

Each translated term will look like this:

{{WikiTranslation
| subtype = hero_infobox
| target_id = wiki_hero_class
| en = Hero Class
| name = Klasa
}}
  • The type should always be "wiki", to distinguish it from game terms.
  • The subtype should indicate which page uses this term. If it shows up on more than 1 page, this should be the word common to indicate it is used elsewhere.
  • The target_id is a unique identifier for this term and should always start with the prefix "wiki_" to ensure it does not collide with official game terms. This is the key used to look up this term and should not be changed.
  • en is a comment that tells people what the translation means in English.
  • name is, finally, the actual translation for the term

Note that the language is auto-detected based on the page address.


Updating

Each language page is essentially a repository of these entries, but we do not expect anyone to manually manage all of them! Whenever a new set of terms needs to be injected into each subpage, use Template:AddWikiTranslations to do so:

{{subst:AddWikiTranslations|lang=pl}}

Copy-paste that into each subpage and save (not preview) the article, and the new entries will be ready to edit.


New Languages

When new language wikis come online, this procedure can also be used to quickly set up new languages, in this case using Template:NewWikiTranslations:

{{subst:AddWikiTranslations|lang=pl}}
  1. Create a page Data:WikiTranslations/xx, replacing xx with the language code.
  2. Add a link to that page or {{loc}} at the top of this page.
  3. Add the following to that page: {{subst:NewWikiTranslations|lang=xx}}, replacing xx with the language code.
  4. Save the article.
  5. Edit the article and replace the English placeholders after | name = with the translations in that language.