Skip to content
Version v3.0.0

Label Import And Export

The ProAuth CLI can import and export labels as YAML. This is commonly used to manage translations, customer-specific wording, and environment-specific text as configuration as code.

ProAuth 3.x label files use the API-versioned YAML resource schema:

yaml
apiVersion: management.proauth.io/v2
kind: LabelBundle
metadata:
  name: account-labels
spec:
  entries:
    - contentPath: /authviews/userlogin-sign-in
      labels:
        - language: en
          fallback: true
          content: Sign in
        - language: de
          fallback: false
          content: Anmelden

Breaking change

ProAuth 3.x uses scoped label roots. Runtime lookup no longer falls back to the legacy /label or /page roots. Legacy label YAML files must be migrated before they can be imported with ProAuth 3.x.

Import Labels

Import one or more YAML files:

bash
proauthcli label import "./labels/*.yml"

The CLI expands file globs, reads every LabelBundle, and sends the labels to the v2 label import endpoint. Large imports are uploaded in batches.

Import is create-or-update. Existing labels with the same content path and language are updated; missing labels are created.

Export Labels

Export all labels:

bash
proauthcli label export "./exported-labels"

Filter by language:

bash
proauthcli label export "./exported-labels" --language "de-ch"

Filter by content path prefix:

bash
proauthcli label export "./exported-labels" --contentPath "/authviews/userlogin"

Exported files are written as LabelBundle resources and can be imported again without conversion.

Delete Labels

Delete labels by content path:

bash
proauthcli label delete "/authviews/userlogin-sign-in"

The delete command removes the label entry identified by the provided content path.

Migrate Legacy Label YAML

Convert ProAuth 2.x label YAML files to the ProAuth 3.x schema:

bash
proauthcli label migrate-yaml "./labels/*.yml" --outputPath "./labels-v3" --overwrite

Legacy input:

yaml
- contentPath: /label/userlogin-sign-in
  labels:
    - language: en
      fallback: true
      content: Sign in
    - language: de
      fallback: false
      content: Anmelden

Migrated output:

yaml
apiVersion: management.proauth.io/v2
kind: LabelBundle
metadata:
  name: login-labels
spec:
  entries:
    - contentPath: /authviews/userlogin-sign-in
      labels:
        - language: de
          fallback: false
          content: Anmelden
        - language: en
          fallback: true
          content: Sign in

Review the generated files before committing them. The migration keeps the label content and grouping semantics, rewrites legacy roots, and preserves culture suffixes. It does not preserve comments as a correctness guarantee.

ProAuth 3.x uses scoped label roots:

RootUsage
/authviewsAuthentication views, MFA UI, UserStore UI, email templates, invitations, questionnaires
/accountmgmtAccount Management views and validation text
/oidcOIDC/protocol validation labels such as request-validation-error-*
/systemGeneric platform labels such as model-validation-*
/adminappAdmin App labels, replacing the old /page root

label migrate-yaml rewrites /page/... to /adminapp/.... Legacy /label/... entries are mapped by key: accountmgmt-* and account-change-password-* go to /accountmgmt, request-validation-error-* goes to /oidc, model-validation-* goes to /system, and remaining labels go to /authviews.

The path mapper preserves customer, subscription, tenant, and app path segments as well as culture suffixes. For example, /label/tenant/{id}/userlogin-title/fr becomes /authviews/tenant/{id}/userlogin-title/fr.

Schema Reference

FieldRequiredDescription
apiVersionYesMust be management.proauth.io/v2.
kindYesMust be LabelBundle.
metadata.nameNoHuman-readable name for the bundle. Used for generated files and review context.
spec.entriesYesList of label groups.
spec.entries[].contentPathYesStable label content path without a language suffix.
spec.entries[].labelsYesTranslations for the content path.
labels[].languageYesCulture code such as en, de, or de-ch.
labels[].fallbackYesMarks the fallback label for the content path.
labels[].contentYesLabel text.

Content Paths And Fallbacks

A label bundle groups translations by the logical contentPath. The language is represented in the nested labels array rather than as separate YAML documents.

Use one fallback label per content path. The fallback label is used when no more specific language value is available.

Example:

yaml
spec:
  entries:
    - contentPath: /authviews/account-password-reset-title
      labels:
        - language: en
          fallback: true
          content: Reset your password
        - language: fr
          fallback: false
          content: Reinitialiser votre mot de passe

For customer-managed configuration repositories, keep label files grouped by functional area or application surface:

text
labels/
  account.yml
  login.yml
  mail.yml
  admin-overrides.yml

This keeps review diffs small and makes it easier to import only a subset during rollout testing.

CI/CD Example

bash
proauthcli loginservice \
  --host "https://idp.example.com" \
  --clientid "$PROAUTH_CLI_CLIENT_ID" \
  --clientsecret "$PROAUTH_CLI_CLIENT_SECRET"

proauthcli label import "./labels/*.yml"

For ProAuth 2.x to 3.x upgrades, run label migrate-yaml once, review the generated files, and then update your deployment scripts to import the migrated folder.