Skip to content

fix #289: add localized date format#419

Open
wellorbetter wants to merge 10 commits intoFossifyOrg:mainfrom
wellorbetter:localization
Open

fix #289: add localized date format#419
wellorbetter wants to merge 10 commits intoFossifyOrg:mainfrom
wellorbetter:localization

Conversation

@wellorbetter
Copy link

@wellorbetter wellorbetter commented Mar 24, 2026

Use string resource for date format to adapt to different locales.

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

  • Moved the date format from hardcoded logic to a localized string resource (R.string.date_format_md).
    This allows the date display (e.g., "Wed, 25 Mar" / "3月25日 周三" / "3月25日(水)") to automatically adapt to different locales without code changes.
  • Updated the main clock to use this localized format.
  • Added Korean and Japanese string resources for the date format to support those locales properly.

Tests performed

  • Verified on device with English (US), Chinese (Simplified), Korean, and Japanese system languages.
  • Ensured format falls back to English when locale resource is missing.

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • I understand every change in this pull request.

Use string resource for date format to adapt to different locales.
@wellorbetter wellorbetter marked this pull request as draft March 24, 2026 19:05
Use string resource for date format to adapt to different locales.
Use string resource for date format to adapt to different locales.
Let main clock use this time format.
Use string resource for date format to adapt to different locales.
Let main clock use this time format.
Adjust the position and modify the code to the minimum extent.
Adjust the position and modify the code to the minimum extent & reduce cyclomatic complexity.
@wellorbetter wellorbetter marked this pull request as ready for review March 24, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Localization of date should not be order-dependent

1 participant