Skip to content

fix: clarity issue with ambiguous string SET#1169

Merged
znelson merged 4 commits intocrosspoint-reader:masterfrom
ariel-lindemann:fix/selected_str
Feb 27, 2026
Merged

fix: clarity issue with ambiguous string SET#1169
znelson merged 4 commits intocrosspoint-reader:masterfrom
ariel-lindemann:fix/selected_str

Conversation

@ariel-lindemann
Copy link
Contributor

Summary

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

Fixes a clarity issue regarding the translation string STR_SET. The issue lies in the fact that the english word can have different meanings.

The only time the string is used is in the language selectio screen, where it has the meaning of selected. (As in The language has been set to French).

Another meaning can be configured. (As in _The KOReader username has been set). This is the meaning many of the translations have taken. The reason that the string is right above STR_NOT_SET (which is meant as not configured).

With this PR I propose to explicitly use the term "Selected". There are two good reasons for this:

  • it removes the confusion and the misleading translations
  • it is consistent with the button label Select, communicating the link between the two (the row will be marked Selected if you press the buttpn Select. Much clearer than now)
  • What changes are included?

Removed the unused strings and added translations for the new string STR_SELECTED for the languages I know.

tagging the translators for feedback:
fr: @Spigaw @CaptainFrito
de: @DavidOrtmann
cs: @brbla
pt: @yagofarias
it: @andreaturchet @fargolinux
ru: @madebyKir @mrtnvgr
es: @yeyeto2788 @Skrzakk @pablohc
sv: @dawiik
ca: @angeldenom
uj: @mirus-ua
be: @dexif

Additional Context

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

the Issue was introduced in #1020. Previously, if a language was selected it was marked with [ON] (STR_ON_MARKER). I considered reverting it back to that, but the solution I described above seemed superior.


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 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 84d0f1d and 16e13f4.

📒 Files selected for processing (14)
  • lib/I18n/translations/belarusian.yaml
  • lib/I18n/translations/catalan.yaml
  • lib/I18n/translations/czech.yaml
  • lib/I18n/translations/english.yaml
  • lib/I18n/translations/french.yaml
  • lib/I18n/translations/german.yaml
  • lib/I18n/translations/italian.yaml
  • lib/I18n/translations/portuguese.yaml
  • lib/I18n/translations/romanian.yaml
  • lib/I18n/translations/russian.yaml
  • lib/I18n/translations/spanish.yaml
  • lib/I18n/translations/swedish.yaml
  • lib/I18n/translations/ukrainian.yaml
  • src/activities/settings/LanguageSelectActivity.cpp
💤 Files with no reviewable changes (7)
  • lib/I18n/translations/catalan.yaml
  • lib/I18n/translations/swedish.yaml
  • lib/I18n/translations/portuguese.yaml
  • lib/I18n/translations/czech.yaml
  • lib/I18n/translations/belarusian.yaml
  • lib/I18n/translations/spanish.yaml
  • lib/I18n/translations/french.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • lib/I18n/translations/romanian.yaml
  • lib/I18n/translations/ukrainian.yaml
  • lib/I18n/translations/english.yaml
  • lib/I18n/translations/italian.yaml
📜 Recent 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 (3)
📓 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.
Learnt from: ariel-lindemann
Repo: crosspoint-reader/crosspoint-reader PR: 1133
File: lib/I18n/translations/finnish.yaml:92-92
Timestamp: 2026-02-23T22:11:51.854Z
Learning: In translation YAML files under `lib/I18n/translations/`, literal percent signs (`%`) in strings like STR_HIDE_BATTERY, STR_GO_TO_PERCENT, and STR_PERCENT_STEP_HINT do not need to be escaped as `%%`. This is the established pattern across all language translations and does not cause formatting errors.
📚 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/german.yaml
  • lib/I18n/translations/russian.yaml
📚 Learning: 2026-02-23T06:18:08.408Z
Learnt from: raygan
Repo: crosspoint-reader/crosspoint-reader PR: 1116
File: src/activities/settings/WallabagSettingsActivity.cpp:57-75
Timestamp: 2026-02-23T06:18:08.408Z
Learning: When navigating from a settings activity to KeyboardEntryActivity (e.g., KOReaderSettingsActivity, WallabagSettingsActivity), call exitActivity() on the parent before calling enterNewActivity(new KeyboardEntryActivity(...)). The KeyboardEntryActivity should then call exitActivity() via its callbacks to return to the parent. Note: ConfirmationActivity does not require exitActivity() before entering KeyboardEntryActivity. Apply this pattern to similar settings activities in this module.

Applied to files:

  • src/activities/settings/LanguageSelectActivity.cpp
🔇 Additional comments (3)
lib/I18n/translations/german.yaml (1)

229-229: LGTM!

The German translation "Ausgewählt" correctly conveys "Selected" as a past participle, which pairs well with the existing "Auswahl" (Select) button label on line 228.

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

228-229: LGTM!

The Russian translations are grammatically correct: "Выбрать" (to select) for the action button and "Выбран" (selected) for the state indicator. This aligns with the suggestion from the previous review.

src/activities/settings/LanguageSelectActivity.cpp (1)

78-78: LGTM!

The change from STR_SET to STR_SELECTED correctly addresses the ambiguity issue described in the PR objectives. For locales that haven't yet added STR_SELECTED translations, the build-time fallback mechanism will use the English string. Based on learnings: missing translation keys in non-English YAML files are automatically filled with English strings at build time by the gen_i18n.py script.


📝 Walkthrough

Walkthrough

Deleted translation keys STR_SET and STR_ON_MARKER across multiple locale YAMLs, added STR_SELECTED in several locales, and updated LanguageSelectActivity.cpp to use STR_SELECTED when rendering the currently selected language.

Changes

Cohort / File(s) Summary
Removed keys (multiple locales)
lib/I18n/translations/belarusian.yaml, lib/I18n/translations/catalan.yaml, lib/I18n/translations/czech.yaml, lib/I18n/translations/french.yaml, lib/I18n/translations/portuguese.yaml, lib/I18n/translations/spanish.yaml, lib/I18n/translations/swedish.yaml
Deleted translation keys STR_SET and STR_ON_MARKER.
Removed keys + STR_SELECTED added
lib/I18n/translations/english.yaml, lib/I18n/translations/german.yaml, lib/I18n/translations/italian.yaml, lib/I18n/translations/romanian.yaml, lib/I18n/translations/russian.yaml, lib/I18n/translations/ukrainian.yaml
Removed STR_SET and STR_ON_MARKER; added STR_SELECTED in these locale files.
UI code update
src/activities/settings/LanguageSelectActivity.cpp
Replaced usage of STR_SET with STR_SELECTED when rendering the currently selected language label.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • osteotek
  • znelson
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: fixing a clarity issue with the ambiguous string 'SET' by replacing it with 'SELECTED'.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation for removing STR_SET and STR_ON_MARKER while adding STR_SELECTED across translation files.

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


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 and usage tips.

znelson
znelson previously approved these changes Feb 24, 2026
STR_STATE_OFF: "OFF"
STR_SET: "Défini"
STR_NOT_SET: "Non défini"
STR_DIR_LEFT: "Gauche"
Copy link
Contributor

@CaptainFrito CaptainFrito Feb 25, 2026

Choose a reason for hiding this comment

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

"Sélectionné" would be the right word but that's very long, alternatively we could use "Actif" in this context. Not a fan of either honestly. What do you think @Spigaw ?

@znelson znelson merged commit 09cef70 into crosspoint-reader:master Feb 27, 2026
6 checks passed
th0m4sek added a commit to th0m4sek/crosspoint-reader-polish that referenced this pull request Feb 27, 2026
th0m4sek added a commit to th0m4sek/crosspoint-reader-polish that referenced this pull request Feb 28, 2026
…er#1169,crosspoint-reader#1031

feat: Auto Page Turn for Epub Reader (crosspoint-reader#1219)
fix: clarity issue with ambiguous string SET (crosspoint-reader#1169)
feat: slim footnotes support (crosspoint-reader#1031)
znelson pushed a commit that referenced this pull request Feb 28, 2026
## Summary

* **What is the goal of this PR?** Add missing strings and tweaks for
polish language
* **What changes are included?**

## 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? _**< YES | PARTIALLY | NO
>**_
lukestein pushed a commit to lukestein/crosspoint-reader that referenced this pull request Feb 28, 2026
…t-reader#1169,crosspoint-reader#1031 +tweaks (crosspoint-reader#1227)

## Summary

* **What is the goal of this PR?** Add missing strings and tweaks for
polish language
* **What changes are included?**

## 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? _**< YES | PARTIALLY | 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.

6 participants