github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/paths/locales/update.yaml (about)

     1  ---
     2  summary: Update a locale
     3  description: Update an existing locale.
     4  operationId: locale/update
     5  tags:
     6  - Locales
     7  parameters:
     8  - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
     9  - "$ref": "../../parameters.yaml#/project_id"
    10  - "$ref": "../../parameters.yaml#/locale_id_as_id"
    11  responses:
    12    '200':
    13      description: OK
    14      content:
    15        application/json:
    16          schema:
    17            "$ref": "../../schemas/locale_details.yaml#/locale_details"
    18      headers:
    19        X-Rate-Limit-Limit:
    20          "$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
    21        X-Rate-Limit-Remaining:
    22          "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
    23        X-Rate-Limit-Reset:
    24          "$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
    25    '400':
    26      "$ref": "../../responses.yaml#/400"
    27    '404':
    28      "$ref": "../../responses.yaml#/404"
    29    '429':
    30      "$ref": "../../responses.yaml#/429"
    31  x-code-samples:
    32  - lang: Curl
    33    source: |-
    34      curl "https://api.phrase.com/v2/projects/:project_id/locales/:id" \
    35        -u USERNAME_OR_ACCESS_TOKEN \
    36        -X PATCH \
    37        -d '{"branch":"my-feature-branch","name":"de","code":"de-DE","source_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
    38        -H 'Content-Type: application/json'
    39  - lang: CLI v2
    40    source: |-
    41      phrase locales update \
    42      --project_id <project_id> \
    43      --id <id> \
    44      --data '{"branch":"my-feature-branch", "name":"de", "code":"de-DE", "source_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
    45      --access_token <token>
    46  requestBody:
    47    required: true
    48    content:
    49      application/json:
    50        schema:
    51          type: object
    52          title: locale/update/parameters
    53          properties:
    54            branch:
    55              description: specify the branch to use
    56              type: string
    57              example: my-feature-branch
    58            name:
    59              description: Locale name
    60              type: string
    61              example: de
    62            code:
    63              description: Locale ISO code
    64              type: string
    65              example: de-DE
    66            default:
    67              description: Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
    68              type: boolean
    69              example:
    70            main:
    71              description: Indicates whether locale is a main locale. Main locales are part of the <a href="https://support.phrase.com/hc/en-us/articles/5784094755484" target="_blank">Verification System</a> feature.
    72              type: boolean
    73              example:
    74            rtl:
    75              description: Indicates whether locale is a RTL (Right-to-Left) locale.
    76              type: boolean
    77              example:
    78            source_locale_id:
    79              description: Source locale. Can be the name or id of the locale. Preferred is id.
    80              type: string
    81              example: abcd1234abcd1234abcd1234abcd1234
    82            fallback_locale_id:
    83              description: Fallback locale for empty translations. Can be a locale name or id.
    84              type: string
    85              example: abcd1234abcd1234abcd1234abcd1234
    86            unverify_new_translations:
    87              description: Indicates that new translations for this locale should be marked as unverified. Part of the <a href="https://support.phrase.com/hc/en-us/articles/5784094755484" target="_blank">Advanced Workflows</a> feature.
    88              type: boolean
    89              example:
    90            unverify_updated_translations:
    91              description: Indicates that updated translations for this locale should be marked as unverified. Part of the <a href="https://support.phrase.com/hc/en-us/articles/5784094755484" target="_blank">Advanced Workflows</a> feature.
    92              type: boolean
    93              example:
    94            autotranslate:
    95              description: If set, translations for this locale will be fetched automatically, right after creation.
    96              type: boolean
    97              example:
    98  x-cli-version: '2.5'