Skip to content

Add i18n support to EntityAttributeDateField (QDate locale configuration) #97

@Zorin95670

Description

@Zorin95670

Description

The EntityAttributeDateField date picker currently does not support internationalization for day and month labels.
At the moment, the QDate component relies on its default locale configuration, which results in non-translated day and month names.

The goal is to update EntityAttributeDateField so that it retrieves translations from vue-i18n and injects them into the local QDate locale configuration.


Proposed Solution

Modify EntityAttributeDateField to:

  • Read translated day and month labels from i18n
  • Build a locale object compatible with QDate
  • Pass this object to the QDate component via its locale prop

Example of QDate locale configuration:

locale: {
  days: ['dimanche', 'lundi', 'mardi', ...],
  daysShort: ['dim', 'lun', 'mar', ...],
  months: ['janvier', 'fevrier', ...],
  monthsShort: ['jan', 'fev', ...]
}

i18n Keys to Add

The following keys should be added to the i18n configuration:

{
  "date": {
    "days": {
      "monday": "lundi"
    },
    "daysShort": {
      "monday": "lun"
    },
    "months": {
      "january": "janvier"
    },
    "monthsShort": {
      "january": "jan"
    }
  }
}

Acceptance Criteria

  • Day and month names displayed in EntityAttributeDateField are translated
  • Translations are sourced exclusively from vue-i18n
  • QDate receives a fully populated locale object
  • Changing the application language updates the date picker accordingly

Notes

This approach allows EntityAttributeDateField to remain independent from the global Quasar language configuration and ensures consistent behavior across the application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions