Skip to content

feat: Italian game language support (OCR + language list) - #3399

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

feat: Italian game language support (OCR + language list)#3399
L0U0m0 wants to merge 8 commits into
babalae:mainfrom
L0U0m0:feat/italian-localization

Conversation

@L0U0m0

@L0U0m0 L0U0m0 commented Aug 7, 2026

Copy link
Copy Markdown

@

What

Adds Italian as a selectable UI/game language:

  • Italian .resx satellite files for all game-text string groups (11 files, 46 strings), taken verbatim from the official Italian game text (TextMap), mapped key-by-key from the French resx files.
  • Tolerant regex patterns for layout-dependent and inflected strings, following the conventions established by the French localization (Feat/multi lan #1336).
  • "it" added to the language list and to CultureInfoNameToKVPConverter ("Italiano").
  • OCR test cases for Italian in PaddleOcrServiceTests. No model changes needed: "it" already maps to the V5Latin model.

Testing

  • dotnet test green, including new Italian OCR cases.
  • Verified in-game with the client set to Italian: dialogue skip, auto pick-up and a full domain run work correctly.

中文摘要

为 BGI 添加意大利语支持:新增意大利语 .resx 资源文件(游戏文本取自官方意大利语文本映射)、语言列表加入 "it"(OCR 已支持 V5Latin 模型)、补充相应单元测试。已在意大利语客户端实测(跳过剧情、自动拾取、完整秘境)。

🤖 Generated with Claude Code
@

Summary by CodeRabbit

  • 新功能

    • 新增意大利语(Italiano)界面选项及完整本地化支持。
    • 覆盖设置、通知、OCR、地图追踪、计时器及新版本功能。
    • 支持自动刷圣遗物、秘境、钓鱼、路线追踪、奖励领取和常用任务操作的意大利语显示。
  • 测试

    • 增加意大利语 OCR 识别测试,覆盖制造、快速选择、任务完成、奖励、委托和钓鱼等场景。

Paolo Roghi and others added 4 commits August 7, 2026 03:34
All strings taken verbatim from the official Italian game text (TextMap),
mapped key-by-key from the existing French resx files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Italian already maps to the V5Latin OCR model in PaddleOcrService.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tolerant regex patterns for layout-dependent and inflected strings,
official TextMap values for expedition and fishing hook strings.

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

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d679613-0826-4cae-b0f1-764d25d7e7a3

📥 Commits

Reviewing files that changed from the base of the PR and between 1720f78 and f104f0f.

📒 Files selected for processing (1)
  • BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.it.resx
🚧 Files skipped from review as they are similar to previous changes (1)
  • BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.it.resx

Walkthrough

新增意大利语本地化支持。语言设置、应用界面、自动任务资源和 OCR 测试均加入意大利语内容。

Changes

意大利语本地化

Layer / File(s) Summary
语言选项与显示名称
BetterGenshinImpact/View/Converters/*, BetterGenshinImpact/ViewModel/Pages/CommonSettingsPageViewModel.cs
语言字典新增 it。转换器将其显示为 Italiano
应用界面翻译
BetterGenshinImpact/User/I18n/it.json
新增覆盖界面、任务配置、通知、OCR 和自动化功能的意大利语翻译字典。
任务界面资源
BetterGenshinImpact/GameTask/AutoArtifactSalvage/*, BetterGenshinImpact/GameTask/AutoDomain/*, BetterGenshinImpact/GameTask/AutoFishing/*, BetterGenshinImpact/GameTask/AutoTrackPath/*, BetterGenshinImpact/GameTask/Common/*
新增多个意大利语 .resx 文件,覆盖圣遗物、秘境、钓鱼、地图地点和公共任务文本。
OCR 识别测试
Test/BetterGenshinImpact.UnitTest/CoreTests/RecognitionTests/OCRTests/PaddleOcrServiceTests.cs
新增 9 组意大利语 OCR 测试数据,并为复合文本添加正则匹配规则。

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

兔子带来 Italiano,
新词跳进资源表。
任务界面齐换装,
OCR 读字不再恼。
胡萝卜庆测试好。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了新增意大利语支持、OCR 测试和语言列表变更,符合主要改动。
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.

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 为游戏语言和界面语言列表加入意大利语,并补充意大利语 OCR、本地化资源及测试。

  • 新增 11 组意大利语游戏文本资源和 UI 翻译文件
  • 在语言选择及显示名称转换中注册 it
  • 增加意大利语 PaddleOCR 识别用例;现有映射会选择 V5Latin 模型

Confidence Score: 5/5

当前没有仍需阻止合并的已确认故障,PR 看起来可以安全合并。

没有阻塞性故障仍然存在。

Important Files Changed

Filename Overview
BetterGenshinImpact/ViewModel/Pages/CommonSettingsPageViewModel.cs it 加入统一的界面及游戏语言选择列表,现有选择流程可正常传递该文化代码。
BetterGenshinImpact/View/Converters/CultureInfoNameToKVPConverter.cs it 增加 “Italiano” 显示名称,与语言列表注册保持一致。
BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.it.resx 增加意大利语秘境 OCR 文本,并沿用现有基于正则的容错匹配方式。
BetterGenshinImpact/User/I18n/it.json 新增意大利语 UI 翻译资源。
Test/BetterGenshinImpact.UnitTest/CoreTests/RecognitionTests/OCRTests/PaddleOcrServiceTests.cs 增加多项意大利语 OCR 样例,覆盖本 PR 引入的主要识别文本。

Reviews (5): Last reviewed commit: "fix: tolerant patterns for limited-time ..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bf840aeaba

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +132 to +133
<data name="跳过" xml:space="preserve">
<value>Salta</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 补齐意大利语秘境限时开放文案

严重程度:P2。问题位置:AutoDomainTask.it.resx 的意大利语资源列表只到这些基础 OCR 文案;问题原因:AutoDomainTask 构造函数还会读取 限时全部开放/限时开放,并在秘境入口用 Regex.IsMatch 判断是否处于限时全开状态,缺少 Italian 资源时 IStringLocalizer 会回落成中文 key。可能造成的影响:当游戏语言设为 Italian 且秘境在非周日的“限时全部开放”活动状态下运行自动秘境时,检测不到 all-open,后续不会按 SundaySelectedValue 选择奖励,可能刷错材料。推荐修复方案:为 限时全部开放限时开放 增加意大利语 OCR 正则(必要时也补齐已声明的 匹配挑战/快速编队)。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in f0bbaee: added 快速编队 ("Configurazione rapida", single unambiguous TextMap hash, matches the button label used elsewhere in the repo) and both 限时开放/限时全部开放 ("Disponibile per un periodo limitato" / "Accesso completo a tempo limitato", the latter derived from the 限时全部开放:{0} variant with the placeholder stripped). 匹配挑战 was left out: TextMap gives two different Italian translations across its 3 CHS-exact hashes ("Matchmaking" 2/3 vs "Cooperativa" 1/3, FR uses "Matchmaking" for all 3 so it doesn't disambiguate), so no univocal source string — didn't want to guess. Also note matchingChallengeString/rapidformationString aren't referenced anywhere in AutoDomainTask.cs beyond the constructor, so this is currently a dead field with no runtime impact; happy to add 匹配挑战 in a follow-up once someone can confirm in-game which of the two candidates is shown.

Comment on lines +120 to +121
<data name="上钩" xml:space="preserve">
<value>preso</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 改用意大利语上钩提示匹配提竿

严重程度:P2。问题位置:AutoFishingTask.it.resx上钩 OCR 关键词;问题原因:FishBite.Update 会对识别文本执行 RemoveAllSpace(...).Contains(this.getABiteLocalizedString),但这里配置成 preso,而意大利语游戏文案中的上钩提示是 Ha abboccato!(HoYoWiki: https://wiki.hoyolab.com/pc/genshin/entry/7005?lang=it-it)。可能造成的影响:在 Italian 游戏语言下,如果前面的文字块/按钮图像识别没有命中,OCR 兜底永远不会触发提竿,自动钓鱼会一直等到超时。推荐修复方案:将该值改为可匹配 abboccato 的关键词或正则,并保持与 StringUtils.RemoveAllSpace 后的文本一致。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in f0bbaee with "bboccato": "preso" matched the catch message (鱼儿上钩啦! → "Hai preso qualcosa!"), while the bite prompt is a different string (喂!鱼上钩了! → "Ehi! Qualcosa ha abboccato!", confirmed via TextMap and HoYoWiki it-it). Used the case-safe substring "bboccato" against the RemoveAllSpace-normalized text, same convention as the fr resx.


[ObservableProperty] private FrozenDictionary<string, string> _languageDict =
new[] { "zh-Hans", "zh-Hant", "en", "ja" }
new[] { "zh-Hans", "zh-Hant", "en", "ja", "it" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 不要在尘歌壶任务仍回落中文时开放 Italian

严重程度:P2。问题位置:新增的 it 游戏语言入口;问题原因:领取尘歌壶奖励 会实例化 GoToSereniteaPotTask,该任务通过 IStringLocalizer<GoToSereniteaPotTask> 匹配 阿圆壶灵信任洞天百宝 等 OCR 文案,但仓库中没有任何 GoToSereniteaPotTask.*.resx(已用 rg --files 检查),所以 Italian 会全部回落成中文。可能造成的影响:用户选择 Italian 后运行一条龙里的尘歌壶奖励时,找不到阿圆或对话选项,任务会失败或空转。推荐修复方案:在把 it 暴露为可选游戏语言的同时,补齐 GoToSereniteaPotTask.it.resx(或在该任务中明确禁用/回退到支持的语言)。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This task has no resx for any non-Chinese locale (en/fr/it all missing GoToSereniteaPotTask.*.resx, verified with rg --files) — it's a pre-existing gap affecting every non-Chinese language, not something introduced by exposing it. Out of scope for this PR; happy to file a follow-up PR to add it once the base localization here is merged.

- 上钩: "preso" matched the catch message, not the bite prompt
  ("Ha abboccato!") — use case-safe substring "bboccato"
- AutoDomainTask: add Italian values for 匹配挑战/快速编队/限时全部开放/限时开放,
  which the task reads but no non-Chinese locale currently provides

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

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0bbaee5af

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


[ObservableProperty] private FrozenDictionary<string, string> _languageDict =
new[] { "zh-Hans", "zh-Hant", "en", "ja" }
new[] { "zh-Hans", "zh-Hant", "en", "ja", "it" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 随 UI 语言入口一起提供 it.json

严重程度:P2。问题位置:新增的 it 被放进同一个 LanguageDict,而该字典同时驱动“UI Language”和“Game Language”下拉框;问题原因:JsonTranslationService.LoadMap 只会读取 User\I18n\it.json,但本提交没有加入该文件(仓库当前仅随包提供 en.json/ja.json),用户初次或离线切到 Italian UI 时翻译表为空。可能造成的影响:界面仍显示中文,新增的 Italian UI 选项实际不可用。推荐修复方案:随提交补齐 BetterGenshinImpact/User/I18n/it.json,或拆分 UI 语言和游戏 OCR 语言列表,只在 UI 翻译文件可用时暴露 UI 选项。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 4662754: added BetterGenshinImpact/User/I18n/it.json (864 entries, from the companion bettergi-i18n PR) alongside en.json/ja.json, so the Italian UI option now has a translation table on first run/offline. It's already covered by the existing User\** CopyToOutputDirectory wildcard in the csproj, same as ja.json, so no extra project entry was needed.

Comment on lines +120 to +121
<data name="今日奖励已领取" xml:space="preserve">
<value>Ricompense giornaliere riscattate</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 补全每日奖励检查的入口匹配

严重程度:P2。问题位置:CheckRewardsTask.it.resx 只新增了最终“已领取”文案;问题原因:CheckRewardsTask.Start 进入冒险之证时仍使用硬编码中文 GetConfirmRa(true,"每日委托奖励")btn.Text == "委托",Italian 游戏界面不会出现这些 OCR 文本,前置等待会超时且后续检查不在正确页面上进行。可能造成的影响:Italian 语言下运行检查每日奖励/通知时容易误报“未领取”或无法正确打开委托页。推荐修复方案:把“每日委托奖励”和“委托”也加入本地化资源,并在该任务中使用对应的 Italian 正则匹配。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Confirmed, but this is a pre-existing gap across the whole multi-language system, not introduced by this PR: CheckRewardsTask.cs:57,63 hardcode the Chinese OCR targets ('每日委托奖励', '委托') directly in the call sites, and no locale (including fr/en) supplies alternatives. A real fix needs refactoring those call sites to use localized keys for every language, which is out of scope here — happy to tackle it in a follow-up PR.

Comment on lines +135 to +136
<data name="快速编队" xml:space="preserve">
<value>Configurazione rapida</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 本地化开始挑战按钮后再开放自动秘境

严重程度:P2。问题位置:AutoDomainTask.it.resx 新增了 Italian 秘境 OCR 资源,但没有覆盖进入战斗前的按钮文案;问题原因:EnterDomain 后续仍以 GetConfirmRa("开始挑战") 作为点击开始前的门禁,而 WaitForElementDisappear 在 Italian 界面找不到中文文本时会直接返回,导致内部点击确认按钮的回调不执行。可能造成的影响:Italian 游戏语言下进入队伍界面后不会点击 Inizia la sfida,自动秘境会卡在队伍界面或后续等待战斗失败。推荐修复方案:为 开始挑战(以及需要等待的 单人挑战)增加 Italian 资源并在调用处使用本地化文本,或改成不依赖中文 OCR 的模板按钮点击。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Confirmed, but same as the CheckRewardsTask case: AutoDomainTask.cs:111-118 (GetConfirmRa for '开始挑战' / '单人挑战') hardcodes the Chinese OCR targets in the code itself, and no non-Chinese locale (fr/en included) provides them — a pre-existing gap in the multi-language system, not introduced by this PR. Fixing it properly means refactoring those call sites plus adding keys for every language, which I'll leave for a follow-up PR.

Comment on lines +123 to +124
<data name="挑战达成" xml:space="preserve">
<value>Sfida completata</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 放宽意大利语挑战完成匹配

严重程度:P2。问题位置:挑战达成 的 Italian OCR 资源;问题原因:IsDomainEnd 对 OCR 原文直接执行 Regex.IsMatch(text, challengeCompletedLocalizedString),但这里配置成带固定空格的 Sfida completata,不像其他语言和新增测试那样使用 Sfida.*completata 容忍 OCR 丢空格/插入分隔符。可能造成的影响:Italian 语言下秘境结束提示被识别成 Sfidacompletata 或类似无空格文本时,自动秘境无法及时判断挑战结束,继续等待直到后续超时。推荐修复方案:把该值改为 Sfida.*completata 或只匹配 completata 等更稳健的正则。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 4662754: changed the 挑战达成 value to (Sfida|completata), mirroring the French tolerant pattern (Défi|terminé) instead of the rigid literal string, and aligned the OCR test pattern in PaddleOcrServiceTests.cs to match.

Comment on lines +144 to +145
<data name="快速选择" xml:space="preserve">
<value>Selezione rapida</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 让快速选择匹配容忍 OCR 空格

严重程度:P2。问题位置:快速选择 的 Italian OCR 资源;问题原因:AutoArtifactSalvageTask 会用 Regex.IsMatch(ocr.Text, quickSelectLocalizedString) 找快速选择按钮,英文和法文资源都用 .* 容忍 OCR 断词,但这里写成固定的 Selezione rapida,而本提交自己的 OCR 测试也用 Selezione.*rapida 作为 Italian 期望模式。可能造成的影响:Italian 游戏语言下按钮被识别为 Selezionerapida 或带换行/多空格时,自动圣遗物分解无法点击快速选择并中断。推荐修复方案:将该值改为 Selezione.*rapida

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 4662754: changed the 快速选择 value to Selezione.*rapida, matching the French pattern (Sélection.*rapide) and the existing OCR test expectation which already used Selezione.*rapida.

…I translation

- 挑战达成/快速选择: mirror the French tolerant patterns
- ship User/I18n/it.json like en/ja so the Italian UI option works
  on first run and offline

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@BetterGenshinImpact/User/I18n/it.json`:
- Around line 137-139: Update the affected Italian localization fragments at the
shown entries to preserve their required leading or trailing spaces when
concatenated with keys, buttons, inputs, and paths: add the missing leading
spaces for the fragments near “后才进行快速传送” and line 272, and missing trailing
spaces near lines 327 and 378. Keep the translated wording unchanged unless
converting a fragment into a complete sentence.
🪄 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: 99c2bd79-28c8-4c81-b28c-cb471c0f60be

📥 Commits

Reviewing files that changed from the base of the PR and between f0bbaee and 4662754.

📒 Files selected for processing (4)
  • BetterGenshinImpact/GameTask/AutoArtifactSalvage/AutoArtifactSalvageTask.it.resx
  • BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.it.resx
  • BetterGenshinImpact/User/I18n/it.json
  • Test/BetterGenshinImpact.UnitTest/CoreTests/RecognitionTests/OCRTests/PaddleOcrServiceTests.cs
🚧 Files skipped from review as they are similar to previous changes (3)
  • Test/BetterGenshinImpact.UnitTest/CoreTests/RecognitionTests/OCRTests/PaddleOcrServiceTests.cs
  • BetterGenshinImpact/GameTask/AutoDomain/AutoDomainTask.it.resx
  • BetterGenshinImpact/GameTask/AutoArtifactSalvage/AutoArtifactSalvageTask.it.resx

Comment thread BetterGenshinImpact/User/I18n/it.json Outdated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4662754607

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="今日奖励已领取" xml:space="preserve">
<value>Ricompense giornaliere riscattate</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 去掉每日已领取匹配中的空格

严重程度:P2。问题位置:CheckRewardsTask.it.resx今日奖励已领取。问题原因:CheckRewardsTask.Start 把该值传给 RecognitionObject.OcrMatch,而 ImageRegion 在匹配前会对 OCR 结果执行 StringUtils.RemoveAllSpace(result.Text),所以实际文本会变成 Ricompensegiornaliereriscattate,无法包含这里带空格的 Ricompense giornaliere riscattate。可能造成的影响:Italian 游戏语言下即使已经在委托奖励页(或后续修复入口匹配后),已领取状态也会被判定为未领取并发送误报。推荐修复方案:把资源改成无空格的匹配串,或使用更短且无空格的关键词如 riscattate

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 1720f78 — stripped the spaces from the Italian value for 今日奖励已领取 (now "riscattate"), matching the space-free EN/FR convention for OcrMatch.

<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="地脉异常" xml:space="preserve">
<value>Anomalia geomantica</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 放宽意大利语地脉异常匹配

严重程度:P2。问题位置:AutoDomainTask.it.resx地脉异常。问题原因:AutoDomainTask 在选择周日/限时全开奖励和关闭秘境提示时都会用 Regex.IsMatch(t.Text, this.leyLineDisorderLocalizedString) 匹配该资源,但这里写成固定空格的 Anomalia geomantica,而本提交新增的 OCR 测试已经按 Anomalia.*geomantica 预期来容忍空格丢失;当 OCR 返回 Anomaliageomantica 时资源不会命中。可能造成的影响:Italian 语言下秘境提示无法稳定识别,周日奖励定位可能失效,进入战斗前关闭提示也可能多等到超时或误点兜底位置。推荐修复方案:改成无空格关键词(如 geomantica,同时兼容现有 Contains 调用)或同步修改调用处统一使用可容忍空格的正则。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 1720f78 — changed 地脉异常 to the tolerant pattern "Anomalia.*geomantica", matching the fr convention (Anomalie.*énergétique); no test asserted the old literal value.

…in it.json

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

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1720f78096

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +139 to +142
<value>Disponibile per un periodo limitato</value>
</data>
<data name="限时全部开放" xml:space="preserve">
<value>Accesso completo a tempo limitato</value>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 放宽限时开放 OCR 匹配

严重程度:P2。问题位置:AutoDomainTask.it.resx限时开放/限时全部开放;问题原因:当前最终提交虽然已经补上这两个键,但值仍是带字面空格的长短语,而 AutoDomainTask 在秘境入口直接用 Regex.IsMatch(t.Text, ...) 判断限时全开,提交中新增的 OCR 测试也显示意大利语多词文本需要用 .* 容忍空格丢失。可能造成的影响:Italian 游戏语言下如果 OCR 把 Accesso completo a tempo limitato 识别成无空格或断词变体,限时全开不会被识别,非周日活动期间不会按 SundaySelectedValue 选择奖励,可能刷错材料。推荐修复方案:把这两个值改成类似 Disponibile.*per.*un.*periodo.*limitato / Accesso.*completo.*a.*tempo.*limitato,或在调用处统一对 OCR 文本去空格后匹配。

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in f104f0f — changed 限时开放 and 限时全部开放 to tolerant patterns (Disponibile.*per.*un.*periodo.*limitato / Accesso.*completo.*a.*tempo.limitato), consistent with the . convention used elsewhere for Regex.IsMatch matches.

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