Fitxers JSON de go-i18n

Afegit a la versió 4.1.

Canviat a la versió 4.16: S’ha afegit suport per a la variant v2 d’aquest format.

Les traduccions go-i18n són monolingües, per la qual cosa es recomana especificar un fitxer base amb (el que és més sovint) cadenes en anglès.

Nota

Weblate admet les variants go-i18n JSON v1 i v2. Si us plau, trieu el format de fitxer correcte que coincideixi amb el vostre entorn.

Example files

Example file v1:

[
  {
    "id": "hello",
    "description": "Description",
    "translation": "Ahoj světe!\n"
  },
  {
    "id": "orangutan",
    "description": "Description",
    "translation": {
      "one": "Orangutan has {{.Count}} banana.\n",
      "other": "Orangutan has {{.Count}} bananas.\n"
    }
  },
  {
    "id": "try",
    "description": "Description",
    "translation": ""
  },
  {
    "id": "thanks",
    "description": "Description",
    "translation": ""
  }
]

Example file v2:

{
  "hello": "Ahoj světe!\n",
  "orangutan": {
    "description": "Description",
    "one": "Orangutan has {{.Count}} banana.\n",
    "other": "Orangutan has {{.Count}} bananas.\n"
  },
  "try": {
    "description": "Description",
    "other": ""
  },
  "thanks": {
    "description": "Description",
    "other": ""
  }
}
Supported features

File extensions

.toml

Lingualitat ⓘ

Monolingual

Supports plural ⓘ

Yes

Supports descriptions ⓘ

No

Admet l’explicació ⓘ

No

Supports context ⓘ

No

Supports location ⓘ

No

Supports flags ⓘ

No

API identifier

go-i18n-toml

Admet cadenes de només lectura ⓘ

No

Supports removing obsolete strings ⓘ

No

Supported features

File extensions

.json

Lingualitat ⓘ

Both monolingual and bilingual

Supports plural ⓘ

Yes

Supports descriptions ⓘ

Yes

Admet l’explicació ⓘ

No

Supports context ⓘ

No

Supports location ⓘ

No

Supports flags ⓘ

No

API identifier

go-i18n-json, go-i18n-json-v2

Admet cadenes de només lectura ⓘ

No

Supports removing obsolete strings ⓘ

No

Configuració del Weblate

Placa web típica Configuració dels components per a v1

Filtre de fitxers

langs/*.json

Fitxer de llengua base monolingüe

langs/en.json

Plantilla per a traduccions noves

«Buit».

Format de fitxer

go-i18n v1 JSON file

Placa web típica Configuració dels components per a v2

Filtre de fitxers

langs/*.json

Fitxer de llengua base monolingüe

langs/en.json

Plantilla per a traduccions noves

«Buit».

Format de fitxer

go-i18n v2 JSON file