Skip to content

feat: Add full Italian translations#1144

Merged
znelson merged 4 commits intocrosspoint-reader:masterfrom
andreaturchet:master
Feb 24, 2026
Merged

feat: Add full Italian translations#1144
znelson merged 4 commits intocrosspoint-reader:masterfrom
andreaturchet:master

Conversation

@andreaturchet
Copy link
Contributor

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 >

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • lib/I18n/I18nStrings.cpp

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Documentation
docs/translators.md
Added new translator entry for Italian translation contributor.
I18n Infrastructure
lib/I18n/I18nKeys.h, lib/I18n/I18nStrings.h
Extended Language enum with ITALIAN = 12 and added corresponding STRINGS_IT[] declaration and switch-case mapping in getStringArray() function to route Italian language requests.
Translation Data
lib/I18n/translations/italian.yaml
New Italian translation resource file containing 320+ string mappings for UI labels, messages, hints, and prompts (STR_BOOTING, STR_LOADING, STR_WIFI_NETWORKS, STR_ERROR_MSG, STR_THEME_CLASSIC, etc.) with language metadata.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #1049: Adds new language pack with identical pattern of STRINGS array, enum entry, getStringArray case, translations YAML, and translator documentation.
  • PR #1120: Modifies same I18n code paths by adding Language enum entry, STRINGS_* declaration, and getStringArray switch case.
  • PR #987: Adds new language by following the same pattern of adding STRINGS array, Language enum, getStringArray mapping, translation YAML, and translator entry.

Suggested reviewers

  • osteotek
  • znelson
  • lukestein
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: Add full Italian translations' clearly and concisely summarizes the main change—adding complete Italian language support to the project.
Description check ✅ Passed The description is directly related to the changeset, detailing the specific files added (italian.yaml, generated C++ files) and modifications to docs/translators.md.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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 | 🔴 Critical

Generate 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.cpp is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 13592db and 80c40da.

📒 Files selected for processing (4)
  • docs/translators.md
  • lib/I18n/I18nKeys.h
  • lib/I18n/I18nStrings.h
  • lib/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.h
  • lib/I18n/I18nKeys.h
  • lib/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.

@andreaturchet
Copy link
Contributor Author

@znelson done with all the necessary translation.

@znelson
Copy link
Contributor

znelson commented Feb 24, 2026

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!

@znelson znelson requested a review from a team February 24, 2026 14:56
@znelson znelson merged commit d6d0cc8 into crosspoint-reader:master Feb 24, 2026
6 checks passed
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
el pushed a commit to el/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
el pushed a commit to el/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
el pushed a commit to el/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
el pushed a commit to el/crosspoint-reader that referenced this pull request Feb 24, 2026
## 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]>
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.

3 participants