Skip to main content

Localization

Brabo speaks four languages in the documentation and in the interface, and Brazilian Portuguese is the source and the default of both products (ADR 0216). All new text is born in pt-BR; the other languages are translations of it.

Languages and codes​

languagecodeplural forms (Intl.PluralRules)note
Português (Brasil)pt-BRone, many, other (+ mandatory _zero in the interface)source
Englishenone, otherEnglish notes
Русскийruone, few, many, otherRussian notes
简体中文zh-HansotherChinese notes

The codes are the same in Docusaurus, in i18next, in <html lang> and in users.locale. The site's local search uses its own (pt, en, ru, zh).

On the site, the language selector sits in the top bar (localeDropdown in website/docusaurus.config.ts), with the labels above, and takes you to the same page in the chosen language; each language lives under its own path (/en/, /ru/, /zh-Hans/; pt-BR at the root of the stage).

Resolving the interface language​

The choice saved in the account always wins and is never overwritten by detection. Without a choice, the browser language suggests (resolverIdiomaDoNavegador, apps/web/src/lib/idioma.ts):

  • pt* → pt-BR;
  • zh, zh-CN, zh-SG and zh-Hans* → zh-Hans;
  • ru* → ru;
  • en* → en;
  • anything else — German, traditional Chinese (zh-TW, zh-Hant) — → pt-BR.

The language of the agents' REPLIES is another preference, with its own mechanism (ADR 0177), and does not depend on the interface language.

Missing text​

  • On the site, a page without a translation in a locale is served from the pt-BR source, at the same address, and a banner at the top SAYS so in the reader's language. A translated page whose source changed after the translation states the translation date and that the original changed.
  • In the interface, text is never missing: key and plural parity is measured, and fallbackLng is pt-BR.

Every translated page carries traducao_de: <SHA> in its frontmatter — the last commit of the source it translates. That is what separates "up to date" from "stale". Today's measurement is in Translation parity, generated by pnpm docs:generate.

The Reference sidebar labels and the top bar labels come from website/sidebars.ts and each locale's navbar.json/current.json; since ADR 0219 the content of the reference/ pages is translated too, generated block included, and only the parity page stays out.

What is never translated​

  • Brabo, and the agent and role names from the glossary (Criativo, PO, Arquiteto, Dev Lead, Infra Lead, owner, maintainer…);
  • user data (project names, messages, artifacts);
  • commands, paths, names of variables, branches and events;
  • RN and ADR numbers and the {#rn-NNN} anchors.