Skip to content

fix(settings): replace Moment with localized date and time composables - #66029

Open
joshtrichards wants to merge 4 commits into
masterfrom
jtr/fix-backgroundTime
Open

joshtrichards wants to merge 4 commits into
masterfrom
jtr/fix-backgroundTime

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Moment uses the locale instead of the language for localization. Replace Moment formatting in background job status and the personal locale example with Nextcloud Vue composables:

  • Use useFormatRelativeTime for background jobs so relative text follows the user’s language rather than their locale.
  • Use useFormatTime for the locale example and useNow to preserve one-second updates with automatic timer cleanup.

Context: https://github.com/nextcloud-libraries/nextcloud-vue/pull/7067/changes

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Moments uses the locale instead of the language for localization. Replace Moment formatting in BackgroundJob with Nextcloud Vue's useFormatRelativeTime composable.

Fixes #45069
Fixes nextcloud-libraries/nextcloud-moment#1061

Signed-off-by: Josh <[email protected]>
@joshtrichards joshtrichards added this to the Nextcloud 36 milestone Oct 30, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner October 30, 2026 01:57
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Oct 30, 2026
@joshtrichards
joshtrichards requested review from kristian-zendato, pringelmann and skjnldsv and removed request for a team October 30, 2026 01:57
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable35

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable34

@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable33

@joshtrichards
joshtrichards requested a review from susnux October 30, 2026 01:58
@joshtrichards joshtrichards added bug papercut Annoying recurring UX issue with possibly simple fix. feature: language/translations (l10n/i18n) Localization and translation matters feature: settings labels Oct 30, 2026
Replace Moment with useFormatTime to format the example using the current user's locale. Use useNow to preserve one-second updates and automatically clean up the timer on unmount.

Closes #45069

Assisted-by: Copilot:gpt-6.1-sol

Signed-off-by: Josh <[email protected]>
@joshtrichards joshtrichards changed the title fix(settings): use localized relative time for background jobs fix(settings): replace Moment with localized date and time composables Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews AI assisted backport-request bug feature: language/translations (l10n/i18n) Localization and translation matters feature: settings papercut Annoying recurring UX issue with possibly simple fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using locale to choose the fromNow string and not the set language [Bug]: last job timestamp localization wrong

2 participants