Skip to content

feat: add Italian UI translation - #2

Open
L0U0m0 wants to merge 8 commits into
babalae:mainfrom
L0U0m0:feat/italian
Open

feat: add Italian UI translation#2
L0U0m0 wants to merge 8 commits into
babalae:mainfrom
L0U0m0:feat/italian

Conversation

@L0U0m0

@L0U0m0 L0U0m0 commented Aug 7, 2026

Copy link
Copy Markdown

Adds i18n/it.json with the complete Italian UI translation (~864 entries), hand-translated and used daily on a live install. Pairs with babalae/better-genshin-impact#3399 which adds Italian to the language list.

中文摘要:新增意大利语界面翻译文件 it.json(约 864 条)。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新功能
    • 新增意大利语界面翻译,覆盖软件界面、游戏功能、任务配置、快捷键、通知、自动化任务及版本信息等内容。
    • 完善意大利语本地化支持,提升相关用户的使用体验。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f903c284-80fd-4e60-b919-98dc2181bba4

Walkthrough

新增 i18n/it.json,为 BetterGI 的界面、功能、任务、通知、自动化和版本文本提供意大利语翻译。

Changes

意大利语本地化

Layer / File(s) Summary
意大利语翻译资源
i18n/it.json
新增 866 行意大利语 JSON 翻译资源,覆盖 BetterGI 的多个功能模块。

Estimated code review effort: 1(简单)| ~5 分钟

Poem

我是小兔,跳过翻译田,
意大利语写入 JSON 里面。
界面、任务、通知排成行,
BetterGI 换上新衣裳。
耳朵一抖,语言更鲜亮!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了新增意大利语界面翻译这一主要变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@i18n/it.json`:
- Around line 156-157: Update the Italian translation value for “自动千音雅集” to use
the same “Repertorio dei Mille Suoni” name already used by the corresponding
entry near line 720, keeping the surrounding automatic-play wording unchanged.
- Line 311: 统一 i18n/it.json 中该配置说明的菜单路径名称:将“Attività singole”替换为现有菜单术语“Attività
indipendenti”,并同步更新对应的 431 行翻译;保留其余翻译内容不变。
- Around line 137-139: Update the Italian translation value for the key "
后才进行快速传送" so it forms a grammatically complete suffix when concatenated after
"Premi " and the shortcut key, including the required spacing and object for
“premuto”.
- Around line 1-2: Remove every key from i18n/it.json that is not present in
i18n/en.json, while preserving all shared Italian locale entries and ensuring
the resulting key sets match exactly.
- Line 149: 更新 i18n/it.json
中包含“王树瑞佑”和“冰中雪影奥黛塔”的意大利语翻译值,优先替换为游戏官方意大利语名称;若不存在,则使用英文或通用名称,确保意大利语界面不再显示中文物品名。
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f1e7df4-410a-4b86-8dfe-0b11078fc14d

📥 Commits

Reviewing files that changed from the base of the PR and between d184568 and 1cd3cbe.

📒 Files selected for processing (1)
  • i18n/it.json

Comment thread i18n/it.json
Comment on lines +1 to +2
{
"BetterGI · 更好的原神 · 0.56.3-alpha.1 · Dev": "BetterGI · Better Genshin Impact · 0.56.3-alpha.1 · Dev",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

python - <<'PY'
import json
from pathlib import Path

target = Path("i18n/it.json")

def load_json(path):
    duplicates = []

    def hook(pairs):
        result = {}
        for key, value in pairs:
            if key in result:
                duplicates.append(key)
            result[key] = value
        return result

    with path.open(encoding="utf-8") as handle:
        data = json.load(handle, object_pairs_hook=hook)

    if not isinstance(data, dict):
        raise SystemExit(f"{path}: 根元素不是对象")

    return data, duplicates

target_data, target_duplicates = load_json(target)
if target_duplicates:
    raise SystemExit(
        f"{target}: 重复 key: {sorted(set(target_duplicates))}"
    )

candidates = []
for path in sorted(Path("i18n").glob("*.json")):
    if path == target:
        continue
    data, duplicates = load_json(path)
    if duplicates:
        print(f"{path}: 重复 key: {sorted(set(duplicates))}")
    candidates.append((path, data))

if not candidates:
    raise SystemExit("未找到可比较的 canonical locale")

reference_path, reference_data = max(
    candidates,
    key=lambda item: len(item[1]),
)

missing = sorted(set(reference_data) - set(target_data))
extra = sorted(set(target_data) - set(reference_data))

print(f"参考文件: {reference_path}")
print(f"参考 key 数量: {len(reference_data)}")
print(f"意大利语 key 数量: {len(target_data)}")

if missing:
    print("意大利语缺失 key:")
    print("\n".join(missing))

if extra:
    print("意大利语多余 key:")
    print("\n".join(extra))

if missing or extra:
    raise SystemExit(1)
PY

Repository: babalae/bettergi-i18n

Length of output: 3434


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

def load_json(path):
    with path.open(encoding="utf-8") as f:
        data = json.load(f)
    if not isinstance(data, dict):
        raise SystemExit(f"{path}: 根元素不是对象")
    return data

en = load_json("i18n/en.json")
it = load_json("i18n/it.json")

print("en key count:", len(en))
print("it key count:", len(it))
print("it duplicates:", sorted(set(k for k in it if list(it.keys()).count(k) > 1)))

missing = sorted(set(en) - set(it))
extra = sorted(set(it) - set(en))

print("missing count:", len(missing))
print("extra count:", len(extra))
for k in missing[:20]:
    print(k)
for k in extra[:20]:
    print(k)

print("first lines matching missing/extra count:", missing[:20], extra[:20])
PY

Repository: babalae/bettergi-i18n

Length of output: 325


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

def load_json(path):
    with open(path, encoding="utf-8") as f:
        data = json.load(f)
    if not isinstance(data, dict):
        raise SystemExit(f"{path}: 根元素不是对象")
    return data

path = Path("i18n/it.json")
it = load_json(path)

keys = list(it)
duplicates = []
seen = set()
for k in keys:
    if k in seen:
        duplicates.append(k)
    else:
        seen.add(k)

en = load_json("i18n/en.json")
missing = sorted(set(en) - set(it))
extra = sorted(set(it) - set(en))

print("i18n/it.json is valid JSON: true")
print("i18n/it.json duplicate key count:", len(duplicates))
print("reference key count:", len(en))
print("i18n/it.json key count:", len(keys))
print("missing count:", len(missing))
print("extra count:", len(extra))
print("first missing:", missing[:10])
print("first extra:", extra[:10])

for path in sorted(Path("i18n").glob("*.json")):
    d = load_json(path)
    dup = [k for k in d if list(d.keys()).count(k) > 1]
    if dup:
        print(f"{path} duplicates: {sorted(set(dup))}")
PY

Repository: babalae/bettergi-i18n

Length of output: 1012


移除 i18n/it.json 中多余的键。

i18n/it.json 可以解析且无重复键,但包含 162 个 i18n/en.json 中没有的键。保持 locale 键集合一致,避免配置与翻译映射不一致。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/it.json` around lines 1 - 2, Remove every key from i18n/it.json that is
not present in i18n/en.json, while preserving all shared Italian locale entries
and ensuring the resulting key sets match exactly.

Comment thread i18n/it.json Outdated
Comment thread i18n/it.json
Comment thread i18n/it.json
Comment on lines +156 to +157
"自动千音雅集": "\"Repertoire of Myriad Melodies\" automatico",
"可以自动演奏单个,也可以全自动完成整个专辑 - ": "Può suonare automaticamente un singolo brano o completare automaticamente l'intero album - ",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

统一 千音雅集 的译名。

Line 156 uses the English phrase Repertoire of Myriad Melodies. Line 720 uses Repertorio dei Mille Suoni. Use the same Italian name in both entries.

建议修改
-  "自动千音雅集": "\"Repertoire of Myriad Melodies\" automatico",
+  "自动千音雅集": "\"Repertorio dei Mille Suoni\" automatico",

Also applies to: 720-720

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/it.json` around lines 156 - 157, Update the Italian translation value
for “自动千音雅集” to use the same “Repertorio dei Mille Suoni” name already used by
the corresponding entry near line 720, keeping the surrounding automatic-play
wording unchanged.

Comment thread i18n/it.json
"领取奖励": "Riscuoti ricompense",
"尘歌壶配置": "Impostazioni Teiera della Serenità",
"完成后操作": "Azione al termine",
"(此处未覆盖的配置可在 独立任务-自动秘境 中配置)": "(Le impostazioni non coperte qui possono essere configurate in Attività singole - Dominio automatico)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

统一 独立任务 的菜单名称。

其他条目使用 Attività indipendenti。Lines 311 and 431 use Attività singole. 这些文本引用菜单路径,术语不一致会影响用户定位页面。

建议修改
-  "(Le impostazioni non coperte qui possono essere configurate in Attività singole - Dominio automatico)",
+  "(Le impostazioni non coperte qui possono essere configurate in Attività indipendenti - Dominio automatico)",

-  "Si applica alle attività dello scheduler e ad alcune attività singole.",
+  "Si applica alle attività dello scheduler e ad alcune attività indipendenti.",

Also applies to: 431-431

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@i18n/it.json` at line 311, 统一 i18n/it.json 中该配置说明的菜单路径名称:将“Attività
singole”替换为现有菜单术语“Attività indipendenti”,并同步更新对应的 431 行翻译;保留其余翻译内容不变。

Paolo Roghi and others added 7 commits August 7, 2026 19:43
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Six keys for text fragments adjacent to hyperlinks (script scheduler examples,
auto-eat config, script repo window) found by a XAML census of implicit Run
nodes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Aggiunge 294 nuove voci it.json per valori vincolati a dropdown/enum
(boss, elementi TCG, achievement, finali companion) allineate alla
tranche 2 del fork build-it. Saltate 27 righe manual:no-textmap-match
e 7 voci già presenti con valore identico. Nessuna collisione.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-up)

Same 9 entries added to the fork's build-it (see companion commit),
found in AutoDomainTask.cs, AutoFightTask.cs and Avatar.cs ternary
message arguments that the phase-1 extractor's positional-argument
scan didn't descend into.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Italian translations for the overlay status bar (pickup/story/hangout/
fishing/teleport toggles), matching the same addition made on the
better-genshin-impact fork's build-it branch. Keys include the
private-use icon codepoint the labels are built with (e.g.
"\uf256 拾取"), since JsonTranslationService does an exact-string lookup
on the whole bound Name, not just the trailing Chinese text.

Short forms for the compact bar: Raccolta, Trama, Eventi (di compagnia,
shortened), Pesca, TP.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant