abichinger / vue-js-cron

Renderless Vue.js cron editor
MIT License
73 stars 23 forks source link

Russian localization #42

Closed aliewusal closed 11 months ago

aliewusal commented 11 months ago

Hello! Can you add Russian localization?

abichinger commented 11 months ago

Hi!

Unfortunately I don't speak Russian and I think using a translation tool like Google Translate wouldn't yield good results. So I can't translate it.

If you like you can translate it yourself by using the customLocale property The customLocale property expects an object of type Localization

If you translate it, please share your localization object with me.

abichinger commented 11 months ago

I asked GPT-4 to translate the German localization into Russian.

Here is the result

const locale: Localization = {
  '*': {
    prefix: 'Каждый',
    suffix: '',
    text: 'Неизвестно',
    '*': {
      value: { text: '{{value.text}}' },
      range: { text: '{{start.text}}-{{end.text}}' },
      everyX: { text: 'каждый {{every.value}}' },
    },
    month: {
      '*': { prefix: 'в' },
      empty: { prefix: 'в', text: 'каждом месяце' },
      value: { text: '{{value.alt}}' },
      range: { text: '{{start.alt}}-{{end.alt}}' },
    },
    day: {
      '*': { prefix: 'в' },
      empty: { prefix: 'в', text: 'каждый день' },
      everyX: { prefix: '', text: 'каждые {{every.value}} дня' },
      noSpecific: { prefix: 'в', text: 'нет определенного дня' },
    },
    dayOfWeek: {
      '*': { prefix: 'по' },
      empty: { prefix: 'по', text: 'каждому дню недели' },
      value: { text: '{{value.alt}}' },
      range: { text: '{{start.alt}}-{{end.alt}}' },
      noSpecific: { prefix: 'и', text: 'нет определенного дня недели' },
    },
    hour: {
      '*': { prefix: 'в' },
      empty: { prefix: 'в', text: 'каждый час' },
      everyX: { prefix: '', text: 'каждые {{every.value}} часа' },
    },
    minute: {
      '*': { prefix: ':' },
      empty: { text: 'каждую минуту' },
      everyX: { prefix: '', text: 'каждые {{every.value}} минуты' },
    },
    second: {
      '*': { prefix: ':' },
      empty: { text: 'каждую секунду' },
      everyX: { prefix: '', text: 'каждые {{every.value}} секунды' },
    },
  },
  minute: { text: 'Минута' },
  hour: {
    text: 'Час',
    minute: { '*': { prefix: 'в', suffix: 'минут(а/ы)' }, empty: { text: 'каждый' } },
  },
  day: { prefix: 'Каждый', text: 'День' },
  week: { text: 'Неделя' },
  month: { prefix: 'Каждый', text: 'Месяц' },
  year: { prefix: 'Каждый', text: 'Год' },

  //quartz format
  'q-second': { text: 'Секунда' },
  'q-minute': { text: 'Минута', second: { '': { prefix: 'и' } } },
  'q-hour': { text: 'Час', minute: { '': { prefix: 'и' } }, second: { '*': { prefix: 'и' } } },
}

Here is a demo: https://codesandbox.io/s/vue-js-cron-russian-localization-42-7cj58k?file=/src/App.vue

Please let me know if this is usable

abichinger commented 11 months ago

7b33b18f69f599fb99f47b171716b1b6409aeaef