@maz-ui/translations 5.0.0-beta.5 → 5.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/locales.Dnq94PS0.js +113 -0
- package/dist/composables/index.js +2 -1
- package/dist/composables/useTranslations.js +11 -1
- package/dist/index.js +17 -1
- package/dist/locales/de.d.ts +46 -0
- package/dist/locales/de.js +129 -1
- package/dist/locales/en.d.ts +78 -0
- package/dist/locales/en.js +129 -1
- package/dist/locales/es.d.ts +46 -0
- package/dist/locales/es.js +129 -1
- package/dist/locales/fr.d.ts +46 -0
- package/dist/locales/fr.js +129 -1
- package/dist/locales/index.js +9 -1
- package/dist/locales/it.d.ts +46 -0
- package/dist/locales/it.js +129 -1
- package/dist/locales/ja.d.ts +46 -0
- package/dist/locales/ja.js +129 -1
- package/dist/locales/pt.d.ts +46 -0
- package/dist/locales/pt.js +129 -1
- package/dist/locales/zh-CN.d.ts +46 -0
- package/dist/locales/zh-CN.js +129 -1
- package/dist/plugin.js +12 -1
- package/dist/states.js +11 -1
- package/dist/utils/index.js +4 -1
- package/dist/utils/inject.js +7 -1
- package/dist/utils/instance.js +26 -1
- package/dist/utils/locales.js +2 -1
- package/dist/utils/messages.js +2 -1
- package/package.json +19 -10
- package/dist/chunks/locales.DAcmIbE5.js +0 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { globalState, locale } from "../states.js";
|
|
2
|
+
//#region src/utils/messages.ts
|
|
3
|
+
function getMessage(obj, path) {
|
|
4
|
+
return path.split(".").reduce((current, key) => current?.[key], obj);
|
|
5
|
+
}
|
|
6
|
+
function setMessage(obj, path, value) {
|
|
7
|
+
let keys = path.split(".");
|
|
8
|
+
let lastKey = keys.pop();
|
|
9
|
+
let target = keys.reduce((current, key) => ((!current[key] || typeof current[key] != "object") && (current[key] = {}), current[key]), obj);
|
|
10
|
+
target[lastKey] = value;
|
|
11
|
+
}
|
|
12
|
+
function isFlattenedObject(obj) {
|
|
13
|
+
return !obj || typeof obj != "object" ? !1 : Object.keys(obj).some((key) => key.includes("."));
|
|
14
|
+
}
|
|
15
|
+
function flattenToNested(flatObj) {
|
|
16
|
+
if (!isFlattenedObject(flatObj)) return flatObj;
|
|
17
|
+
let nested = {};
|
|
18
|
+
for (let [key, value] of Object.entries(flatObj)) key.includes(".") ? setMessage(nested, key, value) : nested[key] = value;
|
|
19
|
+
return nested;
|
|
20
|
+
}
|
|
21
|
+
function mergeMessages(target, source) {
|
|
22
|
+
let normalizedSource = flattenToNested(source);
|
|
23
|
+
let result = { ...flattenToNested(target) };
|
|
24
|
+
for (let key in normalizedSource) result[key] = normalizedSource[key] && typeof normalizedSource[key] == "object" ? mergeMessages(result[key] || {}, normalizedSource[key]) : normalizedSource[key];
|
|
25
|
+
return result;
|
|
26
|
+
}
|
|
27
|
+
function interpolate(message, variables) {
|
|
28
|
+
return variables ? message.replace(/\{(\w+)\}/g, (match, key) => variables[key] === void 0 ? match : String(variables[key])) : message;
|
|
29
|
+
}
|
|
30
|
+
function t(key, variables, fallbackLocale) {
|
|
31
|
+
let message = getMessage(globalState.messages[locale.value], key);
|
|
32
|
+
if (!message && fallbackLocale && locale.value !== fallbackLocale && (globalState.loadedLocales.has(fallbackLocale) || loadLocale(fallbackLocale).catch((error) => console.error(`[@maz-ui/translations] Failed to load fallback locale: "${fallbackLocale}"`, error)), message = getMessage(globalState.messages[fallbackLocale], key)), !message && fallbackLocale !== "en" && locale.value !== "en") {
|
|
33
|
+
if (!globalState.loadedLocales.has("en")) return loadLocale("en").catch((error) => console.error("[@maz-ui/translations] Failed to load en locale: \"en\"", error)), key;
|
|
34
|
+
message = getMessage(globalState.messages.en, key);
|
|
35
|
+
}
|
|
36
|
+
return message ? interpolate(String(message), variables) : (console.warn(`[@maz-ui/translations] Translation not found for key: "${key}"`), key);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/utils/locales.ts
|
|
40
|
+
var defaultLocalesLoaders = {
|
|
41
|
+
"./locales/en.ts": () => import("../locales/en.js").then((m) => ({ default: m.default })),
|
|
42
|
+
"./locales/de.ts": () => import("../locales/de.js").then((m) => ({ default: m.default })),
|
|
43
|
+
"./locales/es.ts": () => import("../locales/es.js").then((m) => ({ default: m.default })),
|
|
44
|
+
"./locales/fr.ts": () => import("../locales/fr.js").then((m) => ({ default: m.default })),
|
|
45
|
+
"./locales/it.ts": () => import("../locales/it.js").then((m) => ({ default: m.default })),
|
|
46
|
+
"./locales/ja.ts": () => import("../locales/ja.js").then((m) => ({ default: m.default })),
|
|
47
|
+
"./locales/pt.ts": () => import("../locales/pt.js").then((m) => ({ default: m.default })),
|
|
48
|
+
"./locales/zh-CN.ts": () => import("../locales/zh-CN.js").then((m) => ({ default: m.default }))
|
|
49
|
+
};
|
|
50
|
+
var defaultMessagesCache = /* @__PURE__ */ new Map();
|
|
51
|
+
async function loadDefaultMessages(locale) {
|
|
52
|
+
if (defaultMessagesCache.has(locale)) return defaultMessagesCache.get(locale);
|
|
53
|
+
let loader = defaultLocalesLoaders[`./locales/${locale}.ts`];
|
|
54
|
+
if (!loader) return {};
|
|
55
|
+
try {
|
|
56
|
+
let messages = (await loader()).default;
|
|
57
|
+
return defaultMessagesCache.set(locale, messages), messages;
|
|
58
|
+
} catch (error) {
|
|
59
|
+
return console.error(`Failed to load default messages for locale "${locale}":`, error), {};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function getAvailableLocales() {
|
|
63
|
+
let locales = /* @__PURE__ */ new Set();
|
|
64
|
+
for (let [path, loader] of Object.entries(defaultLocalesLoaders)) loader && typeof loader == "function" && locales.add(path.replace("./locales/", "").replace(".ts", ""));
|
|
65
|
+
for (let path of Object.keys(globalState.userMessages)) locales.add(path);
|
|
66
|
+
return [...locales];
|
|
67
|
+
}
|
|
68
|
+
function loadLocale(targetLocale) {
|
|
69
|
+
if (globalState.loadedLocales.has(targetLocale)) return Promise.resolve();
|
|
70
|
+
if (globalState.loadingPromises.has(targetLocale)) return globalState.loadingPromises.get(targetLocale);
|
|
71
|
+
let loadingPromise = (async () => {
|
|
72
|
+
try {
|
|
73
|
+
let localeDefaultMessages = await loadDefaultMessages(targetLocale);
|
|
74
|
+
let localeUserMessages = {};
|
|
75
|
+
let userLoader = globalState.userMessages[targetLocale];
|
|
76
|
+
if (userLoader) {
|
|
77
|
+
if (typeof userLoader == "function") try {
|
|
78
|
+
let userMessages = await userLoader();
|
|
79
|
+
localeUserMessages = "default" in userMessages ? userMessages.default : userMessages;
|
|
80
|
+
} catch (error) {
|
|
81
|
+
console.error(`Failed to load user translations for locale "${targetLocale}":`, error), localeUserMessages = {};
|
|
82
|
+
}
|
|
83
|
+
else localeUserMessages = userLoader;
|
|
84
|
+
}
|
|
85
|
+
globalState.messages[targetLocale] = mergeMessages(localeDefaultMessages, localeUserMessages), globalState.loadedLocales.add(targetLocale);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(`Failed to load translations for locale "${targetLocale}":`, error), globalState.messages[targetLocale] = {}, globalState.loadedLocales.add(targetLocale);
|
|
88
|
+
} finally {
|
|
89
|
+
globalState.loadingPromises.delete(targetLocale);
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
return globalState.loadingPromises.set(targetLocale, loadingPromise), loadingPromise;
|
|
93
|
+
}
|
|
94
|
+
function getMessages() {
|
|
95
|
+
return globalState.messages;
|
|
96
|
+
}
|
|
97
|
+
function isLocaleLoaded(localeToCheck) {
|
|
98
|
+
return globalState.loadedLocales.has(localeToCheck);
|
|
99
|
+
}
|
|
100
|
+
function isLocaleLoading(localeToCheck) {
|
|
101
|
+
return globalState.loadingPromises.has(localeToCheck);
|
|
102
|
+
}
|
|
103
|
+
function setLocaleMessage(targetLocale, messages) {
|
|
104
|
+
globalState.messages[targetLocale] || (globalState.messages[targetLocale] = {}), globalState.messages[targetLocale] = mergeMessages(globalState.messages[targetLocale], messages), globalState.loadedLocales.add(targetLocale);
|
|
105
|
+
}
|
|
106
|
+
async function setLocale(newLocale) {
|
|
107
|
+
globalState.loadedLocales.has(newLocale) || await loadLocale(newLocale), locale.value = newLocale;
|
|
108
|
+
}
|
|
109
|
+
function getLoadedLocales() {
|
|
110
|
+
return Object.keys(globalState.messages);
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
export { isLocaleLoading as a, setLocale as c, interpolate as d, mergeMessages as f, isLocaleLoaded as i, setLocaleMessage as l, getLoadedLocales as n, loadDefaultMessages as o, t as p, getMessages as r, loadLocale as s, getAvailableLocales as t, getMessage as u };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{useTranslations}from"./useTranslations.js";
|
|
1
|
+
import { useTranslations } from "./useTranslations.js";
|
|
2
|
+
export { useTranslations };
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
import{getCurrentInstance,inject}from"vue";
|
|
1
|
+
import { getCurrentInstance, inject } from "vue";
|
|
2
|
+
//#region src/composables/useTranslations.ts
|
|
3
|
+
function useTranslations() {
|
|
4
|
+
let injected = inject("mazTranslations", void 0);
|
|
5
|
+
if (injected) return injected;
|
|
6
|
+
let instance = getCurrentInstance();
|
|
7
|
+
if (instance?.appContext?.app?.config?.globalProperties?.$mazTranslations) return instance.appContext.app.config.globalProperties.$mazTranslations;
|
|
8
|
+
throw Error("[@maz-ui/translations] You must install the MazUi or MazUiTranslations plugin, or wrap your components in a MazUiProvider, before using useTranslations composable");
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useTranslations };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{globalState,locale
|
|
1
|
+
import { globalState, locale } from "./states.js";
|
|
2
|
+
import { injectTranslations } from "./utils/inject.js";
|
|
3
|
+
import { a as isLocaleLoading, c as setLocale, d as interpolate, f as mergeMessages, i as isLocaleLoaded, l as setLocaleMessage, n as getLoadedLocales, o as loadDefaultMessages, p as t, r as getMessages, s as loadLocale, t as getAvailableLocales, u as getMessage } from "./chunks/locales.Dnq94PS0.js";
|
|
4
|
+
import { createMazUiTranslations } from "./utils/instance.js";
|
|
5
|
+
import { MazUiTranslations } from "./plugin.js";
|
|
6
|
+
import zh_CN_default from "./locales/zh-CN.js";
|
|
7
|
+
import pt_default from "./locales/pt.js";
|
|
8
|
+
import ja_default from "./locales/ja.js";
|
|
9
|
+
import it_default from "./locales/it.js";
|
|
10
|
+
import fr_default from "./locales/fr.js";
|
|
11
|
+
import es_default from "./locales/es.js";
|
|
12
|
+
import en_default from "./locales/en.js";
|
|
13
|
+
import de_default from "./locales/de.js";
|
|
14
|
+
import { useTranslations } from "./composables/useTranslations.js";
|
|
15
|
+
import "./locales/index.js";
|
|
16
|
+
import "./utils/index.js";
|
|
17
|
+
export { MazUiTranslations, createMazUiTranslations, de_default as de, en_default as en, es_default as es, fr_default as fr, getAvailableLocales, getLoadedLocales, getMessage, getMessages, globalState, injectTranslations, interpolate, isLocaleLoaded, isLocaleLoading, it_default as it, ja_default as ja, loadDefaultMessages, loadLocale, locale, mergeMessages, pt_default as pt, setLocale, setLocaleMessage, t, useTranslations, zh_CN_default as zhCN };
|
package/dist/locales/de.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
aria: {
|
|
3
|
+
close: string;
|
|
4
|
+
increment: string;
|
|
5
|
+
decrement: string;
|
|
6
|
+
character: string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
2
9
|
selectCountry: {
|
|
3
10
|
searchPlaceholder: string;
|
|
4
11
|
};
|
|
@@ -87,9 +94,48 @@ declare const _default: {
|
|
|
87
94
|
collapse: string;
|
|
88
95
|
ariaLabel: string;
|
|
89
96
|
};
|
|
97
|
+
pullToRefresh: {
|
|
98
|
+
pull: string;
|
|
99
|
+
release: string;
|
|
100
|
+
refreshing: string;
|
|
101
|
+
};
|
|
90
102
|
skeleton: {
|
|
91
103
|
ariaLabel: string;
|
|
92
104
|
loadingText: string;
|
|
93
105
|
};
|
|
106
|
+
codeHighlight: {
|
|
107
|
+
copyToClipboard: string;
|
|
108
|
+
copiedToClipboard: string;
|
|
109
|
+
};
|
|
110
|
+
windowMockup: {
|
|
111
|
+
copyUrlToClipboard: string;
|
|
112
|
+
urlCopiedToClipboard: string;
|
|
113
|
+
};
|
|
114
|
+
markdownEditor: {
|
|
115
|
+
write: string;
|
|
116
|
+
preview: string;
|
|
117
|
+
split: string;
|
|
118
|
+
emptyPreview: string;
|
|
119
|
+
toolbar: {
|
|
120
|
+
heading: string;
|
|
121
|
+
bold: string;
|
|
122
|
+
italic: string;
|
|
123
|
+
strikethrough: string;
|
|
124
|
+
quote: string;
|
|
125
|
+
code: string;
|
|
126
|
+
codeBlock: string;
|
|
127
|
+
link: string;
|
|
128
|
+
image: string;
|
|
129
|
+
bulletList: string;
|
|
130
|
+
orderedList: string;
|
|
131
|
+
checkList: string;
|
|
132
|
+
table: string;
|
|
133
|
+
};
|
|
134
|
+
headings: {
|
|
135
|
+
h1: string;
|
|
136
|
+
h2: string;
|
|
137
|
+
h3: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
94
140
|
};
|
|
95
141
|
export default _default;
|
package/dist/locales/de.js
CHANGED
|
@@ -1 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/locales/de.ts
|
|
2
|
+
var de_default = {
|
|
3
|
+
aria: {
|
|
4
|
+
close: "Schließen",
|
|
5
|
+
increment: "Erhöhen",
|
|
6
|
+
decrement: "Verringern",
|
|
7
|
+
character: "Zeichen",
|
|
8
|
+
value: "Wert"
|
|
9
|
+
},
|
|
10
|
+
selectCountry: { searchPlaceholder: "Land suchen" },
|
|
11
|
+
inputPhoneNumber: {
|
|
12
|
+
countrySelect: {
|
|
13
|
+
placeholder: "Ländercode",
|
|
14
|
+
error: "Land wählen",
|
|
15
|
+
searchPlaceholder: "Land suchen"
|
|
16
|
+
},
|
|
17
|
+
phoneInput: {
|
|
18
|
+
placeholder: "Telefonnummer",
|
|
19
|
+
example: "Beispiel: {example}"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dropzone: {
|
|
23
|
+
dragAndDrop: "Dateien ablegen",
|
|
24
|
+
selectFile: "Datei auswählen",
|
|
25
|
+
divider: "oder",
|
|
26
|
+
fileMaxCount: "Maximal {count} Dateien",
|
|
27
|
+
fileMaxSize: "Maximal {size} MB pro Datei",
|
|
28
|
+
fileTypes: "Erlaubte Dateitypen: {types}",
|
|
29
|
+
types: {
|
|
30
|
+
image: "Bilder",
|
|
31
|
+
video: "Videos",
|
|
32
|
+
audio: "Audios",
|
|
33
|
+
text: "Texte"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
datePicker: { shortcuts: {
|
|
37
|
+
lastSevenDays: "Letzte 7 Tage",
|
|
38
|
+
lastThirtyDays: "Letzte 30 Tage",
|
|
39
|
+
thisWeek: "Diese Woche",
|
|
40
|
+
lastWeek: "Letzte Woche",
|
|
41
|
+
thisMonth: "Dieser Monat",
|
|
42
|
+
thisYear: "Dieses Jahr",
|
|
43
|
+
lastYear: "Letztes Jahr"
|
|
44
|
+
} },
|
|
45
|
+
dropdown: { screenReaderDescription: "Dropdown-Menü öffnen" },
|
|
46
|
+
select: { searchPlaceholder: "Suchen" },
|
|
47
|
+
table: {
|
|
48
|
+
noResults: "Keine Ergebnisse",
|
|
49
|
+
actionColumnTitle: "Aktionen",
|
|
50
|
+
searchByInput: {
|
|
51
|
+
all: "Alle",
|
|
52
|
+
placeholder: "Suchen nach"
|
|
53
|
+
},
|
|
54
|
+
searchInput: { placeholder: "Suchen" },
|
|
55
|
+
pagination: {
|
|
56
|
+
all: "Alle",
|
|
57
|
+
rowsPerPage: "Zeilen pro Seite",
|
|
58
|
+
of: "von"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
pagination: {
|
|
62
|
+
navAriaLabel: "Seitennavigation",
|
|
63
|
+
screenReader: {
|
|
64
|
+
firstPage: "Erste Seite, Seite {page}",
|
|
65
|
+
previousPage: "Vorherige Seite, Seite {page}",
|
|
66
|
+
page: "Seite {page}",
|
|
67
|
+
nextPage: "Nächste Seite, Seite {page}",
|
|
68
|
+
lastPage: "Letzte Seite, Seite {page}"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
carousel: { ariaLabel: {
|
|
72
|
+
previousButton: "Zu vorherigen Elementen scrollen",
|
|
73
|
+
nextButton: "Zu nächsten Elementen scrollen"
|
|
74
|
+
} },
|
|
75
|
+
checklist: {
|
|
76
|
+
noResultsFound: "Keine Ergebnisse gefunden",
|
|
77
|
+
searchInput: { placeholder: "Suchen" }
|
|
78
|
+
},
|
|
79
|
+
readMore: {
|
|
80
|
+
expand: "Mehr lesen",
|
|
81
|
+
collapse: "Weniger lesen",
|
|
82
|
+
ariaLabel: "Erweiterbarer Inhalt"
|
|
83
|
+
},
|
|
84
|
+
pullToRefresh: {
|
|
85
|
+
pull: "Zum Aktualisieren ziehen",
|
|
86
|
+
release: "Zum Aktualisieren loslassen",
|
|
87
|
+
refreshing: "Wird aktualisiert…"
|
|
88
|
+
},
|
|
89
|
+
skeleton: {
|
|
90
|
+
ariaLabel: "Inhalt wird geladen",
|
|
91
|
+
loadingText: "Laden..."
|
|
92
|
+
},
|
|
93
|
+
codeHighlight: {
|
|
94
|
+
copyToClipboard: "In Zwischenablage kopieren",
|
|
95
|
+
copiedToClipboard: "In Zwischenablage kopiert"
|
|
96
|
+
},
|
|
97
|
+
windowMockup: {
|
|
98
|
+
copyUrlToClipboard: "URL in Zwischenablage kopieren",
|
|
99
|
+
urlCopiedToClipboard: "URL in Zwischenablage kopiert"
|
|
100
|
+
},
|
|
101
|
+
markdownEditor: {
|
|
102
|
+
write: "Schreiben",
|
|
103
|
+
preview: "Vorschau",
|
|
104
|
+
split: "Geteilt",
|
|
105
|
+
emptyPreview: "Nichts zur Vorschau",
|
|
106
|
+
toolbar: {
|
|
107
|
+
heading: "Überschrift",
|
|
108
|
+
bold: "Fett",
|
|
109
|
+
italic: "Kursiv",
|
|
110
|
+
strikethrough: "Durchgestrichen",
|
|
111
|
+
quote: "Zitat",
|
|
112
|
+
code: "Inline-Code",
|
|
113
|
+
codeBlock: "Codeblock",
|
|
114
|
+
link: "Link",
|
|
115
|
+
image: "Bild",
|
|
116
|
+
bulletList: "Aufzählung",
|
|
117
|
+
orderedList: "Nummerierte Liste",
|
|
118
|
+
checkList: "Aufgabenliste",
|
|
119
|
+
table: "Tabelle"
|
|
120
|
+
},
|
|
121
|
+
headings: {
|
|
122
|
+
h1: "Überschrift 1",
|
|
123
|
+
h2: "Überschrift 2",
|
|
124
|
+
h3: "Überschrift 3"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { de_default as default };
|
package/dist/locales/en.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
/**
|
|
3
|
+
* Generic accessibility labels reused across components (aria-label,
|
|
4
|
+
* screen-reader-only text). One namespace to avoid duplicating common
|
|
5
|
+
* labels like "close" in every component.
|
|
6
|
+
*/
|
|
7
|
+
aria: {
|
|
8
|
+
close: string;
|
|
9
|
+
increment: string;
|
|
10
|
+
decrement: string;
|
|
11
|
+
character: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
2
14
|
/**
|
|
3
15
|
* This is the translation for the input phone number component.
|
|
4
16
|
* The keys are:
|
|
@@ -169,6 +181,18 @@ declare const _default: {
|
|
|
169
181
|
collapse: string;
|
|
170
182
|
ariaLabel: string;
|
|
171
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* This is the translation for the pull to refresh component.
|
|
186
|
+
* The keys are:
|
|
187
|
+
* - pull: Hint shown while the user pulls down.
|
|
188
|
+
* - release: Hint shown once the pull is long enough to refresh.
|
|
189
|
+
* - refreshing: Text shown and announced to screen readers while refreshing.
|
|
190
|
+
*/
|
|
191
|
+
pullToRefresh: {
|
|
192
|
+
pull: string;
|
|
193
|
+
release: string;
|
|
194
|
+
refreshing: string;
|
|
195
|
+
};
|
|
172
196
|
/**
|
|
173
197
|
* This is the translation for the skeleton component.
|
|
174
198
|
* The keys are:
|
|
@@ -179,5 +203,59 @@ declare const _default: {
|
|
|
179
203
|
ariaLabel: string;
|
|
180
204
|
loadingText: string;
|
|
181
205
|
};
|
|
206
|
+
/**
|
|
207
|
+
* This is the translation for the code highlight component.
|
|
208
|
+
* The keys are:
|
|
209
|
+
* - copyToClipboard: Label/tooltip for the copy button (default state).
|
|
210
|
+
* - copiedToClipboard: Label/tooltip for the copy button after a successful copy.
|
|
211
|
+
*/
|
|
212
|
+
codeHighlight: {
|
|
213
|
+
copyToClipboard: string;
|
|
214
|
+
copiedToClipboard: string;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* This is the translation for the window mockup component.
|
|
218
|
+
* The keys are:
|
|
219
|
+
* - copyUrlToClipboard: Label/tooltip for the URL copy button (default state).
|
|
220
|
+
* - urlCopiedToClipboard: Label/tooltip for the URL copy button after a successful copy.
|
|
221
|
+
*/
|
|
222
|
+
windowMockup: {
|
|
223
|
+
copyUrlToClipboard: string;
|
|
224
|
+
urlCopiedToClipboard: string;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* This is the translation for the markdown editor component.
|
|
228
|
+
* The keys are:
|
|
229
|
+
* - write/preview/split: Labels for the editor mode tabs.
|
|
230
|
+
* - emptyPreview: Text shown in the preview pane when there is nothing to render.
|
|
231
|
+
* - toolbar.*: Accessible labels for the formatting toolbar buttons.
|
|
232
|
+
* - headings.h1/h2/h3: Labels for the heading dropdown options.
|
|
233
|
+
*/
|
|
234
|
+
markdownEditor: {
|
|
235
|
+
write: string;
|
|
236
|
+
preview: string;
|
|
237
|
+
split: string;
|
|
238
|
+
emptyPreview: string;
|
|
239
|
+
toolbar: {
|
|
240
|
+
heading: string;
|
|
241
|
+
bold: string;
|
|
242
|
+
italic: string;
|
|
243
|
+
strikethrough: string;
|
|
244
|
+
quote: string;
|
|
245
|
+
code: string;
|
|
246
|
+
codeBlock: string;
|
|
247
|
+
link: string;
|
|
248
|
+
image: string;
|
|
249
|
+
bulletList: string;
|
|
250
|
+
orderedList: string;
|
|
251
|
+
checkList: string;
|
|
252
|
+
table: string;
|
|
253
|
+
};
|
|
254
|
+
headings: {
|
|
255
|
+
h1: string;
|
|
256
|
+
h2: string;
|
|
257
|
+
h3: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
182
260
|
};
|
|
183
261
|
export default _default;
|
package/dist/locales/en.js
CHANGED
|
@@ -1 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/locales/en.ts
|
|
2
|
+
var en_default = {
|
|
3
|
+
aria: {
|
|
4
|
+
close: "Close",
|
|
5
|
+
increment: "Increment",
|
|
6
|
+
decrement: "Decrement",
|
|
7
|
+
character: "Character",
|
|
8
|
+
value: "Value"
|
|
9
|
+
},
|
|
10
|
+
selectCountry: { searchPlaceholder: "Search country" },
|
|
11
|
+
inputPhoneNumber: {
|
|
12
|
+
countrySelect: {
|
|
13
|
+
placeholder: "Country code",
|
|
14
|
+
error: "Choose country",
|
|
15
|
+
searchPlaceholder: "Search the country"
|
|
16
|
+
},
|
|
17
|
+
phoneInput: {
|
|
18
|
+
placeholder: "Phone number",
|
|
19
|
+
example: "Example: {example}"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dropzone: {
|
|
23
|
+
dragAndDrop: "Drop your files",
|
|
24
|
+
selectFile: "select file",
|
|
25
|
+
divider: "or",
|
|
26
|
+
fileMaxCount: "Maximum {count} files",
|
|
27
|
+
fileMaxSize: "Maximum {size} MB per file",
|
|
28
|
+
fileTypes: "Allowed file types: {types}",
|
|
29
|
+
types: {
|
|
30
|
+
image: "images",
|
|
31
|
+
video: "videos",
|
|
32
|
+
audio: "audios",
|
|
33
|
+
text: "texts"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
datePicker: { shortcuts: {
|
|
37
|
+
lastSevenDays: "Last 7 days",
|
|
38
|
+
lastThirtyDays: "Last 30 days",
|
|
39
|
+
thisWeek: "This week",
|
|
40
|
+
lastWeek: "Last week",
|
|
41
|
+
thisMonth: "This month",
|
|
42
|
+
thisYear: "This year",
|
|
43
|
+
lastYear: "Last year"
|
|
44
|
+
} },
|
|
45
|
+
dropdown: { screenReaderDescription: "Open menu dropdown" },
|
|
46
|
+
select: { searchPlaceholder: "Search" },
|
|
47
|
+
table: {
|
|
48
|
+
noResults: "No results",
|
|
49
|
+
actionColumnTitle: "Actions",
|
|
50
|
+
searchByInput: {
|
|
51
|
+
all: "All",
|
|
52
|
+
placeholder: "Search by"
|
|
53
|
+
},
|
|
54
|
+
searchInput: { placeholder: "Search" },
|
|
55
|
+
pagination: {
|
|
56
|
+
all: "All",
|
|
57
|
+
rowsPerPage: "Rows per page",
|
|
58
|
+
of: "of"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
pagination: {
|
|
62
|
+
navAriaLabel: "page navigation",
|
|
63
|
+
screenReader: {
|
|
64
|
+
firstPage: "First Page, page {page}",
|
|
65
|
+
previousPage: "Previous Page, page {page}",
|
|
66
|
+
page: "Page {page}",
|
|
67
|
+
nextPage: "Next Page, page {page}",
|
|
68
|
+
lastPage: "Last Page, page {page}"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
carousel: { ariaLabel: {
|
|
72
|
+
previousButton: "Scroll to previous items",
|
|
73
|
+
nextButton: "Scroll to next items"
|
|
74
|
+
} },
|
|
75
|
+
checklist: {
|
|
76
|
+
noResultsFound: "No results found",
|
|
77
|
+
searchInput: { placeholder: "Search" }
|
|
78
|
+
},
|
|
79
|
+
readMore: {
|
|
80
|
+
expand: "Read more",
|
|
81
|
+
collapse: "Read less",
|
|
82
|
+
ariaLabel: "Expandable content"
|
|
83
|
+
},
|
|
84
|
+
pullToRefresh: {
|
|
85
|
+
pull: "Pull to refresh",
|
|
86
|
+
release: "Release to refresh",
|
|
87
|
+
refreshing: "Refreshing…"
|
|
88
|
+
},
|
|
89
|
+
skeleton: {
|
|
90
|
+
ariaLabel: "Loading content",
|
|
91
|
+
loadingText: "Loading..."
|
|
92
|
+
},
|
|
93
|
+
codeHighlight: {
|
|
94
|
+
copyToClipboard: "Copy to clipboard",
|
|
95
|
+
copiedToClipboard: "Copied to clipboard"
|
|
96
|
+
},
|
|
97
|
+
windowMockup: {
|
|
98
|
+
copyUrlToClipboard: "Copy URL to clipboard",
|
|
99
|
+
urlCopiedToClipboard: "URL copied to clipboard"
|
|
100
|
+
},
|
|
101
|
+
markdownEditor: {
|
|
102
|
+
write: "Write",
|
|
103
|
+
preview: "Preview",
|
|
104
|
+
split: "Split",
|
|
105
|
+
emptyPreview: "Nothing to preview",
|
|
106
|
+
toolbar: {
|
|
107
|
+
heading: "Heading",
|
|
108
|
+
bold: "Bold",
|
|
109
|
+
italic: "Italic",
|
|
110
|
+
strikethrough: "Strikethrough",
|
|
111
|
+
quote: "Quote",
|
|
112
|
+
code: "Inline code",
|
|
113
|
+
codeBlock: "Code block",
|
|
114
|
+
link: "Link",
|
|
115
|
+
image: "Image",
|
|
116
|
+
bulletList: "Bulleted list",
|
|
117
|
+
orderedList: "Numbered list",
|
|
118
|
+
checkList: "Task list",
|
|
119
|
+
table: "Table"
|
|
120
|
+
},
|
|
121
|
+
headings: {
|
|
122
|
+
h1: "Heading 1",
|
|
123
|
+
h2: "Heading 2",
|
|
124
|
+
h3: "Heading 3"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { en_default as default };
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
aria: {
|
|
3
|
+
close: string;
|
|
4
|
+
increment: string;
|
|
5
|
+
decrement: string;
|
|
6
|
+
character: string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
2
9
|
selectCountry: {
|
|
3
10
|
searchPlaceholder: string;
|
|
4
11
|
};
|
|
@@ -87,9 +94,48 @@ declare const _default: {
|
|
|
87
94
|
collapse: string;
|
|
88
95
|
ariaLabel: string;
|
|
89
96
|
};
|
|
97
|
+
pullToRefresh: {
|
|
98
|
+
pull: string;
|
|
99
|
+
release: string;
|
|
100
|
+
refreshing: string;
|
|
101
|
+
};
|
|
90
102
|
skeleton: {
|
|
91
103
|
ariaLabel: string;
|
|
92
104
|
loadingText: string;
|
|
93
105
|
};
|
|
106
|
+
codeHighlight: {
|
|
107
|
+
copyToClipboard: string;
|
|
108
|
+
copiedToClipboard: string;
|
|
109
|
+
};
|
|
110
|
+
windowMockup: {
|
|
111
|
+
copyUrlToClipboard: string;
|
|
112
|
+
urlCopiedToClipboard: string;
|
|
113
|
+
};
|
|
114
|
+
markdownEditor: {
|
|
115
|
+
write: string;
|
|
116
|
+
preview: string;
|
|
117
|
+
split: string;
|
|
118
|
+
emptyPreview: string;
|
|
119
|
+
toolbar: {
|
|
120
|
+
heading: string;
|
|
121
|
+
bold: string;
|
|
122
|
+
italic: string;
|
|
123
|
+
strikethrough: string;
|
|
124
|
+
quote: string;
|
|
125
|
+
code: string;
|
|
126
|
+
codeBlock: string;
|
|
127
|
+
link: string;
|
|
128
|
+
image: string;
|
|
129
|
+
bulletList: string;
|
|
130
|
+
orderedList: string;
|
|
131
|
+
checkList: string;
|
|
132
|
+
table: string;
|
|
133
|
+
};
|
|
134
|
+
headings: {
|
|
135
|
+
h1: string;
|
|
136
|
+
h2: string;
|
|
137
|
+
h3: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
94
140
|
};
|
|
95
141
|
export default _default;
|