feat: Add full Italian translations#1144
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR adds complete Italian language support to the application by introducing a new translator entry, updating the internationalization infrastructure with Italian enum values and string declarations, and providing a comprehensive Italian translation resource file. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/I18n/I18nKeys.h (1)
20-397:⚠️ Potential issue | 🔴 CriticalGenerate I18nStrings.cpp by running gen_i18n.py before merging.
The new STRINGS_IT declaration in I18nKeys.h requires a corresponding definition. The generated file
lib/I18n/I18nStrings.cppis missing from the repository and must be created by executing:python3 scripts/gen_i18n.py lib/I18n/translations lib/I18n/This script will generate the STRINGS_IT array definition and update all auto-generated files. Without this step, the build will fail with undefined reference linker errors.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/I18n/I18nKeys.h` around lines 20 - 397, The header adds a new STRINGS_IT symbol but the generated definitions file is missing; run the generator script to produce lib/I18n/I18nStrings.cpp (which defines STRINGS_IT and updates LANGUAGE_NAMES/CHARACTER_SETS and other auto-generated arrays) by executing the generator: python3 scripts/gen_i18n.py lib/I18n/translations lib/I18n/, then add/commit the resulting I18nStrings.cpp so the linker can find STRINGS_IT referenced by getStringArray/Language.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@lib/I18n/I18nKeys.h`:
- Around line 20-397: The header adds a new STRINGS_IT symbol but the generated
definitions file is missing; run the generator script to produce
lib/I18n/I18nStrings.cpp (which defines STRINGS_IT and updates
LANGUAGE_NAMES/CHARACTER_SETS and other auto-generated arrays) by executing the
generator: python3 scripts/gen_i18n.py lib/I18n/translations lib/I18n/, then
add/commit the resulting I18nStrings.cpp so the linker can find STRINGS_IT
referenced by getStringArray/Language.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
docs/translators.mdlib/I18n/I18nKeys.hlib/I18n/I18nStrings.hlib/I18n/translations/italian.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build
- GitHub Check: cppcheck
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-02-16T22:25:35.674Z
Learnt from: whyte-j
Repo: crosspoint-reader/crosspoint-reader PR: 733
File: lib/I18n/I18nKeys.h:271-272
Timestamp: 2026-02-16T22:25:35.674Z
Learning: In the crosspoint-reader i18n system (lib/I18n/), missing translation keys in non-English YAML files are automatically filled with English strings at build time by the gen_i18n.py script. All generated string arrays (STRINGS_EN, STRINGS_ES, etc.) have identical lengths, so runtime array indexing is safe without per-string fallback logic. The system prints "INFO: '{key}' missing in {lang_code}, using English fallback" during code generation when this occurs.
Applied to files:
lib/I18n/I18nStrings.hlib/I18n/I18nKeys.hlib/I18n/translations/italian.yaml
📚 Learning: 2026-02-23T22:11:42.181Z
Learnt from: ariel-lindemann
Repo: crosspoint-reader/crosspoint-reader PR: 1133
File: lib/I18n/translations/finnish.yaml:92-92
Timestamp: 2026-02-23T22:11:42.181Z
Learning: In translation YAML files located in lib/I18n/translations/, literal percent signs (%) in strings (e.g., STR_HIDE_BATTERY, STR_GO_TO_PERCENT, STR_PERCENT_STEP_HINT) do not require escaping as %% and this convention is consistent across all language translations. Ensure that this pattern is followed for all YAML files in this directory to avoid introducing incorrect formatting markers in localized strings.
Applied to files:
lib/I18n/translations/italian.yaml
🧬 Code graph analysis (1)
lib/I18n/I18nKeys.h (1)
lib/I18n/I18nStrings.h (1)
i18n_strings(8-24)
🔇 Additional comments (3)
docs/translators.md (1)
23-25: LGTM — Italian translator entry added.Thanks for updating the Italian contributor list.
lib/I18n/I18nStrings.h (1)
22-22: LGTM — STRINGS_IT declaration added.The new symbol declaration fits the existing i18n string set.
lib/I18n/translations/italian.yaml (1)
92-307: Percent literal/format usage aligns with existing convention.Strings that include
%literals or format specifiers keep single%usage, consistent with the rest of the translations.Based on learnings: In translation YAML files located in lib/I18n/translations/, literal percent signs (%) in strings do not require escaping as %% and this convention is consistent across all language translations.
|
@znelson done with all the necessary translation. |
|
I18nStrings.cpp is auto-generated at build time, so no need to include here. I was able to delete that file so I think this change is good to go now! |
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
## Summary * **What is the goal of this PR?** Implements the Italian language translation for CrossPoint Reader. * **What changes are included?** * Added [lib/I18n/translations/italian.yaml] with Italian translations for all strings. * Generated the necessary C++ files by running the [gen_i18n.py] script. * Added myself to the [docs/translators.md] file under the Italian section. ## Additional Context --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**< PARTIALLY >**_ --------- Co-authored-by: Zach Nelson <[email protected]>
Summary
Additional Context
AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? < PARTIALLY >