Enterprise Software Development System

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.

← Zurück zur Übersicht über die relman-CLI-Befehle

Übersetzungen

Übersetzungsstapel auflisten (Aliase: translationstacks, ts, tstack, tstacks)

Ruft die ID, den Namen, das Maven-Binding-Flag sowie die Anzahl der Schlüsselwörter, Bildschlüssel und Sprachvarianten für jeden Übersetzungsstapel ab, der zu dem durch .

Beschreibung des Übersetzungsstapels (Aliase: translationstacks, ts, tstack, tstacks)

Ruft die detaillierte Konfiguration des durch identifiziert wird, einschließlich der zugehörigen Sprachumgebungen – das genaue Format „add translationtext“ erwartet für .

add translationtext [] (Aliase: translationstacktext, transl)

Fügt dem Übersetzungsstapel ein neues Übersetzungsschlüsselwort hinzu, das durch . ist die stapelspezifische Kennung, die für das neue Schlüsselwort gespeichert wird; ist dessen erster Wert im (Format -, z. B. en-US – siehe Beschreibung des Übersetzungsstapelseigenes Feld „locales“ für das genau verwendete Format).

lautet wahr/false und ist standardmäßig auf true , wenn dieser Parameter weggelassen wird: Wenn true, muss bereits an den Stack angehängt sein, und – sofern für den Stack ein automatischer Übersetzungsdienst konfiguriert ist – wird der Dienst aufgefordert, in die anderen Sprachversionen des Stacks; wenn false, wird dem Stack hinzugefügt, sofern dies noch nicht geschehen ist, und es wird keine Übersetzung ausgelöst.

Beispiele

1. Auflisten der Übersetzungsstacks eines Projekts

Globale Flags werden im Folgenden weggelassen – siehe Dienstprogramme und globale Flags.

$ relman list translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn
- ID: ts-Bq72Nf
Name: shop-frontend
mavenBound: true
keywordCount: 312
Anzahl der Bildschlüssel: 4
Anzahl der Sprachversionen: 5

Grenzfall: mavenBound: true bedeutet, dass dieser Stack auf dem Live-Server in eine von Maven veröffentlichte JAR-Datei umgewandelt wird – eine Bearbeitung hier führt zu einer sofortigen Änderung in der Datenbank, doch der bereitgestellte Übersetzungstext wird erst beim nächsten serverseitigen Neuaufbau dieser JAR-Datei aktualisiert.

2. Überprüfen der Locales eines Stacks vor dem Hinzufügen von Text

$ relman describe translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf
name: shop-frontend
Ländereinstellungen:
- en-US
- de-DE
- fr-FR

Sonderfall: Das Format der Sprachumgebung lautet genau -en oder en_US werden beide abgelehnt; es muss en-US mit Bindestrich lauten.

3. Hinzufügen einer Übersetzung – mit und ohne automatische Übersetzung

$ relman add translationtext o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf en-US checkout.title „Checkout“
id: tk-Xr93Pq

Sonderfall: Standardmäßig ist true , wenn sie wie oben weggelassen wird – was en-US bereits als Locale zugewiesen sein muss (was gemäß Schritt 2 der Fall war) und, sofern für den Stack ein automatischer Übersetzungsdienst konfiguriert ist, sofort maschinelle Übersetzungen von „Checkout“ in de-DE/fr-FR. Durch die Übergabe von false wird all dies hingegen übersprungen, und als Nebeneffekt wird an den Stapel, falls dies noch nicht geschehen ist – nützlich für eine brandneue Locale, die in „translationstack“ noch nicht aufgeführt ist.

← Retour à la présentation des commandes de l’interface en ligne de commande relman

Traductions

liste translationstack (alias : piles de traduction, ts, tstack, tstacks)

Récupère l’identifiant, le nom, l’indicateur de liaison Maven et le nombre de mots-clés, de clés d’image et de paramètres régionaux pour chaque pile de traduction appartenant au projet identifié par .

décrire une pile de traduction (alias : translationstacks, ts, tstack, tstacks)

Récupère et affiche la configuration détaillée de la pile de traduction identifiée par , y compris les locales qui y sont associées — le format exact ajoute un texte de traduction attend pour .

add translationtext [] (alias : texte de la pile de traduction, transl)

Ajoute un nouveau mot-clé de traduction à la pile de traduction identifiée par . est l’identifiant unique de la pile stocké pour le nouveau mot-clé ; est sa première valeur, au format (format -, par exemple en-US – voir la description du champ « locales »pour connaître le format exact utilisé).

est vrai/faux et sa valeur par défaut est vrai si elle est omise : si vrai, doit déjà être associé à la pile, et — si un service de traduction automatique est configuré pour cette pile — ce service est chargé de traduire vers les autres locales de la pile ; si faux, est ajouté à la pile s’il n’y figurait pas déjà, et aucune traduction n’est déclenchée.

Exemples

1. Affichage des piles de traduction d’un projet

Les indicateurs globaux sont omis ci-dessous — voir Utilitaires et indicateurs globaux.

$ relman list translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn
- id : ts-Bq72Nf
nom : shop-frontend
mavenBound : true
nombre de mots-clés : 312
nombre de clés d'image : 4
nombre de paramètres régionaux : 5

Cas particulier : mavenBound : true signifie que cette pile est régénérée en un fichier JAR publié par Maven sur le serveur de production : toute modification effectuée ici met immédiatement à jour la base de données, mais le texte traduit déployé ne sera mis à jour qu’à la prochaine régénération de ce fichier JAR côté serveur.

2. Vérification des locales d’une pile avant d’ajouter du texte

$ relman describe translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf
nom : shop-frontend
locales :
- en-US
- de-DE
- fr-FR

Cas particulier : le format de la locale est exactement -en ou en_US sont tous deux rejetés ; il doit s’agir de en-US avec un trait d’union.

3. Ajouter une traduction – avec et sans traduction automatique

$ relman add translationtext o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf en-US checkout.title "Checkout"
id : tk-Xr93Pq

Cas particulier : La valeur par défaut est « true » lorsqu’il est omis, comme ci-dessus — ce qui nécessite en-US soit déjà une locale associée (ce qui était le cas, conformément à l’étape 2) et, si la pile dispose d’un service de traduction automatique configuré, met immédiatement en file d’attente les traductions automatiques de « Checkout » vers de-DE/fr-FR. En transmettant false permet d’ignorer toutes ces étapes et, par effet secondaire, d’associer à la pile s’il n’y était pas déjà, ce qui est utile pour une toute nouvelle locale que n’est pas encore répertoriée dans translationstack ne figure pas encore.

← Volver al resumen de comandos de la CLI de relman

Traducciones

list translationstack (alias: pilas de traducción, ts, tstack, tstacks)

Obtiene el identificador, el nombre, el indicador de enlace con Maven y el recuento de palabras clave, claves de imagen y configuraciones regionales de cada pila de traducción perteneciente al proyecto identificado por .

describir pila de traducción (alias: translationstacks, ts, tstack, tstacks)

Recupera y muestra la configuración detallada de la pila de traducción identificada por , incluidas las configuraciones regionales asociadas; el formato exacto añadir texto de traducción que se espera para .

add translationtext [] (alias: textopila de traducción, transl)

Añade una nueva palabra clave de traducción a la pila de traducción identificada por . es el identificador único de la pila almacenado en la nueva palabra clave; es su primer valor, en (formato -, p. ej., en-US —véase la descripción del campo «locales»en su propio campo «locales» para conocer el formato exacto que se utiliza).

es verdadero/false y su valor por defecto es verdadero si se omite: si verdadero, ya debe estar vinculado a la pila y —si la pila tiene configurado un servicio de traducción automática— se solicita a dicho servicio que traduzca a las demás configuraciones regionales de la pila; si falso, se añade a la pila si aún no lo estaba, y no se activa ninguna traducción.

Ejemplos

1. Listado de las pilas de traducción de un proyecto

A continuación se omiten los indicadores globales; véase Utilidades y indicadores globales.

$ relman list translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn
- id: ts-Bq72Nf
nombre: shop-frontend
mavenBound: true
recuento de palabras clave: 312
recuento de claves de imagen: 4
número de configuraciones regionales: 5

Caso límite: mavenBound: true significa que esta pila se regenera en un archivo JAR publicado por Maven en el servidor en producción; al editarla aquí, la base de datos se actualiza de inmediato, pero el texto de traducción implementado solo se actualizará la próxima vez que se vuelva a compilar dicho archivo JAR en el servidor.

2. Comprobación de las configuraciones regionales de una pila antes de añadir texto

$ relman describe translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf
nombre: shop-frontend
configuraciones regionales:
- en-US
- de-DE
- fr-FR

Caso especial: el formato de la configuración regional es exactamente -en o en_US se rechazan ambos; debe ser en-US con un guión.

3. Añadir una traducción: con y sin traducción automática

$ relman add translationtext o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf en-US checkout.title «Checkout»
id: tk-Xr93Pq

Caso especial: El valor predeterminado es «true» si se omite, como en el ejemplo anterior, lo que requiere que «en-US» ya esté configurada como configuración regional (lo estaba, según el paso 2) y, si la pila tiene configurado un servicio de traducción automática, pone inmediatamente en cola las traducciones automáticas de «Checkout» a de-DE/fr-FR. Al pasar false , en cambio, omite todo ese proceso y, como efecto secundario, asocia a la pila si aún no estaba adjunto, lo cual resulta útil para una configuración regional completamente nueva que traducciónstack aún no figure en su lista.

← 返回 relman CLI 命令概述

翻译

列出 translationstack (别名: translationstacks, ts, tstack, tstacks)

获取属于由 .

描述 translationstack (别名: translationstacks, ts, tstack, tstacks)

检索并打印由 标识的翻译堆栈的详细配置,包括其关联的语言环境——确切的格式 添加翻译文本 所期望的 .

add translationtext [] 所期望的精确格式(别名: translationstacktext, transl)

向由 . 是存储在新关键字上的栈唯一标识符; 是其第一个值,格式为 (格式 -,例如 en-US ——参见 translationstack的描述自身“locales”字段以了解确切的格式)。

true/false ,默认值为 true :若省略则默认值为 true, 必须已附加到堆栈上,并且——如果堆栈已配置自动翻译服务——则会请求该服务将 该文本,将其翻译为该堆栈中的其他语言环境;若为 false, 将该项附加到堆栈(如果尚未附加),且不会触发任何翻译。

示例

1. 列出项目的翻译堆栈

下文省略了全局标志——请参阅 实用工具与全局标志.

$ relman list translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn
- id: ts-Bq72Nf
名称:shop-frontend
mavenBound: true
关键词数量: 312
imageKeyCount: 4
语言环境数: 5

边界情况: mavenBound: true 表示该翻译堆栈将在生产服务器上重新生成为 Maven 发布的 JAR 文件——在此处编辑会立即更改数据库,但已部署的翻译文本仅会在下次服务器端重建该 JAR 文件时同步更新。

2. 在添加文本前检查翻译堆栈的语言环境

$ relman describe translationstack o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf
名称:shop-frontend
语言环境:
- en-US
- de-DE
- fr-FR

边界情况: 区域设置格式恰好是 -enen_US 均被拒绝,必须是 en-US ,且必须包含连字符。

3. 添加翻译——使用和不使用自动翻译

$ relman add translationtext o-4kNc8Q pg-8mZ2Lx p-Qv73Tn ts-Bq72Nf en-US checkout.title "Checkout"
id: tk-Xr93Pq

边界情况: 默认值为 true (如上所述),这需要 en-US 必须已经是已关联的区域设置(根据步骤2,它确实已关联),并且如果堆栈中配置了自动翻译服务,则会立即将“Checkout”的机器翻译任务加入队列,目标语言为 de-DE/fr-FR的机器翻译。传递 false 则会跳过上述所有步骤,并作为副作用,将 (如果尚未附加的话)——这对于一个全新的区域设置非常有用,该区域设置 translationstack 中尚未列出的全新语言环境。

Top