relman CLI: Translations
← Back to the relman CLI command overview
Translations
list translationstack <org-token> <pg-token> <project-token> (aliases: translationstacks, ts, tstack, tstacks)
Fetches the id, name, Maven-binding flag and keyword/image-key/locale counts of every translation stack belonging to the project identified by <project-token>.
describe translationstack <org-token> <pg-token> <project-token> <stack-token> (aliases: translationstacks, ts, tstack, tstacks)
Fetches and prints the detailed configuration of the translation stack identified by <stack-token>, including its attached locales – the exact format add translationtext expects for <locale>.
add translationtext <org-token> <pg-token> <project-token> <stack-token> <locale> <keyword> <text> [<translate>] (aliases: translationstacktext, transl)
Adds a new translation keyword to the translation stack identified by <stack-token>. <keyword> is the stack-unique identifier stored on the new keyword; <text> is its first value, in <locale> (format <language ISO 639 code>-<country ISO 3166 code>, e.g. en-US – see describe translationstack‘s own “locales” field for the exact format in use).
<translate> is true/false and defaults to true if omitted: if true, <locale> must already be attached to the stack, and – if the stack has an auto-translate service configured – the service is asked to translate <text> into the stack’s other locales; if false, <locale> is attached to the stack if it wasn’t already, and no translation is triggered.
Examples
1. Listing a project’s translation stacks
Global flags omitted below – see Utility & global flags.
$ relman list translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn
- id: ts-Bq72Nf
name: shop-frontend
mavenBound: true
keywordCount: 312
imageKeyCount: 4
localeCount: 5
Edge case: mavenBound: true means this stack is regenerated into a Maven-published jar on the live server – editing it here changes the database immediately, but the deployed translation text only catches up the next time that jar is rebuilt server-side.
2. Checking a stack’s locales before adding text
$ relman describe translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf
name: shop-frontend
locales:
- en-US
- de-DE
- fr-FR
Edge case: the locale format is exactly <language ISO 639>-<country ISO 3166> – en or en_US are both rejected, it must be en-US with a hyphen.
3. Adding a translation – with and without auto-translate
$ relman add translationtext o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf en-US checkout.title "Checkout"
id: tk-Xr93Pq
Edge case: <translate> defaults to true when omitted, as above – which requires en-US to already be an attached locale (it was, per step 2) and, if the stack has an auto-translate service configured, immediately queues machine translations of “Checkout” into de-DE/fr-FR. Passing false instead skips all of that and, as a side effect, attaches <locale> to the stack if it wasn’t already attached – useful for a brand-new locale that describe translationstack doesn’t list yet.