chore(i18n): update translations#149
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update revises internationalization (i18n) resources and terminology across the firmware. It updates UI strings in multiple languages, changes macro keys and indices, and standardizes terms like "Trezor Compatibility" to "Trezor Mode." It also adjusts enabled/disabled states to "On"/"Off" and refines many prompts for clarity and conciseness. Changes
Sequence Diagram(s)Not applicable. The changes are limited to string updates and macro definitions, with no impact on control flow or feature logic. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (11)
✨ Finishing Touches
🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (11)
legacy/firmware/i18n/i18n.h(1 hunks)legacy/firmware/i18n/keys.h(9 hunks)legacy/firmware/i18n/locales/de.inc(14 hunks)legacy/firmware/i18n/locales/en.inc(11 hunks)legacy/firmware/i18n/locales/es.inc(14 hunks)legacy/firmware/i18n/locales/ja.inc(14 hunks)legacy/firmware/i18n/locales/ko_kr.inc(11 hunks)legacy/firmware/i18n/locales/pt_br.inc(13 hunks)legacy/firmware/i18n/locales/zh_cn.inc(10 hunks)legacy/firmware/i18n/locales/zh_tw.inc(9 hunks)legacy/firmware/menu_list.c(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Style check
- GitHub Check: Defs check
- GitHub Check: Gen check
🔇 Additional comments (11)
legacy/firmware/i18n/i18n.h (1)
8-8: Ensure I18N_ITEMS_COUNT is accurate
Verify that the new value (380) matches the total entries in keys.h and all locale files.legacy/firmware/menu_list.c (1)
612-613: Rename menu title to “Trezor Mode”
This update aligns the UI label with the revised localization keys and terminology.legacy/firmware/i18n/locales/pt_br.inc (1)
1-382: Approve Brazilian Portuguese translation changes
All strings reflect the updated terminology (“Modo Trezor”, “Ativo/Desl.”, etc.) and maintain clarity and consistency.legacy/firmware/i18n/locales/ja.inc (1)
1-383: Approve Japanese translation changes
Updated phrases (“Trezor モード”, “オン/オフ”, etc.) are clear, consistent, and match the new localization keys.legacy/firmware/i18n/locales/en.inc (1)
1-383: Approve English translation refinements
Terminology (“Trezor Mode”, “On/Off”, “Genuine Check”, etc.) is now concise, consistent, and aligns with other locales.legacy/firmware/i18n/locales/de.inc (1)
2-382: German translations updated correctly.
Placeholders ({}) remain intact and terminology now matches other locales.legacy/firmware/i18n/locales/zh_tw.inc (1)
2-383: Traditional Chinese translations look good.
Placeholders are preserved and terminology changes are consistent with other languages.legacy/firmware/i18n/locales/es.inc (1)
2-383: Spanish translations reviewed and approved.
All placeholders are intact and phrasing aligns with other locale updates.legacy/firmware/i18n/locales/ko_kr.inc (1)
2-383: Korean translations look solid.
Placeholders preserved and new labels match cross-locale terminology.legacy/firmware/i18n/locales/zh_cn.inc (1)
2-383: Simplified Chinese translations are consistent.
Placeholders intact and “Trezor Mode” naming aligns with menu updates.legacy/firmware/i18n/keys.h (1)
190-201:Details
❓ Verification inconclusive
New key added – verify downstream locale files & counter
M__CHECK_RECOVERY_PHRASE(87) shifts every subsequent index. Ensure:
- All
*.inclocale files now carry a translation for index 87.- The global constant
I18N_ITEMS_COUNTini18n.hequals the new maximum + 1.Quick check script:
🏁 Script executed:
#!/bin/bash # Recompute max index and compare with I18N_ITEMS_COUNT max=$(grep -Eo '^#define [A-Z0-9_]+ +[0-9]+' legacy/firmware/i18n/keys.h | awk '{print $2+0}' | sort -n | tail -1) count=$(grep -Eo '^#define +I18N_ITEMS_COUNT +[0-9]+' legacy/firmware/i18n/i18n.h | awk '{print $2+0}') echo "max=$max expected_count=$((max+1)) defined_count=$count"Length of output: 321
The initial check didn’t pick up any defines (likely due to tabs or mixed whitespace). Let’s use a whitespace-aware regex:
🏁 Script executed:
#!/bin/bash # Recompute max index and compare with I18N_ITEMS_COUNT using [[:space:]] max=$(grep -Eo '^#define[[:space:]]+[A-Z0-9_]+[[:space:]]+[0-9]+' legacy/firmware/i18n/keys.h \ | awk '{print $3+0}' \ | sort -n \ | tail -1) count=$(grep -Eo '^#define[[:space:]]+I18N_ITEMS_COUNT[[:space:]]+[0-9]+' legacy/firmware/i18n/i18n.h \ | awk '{print $3+0}') echo "max=$max expected_count=$((max+1)) defined_count=$count"Length of output: 378
I18N counter is correct—now verify translations for the new key
The script shows
I18N_ITEMS_COUNT(380) matchesmax+1. Counter update is good.Next, ensure every locale
.incfile includes an entry for index 87. For example:
- Run
grep -R "87" legacy/firmware/i18n/*.inc- Confirm each file has a translation string for key 87.
Summary by CodeRabbit
Style
Bug Fixes