-
Notifications
You must be signed in to change notification settings - Fork 9
fix: update fide i18n and fix issue #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update fide i18n and fix issue #166
Conversation
WalkthroughUpdates increase I18N item count, add four i18n keys, and append new/modified translations across eight locales. Menu handling centralizes confirm-only key waits and renames a menu label. PIN change flow adds a post-change lock sequence when a passphrase PIN is removed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as UI/Menu
participant Keys as KeyHandler
participant Sec as SecurityFlow
rect rgba(230,240,255,0.6)
note over UI,Keys: Centralized confirm-only wait (new)
User->>UI: Navigate menu
UI->>Keys: wait_for_confirm_only(mode)
alt Confirm
Keys-->>UI: KEY_CONFIRM
UI->>Sec: Proceed with selected action
else Cancel
Keys-->>UI: KEY_CANCEL
UI-->>User: Exit/Back
else No key
Keys-->>UI: KEY_NULL
UI-->>User: Keep waiting
end
end
sequenceDiagram
autonumber
actor User
participant Dev as Device
participant Prot as protectChangePinOnDevice
participant Sess as SessionManager
participant UI as Home
User->>Prot: Change main PIN
Prot->>Prot: Perform PIN change
alt Passphrase PIN deleted
Prot->>Prot: lock_required = true
note right of Prot: New post-change lock sequence
Prot->>Sess: clearSession()
Prot->>UI: returnToHome()
Prot->>Sess: clearPinStateCache()
loop Ensure re-lock
Prot->>Sess: verifyUnlockedOrPrompt()
Prot->>Sess: clearInternalState()
end
else No passphrase PIN deletion
Prot-->>User: Complete without extra locking
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
legacy/firmware/menu_list.c (1)
1194-1230: Introduce standard wait helper only ifprotectAbortedByCancelis visible
wait_for_confirm_only()readsprotectAbortedByCancel, but this file never included that symbol before. Please confirm thatprotectAbortedByCancelis declared in a header visible here; otherwise this will not compile. If it isn’t, add the properexterndeclaration (ideally inprotect.h) or rework the helper to avoid the dependency.
📜 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
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (12)
legacy/firmware/i18n/i18n.h(1 hunks)legacy/firmware/i18n/keys.h(1 hunks)legacy/firmware/i18n/locales/de.inc(2 hunks)legacy/firmware/i18n/locales/en.inc(2 hunks)legacy/firmware/i18n/locales/es.inc(1 hunks)legacy/firmware/i18n/locales/ja.inc(1 hunks)legacy/firmware/i18n/locales/ko_kr.inc(2 hunks)legacy/firmware/i18n/locales/pt_br.inc(2 hunks)legacy/firmware/i18n/locales/zh_cn.inc(1 hunks)legacy/firmware/i18n/locales/zh_tw.inc(1 hunks)legacy/firmware/menu_list.c(5 hunks)legacy/firmware/protect.c(4 hunks)
⏰ 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). (3)
- GitHub Check: Style check
- GitHub Check: Gen check
- GitHub Check: Defs check
🔇 Additional comments (12)
legacy/firmware/i18n/locales/zh_cn.inc (1)
425-428: New strings align with new keys.Appends 4 items for the new keys at the end. Good placement to preserve indices.
legacy/firmware/i18n/locales/ja.inc (1)
425-428: JP locale updated with 4 new entries.Appended, preserving index alignment. Looks good.
legacy/firmware/i18n/locales/ko_kr.inc (2)
260-260: PIN hint formatting changed to multiline.Text-only change; index preserved. Confirm it renders well on the target display.
425-428: KR locale: 4 appended entries.Placement and content align with the new keys.
legacy/firmware/i18n/locales/de.inc (2)
261-261: German PIN hint formatting adjusted.Multiline phrasing is fine; index kept. Please sanity-check on device for line wrapping.
425-428: DE locale: 4 appended entries.End-append preserves stable indices. Good.
legacy/firmware/i18n/locales/pt_br.inc (2)
136-136: PT-BR “0 attempts” message reflowed.Text-only tweak. Ensure the line breaks fit the screen width.
425-428: PT-BR: 4 new strings appended.Matches new keys; ordering is correct.
legacy/firmware/protect.c (1)
1225-1496: Post-change lock flow added; behavior looks correct.lock_required is set when a main PIN change deletes the current passphrase PIN, then forces a re-lock and cache/state clears after the user acknowledges success. This reduces exposure. Good addition.
Please verify these cases on-device:
- Starting in USER PIN session, set new main PIN equal to an existing passphrase PIN. Confirm: passphrase PIN deleted, success dialog shown, device locks after confirm.
- Starting in PASSPHRASE PIN session, set a new passphrase PIN equal to USER PIN. Confirm the overwrite warning path and that no unintended lock occurs.
- If se_delete_pin_passphrase succeeds but the subsequent config_changePin fails, confirm the device remains in a safe state (no hidden session lingering). If needed, consider locking immediately upon deleting a current passphrase PIN even when the change fails.
legacy/firmware/i18n/i18n.h (1)
8-8: I18N_ITEMS_COUNT and locales sizes validated
I18N_ITEMS_COUNT = 427 (max key 426 + 1). All locale arrays contain 427 entries.legacy/firmware/menu_list.c (1)
755-756: Rename menu item consistently with i18n keysThe menu label changed from “FIDO Keys” to “Security Keys”. Make sure the corresponding localization entries (and any key lookups that expect “FIDO Keys”) are updated across locales so the UI stays consistent. If everything already lines up, feel free to disregard.
legacy/firmware/i18n/locales/zh_tw.inc (1)
425-428: Polish zh-TW copy for clarity and consistency
- “確認結構數據” → “確認結構化數據”
- “{} 授權。請先檢查 dApp 信任度。” → “為 {} 授權。請先檢查 dApp 的信任度。”
- “來切換” → “以切換”
All locale files still have 427 entries (I18N_ITEMS_COUNT).
Summary by CodeRabbit
New Features
Bug Fixes