@schedule-x/translations
Advanced tools
Comparing version 1.48.0 to 1.49.0
@@ -24,2 +24,4 @@ 'use strict'; | ||
'Full day- and multiple day events': 'Ganztägige und mehrtägige Ereignisse', | ||
'Link to {{n}} more events on {{date}}': 'Link zu {{n}} weiteren Ereignissen am {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link zu 1 weiteren Ereignis am {{date}}', | ||
}; | ||
@@ -53,2 +55,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -82,2 +86,4 @@ | ||
'Full day- and multiple day events': 'Eventi della giornata e plurigiornalieri', | ||
'Link to {{n}} more events on {{date}}': 'Link a {{n}} eventi in più il {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link a 1 evento in più il {{date}}', | ||
}; | ||
@@ -111,2 +117,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -140,2 +148,4 @@ | ||
'Full day- and multiple day events': 'Heldags- och flerdagshändelser', | ||
'Link to {{n}} more events on {{date}}': 'Länk till {{n}} fler händelser den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Länk till 1 händelse till den {{date}}', | ||
}; | ||
@@ -169,2 +179,4 @@ | ||
'Full day- and multiple day events': '全天和多天活动', | ||
'Link to {{n}} more events on {{date}}': '链接到{{date}}上的{{n}}个更多活动', | ||
'Link to 1 more event on {{date}}': '链接到{{date}}上的1个更多活动', | ||
}; | ||
@@ -198,2 +210,4 @@ | ||
'Full day- and multiple day events': '終日および複数日イベント', | ||
'Link to {{n}} more events on {{date}}': '{{date}} に{{n}}件のイベントへのリンク', | ||
'Link to 1 more event on {{date}}': '{{date}} に1件のイベントへのリンク', | ||
}; | ||
@@ -227,2 +241,4 @@ | ||
'Full day- and multiple day events': 'События на целый день и несколько дней подряд', | ||
'Link to {{n}} more events on {{date}}': 'Ссылка на {{n}} дополнительных событий на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Ссылка на 1 дополнительное событие на {{date}}', | ||
}; | ||
@@ -256,2 +272,4 @@ | ||
'Full day- and multiple day events': '종일 및 복수일 일정', | ||
'Link to {{n}} more events on {{date}}': '{{date}}에 {{n}}개 이상의 이벤트로 이동', | ||
'Link to 1 more event on {{date}}': '{{date}}에 1개 이상의 이벤트로 이동', | ||
}; | ||
@@ -285,2 +303,4 @@ | ||
'Full day- and multiple day events': "Événements d'une ou plusieurs journées", | ||
'Link to {{n}} more events on {{date}}': 'Lien vers {{n}} autres événements le {{date}}', | ||
'Link to 1 more event on {{date}}': 'Lien vers 1 autre événement le {{date}}', | ||
}; | ||
@@ -314,2 +334,4 @@ | ||
'Full day- and multiple day events': 'Heldagsbegivenheder og flerdagsbegivenheder', | ||
'Link to {{n}} more events on {{date}}': 'Link til {{n}} flere begivenheder den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link til 1 mere begivenhed den {{date}}', | ||
}; | ||
@@ -343,2 +365,4 @@ | ||
'Full day- and multiple day events': 'Wydarzenia całodniowe i wielodniowe', | ||
'Link to {{n}} more events on {{date}}': 'Link do {{n}} kolejnych wydarzeń w dniu {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link do 1 kolejnego wydarzenia w dniu {{date}}', | ||
}; | ||
@@ -372,2 +396,4 @@ | ||
'Full day- and multiple day events': 'Día completo y eventos de múltiples días', | ||
'Link to {{n}} more events on {{date}}': 'Enlace a {{n}} eventos más el {{date}}', | ||
'Link to 1 more event on {{date}}': 'Enlace a 1 evento más el {{date}}', | ||
}; | ||
@@ -392,2 +418,4 @@ | ||
'Full day- and multiple day events': 'Evenementen van een hele dag en meerdere dagen', | ||
'Link to {{n}} more events on {{date}}': 'Link naar {{n}} meer evenementen op {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link naar 1 meer evenement op {{date}}', | ||
}; | ||
@@ -430,2 +458,4 @@ | ||
'Full day- and multiple day events': 'Dia inteiro e eventos de vários dias', | ||
'Link to {{n}} more events on {{date}}': 'Link para mais {{n}} eventos em {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link para mais 1 evento em {{date}}', | ||
}; | ||
@@ -459,2 +489,4 @@ | ||
'Full day- and multiple day events': 'Celodenné a viacdňové udalosti', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} ďalších udalostí dňa {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 ďalšiu udalosť dňa {{date}}', | ||
}; | ||
@@ -488,2 +520,4 @@ | ||
'Full day- and multiple day events': 'Целодневни и повеќедневни настани', | ||
'Link to {{n}} more events on {{date}}': 'Линк до {{n}} повеќе настани на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Линк до 1 повеќе настан на {{date}}', | ||
}; | ||
@@ -517,2 +551,4 @@ | ||
'Full day- and multiple day events': 'Tüm gün ve çoklu gün etkinlikleri', | ||
'Link to {{n}} more events on {{date}}': '{{date}} tarihinde {{n}} etkinliğe bağlantı', | ||
'Link to 1 more event on {{date}}': '{{date}} tarihinde 1 etkinliğe bağlantı', | ||
}; | ||
@@ -546,2 +582,4 @@ | ||
'Full day- and multiple day events': 'Күн бою жана бир нече күн катары менен болгон окуялар', | ||
'Link to {{n}} more events on {{date}}': '{{date}} күнүндө {{n}} окуяга байланыш', | ||
'Link to 1 more event on {{date}}': '{{date}} күнүндө 1 окуяга байланыш', | ||
}; | ||
@@ -575,2 +613,4 @@ | ||
'Full day- and multiple day events': 'Sepanjang hari dan acara beberapa hari ', | ||
'Link to {{n}} more events on {{date}}': 'Tautan ke {{n}} acara lainnya pada {{date}}', | ||
'Link to 1 more event on {{date}}': 'Tautan ke 1 acara lainnya pada {{date}}', | ||
}; | ||
@@ -604,2 +644,4 @@ | ||
'Full day- and multiple day events': 'Celodenní a vícedenní události', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} dalších událostí dne {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 další událost dne {{date}}', | ||
}; | ||
@@ -618,3 +660,3 @@ | ||
const translate = (locale, languages) => (key) => { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
@@ -626,3 +668,10 @@ throw new InvalidLocaleError(locale); | ||
return key; | ||
return language[key] || key; | ||
let translation = language[key] || key; | ||
Object.keys(translationVariables || {}).forEach((variable) => { | ||
const value = String(translationVariables === null || translationVariables === void 0 ? void 0 : translationVariables[variable]); | ||
if (!value) | ||
return; | ||
translation = translation.replace(`{{${variable}}}`, value); | ||
}); | ||
return translation; | ||
}; | ||
@@ -629,0 +678,0 @@ |
@@ -21,2 +21,4 @@ interface DatePickerTranslations { | ||
"Full day- and multiple day events": string; | ||
"Link to {{n}} more events on {{date}}": string; | ||
"Link to 1 more event on {{date}}": string; | ||
} | ||
@@ -45,3 +47,6 @@ type Language = DatePickerTranslations & CalendarTranslations; | ||
declare const csCZ: Language; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string) => string; | ||
type TranslationVariables = { | ||
[key: string]: string | number; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translations: { | ||
@@ -48,0 +53,0 @@ deDE: Language; |
@@ -24,2 +24,4 @@ 'use strict'; | ||
'Full day- and multiple day events': 'Ganztägige und mehrtägige Ereignisse', | ||
'Link to {{n}} more events on {{date}}': 'Link zu {{n}} weiteren Ereignissen am {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link zu 1 weiteren Ereignis am {{date}}', | ||
}; | ||
@@ -53,2 +55,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -82,2 +86,4 @@ | ||
'Full day- and multiple day events': 'Eventi della giornata e plurigiornalieri', | ||
'Link to {{n}} more events on {{date}}': 'Link a {{n}} eventi in più il {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link a 1 evento in più il {{date}}', | ||
}; | ||
@@ -111,2 +117,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -140,2 +148,4 @@ | ||
'Full day- and multiple day events': 'Heldags- och flerdagshändelser', | ||
'Link to {{n}} more events on {{date}}': 'Länk till {{n}} fler händelser den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Länk till 1 händelse till den {{date}}', | ||
}; | ||
@@ -169,2 +179,4 @@ | ||
'Full day- and multiple day events': '全天和多天活动', | ||
'Link to {{n}} more events on {{date}}': '链接到{{date}}上的{{n}}个更多活动', | ||
'Link to 1 more event on {{date}}': '链接到{{date}}上的1个更多活动', | ||
}; | ||
@@ -198,2 +210,4 @@ | ||
'Full day- and multiple day events': '終日および複数日イベント', | ||
'Link to {{n}} more events on {{date}}': '{{date}} に{{n}}件のイベントへのリンク', | ||
'Link to 1 more event on {{date}}': '{{date}} に1件のイベントへのリンク', | ||
}; | ||
@@ -227,2 +241,4 @@ | ||
'Full day- and multiple day events': 'События на целый день и несколько дней подряд', | ||
'Link to {{n}} more events on {{date}}': 'Ссылка на {{n}} дополнительных событий на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Ссылка на 1 дополнительное событие на {{date}}', | ||
}; | ||
@@ -256,2 +272,4 @@ | ||
'Full day- and multiple day events': '종일 및 복수일 일정', | ||
'Link to {{n}} more events on {{date}}': '{{date}}에 {{n}}개 이상의 이벤트로 이동', | ||
'Link to 1 more event on {{date}}': '{{date}}에 1개 이상의 이벤트로 이동', | ||
}; | ||
@@ -285,2 +303,4 @@ | ||
'Full day- and multiple day events': "Événements d'une ou plusieurs journées", | ||
'Link to {{n}} more events on {{date}}': 'Lien vers {{n}} autres événements le {{date}}', | ||
'Link to 1 more event on {{date}}': 'Lien vers 1 autre événement le {{date}}', | ||
}; | ||
@@ -314,2 +334,4 @@ | ||
'Full day- and multiple day events': 'Heldagsbegivenheder og flerdagsbegivenheder', | ||
'Link to {{n}} more events on {{date}}': 'Link til {{n}} flere begivenheder den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link til 1 mere begivenhed den {{date}}', | ||
}; | ||
@@ -343,2 +365,4 @@ | ||
'Full day- and multiple day events': 'Wydarzenia całodniowe i wielodniowe', | ||
'Link to {{n}} more events on {{date}}': 'Link do {{n}} kolejnych wydarzeń w dniu {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link do 1 kolejnego wydarzenia w dniu {{date}}', | ||
}; | ||
@@ -372,2 +396,4 @@ | ||
'Full day- and multiple day events': 'Día completo y eventos de múltiples días', | ||
'Link to {{n}} more events on {{date}}': 'Enlace a {{n}} eventos más el {{date}}', | ||
'Link to 1 more event on {{date}}': 'Enlace a 1 evento más el {{date}}', | ||
}; | ||
@@ -392,2 +418,4 @@ | ||
'Full day- and multiple day events': 'Evenementen van een hele dag en meerdere dagen', | ||
'Link to {{n}} more events on {{date}}': 'Link naar {{n}} meer evenementen op {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link naar 1 meer evenement op {{date}}', | ||
}; | ||
@@ -430,2 +458,4 @@ | ||
'Full day- and multiple day events': 'Dia inteiro e eventos de vários dias', | ||
'Link to {{n}} more events on {{date}}': 'Link para mais {{n}} eventos em {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link para mais 1 evento em {{date}}', | ||
}; | ||
@@ -459,2 +489,4 @@ | ||
'Full day- and multiple day events': 'Celodenné a viacdňové udalosti', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} ďalších udalostí dňa {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 ďalšiu udalosť dňa {{date}}', | ||
}; | ||
@@ -488,2 +520,4 @@ | ||
'Full day- and multiple day events': 'Целодневни и повеќедневни настани', | ||
'Link to {{n}} more events on {{date}}': 'Линк до {{n}} повеќе настани на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Линк до 1 повеќе настан на {{date}}', | ||
}; | ||
@@ -517,2 +551,4 @@ | ||
'Full day- and multiple day events': 'Tüm gün ve çoklu gün etkinlikleri', | ||
'Link to {{n}} more events on {{date}}': '{{date}} tarihinde {{n}} etkinliğe bağlantı', | ||
'Link to 1 more event on {{date}}': '{{date}} tarihinde 1 etkinliğe bağlantı', | ||
}; | ||
@@ -546,2 +582,4 @@ | ||
'Full day- and multiple day events': 'Күн бою жана бир нече күн катары менен болгон окуялар', | ||
'Link to {{n}} more events on {{date}}': '{{date}} күнүндө {{n}} окуяга байланыш', | ||
'Link to 1 more event on {{date}}': '{{date}} күнүндө 1 окуяга байланыш', | ||
}; | ||
@@ -575,2 +613,4 @@ | ||
'Full day- and multiple day events': 'Sepanjang hari dan acara beberapa hari ', | ||
'Link to {{n}} more events on {{date}}': 'Tautan ke {{n}} acara lainnya pada {{date}}', | ||
'Link to 1 more event on {{date}}': 'Tautan ke 1 acara lainnya pada {{date}}', | ||
}; | ||
@@ -604,2 +644,4 @@ | ||
'Full day- and multiple day events': 'Celodenní a vícedenní události', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} dalších událostí dne {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 další událost dne {{date}}', | ||
}; | ||
@@ -618,3 +660,3 @@ | ||
const translate = (locale, languages) => (key) => { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
@@ -626,3 +668,10 @@ throw new InvalidLocaleError(locale); | ||
return key; | ||
return language[key] || key; | ||
let translation = language[key] || key; | ||
Object.keys(translationVariables || {}).forEach((variable) => { | ||
const value = String(translationVariables === null || translationVariables === void 0 ? void 0 : translationVariables[variable]); | ||
if (!value) | ||
return; | ||
translation = translation.replace(`{{${variable}}}`, value); | ||
}); | ||
return translation; | ||
}; | ||
@@ -629,0 +678,0 @@ |
@@ -21,2 +21,4 @@ interface DatePickerTranslations { | ||
"Full day- and multiple day events": string; | ||
"Link to {{n}} more events on {{date}}": string; | ||
"Link to 1 more event on {{date}}": string; | ||
} | ||
@@ -45,3 +47,6 @@ type Language = DatePickerTranslations & CalendarTranslations; | ||
declare const csCZ: Language; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string) => string; | ||
type TranslationVariables = { | ||
[key: string]: string | number; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translations: { | ||
@@ -48,0 +53,0 @@ deDE: Language; |
@@ -22,2 +22,4 @@ const datePickerDeDE = { | ||
'Full day- and multiple day events': 'Ganztägige und mehrtägige Ereignisse', | ||
'Link to {{n}} more events on {{date}}': 'Link zu {{n}} weiteren Ereignissen am {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link zu 1 weiteren Ereignis am {{date}}', | ||
}; | ||
@@ -51,2 +53,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -80,2 +84,4 @@ | ||
'Full day- and multiple day events': 'Eventi della giornata e plurigiornalieri', | ||
'Link to {{n}} more events on {{date}}': 'Link a {{n}} eventi in più il {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link a 1 evento in più il {{date}}', | ||
}; | ||
@@ -109,2 +115,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -138,2 +146,4 @@ | ||
'Full day- and multiple day events': 'Heldags- och flerdagshändelser', | ||
'Link to {{n}} more events on {{date}}': 'Länk till {{n}} fler händelser den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Länk till 1 händelse till den {{date}}', | ||
}; | ||
@@ -167,2 +177,4 @@ | ||
'Full day- and multiple day events': '全天和多天活动', | ||
'Link to {{n}} more events on {{date}}': '链接到{{date}}上的{{n}}个更多活动', | ||
'Link to 1 more event on {{date}}': '链接到{{date}}上的1个更多活动', | ||
}; | ||
@@ -196,2 +208,4 @@ | ||
'Full day- and multiple day events': '終日および複数日イベント', | ||
'Link to {{n}} more events on {{date}}': '{{date}} に{{n}}件のイベントへのリンク', | ||
'Link to 1 more event on {{date}}': '{{date}} に1件のイベントへのリンク', | ||
}; | ||
@@ -225,2 +239,4 @@ | ||
'Full day- and multiple day events': 'События на целый день и несколько дней подряд', | ||
'Link to {{n}} more events on {{date}}': 'Ссылка на {{n}} дополнительных событий на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Ссылка на 1 дополнительное событие на {{date}}', | ||
}; | ||
@@ -254,2 +270,4 @@ | ||
'Full day- and multiple day events': '종일 및 복수일 일정', | ||
'Link to {{n}} more events on {{date}}': '{{date}}에 {{n}}개 이상의 이벤트로 이동', | ||
'Link to 1 more event on {{date}}': '{{date}}에 1개 이상의 이벤트로 이동', | ||
}; | ||
@@ -283,2 +301,4 @@ | ||
'Full day- and multiple day events': "Événements d'une ou plusieurs journées", | ||
'Link to {{n}} more events on {{date}}': 'Lien vers {{n}} autres événements le {{date}}', | ||
'Link to 1 more event on {{date}}': 'Lien vers 1 autre événement le {{date}}', | ||
}; | ||
@@ -312,2 +332,4 @@ | ||
'Full day- and multiple day events': 'Heldagsbegivenheder og flerdagsbegivenheder', | ||
'Link to {{n}} more events on {{date}}': 'Link til {{n}} flere begivenheder den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link til 1 mere begivenhed den {{date}}', | ||
}; | ||
@@ -341,2 +363,4 @@ | ||
'Full day- and multiple day events': 'Wydarzenia całodniowe i wielodniowe', | ||
'Link to {{n}} more events on {{date}}': 'Link do {{n}} kolejnych wydarzeń w dniu {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link do 1 kolejnego wydarzenia w dniu {{date}}', | ||
}; | ||
@@ -370,2 +394,4 @@ | ||
'Full day- and multiple day events': 'Día completo y eventos de múltiples días', | ||
'Link to {{n}} more events on {{date}}': 'Enlace a {{n}} eventos más el {{date}}', | ||
'Link to 1 more event on {{date}}': 'Enlace a 1 evento más el {{date}}', | ||
}; | ||
@@ -390,2 +416,4 @@ | ||
'Full day- and multiple day events': 'Evenementen van een hele dag en meerdere dagen', | ||
'Link to {{n}} more events on {{date}}': 'Link naar {{n}} meer evenementen op {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link naar 1 meer evenement op {{date}}', | ||
}; | ||
@@ -428,2 +456,4 @@ | ||
'Full day- and multiple day events': 'Dia inteiro e eventos de vários dias', | ||
'Link to {{n}} more events on {{date}}': 'Link para mais {{n}} eventos em {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link para mais 1 evento em {{date}}', | ||
}; | ||
@@ -457,2 +487,4 @@ | ||
'Full day- and multiple day events': 'Celodenné a viacdňové udalosti', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} ďalších udalostí dňa {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 ďalšiu udalosť dňa {{date}}', | ||
}; | ||
@@ -486,2 +518,4 @@ | ||
'Full day- and multiple day events': 'Целодневни и повеќедневни настани', | ||
'Link to {{n}} more events on {{date}}': 'Линк до {{n}} повеќе настани на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Линк до 1 повеќе настан на {{date}}', | ||
}; | ||
@@ -515,2 +549,4 @@ | ||
'Full day- and multiple day events': 'Tüm gün ve çoklu gün etkinlikleri', | ||
'Link to {{n}} more events on {{date}}': '{{date}} tarihinde {{n}} etkinliğe bağlantı', | ||
'Link to 1 more event on {{date}}': '{{date}} tarihinde 1 etkinliğe bağlantı', | ||
}; | ||
@@ -544,2 +580,4 @@ | ||
'Full day- and multiple day events': 'Күн бою жана бир нече күн катары менен болгон окуялар', | ||
'Link to {{n}} more events on {{date}}': '{{date}} күнүндө {{n}} окуяга байланыш', | ||
'Link to 1 more event on {{date}}': '{{date}} күнүндө 1 окуяга байланыш', | ||
}; | ||
@@ -573,2 +611,4 @@ | ||
'Full day- and multiple day events': 'Sepanjang hari dan acara beberapa hari ', | ||
'Link to {{n}} more events on {{date}}': 'Tautan ke {{n}} acara lainnya pada {{date}}', | ||
'Link to 1 more event on {{date}}': 'Tautan ke 1 acara lainnya pada {{date}}', | ||
}; | ||
@@ -602,2 +642,4 @@ | ||
'Full day- and multiple day events': 'Celodenní a vícedenní události', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} dalších událostí dne {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 další událost dne {{date}}', | ||
}; | ||
@@ -616,3 +658,3 @@ | ||
const translate = (locale, languages) => (key) => { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
@@ -624,3 +666,10 @@ throw new InvalidLocaleError(locale); | ||
return key; | ||
return language[key] || key; | ||
let translation = language[key] || key; | ||
Object.keys(translationVariables || {}).forEach((variable) => { | ||
const value = String(translationVariables === null || translationVariables === void 0 ? void 0 : translationVariables[variable]); | ||
if (!value) | ||
return; | ||
translation = translation.replace(`{{${variable}}}`, value); | ||
}); | ||
return translation; | ||
}; | ||
@@ -627,0 +676,0 @@ |
@@ -21,2 +21,4 @@ interface DatePickerTranslations { | ||
"Full day- and multiple day events": string; | ||
"Link to {{n}} more events on {{date}}": string; | ||
"Link to 1 more event on {{date}}": string; | ||
} | ||
@@ -45,3 +47,6 @@ type Language = DatePickerTranslations & CalendarTranslations; | ||
declare const csCZ: Language; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string) => string; | ||
type TranslationVariables = { | ||
[key: string]: string | number; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translations: { | ||
@@ -48,0 +53,0 @@ deDE: Language; |
@@ -28,2 +28,4 @@ (function (global, factory) { | ||
'Full day- and multiple day events': 'Ganztägige und mehrtägige Ereignisse', | ||
'Link to {{n}} more events on {{date}}': 'Link zu {{n}} weiteren Ereignissen am {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link zu 1 weiteren Ereignis am {{date}}', | ||
}; | ||
@@ -57,2 +59,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -86,2 +90,4 @@ | ||
'Full day- and multiple day events': 'Eventi della giornata e plurigiornalieri', | ||
'Link to {{n}} more events on {{date}}': 'Link a {{n}} eventi in più il {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link a 1 evento in più il {{date}}', | ||
}; | ||
@@ -115,2 +121,4 @@ | ||
'Full day- and multiple day events': 'Full day- and multiple day events', | ||
'Link to {{n}} more events on {{date}}': 'Link to {{n}} more events on {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link to 1 more event on {{date}}', | ||
}; | ||
@@ -144,2 +152,4 @@ | ||
'Full day- and multiple day events': 'Heldags- och flerdagshändelser', | ||
'Link to {{n}} more events on {{date}}': 'Länk till {{n}} fler händelser den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Länk till 1 händelse till den {{date}}', | ||
}; | ||
@@ -173,2 +183,4 @@ | ||
'Full day- and multiple day events': '全天和多天活动', | ||
'Link to {{n}} more events on {{date}}': '链接到{{date}}上的{{n}}个更多活动', | ||
'Link to 1 more event on {{date}}': '链接到{{date}}上的1个更多活动', | ||
}; | ||
@@ -202,2 +214,4 @@ | ||
'Full day- and multiple day events': '終日および複数日イベント', | ||
'Link to {{n}} more events on {{date}}': '{{date}} に{{n}}件のイベントへのリンク', | ||
'Link to 1 more event on {{date}}': '{{date}} に1件のイベントへのリンク', | ||
}; | ||
@@ -231,2 +245,4 @@ | ||
'Full day- and multiple day events': 'События на целый день и несколько дней подряд', | ||
'Link to {{n}} more events on {{date}}': 'Ссылка на {{n}} дополнительных событий на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Ссылка на 1 дополнительное событие на {{date}}', | ||
}; | ||
@@ -260,2 +276,4 @@ | ||
'Full day- and multiple day events': '종일 및 복수일 일정', | ||
'Link to {{n}} more events on {{date}}': '{{date}}에 {{n}}개 이상의 이벤트로 이동', | ||
'Link to 1 more event on {{date}}': '{{date}}에 1개 이상의 이벤트로 이동', | ||
}; | ||
@@ -289,2 +307,4 @@ | ||
'Full day- and multiple day events': "Événements d'une ou plusieurs journées", | ||
'Link to {{n}} more events on {{date}}': 'Lien vers {{n}} autres événements le {{date}}', | ||
'Link to 1 more event on {{date}}': 'Lien vers 1 autre événement le {{date}}', | ||
}; | ||
@@ -318,2 +338,4 @@ | ||
'Full day- and multiple day events': 'Heldagsbegivenheder og flerdagsbegivenheder', | ||
'Link to {{n}} more events on {{date}}': 'Link til {{n}} flere begivenheder den {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link til 1 mere begivenhed den {{date}}', | ||
}; | ||
@@ -347,2 +369,4 @@ | ||
'Full day- and multiple day events': 'Wydarzenia całodniowe i wielodniowe', | ||
'Link to {{n}} more events on {{date}}': 'Link do {{n}} kolejnych wydarzeń w dniu {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link do 1 kolejnego wydarzenia w dniu {{date}}', | ||
}; | ||
@@ -376,2 +400,4 @@ | ||
'Full day- and multiple day events': 'Día completo y eventos de múltiples días', | ||
'Link to {{n}} more events on {{date}}': 'Enlace a {{n}} eventos más el {{date}}', | ||
'Link to 1 more event on {{date}}': 'Enlace a 1 evento más el {{date}}', | ||
}; | ||
@@ -396,2 +422,4 @@ | ||
'Full day- and multiple day events': 'Evenementen van een hele dag en meerdere dagen', | ||
'Link to {{n}} more events on {{date}}': 'Link naar {{n}} meer evenementen op {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link naar 1 meer evenement op {{date}}', | ||
}; | ||
@@ -434,2 +462,4 @@ | ||
'Full day- and multiple day events': 'Dia inteiro e eventos de vários dias', | ||
'Link to {{n}} more events on {{date}}': 'Link para mais {{n}} eventos em {{date}}', | ||
'Link to 1 more event on {{date}}': 'Link para mais 1 evento em {{date}}', | ||
}; | ||
@@ -463,2 +493,4 @@ | ||
'Full day- and multiple day events': 'Celodenné a viacdňové udalosti', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} ďalších udalostí dňa {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 ďalšiu udalosť dňa {{date}}', | ||
}; | ||
@@ -492,2 +524,4 @@ | ||
'Full day- and multiple day events': 'Целодневни и повеќедневни настани', | ||
'Link to {{n}} more events on {{date}}': 'Линк до {{n}} повеќе настани на {{date}}', | ||
'Link to 1 more event on {{date}}': 'Линк до 1 повеќе настан на {{date}}', | ||
}; | ||
@@ -521,2 +555,4 @@ | ||
'Full day- and multiple day events': 'Tüm gün ve çoklu gün etkinlikleri', | ||
'Link to {{n}} more events on {{date}}': '{{date}} tarihinde {{n}} etkinliğe bağlantı', | ||
'Link to 1 more event on {{date}}': '{{date}} tarihinde 1 etkinliğe bağlantı', | ||
}; | ||
@@ -550,2 +586,4 @@ | ||
'Full day- and multiple day events': 'Күн бою жана бир нече күн катары менен болгон окуялар', | ||
'Link to {{n}} more events on {{date}}': '{{date}} күнүндө {{n}} окуяга байланыш', | ||
'Link to 1 more event on {{date}}': '{{date}} күнүндө 1 окуяга байланыш', | ||
}; | ||
@@ -579,2 +617,4 @@ | ||
'Full day- and multiple day events': 'Sepanjang hari dan acara beberapa hari ', | ||
'Link to {{n}} more events on {{date}}': 'Tautan ke {{n}} acara lainnya pada {{date}}', | ||
'Link to 1 more event on {{date}}': 'Tautan ke 1 acara lainnya pada {{date}}', | ||
}; | ||
@@ -608,2 +648,4 @@ | ||
'Full day- and multiple day events': 'Celodenní a vícedenní události', | ||
'Link to {{n}} more events on {{date}}': 'Odkaz na {{n}} dalších událostí dne {{date}}', | ||
'Link to 1 more event on {{date}}': 'Odkaz na 1 další událost dne {{date}}', | ||
}; | ||
@@ -622,3 +664,3 @@ | ||
const translate = (locale, languages) => (key) => { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
@@ -630,3 +672,10 @@ throw new InvalidLocaleError(locale); | ||
return key; | ||
return language[key] || key; | ||
let translation = language[key] || key; | ||
Object.keys(translationVariables || {}).forEach((variable) => { | ||
const value = String(translationVariables === null || translationVariables === void 0 ? void 0 : translationVariables[variable]); | ||
if (!value) | ||
return; | ||
translation = translation.replace(`{{${variable}}}`, value); | ||
}); | ||
return translation; | ||
}; | ||
@@ -633,0 +682,0 @@ |
{ | ||
"name": "@schedule-x/translations", | ||
"version": "1.48.0", | ||
"version": "1.49.0", | ||
"description": "Schedule-X translations", | ||
@@ -30,3 +30,3 @@ "author": { | ||
"homepage": "https://schedule-x.dev", | ||
"gitHead": "770bce0c213cded949c70cac797f3c8badb2725f" | ||
"gitHead": "10378f271ef2a416b7f625b34308846eda6254db" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96106
2905