mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-06 19:47:47 -05:00
Date Localization Issues with dayjs #2064
Closed
opened 2026-03-22 13:54:04 -05:00 by GiteaMirror
·
15 comments
No Branch/Tag Specified
main
feat-v2-foundation
spike-huma-openapi3
claude/investigate-swagger3-support-nyyUa
feat-list-view-buckets
ci-mysql-8-test
codex/analyze-codebase-for-email-task-feature
feat-project-templates
csv-import-feature
claude/email-reply-comments-wpdcQ
fix-oidc-pkce-support
fix/overview-subtasks-expand
feat/bucket-select-task-detail
feat-soft-delete-projects
claude/review-bot-design-plan-cf5C3
claude/project-scoped-api-tokens-KTqR3
claude/explore-openclaw-integration-KQEzg
claude/project-scoped-api-tokens-yv5KS
fix-duplicate-close-button
feat-list-view-sorting
feat/official-vite-sentry-plugin
feat/highlight-overdue-tasks
feat/add-enter-key-form-submission-handling
feat/TipTap-nits
feat/update-caldavtimetotimestamp-parsing
feat-phosphor-icons
wip-plans
claude/investigate-issue-2173-llKme
fix-description-text-drag
feat-custom-keyboard-shortcuts
pr-1845-ci
codex/fix-drag-and-drop-behavior-inconsistency
copilot/add-clickable-labels-for-filtering
copilot/fix-issue-1786
playwright-migration
fix-kanban-repeating-wip
copilot/fix-1498
feature/replace-axios
codex/upgrade-to-tailwind-4.1.8-using-pnpm
codex/add-cypress-test-for-avatar-types
feature/biome
feature/oxc
codex/update-flexsearch-to-0.8.205
4r6ni9-codex/fix-deprecated-sass-@import-usage
codex/fix-deprecated-sass-@import-usage
codex/add-cypress-test-for-task-list-refresh-fix
codex/fix-quick-add-magic-not-adding-tasks
codex/fix-all-type-errors
codex/fix-mimetype-for-docs.json
feature/caldav-from-scratch
feature/gh-actions-hetzner
fix-ci
feat/new-logger
jyte-better-dev-config
feat/add-team-member-with-enter
fix/button-and-icon-types
fix/notifications-component-name-collision
feature/null-time
renovate/tailwindcss-4.x
feature/unplugin-vue-router
fix/deprecated-import
feature/zod-schema
renovate/golangci-golangci-lint-1.x
fix/tiptap-editor-reactive-destructuring
release/0.24
feat/improve-add-task
fix/saved-filter-search
feat/webp-and-avif-attachment-previews
feature/migrate-back-to-bulma
fix/sass-add-missing-list-import
feature/sticky-demo-bar
fix/gantt-view-switch
feature/typesense-position-join
feature/focus-visible
dependencies/golangci-lint
feature/better-filter-syntax
fix/tiptap-task-list
renovate/github.com-golang-jwt-jwt-v4-5.x
feature/hide-forbidden-related-tasks
renovate/golang-1.x
release/0.20
release/0.17
release/0.16
release/0.15
release/0.14
v2.3.0
v2.2.2
v2.2.1
v2.2.0
v2.1.0
v2.0.0
v1.1.0
v1.0.0
v1.0.0-rc4
v1.0.0-rc3
v1.0.0-rc2
v1.0.0-rc1
v1.0.0-rc0
v0.24.6
v0.24.5
v0.24.4
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.0
v0.22.1
v0.22.0
0.21.0
v0.21.0
v0.20.4
v0.20.5
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.2
v0.19.1
v0.19.0
vue3
v0.18.1
v0.18.0
v0.17.1
v0.17.0
v0.16.1
v0.16.0
v0.15.1
v0.15.0
v0.14.1
v0.14.0
v0.13.1
v0.13
v0.12
v0.11
v0.10
v0.9
v0.8
v0.7
v0.6
v0.5
v0.4
v0.3
v0.2
v0.1
Labels
Clear labels
area/api
area/attachments
area/auth
area/avatars
area/backup-restore
area/caldav
area/calendar-view
area/comments
area/config
area/database
area/desktop
area/docker
area/email
area/favorites
area/filters
area/frontend
area/gantt
area/i18n
area/import-export
area/internal-code
area/kanban
area/labels
area/list-view
area/mobile
area/notifications
area/permissions
area/projects
area/pwa
area/recurring-tasks
area/reminders
area/search
area/shortcuts
area/subtasks
area/sync
area/table-view
area/task-editor
area/task-metadata
area/task-relations
area/teams
area/theming
area/time-tracking
area/typesense
area/views
area/webhooks
bug
changes requested
concern/accessibility
concern/performance
concern/regression
concern/ux
confirmed
db/mysql
dependencies
enhancement
good first issue
help wanted
integration/inbound
integration/outbound
kind/bug
kind/feature
needs reproduction
pull-request
question
security
support
upstream issue
waiting for reply
wontfix
Mirrored from GitHub Pull Request
No Label
area/frontend
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/vikunja#2064
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davide-ruota on GitHub (Jan 13, 2025).
Description
Hi, I have some issues with date localization. I initially thought it was due to localization settings, but I realized it depends on the localization provided by dayjs.
I also checked on https://try.vikunja.io and noticed that other languages besides Italian have localization issues.
In practice, only German, French, and Russian are translated correctly, and maybe a few others (I haven't checked everything).
Vikunja Version
v0.24.1-657-8ba9ded3e2
Browser and version
No response
Can you reproduce the bug on the Vikunja demo site?
Yes
Screenshots
@kolaente commented on GitHub (Jan 13, 2025):
This seems to be a problem with our loading of these translations. The italian translation files seem correct. @dpschen Do you have an idea what could be wrong here?
@dpschen commented on GitHub (Jan 14, 2025):
I would assume that the dayjs language mapping is the issue here, since it doesn't seem like it's in sync.
EDIT
Also
SUPPORTED_LOCALESneed to be updated accordingly. I thought that they would be up-to-date, but they don't seem to be?@kolaente commented on GitHub (Jan 14, 2025):
Crowdin syncs all languages, but only those with translated strings of more than 50% are added to
SUPPORTED_LOCALES. That's why not all languages we have files for are included.Italian is included correctly, but the date strings are not used?
@dpschen commented on GitHub (Jan 14, 2025):
I see, will check further, thanks for clarification!
I wasn't aware that Crowdin also changed the
SUPPORTED_LOCALESlist. Maybe we should add a comment there. Or to make it even more obvious we could generate the list in an external file that gets imported ini18n/index.ts.Why do we add json files of languages that have less than 50%?
@kolaente commented on GitHub (Jan 14, 2025):
It doesn't, the crowdin sync will only create the files. Adding a language to
SUPPORTED_LOCALESis a manual process.That's a limitation of the crowdin sync job.
@kolaente commented on GitHub (Jan 21, 2025):
It looks like the part of Vikunja from the screenshot in the first comment does not use dayjs, but date-fns (a different library) 🙃
https://github.com/go-vikunja/vikunja/blob/main/frontend/src/helpers/time/formatDate.ts#L4-L5
Why again do we have two date libraries?
@kolaente commented on GitHub (Jan 21, 2025):
PR is up: https://kolaente.dev/vikunja/vikunja/pulls/3039
@jon4god commented on GitHub (Feb 19, 2025):
I think it's a pretty critical bug. I get everything related to dates in English, although I use Russian in v0.24.6. And besides I have other inserts from English, although everything is translated in Crowdin.
@kolaente commented on GitHub (Feb 21, 2025):
Not all translated strings are approved. Only approved strings will show up in Vikunja.
@kolaente commented on GitHub (Feb 21, 2025):
Fixed in
021d71b90e, please check with the next unstable build (should be ready for deployment in ~45min, also on try).@jon4god commented on GitHub (Feb 22, 2025):
From what I understand the changes can be viewed at https://try.vikunja.io/. Checked it out. There's still a problem with the dates.
Gone are the remnants of English from the settings.
@kolaente commented on GitHub (Feb 24, 2025):
This seems to affect a handful of languages, but it's completely unclear to me why. Dayjs has all the required translations.
@jon4god commented on GitHub (Mar 4, 2025):
I'm not good at js, but I read that if you use dayjs on a multilingual site, you should use i18n:localeSwitched.
It allows you to switch dayjs localization when you switch site locale.
Is this used?
@kolaente commented on GitHub (Mar 7, 2025):
This seems to be a Nuxt thing, which we don't use. Might be a problem with
dayjs.locale. I'll check.@kolaente commented on GitHub (Mar 9, 2025):
It seems like this was caused by an incorrect setting, a few layers deep:
date.locale. This works great in theory, but for Russian and a few other languages that string was "translated" toen. That meant the language for dates was explicitly set toenwhen these languages were selected.I've fixed this now in
4e979f3375- please check with the next unstable build, you know how it works.