fix: localize remaining hardcoded user-facing strings (#18)#27
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
WalkthroughWraps previously hardcoded ChangesLocalize UI strings and native file-dialog title
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit d6e699a on Jun 18, 2026 12:50pm UTC. |
Verification + CI statusLocal checks (the exact commands CI runs) all pass on this branch:
CI is red for an environmental reason unrelated to this PR. Every This is not introduced by this change: the identical failure pattern is present on the latest CodeRabbit: ✅ pass. No sensitive paths touched. cc @ Jeff — needs the deploy-key secret restored on CI before the build/lint jobs can go green; the code itself is verified locally. |
|
@agent-p1p please rebase on top of master to fix the CI |
9393610 to
b896549
Compare
|
@dannym-arx done — rebased That fixed the CI failure you were hitting: every
The one remaining red check, I'm deliberately not folding a cc @ Jeff for the call on the master fmt fix. |
|
@agent-p1p rebase on top of master, and I'm telling you for certain that the fmt issues will be fixed, also you have conflicts that need to be fixed |
b896549 to
63f03b2
Compare
|
@dannym-arx done. Rebased You were right on both counts:
No sensitive paths touched (UI strings + translation catalogs only). |
|
@agent-p1p a few things are missing translations in the i18n... nsec is fine... but the rest.... |
Fill the it/de/ja catalog entries for the two user-facing strings added in this PR that landed untranslated: - "Choose a profile picture" (NativeDialogStrings) - "https://… or upload a file →" (PictureField) NSEC and NIP-05 are Nostr protocol identifiers and are intentionally left as passthrough (empty msgstr → falls back to the identifier), matching the existing convention. Addresses @dannym-arx review feedback on #27.
|
@dannym-arx good catch — the new
Left untranslated (passthrough, empty
If you'd actually prefer NIP-05 localized too (or a different phrasing on any of the above), say the word and I'll adjust. All three catalogs parse cleanly. |
|
@agent-p1p rebase on top and it should be fine to merge |
Wrap the strings that bypassed translation in @tr(): - login NSEC field label (login-screen.slint) - profile picture-field placeholder (profile-page.slint) - both NIP-05 labels, edit + display (profile-page.slint) The native file-picker title "Choose a profile picture" is set on the Rust side via rfd. The s() helper is only a SharedString conversion, not a translator, and the project deliberately keeps i18n in the Slint @tr catalogs (see notification_body comment in main.rs). So expose the title as an @tr property on a new NativeDialogStrings Slint global and read it on the UI thread before spawning the blocking dialog task. Regenerated lang/dm-ui.pot and merged into the it/de/ja catalogs via scripts/update-translations.sh; the new strings land untranslated, matching the existing translation backlog. Closes #18
Fill the it/de/ja catalog entries for the two user-facing strings added in this PR that landed untranslated: - "Choose a profile picture" (NativeDialogStrings) - "https://… or upload a file →" (PictureField) NSEC and NIP-05 are Nostr protocol identifiers and are intentionally left as passthrough (empty msgstr → falls back to the identifier), matching the existing convention. Addresses @dannym-arx review feedback on #27.
1ec7be4 to
d6e699a
Compare
|
@dannym-arx done — rebased The only conflicts were in the gettext catalogs ( Local checks green: |
Pip adversarial reviewVerdict: no blocking findings for PR #27. I reviewed the merged diff against #18's listed locations:
Verification:
Sensitive paths touched: none of the repo-sensitive paths ( Out-of-scope follow-up filed: #71 tracks two remaining hardcoded generated-key readout labels on the login screen ( |
Summary
Routes the last few visible strings that bypassed translation through the i18n layer. Fixes the English fragments that leaked into otherwise-translated login and profile screens for it/de/ja users.
Wrapped in
@tr("…")(Slint):ui/login/login-screen.slint— NSEC field labelui/profile/profile-page.slint— picture-field placeholderhttps://… or upload a file →ui/profile/profile-page.slint— both NIP-05 labels (edit FieldRow + display InfoRow)File-dialog title (the one subtlety)
The issue suggested routing the
rfdfile-picker title"Choose a profile picture"through "the sames()helper already used for other Rust-side status strings." That doesn't actually translate anything:s()(main.rs:223) is justv.into()— a&str→SharedStringconversion. The project also deliberately keeps all i18n in the Slint@trcatalogs and does not wiregettext-rson the Rust side (see thenotification_bodycomment at main.rs:8020).To honor that architecture, this exposes the title as an
@trproperty on a newNativeDialogStringsSlint global and reads it on the UI thread before spawning the blocking dialog task. Same pattern as the existingEmojiSheet/ProfileSinkglobals.Catalogs
Regenerated
lang/dm-ui.potand merged into the it/de/ja.pocatalogs via the mandatedscripts/update-translations.sh. The 5 new strings land untranslated (emptymsgstr), matching the existing translation backlog (~120 untranslated entries per locale).Note on catalog diff size: the
.podiffs are large becausemsgmergerefreshes#:source-location comments (line numbers shifted by these edits) and demotes 3 pre-existing fuzzy entries. That churn reproduces identically when runningupdate-translations.shon pristinemaster— it is pre-existing catalog drift, not introduced by this change. Content changes are limited to the 5 added msgids.Verification
cargo check— cleancargo clippy— clean (only the pre-existing optional libmpv pkg-config probe warning)Closes #18
Summary by CodeRabbit
New Features
Documentation