@schedule-x/translations
Advanced tools
Comparing version 1.63.1 to 1.64.0-alpha.0
@@ -0,1 +1,2 @@ | ||
import { Signal } from "@preact/signals"; | ||
interface DatePickerTranslations { | ||
@@ -51,3 +52,3 @@ Date: string; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translate: (locale: Signal<string>, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const caES: Language; | ||
@@ -54,0 +55,0 @@ declare const translations: { |
@@ -700,5 +700,5 @@ 'use strict'; | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
throw new InvalidLocaleError(locale); | ||
const deHyphenatedLocale = locale.replace('-', ''); | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale.value)) | ||
throw new InvalidLocaleError(locale.value); | ||
const deHyphenatedLocale = locale.value.replace('-', ''); | ||
const language = languages[deHyphenatedLocale]; | ||
@@ -705,0 +705,0 @@ if (!language) |
@@ -0,1 +1,2 @@ | ||
import { Signal } from "@preact/signals"; | ||
interface DatePickerTranslations { | ||
@@ -51,3 +52,3 @@ Date: string; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translate: (locale: Signal<string>, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const caES: Language; | ||
@@ -54,0 +55,0 @@ declare const translations: { |
@@ -698,5 +698,5 @@ const datePickerDeDE = { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
throw new InvalidLocaleError(locale); | ||
const deHyphenatedLocale = locale.replace('-', ''); | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale.value)) | ||
throw new InvalidLocaleError(locale.value); | ||
const deHyphenatedLocale = locale.value.replace('-', ''); | ||
const language = languages[deHyphenatedLocale]; | ||
@@ -703,0 +703,0 @@ if (!language) |
@@ -0,1 +1,2 @@ | ||
import { Signal } from "@preact/signals"; | ||
interface DatePickerTranslations { | ||
@@ -51,3 +52,3 @@ Date: string; | ||
}; | ||
declare const translate: (locale: string, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const translate: (locale: Signal<string>, languages: Record<string, object>) => (key: string, translationVariables?: TranslationVariables) => string; | ||
declare const caES: Language; | ||
@@ -54,0 +55,0 @@ declare const translations: { |
@@ -704,5 +704,5 @@ (function (global, factory) { | ||
const translate = (locale, languages) => (key, translationVariables) => { | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale)) | ||
throw new InvalidLocaleError(locale); | ||
const deHyphenatedLocale = locale.replace('-', ''); | ||
if (!/^[a-z]{2}-[A-Z]{2}$/.test(locale.value)) | ||
throw new InvalidLocaleError(locale.value); | ||
const deHyphenatedLocale = locale.value.replace('-', ''); | ||
const language = languages[deHyphenatedLocale]; | ||
@@ -709,0 +709,0 @@ if (!language) |
{ | ||
"name": "@schedule-x/translations", | ||
"umdName": "SXTranslations", | ||
"version": "1.63.1", | ||
"version": "1.64.0-alpha.0", | ||
"description": "Schedule-X translations", | ||
@@ -31,3 +31,3 @@ "author": { | ||
"homepage": "https://schedule-x.dev", | ||
"gitHead": "559d32882f6fe764328d542216bb3c2c8813acca" | ||
"gitHead": "f0cfd68222837d0f5c97f0c88386ae8b017d0195" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
85343
2543
1