Fichiers JSON go-i18n¶
Ajouté dans la version 4.1.
Modifié dans la version 4.16: Ajout du support pour la variante v2 de ce format.
go-i18n translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.
Note
Weblate supports the go-i18n JSON v1 and v2 variants. Please choose correct file format matching your environment.
Voir aussi
Fichiers d’exemples¶
Exemple de fichier 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": ""
}
]
Exemple de fichier 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": ""
}
}
File extensions |
|
|---|---|
Linguality ⓘ |
Monolingual |
Supports plural ⓘ |
|
Supports descriptions ⓘ |
|
Supports explanation ⓘ |
|
Supports context ⓘ |
|
Supports location ⓘ |
|
Supports flags ⓘ |
|
API identifier |
|
Supports read-only strings ⓘ |
|
File extensions |
|
|---|---|
Linguality ⓘ |
Both monolingual and bilingual |
Supports plural ⓘ |
|
Supports descriptions ⓘ |
|
Supports explanation ⓘ |
|
Supports context ⓘ |
|
Supports location ⓘ |
|
Supports flags ⓘ |
|
API identifier |
|
Supports read-only strings ⓘ |
|
Configuration Weblate¶
Configuration des composants typique de Weblate pour v1 |
|
|---|---|
Masque de fichier |
|
Fichier de langue de base mono-langue |
|
Modèle pour les nouvelles traductions |
Vide |
Format de fichier |
Fichier JSON go-i18n v1 |
Configuration des composants typique de Weblate pour v2 |
|
|---|---|
Masque de fichier |
|
Fichier de langue de base mono-langue |
|
Modèle pour les nouvelles traductions |
Vide |
Format de fichier |
Fichier JSON go-i18n |