Tipos de arquivos aceitos (Strings)

.JSON - Aninhado (Strings)

O conteúdo de toda a Central de Ajuda é traduzido automaticamente de inglês pelo Phrase Language AI.

Extensões de arquivo

.json

Extensão de API

nested_json

Importar

Sim

Exportar

Sim

Suporte para formas plurais

Sim

Suporte para descrição

Não

Opções de formato

Estas opções que podem ser especificadas quando um arquivo é feito upload e/ou Download. Dependendo do método de upload/Download (API, CLI, sincronização de repositório, etc.), elas podem ser especificadas em parâmetros de consulta upload, Download ou no arquivo de configuração phrase.yml.

enable_pluralization

Um JSON aninhado é um arquivo JSON em que parte relativamente grande dos valores são outros objetos JSON. Comparado com o JSON simples, o JSON aninhado fornece maior clareza ao desacoplar objetos em diferentes camadas, facilitando a manutenção. Chaves são armazenadas separando níveis com um ponto .. Durante a exportar, todas as chaves são novamente divididas e renderizadas na estrutura do .JSON aninhado original.

Os chatbots da IA podem ser muito efetivos na geração de uma lista de chaves a partir de um arquivo .JSON.

Opções de formato

Identificador

enable_pluralization

Tipo

Booleano

Upload

Sim

Baixar

Não

Padrão

true

Descrição

Permite a detecção de chaves pluralizadas. Todas as chaves correspondentes persistirão como chaves pluralizadas.

Amostra de código

{
  "boolean_key": "--- true\n",
  "empty_string_translation": "",
  "key_with_description": "Check it out! This key has a description! (At least in some formats)",
  "key_with_line-break": "This translations contains\na line-break.",
  "nested": {
    "deeply": {
      "key": "Wow, this key is nested even deeper."
    },
    "key": "This key is nested inside a namespace."
  },
  "null_translation": null,
  "pluralized_key": {
    "one": "Only one pluralization found.",
    "other": "Wow, you have %s pluralizations!",
    "zero": "You have no pluralization."
  },
  "sample_collection": [
    "first item",
    "second item",
    "third item"
  ],
  "simple_key": "Just a simple key with a simple message.",
  "unverified_key": "This translation is not yet verified and waits for it."}}- Terminology (mandatory - terms override all other word choices, including the copy rules, and apply inside tags, braces, and placeholders):
  upload -> upload
  download -> Download
  API -> API
  query -> consulta
  Upload -> upload
  Download -> Download
  phrase -> Phrase
  export -> exportar
  split -> dividir
  key -> chave
  unverified -> não verificada
  key -> chave
  verified -> verificado
- Translation memory references below. Reuse the target wording for source parts that match; adapt numbers, names, terms, tense, and grammar that differ; do not copy TM text absent from the source; match the TM register and style:
  Keys are stored by separating levels with a dot .. -> As chaves são armazenadas separando níveis com um ponto ..
  During export, all keys are again split and rendered in the original nested .JSON structure. -> Durante a exportação, todas as chaves são novamente divididas e renderizadas na estrutura do .JSON aninhado original.
  key_with_description,Check it out! -> key_with_description,Check it out!
  unverified_key,This translation is not yet verified and waits for it. -> unverified_key,This translation is not yet verified and waits for it.
  During export, all keys are again split and rendered as a nested .JSON structure. -> Durante a exportação, todas as chaves são novamente divididas e renderizadas como uma estrutura .JSON aninhada.
  "This translation is not yet verified and waits for it. -> "This translation is not yet verified and waits for it.
  "Translation is not yet verified and waits for it. -> "Translation is not yet verified and waits for it.
- When both apply: base the translation on the TM target, but replace any term in it with its required target form - terminology wins over the TM wording.
  Example - term: voiture -> automobile; TM: "Le camion rouge est rapide." -> "The red truck is fast."; source: "La voiture rouge est rapide." -> "The red automobile is fast." (reuse the TM frame, translate the changed word, but force the term).
Respect all tags given by the following regular expression: (\{[1-9][0-9]*\}|\{[1-9][0-9]*>|<[1-9][0-9]*\}|\{[biu_\^]{1,4}>|<[biu_\^]{1,4}\})
Store the translations in the JSON 'translations' field.
You must use consistent grammatical forms within each segment. If a segment contains multiple verbs or pronouns, they must ALL use the same formality level. Do NOT mix formal and informal forms in a single segment.
Preserve the formality level of the source text in the target language. You must use a consistent level of formality.
After translating each segment, verify that all verbs, pronouns, and verb conjugations within that segment are consistent in formality. If you find any inconsistency, revise the entire segment.
Translate the following 6 segments from English to Brazilian Portuguese and nothing else.
Maintain absolute numerical precision; never round, truncate, or alter numerical values.
Use standard Brazilian Portuguese and avoid European Portuguese vocabulary or verb forms.
Make sure that the number of segments in the sources and translations are the same.
{"sources":[{"source_1":"These options that can be specified when a file is uploaded and/or downloaded."},{"source_2":"Depending on the upload/download method (API, CLI, Repo sync etc.), they can be specified in query parameters Upload, Download or in the phrase.yml configuration file."},{"source_3":"Keys are stored by separating levels with a dot .."},{"source_4":"During export, all keys are again split and rendered in the original nested .JSON structure."},{"source_5":"\"key_with_description\": \"Check it out!"},{"source_6":"\"unverified_key\": \"This translation is not yet verified and waits for it."}]} (In some formats we also export this status)"
}

Formas plurais

Este formato usa categorias nomeadas para identificar as várias pluralizações de uma chave. As seguintes categorias são reservadas para formas plurais:

.zero | .one | .two | .few | .many | .other

Nomes de exemplos de chaves pluralizadas identificadas, persistentes e marcadas corretamente:

  • inbox.messages.notification.one

  • inbox.messages.notification.other

Plurais para arquivos JSON

O formato mais comum de mensagens de chave no plural em várias bibliotecas:

"messages": {
    "one": "One message received.",
    "other": "%s messages received.",
    "zero": "No messages received."
}
Esse artigo foi útil?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.