feat: add Italian UI translation - #2
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Walkthrough新增 Changes意大利语本地化
Estimated code review effort: 1(简单)| ~5 分钟 Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
| { | ||
| "BetterGI · 更好的原神 · 0.56.3-alpha.1 · Dev": "BetterGI · Better Genshin Impact · 0.56.3-alpha.1 · Dev", |
There was a problem hiding this comment.
🗄️ 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)
PYRepository: 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])
PYRepository: 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))}")
PYRepository: 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.
| "自动千音雅集": "\"Repertoire of Myriad Melodies\" automatico", | ||
| "可以自动演奏单个,也可以全自动完成整个专辑 - ": "Può suonare automaticamente un singolo brano o completare automaticamente l'intero album - ", |
There was a problem hiding this comment.
🎯 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.
| "领取奖励": "Riscuoti ricompense", | ||
| "尘歌壶配置": "Impostazioni Teiera della Serenità", | ||
| "完成后操作": "Azione al termine", | ||
| "(此处未覆盖的配置可在 独立任务-自动秘境 中配置)": "(Le impostazioni non coperte qui possono essere configurate in Attività singole - Dominio automatico)", |
There was a problem hiding this comment.
🎯 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 行翻译;保留其余翻译内容不变。
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>
Adds
i18n/it.jsonwith 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