feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
_language_name: "English"
|
feat: sort languages in selection menu (#1071)
## Summary
* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)
Currently we are displaying the languages in the order they were added
(as in the `Language` enum). However, as new languages are coming in,
this will quickly be confusing to the users.
But we can't just change the ordering of the enum if we want to respect
bakwards compatibility.
So my proposal is to add a mapping of the alphabetical order of the
languages. I've made it so that it's generated by the `gen_i18n.py`
script, which will be used when a new language is added.
* **What changes are included?**
Added the array from the python script and changed
`LanguageSelectActivity` to use the indices from there. Also commited
the generated `I18nKeys.h`
## Additional Context
* Add any other information that might be helpful for the reviewer
(e.g., performance implications, potential risks,
specific areas to focus on).
I was wondering if there is a better way to sort it. Currently, it's by
unicode value and Czech and Russian are last, which I don't know it it's
the most intuitive.
The current order is:
`Català, Deutsch, English, Español, Français, Português (Brasil),
Română, Svenska, Čeština, Русский`
---
### 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 >**_
2026-02-25 17:44:17 +01:00
|
|
|
_language_code: "EN"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
_order: "0"
|
|
|
|
|
|
|
|
|
|
STR_CROSSPOINT: "CrossPoint"
|
|
|
|
|
STR_BOOTING: "BOOTING"
|
|
|
|
|
STR_SLEEPING: "SLEEPING"
|
feat: Tweak Lyra popup UI (#768)
## Summary
I want to preface this PR by stating that the proposed changes are
subjective to people's opinions. The following is just my suggestion,
but I'm of course open to changes.
The popups in the currently implemented version of the Lyra theme feel a
bit out of place. This PR suggests an updated version which looks a bit
more polished and in line with the rest of the theme.
I've also taken the liberty to remove the ellipsis behind the text of
the popups, as they made the popup feel a bit off balance (example
below).
With the applied changes, popups will look like this.

The vertical position is (more or less) aligned to be in line with the
sleep button. I'm aware the popup is used for other purposes aside from
the sleep message, but this still felt like a good place. It's also a
place where your eyes naturally 'rest'.
The popup has a small 2px white outline, neatly separating it from
whatever is behind it.
### Alternatives considered and rationale behind proposal
Initially I started out worked off the Figma design for the Lyra theme,
which [moves the
popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1)
to the bottom of the screen. To me, this results in popups that are much
too easy to miss:

After this, I tried moving the popup back up (to the position of the
sleep button), but to me it still kinda disappeared into the text of the
book:

Inverting the colors of the popup made things stand out the perfect
amount in my opinion. The white outline separates the popup from what is
behind it.

This looked much better to me. The only thing that felt a bit off to me,
was the balance due to the ellipsis at the end of the popup text. Also,
"Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more
'conversational' makes at all feel a bit more human-centric. But I'm no
copywriter, and English is not even my native language. So feel free to
chip in!
After tweaking that, I ended up with the final result:
_(Same picture as the first one shown in this PR)_

## Additional Context
* Figma design:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1
---
### 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**_
2026-02-19 10:23:34 +01:00
|
|
|
STR_ENTERING_SLEEP: "Going to sleep"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_BROWSE_FILES: "Browse Files"
|
|
|
|
|
STR_FILE_TRANSFER: "File Transfer"
|
|
|
|
|
STR_SETTINGS_TITLE: "Settings"
|
|
|
|
|
STR_CALIBRE_LIBRARY: "Calibre Library"
|
|
|
|
|
STR_CONTINUE_READING: "Continue Reading"
|
|
|
|
|
STR_NO_OPEN_BOOK: "No open book"
|
|
|
|
|
STR_START_READING: "Start reading below"
|
|
|
|
|
STR_BOOKS: "Books"
|
|
|
|
|
STR_NO_BOOKS_FOUND: "No books found"
|
|
|
|
|
STR_SELECT_CHAPTER: "Select Chapter"
|
|
|
|
|
STR_NO_CHAPTERS: "No chapters"
|
|
|
|
|
STR_END_OF_BOOK: "End of book"
|
|
|
|
|
STR_EMPTY_CHAPTER: "Empty chapter"
|
feat: Tweak Lyra popup UI (#768)
## Summary
I want to preface this PR by stating that the proposed changes are
subjective to people's opinions. The following is just my suggestion,
but I'm of course open to changes.
The popups in the currently implemented version of the Lyra theme feel a
bit out of place. This PR suggests an updated version which looks a bit
more polished and in line with the rest of the theme.
I've also taken the liberty to remove the ellipsis behind the text of
the popups, as they made the popup feel a bit off balance (example
below).
With the applied changes, popups will look like this.

The vertical position is (more or less) aligned to be in line with the
sleep button. I'm aware the popup is used for other purposes aside from
the sleep message, but this still felt like a good place. It's also a
place where your eyes naturally 'rest'.
The popup has a small 2px white outline, neatly separating it from
whatever is behind it.
### Alternatives considered and rationale behind proposal
Initially I started out worked off the Figma design for the Lyra theme,
which [moves the
popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1)
to the bottom of the screen. To me, this results in popups that are much
too easy to miss:

After this, I tried moving the popup back up (to the position of the
sleep button), but to me it still kinda disappeared into the text of the
book:

Inverting the colors of the popup made things stand out the perfect
amount in my opinion. The white outline separates the popup from what is
behind it.

This looked much better to me. The only thing that felt a bit off to me,
was the balance due to the ellipsis at the end of the popup text. Also,
"Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more
'conversational' makes at all feel a bit more human-centric. But I'm no
copywriter, and English is not even my native language. So feel free to
chip in!
After tweaking that, I ended up with the final result:
_(Same picture as the first one shown in this PR)_

## Additional Context
* Figma design:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1
---
### 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**_
2026-02-19 10:23:34 +01:00
|
|
|
STR_INDEXING: "Indexing"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_MEMORY_ERROR: "Memory error"
|
|
|
|
|
STR_PAGE_LOAD_ERROR: "Page load error"
|
|
|
|
|
STR_EMPTY_FILE: "Empty file"
|
|
|
|
|
STR_OUT_OF_BOUNDS: "Out of bounds"
|
|
|
|
|
STR_LOADING: "Loading..."
|
feat: Tweak Lyra popup UI (#768)
## Summary
I want to preface this PR by stating that the proposed changes are
subjective to people's opinions. The following is just my suggestion,
but I'm of course open to changes.
The popups in the currently implemented version of the Lyra theme feel a
bit out of place. This PR suggests an updated version which looks a bit
more polished and in line with the rest of the theme.
I've also taken the liberty to remove the ellipsis behind the text of
the popups, as they made the popup feel a bit off balance (example
below).
With the applied changes, popups will look like this.

The vertical position is (more or less) aligned to be in line with the
sleep button. I'm aware the popup is used for other purposes aside from
the sleep message, but this still felt like a good place. It's also a
place where your eyes naturally 'rest'.
The popup has a small 2px white outline, neatly separating it from
whatever is behind it.
### Alternatives considered and rationale behind proposal
Initially I started out worked off the Figma design for the Lyra theme,
which [moves the
popups](https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1)
to the bottom of the screen. To me, this results in popups that are much
too easy to miss:

After this, I tried moving the popup back up (to the position of the
sleep button), but to me it still kinda disappeared into the text of the
book:

Inverting the colors of the popup made things stand out the perfect
amount in my opinion. The white outline separates the popup from what is
behind it.

This looked much better to me. The only thing that felt a bit off to me,
was the balance due to the ellipsis at the end of the popup text. Also,
"Entering Sleep..." felt a bit.. engineer-y. I felt something a bit more
'conversational' makes at all feel a bit more human-centric. But I'm no
copywriter, and English is not even my native language. So feel free to
chip in!
After tweaking that, I ended up with the final result:
_(Same picture as the first one shown in this PR)_

## Additional Context
* Figma design:
https://www.figma.com/design/UhxoV4DgUnfrDQgMPPTXog/Lyra-Theme?node-id=2011-19296&t=Ppj6B2MrFRfUo9YX-1
---
### 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**_
2026-02-19 10:23:34 +01:00
|
|
|
STR_LOADING_POPUP: "Loading"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_LOAD_XTC_FAILED: "Failed to load XTC"
|
|
|
|
|
STR_LOAD_TXT_FAILED: "Failed to load TXT"
|
|
|
|
|
STR_LOAD_EPUB_FAILED: "Failed to load EPUB"
|
|
|
|
|
STR_SD_CARD_ERROR: "SD card error"
|
|
|
|
|
STR_WIFI_NETWORKS: "WiFi Networks"
|
|
|
|
|
STR_NO_NETWORKS: "No networks found"
|
|
|
|
|
STR_NETWORKS_FOUND: "%zu networks found"
|
|
|
|
|
STR_SCANNING: "Scanning..."
|
|
|
|
|
STR_CONNECTING: "Connecting..."
|
|
|
|
|
STR_CONNECTED: "Connected!"
|
|
|
|
|
STR_CONNECTION_FAILED: "Connection Failed"
|
|
|
|
|
STR_CONNECTION_TIMEOUT: "Connection timeout"
|
|
|
|
|
STR_FORGET_NETWORK: "Forget Network?"
|
|
|
|
|
STR_SAVE_PASSWORD: "Save password for next time?"
|
|
|
|
|
STR_REMOVE_PASSWORD: "Remove saved password?"
|
|
|
|
|
STR_PRESS_OK_SCAN: "Press OK to scan again"
|
|
|
|
|
STR_PRESS_ANY_CONTINUE: "Press any button to continue"
|
|
|
|
|
STR_SELECT_HINT: "LEFT/RIGHT: Select | OK: Confirm"
|
|
|
|
|
STR_HOW_CONNECT: "How would you like to connect?"
|
|
|
|
|
STR_JOIN_NETWORK: "Join a Network"
|
|
|
|
|
STR_CREATE_HOTSPOT: "Create Hotspot"
|
|
|
|
|
STR_JOIN_DESC: "Connect to an existing WiFi network"
|
|
|
|
|
STR_HOTSPOT_DESC: "Create a WiFi network others can join"
|
|
|
|
|
STR_STARTING_HOTSPOT: "Starting Hotspot..."
|
|
|
|
|
STR_HOTSPOT_MODE: "Hotspot Mode"
|
|
|
|
|
STR_CONNECT_WIFI_HINT: "Connect your device to this WiFi network"
|
|
|
|
|
STR_OPEN_URL_HINT: "Open this URL in your browser"
|
|
|
|
|
STR_OR_HTTP_PREFIX: "or http://"
|
|
|
|
|
STR_SCAN_QR_HINT: "or scan QR code with your phone:"
|
|
|
|
|
STR_CALIBRE_WIRELESS: "Calibre Wireless"
|
|
|
|
|
STR_CALIBRE_WEB_URL: "Calibre Web URL"
|
|
|
|
|
STR_CONNECT_WIRELESS: "Connect as Wireless Device"
|
|
|
|
|
STR_NETWORK_LEGEND: "* = Encrypted | + = Saved"
|
|
|
|
|
STR_MAC_ADDRESS: "MAC address:"
|
|
|
|
|
STR_CHECKING_WIFI: "Checking WiFi..."
|
|
|
|
|
STR_ENTER_WIFI_PASSWORD: "Enter WiFi Password"
|
|
|
|
|
STR_ENTER_TEXT: "Enter Text"
|
|
|
|
|
STR_TO_PREFIX: "to "
|
|
|
|
|
STR_CALIBRE_DISCOVERING: "Discovering Calibre..."
|
|
|
|
|
STR_CALIBRE_CONNECTING_TO: "Connecting to "
|
|
|
|
|
STR_CALIBRE_CONNECTED_TO: "Connected to "
|
|
|
|
|
STR_CALIBRE_WAITING_COMMANDS: "Waiting for commands..."
|
|
|
|
|
STR_CONNECTION_FAILED_RETRYING: "(Connection failed, retrying)"
|
|
|
|
|
STR_CALIBRE_DISCONNECTED: "Calibre disconnected"
|
|
|
|
|
STR_CALIBRE_WAITING_TRANSFER: "Waiting for transfer..."
|
|
|
|
|
STR_CALIBRE_TRANSFER_HINT: "If transfer fails, enable\\n'Ignore free space' in Calibre's\\nSmartDevice plugin settings."
|
|
|
|
|
STR_CALIBRE_RECEIVING: "Receiving: "
|
|
|
|
|
STR_CALIBRE_RECEIVED: "Received: "
|
|
|
|
|
STR_CALIBRE_WAITING_MORE: "Waiting for more..."
|
|
|
|
|
STR_CALIBRE_FAILED_CREATE_FILE: "Failed to create file"
|
|
|
|
|
STR_CALIBRE_PASSWORD_REQUIRED: "Password required"
|
|
|
|
|
STR_CALIBRE_TRANSFER_INTERRUPTED: "Transfer interrupted"
|
|
|
|
|
STR_CALIBRE_INSTRUCTION_1: "1) Install CrossPoint Reader plugin"
|
|
|
|
|
STR_CALIBRE_INSTRUCTION_2: "2) Be on the same WiFi network"
|
|
|
|
|
STR_CALIBRE_INSTRUCTION_3: "3) In Calibre: \"Send to device\""
|
|
|
|
|
STR_CALIBRE_INSTRUCTION_4: "\"Keep this screen open while sending\""
|
|
|
|
|
STR_CAT_DISPLAY: "Display"
|
|
|
|
|
STR_CAT_READER: "Reader"
|
|
|
|
|
STR_CAT_CONTROLS: "Controls"
|
|
|
|
|
STR_CAT_SYSTEM: "System"
|
|
|
|
|
STR_SLEEP_SCREEN: "Sleep Screen"
|
|
|
|
|
STR_SLEEP_COVER_MODE: "Sleep Screen Cover Mode"
|
|
|
|
|
STR_STATUS_BAR: "Status Bar"
|
|
|
|
|
STR_HIDE_BATTERY: "Hide Battery %"
|
|
|
|
|
STR_EXTRA_SPACING: "Extra Paragraph Spacing"
|
|
|
|
|
STR_TEXT_AA: "Text Anti-Aliasing"
|
|
|
|
|
STR_SHORT_PWR_BTN: "Short Power Button Click"
|
|
|
|
|
STR_ORIENTATION: "Reading Orientation"
|
|
|
|
|
STR_FRONT_BTN_LAYOUT: "Front Button Layout"
|
|
|
|
|
STR_SIDE_BTN_LAYOUT: "Side Button Layout (reader)"
|
|
|
|
|
STR_LONG_PRESS_SKIP: "Long-press Chapter Skip"
|
|
|
|
|
STR_FONT_FAMILY: "Reader Font Family"
|
|
|
|
|
STR_EXT_READER_FONT: "External Reader Font"
|
|
|
|
|
STR_EXT_CHINESE_FONT: "Reader Font"
|
|
|
|
|
STR_EXT_UI_FONT: "UI Font"
|
2026-02-26 03:22:59 +13:00
|
|
|
STR_FONT_SIZE: "Reader Font Size"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_LINE_SPACING: "Reader Line Spacing"
|
|
|
|
|
STR_ASCII_LETTER_SPACING: "ASCII Letter Spacing"
|
|
|
|
|
STR_ASCII_DIGIT_SPACING: "ASCII Digit Spacing"
|
|
|
|
|
STR_CJK_SPACING: "CJK Spacing"
|
|
|
|
|
STR_COLOR_MODE: "Color Mode"
|
|
|
|
|
STR_SCREEN_MARGIN: "Reader Screen Margin"
|
|
|
|
|
STR_PARA_ALIGNMENT: "Reader Paragraph Alignment"
|
|
|
|
|
STR_HYPHENATION: "Hyphenation"
|
|
|
|
|
STR_TIME_TO_SLEEP: "Time to Sleep"
|
|
|
|
|
STR_REFRESH_FREQ: "Refresh Frequency"
|
|
|
|
|
STR_CALIBRE_SETTINGS: "Calibre Settings"
|
|
|
|
|
STR_KOREADER_SYNC: "KOReader Sync"
|
|
|
|
|
STR_CHECK_UPDATES: "Check for updates"
|
|
|
|
|
STR_LANGUAGE: "Language"
|
|
|
|
|
STR_SELECT_WALLPAPER: "Select Wallpaper"
|
|
|
|
|
STR_CLEAR_READING_CACHE: "Clear Reading Cache"
|
|
|
|
|
STR_CALIBRE: "Calibre"
|
|
|
|
|
STR_USERNAME: "Username"
|
|
|
|
|
STR_PASSWORD: "Password"
|
|
|
|
|
STR_SYNC_SERVER_URL: "Sync Server URL"
|
|
|
|
|
STR_DOCUMENT_MATCHING: "Document Matching"
|
|
|
|
|
STR_AUTHENTICATE: "Authenticate"
|
|
|
|
|
STR_KOREADER_USERNAME: "KOReader Username"
|
|
|
|
|
STR_KOREADER_PASSWORD: "KOReader Password"
|
|
|
|
|
STR_FILENAME: "Filename"
|
|
|
|
|
STR_BINARY: "Binary"
|
|
|
|
|
STR_SET_CREDENTIALS_FIRST: "Set credentials first"
|
|
|
|
|
STR_WIFI_CONN_FAILED: "WiFi connection failed"
|
|
|
|
|
STR_AUTHENTICATING: "Authenticating..."
|
|
|
|
|
STR_AUTH_SUCCESS: "Successfully authenticated!"
|
|
|
|
|
STR_KOREADER_AUTH: "KOReader Auth"
|
|
|
|
|
STR_SYNC_READY: "KOReader sync is ready to use"
|
|
|
|
|
STR_AUTH_FAILED: "Authentication Failed"
|
|
|
|
|
STR_DONE: "Done"
|
|
|
|
|
STR_CLEAR_CACHE_WARNING_1: "This will clear all cached book data."
|
|
|
|
|
STR_CLEAR_CACHE_WARNING_2: "All reading progress will be lost!"
|
|
|
|
|
STR_CLEAR_CACHE_WARNING_3: "Books will need to be re-indexed"
|
|
|
|
|
STR_CLEAR_CACHE_WARNING_4: "when opened again."
|
|
|
|
|
STR_CLEARING_CACHE: "Clearing cache..."
|
|
|
|
|
STR_CACHE_CLEARED: "Cache Cleared"
|
|
|
|
|
STR_ITEMS_REMOVED: "items removed"
|
|
|
|
|
STR_FAILED_LOWER: "failed"
|
|
|
|
|
STR_CLEAR_CACHE_FAILED: "Failed to clear cache"
|
|
|
|
|
STR_CHECK_SERIAL_OUTPUT: "Check serial output for details"
|
|
|
|
|
STR_DARK: "Dark"
|
|
|
|
|
STR_LIGHT: "Light"
|
|
|
|
|
STR_CUSTOM: "Custom"
|
|
|
|
|
STR_COVER: "Cover"
|
|
|
|
|
STR_NONE_OPT: "None"
|
|
|
|
|
STR_FIT: "Fit"
|
|
|
|
|
STR_CROP: "Crop"
|
|
|
|
|
STR_NO_PROGRESS: "No Progress"
|
|
|
|
|
STR_FULL_OPT: "Full"
|
|
|
|
|
STR_NEVER: "Never"
|
|
|
|
|
STR_IN_READER: "In Reader"
|
|
|
|
|
STR_ALWAYS: "Always"
|
|
|
|
|
STR_IGNORE: "Ignore"
|
|
|
|
|
STR_SLEEP: "Sleep"
|
|
|
|
|
STR_PAGE_TURN: "Page Turn"
|
|
|
|
|
STR_PORTRAIT: "Portrait"
|
|
|
|
|
STR_LANDSCAPE_CW: "Landscape CW"
|
|
|
|
|
STR_INVERTED: "Inverted"
|
|
|
|
|
STR_LANDSCAPE_CCW: "Landscape CCW"
|
|
|
|
|
STR_FRONT_LAYOUT_BCLR: "Bck, Cnfrm, Lft, Rght"
|
|
|
|
|
STR_FRONT_LAYOUT_LRBC: "Lft, Rght, Bck, Cnfrm"
|
|
|
|
|
STR_FRONT_LAYOUT_LBCR: "Lft, Bck, Cnfrm, Rght"
|
|
|
|
|
STR_PREV_NEXT: "Prev/Next"
|
|
|
|
|
STR_NEXT_PREV: "Next/Prev"
|
|
|
|
|
STR_BOOKERLY: "Bookerly"
|
|
|
|
|
STR_NOTO_SANS: "Noto Sans"
|
|
|
|
|
STR_OPEN_DYSLEXIC: "Open Dyslexic"
|
|
|
|
|
STR_SMALL: "Small"
|
|
|
|
|
STR_MEDIUM: "Medium"
|
|
|
|
|
STR_LARGE: "Large"
|
|
|
|
|
STR_X_LARGE: "X Large"
|
|
|
|
|
STR_TIGHT: "Tight"
|
|
|
|
|
STR_NORMAL: "Normal"
|
|
|
|
|
STR_WIDE: "Wide"
|
|
|
|
|
STR_JUSTIFY: "Justify"
|
|
|
|
|
STR_ALIGN_LEFT: "Left"
|
|
|
|
|
STR_CENTER: "Center"
|
|
|
|
|
STR_ALIGN_RIGHT: "Right"
|
|
|
|
|
STR_MIN_1: "1 min"
|
|
|
|
|
STR_MIN_5: "5 min"
|
|
|
|
|
STR_MIN_10: "10 min"
|
|
|
|
|
STR_MIN_15: "15 min"
|
|
|
|
|
STR_MIN_30: "30 min"
|
|
|
|
|
STR_PAGES_1: "1 page"
|
|
|
|
|
STR_PAGES_5: "5 pages"
|
|
|
|
|
STR_PAGES_10: "10 pages"
|
|
|
|
|
STR_PAGES_15: "15 pages"
|
|
|
|
|
STR_PAGES_30: "30 pages"
|
|
|
|
|
STR_UPDATE: "Update"
|
|
|
|
|
STR_CHECKING_UPDATE: "Checking for update..."
|
|
|
|
|
STR_NEW_UPDATE: "New update available!"
|
|
|
|
|
STR_CURRENT_VERSION: "Current Version: "
|
|
|
|
|
STR_NEW_VERSION: "New Version: "
|
|
|
|
|
STR_UPDATING: "Updating..."
|
|
|
|
|
STR_NO_UPDATE: "No update available"
|
|
|
|
|
STR_UPDATE_FAILED: "Update failed"
|
|
|
|
|
STR_UPDATE_COMPLETE: "Update complete"
|
|
|
|
|
STR_POWER_ON_HINT: "Press and hold power button to turn back on"
|
|
|
|
|
STR_EXTERNAL_FONT: "External Font"
|
|
|
|
|
STR_BUILTIN_DISABLED: "Built-in (Disabled)"
|
|
|
|
|
STR_NO_ENTRIES: "No entries found"
|
|
|
|
|
STR_DOWNLOADING: "Downloading..."
|
|
|
|
|
STR_DOWNLOAD_FAILED: "Download failed"
|
|
|
|
|
STR_ERROR_MSG: "Error:"
|
|
|
|
|
STR_UNNAMED: "Unnamed"
|
|
|
|
|
STR_NO_SERVER_URL: "No server URL configured"
|
|
|
|
|
STR_FETCH_FEED_FAILED: "Failed to fetch feed"
|
|
|
|
|
STR_PARSE_FEED_FAILED: "Failed to parse feed"
|
|
|
|
|
STR_NETWORK_PREFIX: "Network: "
|
|
|
|
|
STR_IP_ADDRESS_PREFIX: "IP Address: "
|
|
|
|
|
STR_SCAN_QR_WIFI_HINT: "or scan QR code with your phone to connect to Wifi."
|
|
|
|
|
STR_ERROR_GENERAL_FAILURE: "Error: General failure"
|
|
|
|
|
STR_ERROR_NETWORK_NOT_FOUND: "Error: Network not found"
|
|
|
|
|
STR_ERROR_CONNECTION_TIMEOUT: "Error: Connection timeout"
|
|
|
|
|
STR_SD_CARD: "SD card"
|
|
|
|
|
STR_BACK: "« Back"
|
|
|
|
|
STR_EXIT: "« Exit"
|
|
|
|
|
STR_HOME: "« Home"
|
|
|
|
|
STR_SAVE: "« Save"
|
|
|
|
|
STR_SELECT: "Select"
|
2026-02-27 18:45:05 +01:00
|
|
|
STR_SELECTED: "Selected"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_TOGGLE: "Toggle"
|
|
|
|
|
STR_CONFIRM: "Confirm"
|
|
|
|
|
STR_CANCEL: "Cancel"
|
|
|
|
|
STR_CONNECT: "Connect"
|
|
|
|
|
STR_OPEN: "Open"
|
|
|
|
|
STR_DOWNLOAD: "Download"
|
|
|
|
|
STR_RETRY: "Retry"
|
|
|
|
|
STR_YES: "Yes"
|
|
|
|
|
STR_NO: "No"
|
2026-02-25 10:06:38 +00:00
|
|
|
STR_SHOW: "Show"
|
|
|
|
|
STR_HIDE: "Hide"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_STATE_ON: "ON"
|
|
|
|
|
STR_STATE_OFF: "OFF"
|
|
|
|
|
STR_NOT_SET: "Not Set"
|
|
|
|
|
STR_DIR_LEFT: "Left"
|
|
|
|
|
STR_DIR_RIGHT: "Right"
|
|
|
|
|
STR_DIR_UP: "Up"
|
|
|
|
|
STR_DIR_DOWN: "Down"
|
|
|
|
|
STR_CAPS_ON: "CAPS"
|
|
|
|
|
STR_CAPS_OFF: "caps"
|
|
|
|
|
STR_OK_BUTTON: "OK"
|
|
|
|
|
STR_SLEEP_COVER_FILTER: "Sleep Screen Cover Filter"
|
|
|
|
|
STR_FILTER_CONTRAST: "Contrast"
|
2026-02-25 10:06:38 +00:00
|
|
|
STR_CUSTOMISE_STATUS_BAR: "Customise Status Bar"
|
|
|
|
|
STR_CHAPTER_PAGE_COUNT: "Chapter Page Count"
|
|
|
|
|
STR_BOOK_PROGRESS_PERCENTAGE: "Book Progress Percentage"
|
|
|
|
|
STR_PROGRESS_BAR: "Progress Bar"
|
|
|
|
|
STR_PROGRESS_BAR_THICKNESS: "Progress Bar Thickness"
|
|
|
|
|
STR_PROGRESS_BAR_THIN: "Thin"
|
|
|
|
|
STR_PROGRESS_BAR_MEDIUM: "Medium"
|
|
|
|
|
STR_PROGRESS_BAR_THICK: "Thick"
|
|
|
|
|
STR_BOOK: "Book"
|
|
|
|
|
STR_CHAPTER: "Chapter"
|
|
|
|
|
STR_EXAMPLE_CHAPTER: "Chapter 21"
|
|
|
|
|
STR_EXAMPLE_BOOK: "Book Title"
|
|
|
|
|
STR_PREVIEW: "Preview"
|
|
|
|
|
STR_TITLE: "Title"
|
|
|
|
|
STR_BATTERY: "Battery"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_UI_THEME: "UI Theme"
|
|
|
|
|
STR_THEME_CLASSIC: "Classic"
|
|
|
|
|
STR_THEME_LYRA: "Lyra"
|
2026-02-19 17:16:55 +07:00
|
|
|
STR_THEME_LYRA_EXTENDED: "Lyra Extended"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_SUNLIGHT_FADING_FIX: "Sunlight Fading Fix"
|
|
|
|
|
STR_REMAP_FRONT_BUTTONS: "Remap Front Buttons"
|
|
|
|
|
STR_OPDS_BROWSER: "OPDS Browser"
|
|
|
|
|
STR_COVER_CUSTOM: "Cover + Custom"
|
|
|
|
|
STR_RECENTS: "Recents"
|
|
|
|
|
STR_MENU_RECENT_BOOKS: "Recent Books"
|
|
|
|
|
STR_NO_RECENT_BOOKS: "No recent books"
|
|
|
|
|
STR_CALIBRE_DESC: "Use Calibre wireless device transfers"
|
|
|
|
|
STR_FORGET_AND_REMOVE: "Forget network and remove saved password?"
|
2026-02-20 20:05:03 -05:00
|
|
|
STR_FORGET_BUTTON: "Forget"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_CALIBRE_STARTING: "Starting Calibre..."
|
|
|
|
|
STR_CALIBRE_SETUP: "Setup"
|
|
|
|
|
STR_CALIBRE_STATUS: "Status"
|
|
|
|
|
STR_CLEAR_BUTTON: "Clear"
|
|
|
|
|
STR_DEFAULT_VALUE: "Default"
|
|
|
|
|
STR_REMAP_PROMPT: "Press a front button for each role"
|
|
|
|
|
STR_UNASSIGNED: "Unassigned"
|
|
|
|
|
STR_ALREADY_ASSIGNED: "Already assigned"
|
|
|
|
|
STR_REMAP_RESET_HINT: "Side button Up: Reset to default layout"
|
|
|
|
|
STR_REMAP_CANCEL_HINT: "Side button Down: Cancel remapping"
|
|
|
|
|
STR_HW_BACK_LABEL: "Back (1st button)"
|
|
|
|
|
STR_HW_CONFIRM_LABEL: "Confirm (2nd button)"
|
|
|
|
|
STR_HW_LEFT_LABEL: "Left (3rd button)"
|
|
|
|
|
STR_HW_RIGHT_LABEL: "Right (4th button)"
|
|
|
|
|
STR_GO_TO_PERCENT: "Go to %"
|
|
|
|
|
STR_GO_HOME_BUTTON: "Go Home"
|
|
|
|
|
STR_SYNC_PROGRESS: "Sync Progress"
|
|
|
|
|
STR_DELETE_CACHE: "Delete Book Cache"
|
2026-02-28 11:58:10 -05:00
|
|
|
STR_DELETE: "Delete"
|
2026-02-25 09:12:31 +00:00
|
|
|
STR_DISPLAY_QR: "Show page as QR"
|
feat: User-Interface I18n System (#728)
## Summary
**What is the goal of this PR?**
This PR introduces Internationalization (i18n) support, enabling users
to switch the UI language dynamically.
**What changes are included?**
- Core Logic: Added I18n class (`lib/I18n/I18n.h/cpp`) to manage
language state and string retrieval.
- Data Structures:
- `lib/I18n/I18nStrings.h/cpp`: Static string arrays for each supported
language.
- `lib/I18n/I18nKeys.h`: Enum definitions for type-safe string access.
- `lib/I18n/translations.csv`: single source of truth.
- Documentation: Added `docs/i18n.md` detailing the workflow for
developers and translators.
- New Settings activity:
`src/activities/settings/LanguageSelectActivity.h/cpp`
## Additional Context
This implementation (building on concepts from #505) prioritizes
performance and memory efficiency.
The core approach is to store all localized strings for each language in
dedicated arrays and access them via enums. This provides O(1) access
with zero runtime overhead, and avoids the heap allocations, hashing,
and collision handling required by `std::map` or `std::unordered_map`.
The main trade-off is that enums and string arrays must remain perfectly
synchronized—any mismatch would result in incorrect strings being
displayed in the UI.
To eliminate this risk, I added a Python script that automatically
generates `I18nStrings.h/.cpp` and `I18nKeys.h` from a CSV file, which
will serve as the single source of truth for all translations. The full
design and workflow are documented in `docs/i18n.md`.
### Next Steps
- [x] Python script `generate_i18n.py` to auto-generate C++ files from
CSV
- [x] Populate translations.csv with initial translations.
Currently available translations: English, Español, Français, Deutsch,
Čeština, Português (Brasil), Русский, Svenska.
Thanks, community!
**Status:** EDIT: ready to be merged.
As a proof of concept, the SPANISH strings currently mirror the English
ones, but are fully uppercased.
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY >**_
I used AI for the black work of replacing strings with I18n references
across the project, and for generating the documentation. EDIT: also
some help with merging changes from master.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: yeyeto2788 <juanernestobiondi@gmail.com>
2026-02-16 15:28:42 +02:00
|
|
|
STR_CHAPTER_PREFIX: "Chapter: "
|
|
|
|
|
STR_PAGES_SEPARATOR: " pages | "
|
|
|
|
|
STR_BOOK_PREFIX: "Book: "
|
|
|
|
|
STR_KBD_SHIFT: "shift"
|
|
|
|
|
STR_KBD_SHIFT_CAPS: "SHIFT"
|
|
|
|
|
STR_KBD_LOCK: "LOCK"
|
|
|
|
|
STR_CALIBRE_URL_HINT: "For Calibre, add /opds to your URL"
|
|
|
|
|
STR_PERCENT_STEP_HINT: "Left/Right: 1% Up/Down: 10%"
|
|
|
|
|
STR_SYNCING_TIME: "Syncing time..."
|
|
|
|
|
STR_CALC_HASH: "Calculating document hash..."
|
|
|
|
|
STR_HASH_FAILED: "Failed to calculate document hash"
|
|
|
|
|
STR_FETCH_PROGRESS: "Fetching remote progress..."
|
|
|
|
|
STR_UPLOAD_PROGRESS: "Uploading progress..."
|
|
|
|
|
STR_NO_CREDENTIALS_MSG: "No credentials configured"
|
|
|
|
|
STR_KOREADER_SETUP_HINT: "Set up KOReader account in Settings"
|
|
|
|
|
STR_PROGRESS_FOUND: "Progress found!"
|
|
|
|
|
STR_REMOTE_LABEL: "Remote:"
|
|
|
|
|
STR_LOCAL_LABEL: "Local:"
|
|
|
|
|
STR_PAGE_OVERALL_FORMAT: "Page %d, %.2f%% overall"
|
|
|
|
|
STR_PAGE_TOTAL_OVERALL_FORMAT: "Page %d/%d, %.2f%% overall"
|
|
|
|
|
STR_DEVICE_FROM_FORMAT: " From: %s"
|
|
|
|
|
STR_APPLY_REMOTE: "Apply remote progress"
|
|
|
|
|
STR_UPLOAD_LOCAL: "Upload local progress"
|
|
|
|
|
STR_NO_REMOTE_MSG: "No remote progress found"
|
|
|
|
|
STR_UPLOAD_PROMPT: "Upload current position?"
|
|
|
|
|
STR_UPLOAD_SUCCESS: "Progress uploaded!"
|
|
|
|
|
STR_SYNC_FAILED_MSG: "Sync failed"
|
|
|
|
|
STR_SECTION_PREFIX: "Section "
|
|
|
|
|
STR_UPLOAD: "Upload"
|
|
|
|
|
STR_BOOK_S_STYLE: "Book's Style"
|
|
|
|
|
STR_EMBEDDED_STYLE: "Embedded Style"
|
|
|
|
|
STR_OPDS_SERVER_URL: "OPDS Server URL"
|
feat: slim footnotes support (#1031)
## Summary
**What is the goal of this PR?** Implement support for footnotes in epub
files.
It is based on #553, but simplified — removed the parts which
complicated the code and burden the CPU/RAM. This version supports basic
footnotes and lets the user jump from location to location inside the
epub.
**What changes are included?**
- `FootnoteEntry` struct — A small POD struct (number[24], href[64])
shared between parser, page storage, and UI.
- Parser: `<a href>` detection (`ChapterHtmlSlimParser`) — During a
single parsing pass, internal epub links are detected and collected as
footnotes. The link text is underlined to hint navigability.
Bracket/whitespace normalization is applied to the display label (e.g.
[1] → 1).
- Footnote-to-page assignment (`ChapterHtmlSlimParser`, `Page`) —
Footnotes are attached to the exact page where their anchor word
appears, tracked via a cumulative word counter during layout, surviving
paragraph splits and the 750-word mid-paragraph safety flush.
- Page serialization (`Page`, `Section`) — Footnotes are
serialized/deserialized per page (max 16 per page). Section cache
version bumped to 14 to force a clean rebuild.
- Href → spine resolution (`Epub`) — `resolveHrefToSpineIndex()` maps an
href (e.g. `chapter2.xhtml#note1`) to its spine index by filename
matching.
- Footnotes menu + activity (`EpubReaderMenuActivity`,
`EpubReaderFootnotesActivity`) — A new "Footnotes" entry in the reader
menu lists all footnote links found on the current page. The user
scrolls and selects to navigate.
- Navigate & restore (`EpubReaderActivity`) — `navigateToHref()` saves
the current spine index and page number, then jumps to the target. The
Back button restores the saved position when the user is done reading
the footnote.
**Additional Context**
**What was removed vs #553:** virtual spine items
(`addVirtualSpineItem`, `isVirtualSpineItem`), two-pass parsing,
`<aside>` content extraction to temp HTML files, `<p class="note">`
paragraph note extraction, `replaceHtmlEntities` (master already has
`lookupHtmlEntity`), `footnotePages` / `buildFilteredChapterList`,
`noterefCallback` / `Noteref` struct, and the stack size increase from 8
KB to 24 KB (not needed without two-pass parsing and virtual file I/O on
the render task).
**Performance:** Single-pass parsing. No new heap allocations in the hot
path — footnote text is collected into fixed stack buffers (char[24],
char[64]). Active runtime memory is ~2.8 KB worst-case (one page × 16
footnotes × 88 bytes, mirrored in `currentPageFootnotes`). Flash usage
is unchanged at 97.4%; RAM stays at 31%.
**Known limitations:** When clicking a footnote, it jumps to the start
of the HTML file instead of the specific anchor. This could be
problematic for books that don't have separate files for each footnote.
(no element-id-to-page mapping yet - will be another PR soon).
---
### AI Usage
Did you use AI tools to help write this code? _**< PARTIALLY>**_
Claude Opus 4.6 was used to do most of the migration, I checked manually
its work, and fixed some stuff, but I haven't review all the changes
yet, so feedback is welcomed.
---------
Co-authored-by: Arthur Tazhitdinov <lisnake@gmail.com>
2026-02-26 16:47:34 +02:00
|
|
|
STR_FOOTNOTES: "Footnotes"
|
|
|
|
|
STR_NO_FOOTNOTES: "No footnotes on this page"
|
|
|
|
|
STR_LINK: "[link]"
|
|
|
|
|
STR_SCREENSHOT_BUTTON: "Take screenshot"
|
feat: Auto Page Turn for Epub Reader (#1219)
## Summary
* **What is the goal of this PR?** (e.g., Implements the new feature for
file uploading.)
- Implements auto page turn feature for epub reader in the reader
submenu
* **What changes are included?**
- added auto page turn feature in epub reader in the submenu
- currently there are 5 settings, `OFF, 1, 3, 6, 12` pages per minute
## Additional Context
* Add any other information that might be helpful for the reviewer
(e.g., performance implications, potential risks,
specific areas to focus on).
- Replacement PR for #723
- when auto turn is enabled, space reserved for chapter title will be
used to indicate auto page turn being active
- Back and Confirm button is used to disable it
---
### 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 (mainly code
reviews)**_
2026-02-28 03:42:41 +08:00
|
|
|
STR_AUTO_TURN_ENABLED: "Auto Turn Enabled: "
|
|
|
|
|
STR_AUTO_TURN_PAGES_PER_MIN: "Auto Turn (Pages Per Minute)"
|