Skip to content

feat: add Catalan strings#1049

Merged
osteotek merged 8 commits intocrosspoint-reader:masterfrom
angeldenom:feature/catalan-translation
Feb 21, 2026
Merged

feat: add Catalan strings#1049
osteotek merged 8 commits intocrosspoint-reader:masterfrom
angeldenom:feature/catalan-translation

Conversation

@angeldenom
Copy link
Contributor

Summary

  • What is the goal of this PR? (e.g., Implements the new feature for file uploading.)

Add support for Catalan language user interface.

  • What changes are included?

A new i18n file catalan.yml.

Additional Context

  • Add any other information that might be helpful for the reviewer (e.g., performance implications, potential risks,
    specific areas to focus on).

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? NO

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1594a42 and 9ac286e.

📒 Files selected for processing (1)
  • lib/I18n/translations/catalan.yaml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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.
📚 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/translations/catalan.yaml
⏰ 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). (1)
  • GitHub Check: build
🔇 Additional comments (2)
lib/I18n/translations/catalan.yaml (2)

1-4: LGTM! Metadata section is correctly structured.

The language metadata follows the expected format with proper language name, code, and ordering.


5-319: LGTM! Comprehensive Catalan translation with all previous issues addressed.

The translation file is well-structured:

  • All format specifiers (%zu, %d, %.2f%%, %s) are correctly preserved
  • Multi-line escape sequences (\\n) are properly formatted (e.g., line 74)
  • Previous typos identified in earlier reviews have been fixed ("connectar-vos", "totes les dades", "transferències", "WiFi" capitalization, "Voleu" formality)
  • Formality is consistent: formal "voleu/Premeu" for questions and instructions, imperative forms for action buttons (common Catalan UI pattern)

Based on learnings, missing translation keys will be automatically filled with English strings at build time by the gen_i18n.py script, so partial coverage is handled safely.


📝 Walkthrough

Walkthrough

Adds Catalan language support and translator credit: updates docs, declares and wires STRINGS_CA into i18n headers, adds Language::CATALAN, and adds a full Catalan translations YAML file.

Changes

Cohort / File(s) Summary
Documentation
docs/translators.md
Fixed Romanian translator bullet formatting; added Catalan translator credit and newline.
I18n Keys & Declarations
lib/I18n/I18nKeys.h, lib/I18n/I18nStrings.h
Added CATALAN = 9 to enum class Language, declared extern const char* const STRINGS_CA[];, and added getStringArray case to return STRINGS_CA.
Catalan Translations
lib/I18n/translations/catalan.yaml
Added complete Catalan translation file with language metadata and ~300+ localized keys.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • znelson
  • osteotek
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add Catalan strings' directly and concisely describes the main change - adding Catalan language support through new translation strings.
Description check ✅ Passed The description clearly states the goal of adding Catalan language UI support and mentions the new i18n file catalan.yml, which aligns with the changeset.

✏️ 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.

Actionable comments posted: 3

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c55c15 and ca89ad3.

📒 Files selected for processing (4)
  • docs/translators.md
  • lib/I18n/I18nKeys.h
  • lib/I18n/I18nStrings.h
  • lib/I18n/translations/catalan.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 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/translations/catalan.yaml
  • lib/I18n/I18nKeys.h
🧬 Code graph analysis (1)
lib/I18n/I18nKeys.h (1)
lib/I18n/I18nStrings.h (1)
  • i18n_strings (8-21)
⏰ 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). (1)
  • GitHub Check: build
🔇 Additional comments (4)
docs/translators.md (1)

37-41: LGTM!

The Romanian formatting fix and new Catalan translator entry follow the established pattern for other languages in this file.

lib/I18n/I18nStrings.h (1)

19-19: LGTM!

The STRINGS_CA declaration follows the established pattern for other language string arrays and uses the correct ISO 639-1 language code suffix.

lib/I18n/I18nKeys.h (1)

17-17: LGTM!

The Catalan language support is properly integrated:

  • Forward declaration of STRINGS_CA follows the existing pattern
  • CATALAN = 9 enum value is sequential and placed correctly before _COUNT
  • getStringArray switch case correctly returns i18n_strings::STRINGS_CA

Also applies to: 31-31, 383-384

lib/I18n/translations/catalan.yaml (1)

1-4: LGTM on the file structure and metadata.

The metadata correctly identifies Catalan with _order: "9" matching the CATALAN = 9 enum value in I18nKeys.h, and format specifiers (%zu, %d, %.2f%%) are properly preserved throughout the translations.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/I18n/translations/catalan.yaml`:
- Line 267: Fix the typo in the Catalan translation string STR_CALIBRE_DESC by
replacing "tranferències" with the correct spelling "transferències" so the
value becomes "Usa les transferències sense fils de Calibre"; update the
translation entry for STR_CALIBRE_DESC accordingly.
- Line 47: The translation string STR_HOW_CONNECT contains a typo
("conectar-vos"); update its value to use the correct Catalan spelling
"connectar-vos" by editing the STR_HOW_CONNECT entry in
lib/I18n/translations/catalan.yaml so the line reads STR_HOW_CONNECT: "Com voleu
connectar-vos?".
- Line 139: The Catalan translation for STR_CLEAR_CACHE_WARNING_1 has incorrect
gender/number agreement ("tota les dades"); update the string value to use the
feminine plural "totes les dades" so it reads: STR_CLEAR_CACHE_WARNING_1 ->
"Això esborrarà totes les dades de lectura de la memòria cau." Locate
STR_CLEAR_CACHE_WARNING_1 in the translations (catalan.yaml) and replace the
phrase accordingly.

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.

Actionable comments posted: 2

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ca89ad3 and 1594a42.

📒 Files selected for processing (1)
  • lib/I18n/translations/catalan.yaml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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.
📚 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/translations/catalan.yaml
⏰ 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 comments (3)
lib/I18n/translations/catalan.yaml (3)

1-3: LGTM!

Metadata is correctly defined and aligns with the Language::CATALAN = 9 enum declaration in the header files.


47-47: Previously flagged typos have been corrected.

The fixes from commit 1594a42 are confirmed:

  • Line 47: "connectar-vos" ✓
  • Line 139: "totes les dades" ✓
  • Line 267: "transferències" ✓

Also applies to: 139-139, 267-267


35-35: Format string placeholders correctly preserved.

The format specifiers (%zu, %d, %.2f, %%, %s) and escape sequences (\\n) are properly maintained, ensuring runtime string formatting will work correctly.

Also applies to: 306-308

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/I18n/translations/catalan.yaml`:
- Line 312: The Catalan translation key STR_UPLOAD_PROMPT uses the informal
"Vols" which is inconsistent with the rest of the prompts; update the value for
STR_UPLOAD_PROMPT to use the formal plural "Voleu" so it reads "Voleu pujar la
posició actual?" to match other keys like "Voleu oblidar" and "Com voleu
connectar-vos?".
- Line 219: The translation value for key STR_SCAN_QR_WIFI_HINT uses
inconsistent capitalization ("Wifi"); update the string to use "WiFi" to match
other occurrences (e.g., change "o escanegeu el codi QR amb el telèfon per
connectar el Wifi." to use "WiFi"), keeping the rest of the sentence identical
and preserving punctuation and YAML quoting.

@lukestein lukestein requested a review from a team February 21, 2026 01:16
@osteotek osteotek merged commit f02c978 into crosspoint-reader:master Feb 21, 2026
6 checks passed
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 21, 2026
## Summary

* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)

Add support for Catalan language user interface.
* **What changes are included?**

A new i18n file catalan.yml.

## Additional Context

* Add any other information that might be helpful for the reviewer
(e.g., performance implications, potential risks,
  specific areas to focus on).

---

### 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?  NO
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.

5 participants