Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Translations

Methods about the translations of the open packs.

translations.pack

Returns the whole translation of an open pack to a language, as the translator works with it.

Meant for clients editing whole translations. Others should use translations.list.

Params (GetPackTranslation)

NameTypeRequiredDescription
packstringyesKey of the pack.
source_languagestringyesLanguage code of the source texts, like en.
languagestringyesLanguage code of the translation, like es.

Result (PackTranslation)

One of RPFM’s own types, without a schema. See its docs in rpfm_lib or rpfm_extensions.

translations.submit

Submits the saved translation of a pack to the Translation Hub, opening or updating a pull request.

Params (SubmitTranslation)

NameTypeRequiredDescription
pack_namestringyesName of the pack the translation is for.
source_languagestringyesLanguage code of the source texts, like en.
languagestringyesLanguage code of the translation, like es.

Result (TranslationSubmission)

One of:

  • { "status": "submitted", "created": …, "url": … }: The translation was submitted.
    • created (boolean, yes): If a new pull request was opened. false means an open one was updated.
    • url (string, yes): Web page of the pull request.
  • { "status": "sign_in_required" }: The user has to sign in to GitHub first, because they never did or GitHub rejected their sign-in.

translations.list

Returns the translation of the texts of an open pack to a language.

Texts already translated in the vanilla game, or in previous translations of the pack, come translated.

Params (ListTranslations)

NameTypeRequiredDescription
packstringyesKey of the pack.
source_languagestringno, default "EN"Language the texts of the pack are written in, like EN.
languagestringyesLanguage to translate the texts to, like ES or DE.
filterTranslationFilterno, default "all"Which entries to return.
offsetintegerno, default 0Amount of matching entries to skip.
limitinteger or nullnoMaximum amount of entries to return. Defaults to 200.

Result (Translations)

NameTypeRequiredDescription
entriesarray of TranslationEntryyesThe entries in the page, sorted by key.
totalintegeryesAmount of entries matching the request, in all pages.

translations.generate_vanilla

Generates the vanilla texts of a language from the game’s locale packs, so translations to and from it can reuse them.

Params (GenerateVanillaTexts)

NameTypeRequiredDescription
languagestringyesLanguage of the texts to generate, like EN.

Result (VanillaTextsAvailable)

NameTypeRequiredDescription
availablebooleanyesIf they’re available, generated now or before.

Types

Type TranslationEntry

The translation of a text.

NameTypeRequiredDescription
keystringyesLoc key of the text.
sourcestringyesText in the source language.
translationstringyesText in the target language. Empty if it’s not translated yet.
needs_retranslationbooleanyesIf the source text changed since it was translated.
automaticbooleanyesIf the translation was made automatically, and still needs a review.
removedbooleanyesIf the text no longer exists in the pack.

Type TranslationFilter

Which translation entries to return.

One of:

  • "all": All of them.
  • "untranslated": Entries without a translation.
  • "needs_review": Entries whose source text changed since they were translated, or that were translated automatically.