Skip to content
78 changes: 78 additions & 0 deletions .github/skills/airflow-translations/locales/pt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->

# Portuguese (pt) Translation Agent Skill

**Locale code:** `pt`
**Preferred variant:** Mix of pt-BR / pt-PT as visible in existing files (Brazilian spelling often preferred, but some European forms like "Secção" appear)

This file contains locale-specific guidelines so AI translation agents produce new Portuguese strings that stay 100% consistent with the existing translations in:

`airflow-core/src/airflow/ui/public/i18n/locales/pt/*.json`

Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unlike the existing zh-CN locale skill, this file doesn't explicitly state that it inherits the global rules from ../SKILL.md. Adding a short note/link (and precedence rule) would help avoid agents applying only the locale file and missing global guidance.

Suggested change
These rules **extend** the global Airflow Translation Agent rules defined in `../SKILL.md`. If there is any conflict, the instructions in this `pt` locale file take precedence for Portuguese output; otherwise, always follow the global rules as well.

Copilot uses AI. Check for mistakes.
## 1. Core Airflow Terminology

- Keep these terms **in English unchanged** (case-sensitive):
- Dag / Dags
- Asset / Assets / Asset Events
- Backfill / Backfills
- XCom / XComs
- TaskInstance, DagRun, Triggerer, Executor, Pool, Provider, etc.
Comment on lines +15 to +20
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The do-not-translate list includes "Asset Events", but existing pt locale strings translate the concept as "Evento(s) de Asset" (e.g. assetEvent_one/other/many in common.json). Consider updating the rule to keep only "Asset" in English while still translating the surrounding words (and optionally call out the one existing untranslated tab label as legacy/inconsistent).

Copilot uses AI. Check for mistakes.
Comment on lines +15 to +20
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Section 1 says to keep "TaskInstance" and "DagRun" in English, but the established UI translations for these concepts are Portuguese (e.g. "Instância de Tarefa" and "Execução do Dag" in the existing pt JSON files). Suggest clarifying this rule to apply only to code/class identifiers (camelcase) when they appear verbatim, and otherwise follow the existing translated UI terms.

Suggested change
- Keep these terms **in English unchanged** (case-sensitive):
- Dag / Dags
- Asset / Assets / Asset Events
- Backfill / Backfills
- XCom / XComs
- TaskInstance, DagRun, Triggerer, Executor, Pool, Provider, etc.
- Keep these terms **in English unchanged** (case-sensitive) in UI strings:
- Dag / Dags
- Asset / Assets / Asset Events
- Backfill / Backfills
- XCom / XComs
- For CamelCase code/class identifiers (when they appear **verbatim as code**), keep them in English (e.g. `TaskInstance`, `DagRun`, `Triggerer`, `Executor`, `Pool`, `Provider`). When they are UI labels or descriptions, follow the existing translations, for example:
- `TaskInstance` → "Instância de Tarefa"
- `DagRun` → "Execução do Dag"

Copilot uses AI. Check for mistakes.
- Never use "DAG" – always "Dag"
- Product names: "Airflow" stays "Airflow"

## 2. Portuguese-Specific Guidelines

- Use natural, fluent Portuguese.
- Respect gender and number agreement (feminine/masculine, singular/plural).
- Follow existing i18next plural keys: `_one`, `_many`, `_other`, `_zero`
- Capitalization: Sentence case for descriptions, title-like for headers/buttons (match existing files).
- Spelling/vocab: Follow patterns in current JSON (e.g. "Excluir", "Adicionar", "Executando", "Enfileirado", "Secção", "detetadas", "Sobreescreve").

## 3. Examples from Existing Translations

**Always keep in English:**

- "Dag" → "Dag"
- "Asset" → "Asset"
- "Backfill" → "Backfill"
- "XCom" → "XCom"

**Common translated patterns:**

- "task_one" → "Tarefa"
- "task_many" → "Tarefas"
- "dagRun_one" → "Execução do Dag"
- "dagRun_many" → "Execuções do Dag"
- "allRuns" → "Todas as Execuções"
- "running" → "Executando"
- "failed" → "Falha"
- "success" → "Sucesso"
- "queued" → "Enfileirado"
- "Add" → "Adicionar"
- "Delete" → "Excluir"
- "Edit" → "Editar"
- "Save" → "Salvar"
- "Test" → "Testar"
- "Import" → "Importar"
- "Config" → "Configuração do Airflow"

## 4. Agent Instructions (DO / DON'T)

**DO:**

- Match tone, style, gender, casing from existing `pt/*.json` files
- Use natural Portuguese readable by Brazilian & Portuguese users
- Preserve all placeholders: `{{count}}`, `{{dagName}}`, etc.
- For plurals: provide all needed suffixes if source has them

**DON'T:**

- Translate core terms listed in section 1
- Use inconsistent gender (e.g. "Execução de Dag" instead of "Execução do Dag")
- Invent new vocabulary when equivalent already exists
- Translate hotkeys, code references, or file paths

---

**Version:** 1.0 – based directly on current `pt/` JSON files (Feb 2026)