fix: localize app status and backup timestamps - #1124
Merged
jvsena42 merged 3 commits intoAug 4, 2026
Conversation
Greptile SummaryThis PR localizes App Status and Backup timestamps using the active default locale.
Confidence Score: 4/5The application-locale mismatch needs to be fixed before merging because timestamps remain in the device language when users select a different language within Bitkit.
Files Needing Attention: app/src/main/java/to/bitkit/ext/DateTime.kt
|
| Filename | Overview |
|---|---|
| app/src/main/java/to/bitkit/ext/DateTime.kt | Makes timestamp formatting locale-aware, but the new default reads the device/JVM locale rather than Bitkit's application-specific locale. |
| app/src/test/java/to/bitkit/ext/DateTimeExtTest.kt | Adds focused formatter tests, but the default-locale test uses Locale.setDefault() rather than exercising the app-specific locale path. |
| changelog.d/next/1112.fixed.md | Documents the user-visible timestamp localization change. |
Reviews (1): Last reviewed commit: "fix: localize app status and backup time..." | Re-trigger Greptile
jvsena42
enabled auto-merge
August 4, 2026 12:11
jvsena42
approved these changes
Aug 4, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1112
This PR makes the App Status and Backup timestamps follow the device language instead of always formatting them in US English.
Description
toLocalizedTimestampdefaulted toLocale.US, and all three call sites take the default. On a German device App Status therefore readJuly 31, 2026 at 8:08 PMdirectly under the translated labelVollständiges Backup.toRelativeTimeStringin the same file already defaults toLocale.getDefault(), so this was the one date helper that did not.Locale.getDefault()is the right source rather than the system configuration, becauseAppLocaleManagersets the language throughAppCompatDelegate.setApplicationLocales. Bitkit's own Language setting therefore moves the timestamps too, not only a change of device language.toLocalizedTimestamptoLocale.getDefault(), which fixes App Status, Backup metadata and the App Status preview in one line.MMMM d, yyyy 'at' h:mm a, withjava.text.DateFormat.getDateTimeInstance(LONG, SHORT, locale). The old pattern was English word order with a literalat, so on the fallback path a German locale still producedJuli 27, 2026 at 9:26 PM.Locale.USuses alone:utcDateFormatterOf,Logger,TrezorDebugLog, and thelowercase(Locale.US)calls inmodels/that are locale-invariant on purpose.The clock format here follows the locale rather than the device's 12/24-hour setting, which is what
DateFormat.SHORTmeans:deprints20:08,en-USprints8:08 PM. That differs from the activity and connection rows, where the pattern is fixed by design and the 12/24-hour setting decides.Preview
QA Notes
Manual Tests
31. Juli 2026 um 20:10, matching the surrounding translated labels. The issue asked for27. Juli 2026, 21:26; ICU joins German long dates withumrather than a comma.regression:set the language back to English: the same row still readsJuly 31, 2026 at 8:08 PM.Automated Checks
DateTimeExtTest.kt: the supplied locale, the default locale, and the day-before-month ordering German uses. All three fail on master and pass here.cmd locale set-app-locales.just compile,just test,just lintall pass, no new detekt findings.