Skip to content

Kazakhs language date function return date in english #999

@RollingTL

Description

@RollingTL

Reporting a bug?

When I changing locale to Russian(ru) or English(en) date is shown in Russian and English. But when I change locale to Kazakh(kz) date is shown in English.

Expected behavior

Date in Kazakh instead of English.

Reproduction

dateTimeFormats.ts:

export default () => ({
  en: {
    short: {
      year: 'numeric',
      month: 'short',
      day: 'numeric'
    },
    long: {
      year: 'numeric',
      month: 'long',
      day: 'numeric',
      weekday: 'short',
      hour: 'numeric',
      minute: 'numeric',
      hour12: false
    }
  },
  ru: {
    short: {
      year: 'numeric',
      month: 'short',
      day: 'numeric'
    },
    long: {
      year: 'numeric',
      month: 'long',
      day: 'numeric',
      weekday: 'short',
      hour: 'numeric',
      minute: 'numeric',
      hour12: false
    }
  },
  kz: {
    short: {
      year: 'numeric',
      month: 'short',
      day: 'numeric'
    },
    long: {
      year: 'numeric',
      month: 'long',
      day: 'numeric',
      weekday: 'short',
      hour: 'numeric',
      minute: 'numeric',
      hour12: false
    }
  }
})

template:

<template>
  <div class="pa1 text-big">
    {{ $d(new Date('2022-04-02T11:41:02'), 'short') }}
  </div>
</template>

System Info

MacOS
Kazakh language is installed on the system.
{
  "name": "vite",
  "version": "0.0.0",
  "scripts": {
    "dev": "cp html/dev-index.html index.html && vite",
    "build": "vue-tsc --noEmit && vite build",
    "serve": "vite preview",
    "build:client": "vite build --emptyOutDir --outDir ../public/app/",
    "build:server": "vite build --emptyOutDir --outDir ../js/server/ --ssr src/server.js && mv ../public/app/index.html ../js/server/",
    "pro": "cp html/pro-index.html index.html && npm run build:client && npm run build:server"
  },
  "dependencies": {
    "@vuelidate/core": "^2.0.0-alpha.26",
    "@vuelidate/validators": "^2.0.0-alpha.22",
    "axios": "^0.21.4",
    "ol": "^6.8.1",
    "serialize-javascript": "^6.0.0",
    "vue": "^3.2.16",
    "vue-i18n": "^9.2.0-beta.11",
    "vue-router": "^4.0.11",
    "xstate": "^4.25.0"
  },
  "devDependencies": {
    "@types/node": "^16.10.2",
    "@typescript-eslint/eslint-plugin": "^4.32.0",
    "@typescript-eslint/parser": "^4.32.0",
    "@vitejs/plugin-vue": "^1.9.2",
    "@vue/eslint-config-prettier": "^6.0.0",
    "@vue/eslint-config-typescript": "^7.0.0",
    "eslint": "^7.32.0",
    "eslint-plugin-prettier": "^3.4.1",
    "eslint-plugin-vue": "^7.18.0",
    "prettier": "^2.4.1",
    "rollup-plugin-visualizer": "^5.5.2",
    "sass": "^1.42.1",
    "typescript": "^4.4.3",
    "vite": "^2.6.0",
    "vue-tsc": "^0.3.0"
  }
}

Screenshot

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions