GRM-20: feat: user-friendly click errors with i18n in configure_repo
CI / lint (push) Has been cancelled
CI / unit-tests (push) Has been cancelled
CI / molecule-tests (push) Has been cancelled
Post-merge Vikunja update / vikunja (push) Has been cancelled

This commit is contained in:
Emil Simeonov
2026-06-19 19:33:04 +02:00
parent 4fa3aeb54c
commit e1b589efab
3 changed files with 187 additions and 23 deletions
+98
View File
@@ -502,6 +502,104 @@ TRANSLATIONS: dict[str, dict[str, str]] = {
"ru": "Ad-hoc команда не удалась на {host}: {stderr}",
"zh": "Ad-hoc 命令在 {host} 上失败: {stderr}",
},
"ERROR: GITEA_ADMIN_TOKEN is not set.": {
"en": "ERROR: GITEA_ADMIN_TOKEN is not set.",
"bg": "ГРЕШКА: GITEA_ADMIN_TOKEN не е зададен.",
"de": "FEHLER: GITEA_ADMIN_TOKEN ist nicht gesetzt.",
"ru": "ОШИБКА: GITEA_ADMIN_TOKEN не задан.",
"zh": "错误:未设置 GITEA_ADMIN_TOKEN。",
},
"Configuring branch protection for {branch}...": {
"en": "Configuring branch protection for {branch}...",
"bg": "Конфигуриране на защита на клона {branch}...",
"de": "Konfiguriere Branch-Schutz für {branch}...",
"ru": "Настройка защиты ветки {branch}...",
"zh": "正在配置 {branch} 的分支保护...",
},
" - Direct pushes: BLOCKED (require PR)": {
"en": " - Direct pushes: BLOCKED (require PR)",
"bg": " - Директни push-ове: БЛОКИРАНИ (изисква PR)",
"de": " - Direkte Pushes: BLOCKIERT (PR erforderlich)",
"ru": " - Прямые push: ЗАБЛОКИРОВАНЫ (требуется PR)",
"zh": " - 直接推送:已阻止(需要 PR",
},
" - Required approvals: {count}": {
"en": " - Required approvals: {count}",
"bg": " - Необходими одобрения: {count}",
"de": " - Erforderliche Genehmigungen: {count}",
"ru": " - Требуемые одобрения: {count}",
"zh": " - 必需审批数: {count}",
},
" - Dismiss stale approvals: yes": {
"en": " - Dismiss stale approvals: yes",
"bg": " - Анулиране на остарели одобрения: да",
"de": " - Veraltete Genehmigungen ablehnen: ja",
"ru": " - Отклонять устаревшие одобрения: да",
"zh": " - 忽略过时审批: 是",
},
" - Block outdated branches: yes": {
"en": " - Block outdated branches: yes",
"bg": " - Блокиране на остарели клонове: да",
"de": " - Veraltete Branches blockieren: ja",
"ru": " - Блокировать устаревшие ветки: да",
"zh": " - 阻止过时分支: 是",
},
" - Block rejected reviews: yes": {
"en": " - Block rejected reviews: yes",
"bg": " - Блокиране на отхвърлени рецензии: да",
"de": " - Abgelehnte Reviews blockieren: ja",
"ru": " - Блокировать отклонённые ревью: да",
"zh": " - 阻止被拒绝的审查: 是",
},
" - Required status checks: {checks}": {
"en": " - Required status checks: {checks}",
"bg": " - Необходими проверки на състоянието: {checks}",
"de": " - Erforderliche Status-Checks: {checks}",
"ru": " - Требуемые проверки статуса: {checks}",
"zh": " - 必需状态检查: {checks}",
},
"Creating {label} label...": {
"en": "Creating {label} label...",
"bg": "Създаване на етикет {label}...",
"de": "Erstelle Label {label}...",
"ru": "Создание метки {label}...",
"zh": "正在创建标签 {label}...",
},
" Label '{label}' already exists.": {
"en": " Label '{label}' already exists.",
"bg": " Етикетът '{label}' вече съществува.",
"de": " Label '{label}' existiert bereits.",
"ru": " Метка '{label}' уже существует.",
"zh": " 标签 '{label}' 已存在。",
},
" Label '{label}' created.": {
"en": " Label '{label}' created.",
"bg": " Етикетът '{label}' е създаден.",
"de": " Label '{label}' erstellt.",
"ru": " Метка '{label}' создана.",
"zh": " 标签 '{label}' 已创建。",
},
"Repository configuration complete.": {
"en": "Repository configuration complete.",
"bg": "Конфигурирането на хранилището е завършено.",
"de": "Repository-Konfiguration abgeschlossen.",
"ru": "Конфигурация репозитория завершена.",
"zh": "仓库配置完成。",
},
"HTTP {status} Forbidden — your token lacks admin rights.\nMake sure the token belongs to a repo owner or organisation admin.\nAlternatively, configure branch protection manually in Settings → Branches.": { # noqa: E501
"en": "HTTP {status} Forbidden — your token lacks admin rights.\nMake sure the token belongs to a repo owner or organisation admin.\nAlternatively, configure branch protection manually in Settings → Branches.", # noqa: E501
"bg": "HTTP {status} Забранено — вашият токен няма администраторски права.\nУверете се, че токенът принадлежи на собственик на хранилище или администратор на организация.\nАлтернативно, конфигурирайте защитата на клона ръчно в Настройки → Клонове.", # noqa: E501
"de": "HTTP {status} Verboten — Ihr Token hat keine Admin-Rechte.\nStellen Sie sicher, dass das Token einem Repository-Besitzer oder Organisations-Admin gehört.\nAlternativ können Sie den Branch-Schutz manuell unter Einstellungen → Branches konfigurieren.", # noqa: E501
"ru": "HTTP {status} Запрещено — у вашего токена нет прав администратора.\nУбедитесь, что токен принадлежит владельцу репозитория или администратору организации.\nЛибо настройте защиту ветки вручную в разделе Настройки → Ветки.", # noqa: E501
"zh": "HTTP {status} 禁止访问 — 您的令牌缺少管理员权限。\n请确保令牌属于仓库所有者或组织管理员。\n或者,您可以在 设置 → 分支 中手动配置分支保护。", # noqa: E501
},
"HTTP error: {status}{message}": {
"en": "HTTP error: {status}{message}",
"bg": "HTTP грешка: {status}{message}",
"de": "HTTP-Fehler: {status}{message}",
"ru": "Ошибка HTTP: {status}{message}",
"zh": "HTTP 错误: {status}{message}",
},
"exit code {code}": {
"en": "exit code {code}",
"bg": "код за изход {code}",