@maz-ui/translations 4.7.4 → 4.7.6

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.
@@ -0,0 +1 @@
1
+ import{globalState,locale}from"../states.js";function getMessage(obj,path){return path.split(`.`).reduce((current,key)=>current?.[key],obj)}function setMessage(obj,path,value){let keys=path.split(`.`);let lastKey=keys.pop();let target=keys.reduce((current,key)=>((!current[key]||typeof current[key]!=`object`)&&(current[key]={}),current[key]),obj);target[lastKey]=value}function isFlattenedObject(obj){return!obj||typeof obj!=`object`?!1:Object.keys(obj).some(key=>key.includes(`.`))}function flattenToNested(flatObj){if(!isFlattenedObject(flatObj))return flatObj;let nested={};for(let[key,value]of Object.entries(flatObj))key.includes(`.`)?setMessage(nested,key,value):nested[key]=value;return nested}function mergeMessages(target,source){let normalizedSource=flattenToNested(source);let result={...flattenToNested(target)};for(let key in normalizedSource)normalizedSource[key]&&typeof normalizedSource[key]==`object`?result[key]=mergeMessages(result[key]||{},normalizedSource[key]):result[key]=normalizedSource[key];return result}function interpolate(message,variables){return variables?message.replace(/\{(\w+)\}/g,(match,key)=>variables[key]===void 0?match:String(variables[key])):message}function t(key,variables,fallbackLocale){let message=getMessage(globalState.messages[locale.value],key);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`){if(!globalState.loadedLocales.has(`en`))return loadLocale(`en`).catch(error=>console.error(`[@maz-ui/translations] Failed to load en locale: "en"`,error)),key;message=getMessage(globalState.messages.en,key)}return message?interpolate(String(message),variables):(console.warn(`[@maz-ui/translations] Translation not found for key: "${key}"`),key)}var defaultLocalesLoaders={"./locales/en.ts":()=>import(`../locales/en.js`).then(m=>({default:m.default})),"./locales/de.ts":()=>import(`../locales/de.js`).then(m=>({default:m.default})),"./locales/es.ts":()=>import(`../locales/es.js`).then(m=>({default:m.default})),"./locales/fr.ts":()=>import(`../locales/fr.js`).then(m=>({default:m.default})),"./locales/it.ts":()=>import(`../locales/it.js`).then(m=>({default:m.default})),"./locales/ja.ts":()=>import(`../locales/ja.js`).then(m=>({default:m.default})),"./locales/pt.ts":()=>import(`../locales/pt.js`).then(m=>({default:m.default})),"./locales/zh-CN.ts":()=>import(`../locales/zh-CN.js`).then(m=>({default:m.default}))};var defaultMessagesCache=new Map;async function loadDefaultMessages(locale){if(defaultMessagesCache.has(locale))return defaultMessagesCache.get(locale);let loader=defaultLocalesLoaders[`./locales/${locale}.ts`];if(!loader)return{};try{let messages=(await loader()).default;return defaultMessagesCache.set(locale,messages),messages}catch(error){return console.error(`Failed to load default messages for locale "${locale}":`,error),{}}}function getAvailableLocales(){let locales=new Set;for(let[path,loader]of Object.entries(defaultLocalesLoaders))loader&&typeof loader==`function`&&locales.add(path.replace(`./locales/`,``).replace(`.ts`,``));for(let path of Object.keys(globalState.userMessages))locales.add(path);return Array.from(locales)}function loadLocale(targetLocale){if(globalState.loadedLocales.has(targetLocale))return Promise.resolve();if(globalState.loadingPromises.has(targetLocale))return globalState.loadingPromises.get(targetLocale);let loadingPromise=(async()=>{try{let localeDefaultMessages=await loadDefaultMessages(targetLocale);let localeUserMessages={};let userLoader=globalState.userMessages[targetLocale];if(userLoader)if(typeof userLoader==`function`)try{let userMessages=await userLoader();localeUserMessages=`default`in userMessages?userMessages.default:userMessages}catch(error){console.error(`Failed to load user translations for locale "${targetLocale}":`,error),localeUserMessages={}}else localeUserMessages=userLoader;globalState.messages[targetLocale]=mergeMessages(localeDefaultMessages,localeUserMessages),globalState.loadedLocales.add(targetLocale)}catch(error){console.error(`Failed to load translations for locale "${targetLocale}":`,error),globalState.messages[targetLocale]={},globalState.loadedLocales.add(targetLocale)}finally{globalState.loadingPromises.delete(targetLocale)}})();return globalState.loadingPromises.set(targetLocale,loadingPromise),loadingPromise}function getMessages(){return globalState.messages}function isLocaleLoaded(localeToCheck){return globalState.loadedLocales.has(localeToCheck)}function isLocaleLoading(localeToCheck){return globalState.loadingPromises.has(localeToCheck)}function setLocaleMessage(targetLocale,messages){globalState.messages[targetLocale]||(globalState.messages[targetLocale]={}),globalState.messages[targetLocale]=mergeMessages(globalState.messages[targetLocale],messages),globalState.loadedLocales.add(targetLocale)}async function setLocale(newLocale){globalState.loadedLocales.has(newLocale)||await loadLocale(newLocale),locale.value=newLocale}function getLoadedLocales(){return Object.keys(globalState.messages)}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,5 +1 @@
1
- import "vue";
2
- import { useTranslations } from "./useTranslations.js";
3
- export {
4
- useTranslations
5
- };
1
+ import{useTranslations}from"./useTranslations.js";export{useTranslations};
@@ -1,13 +1 @@
1
- import { inject, getCurrentInstance } from "vue";
2
- function useTranslations() {
3
- const injected = inject("mazTranslations", void 0);
4
- if (injected)
5
- return injected;
6
- const instance = getCurrentInstance();
7
- if (instance?.appContext?.app?.config?.globalProperties?.$mazTranslations)
8
- return instance.appContext.app.config.globalProperties.$mazTranslations;
9
- throw new Error("[@maz-ui/translations] You must install the MazUi or MazUiTranslations plugin, or wrap your components in a MazUiProvider, before using useTranslations composable");
10
- }
11
- export {
12
- useTranslations
13
- };
1
+ import{getCurrentInstance,inject}from"vue";function useTranslations(){let injected=inject(`mazTranslations`,void 0);if(injected)return injected;let instance=getCurrentInstance();if(instance?.appContext?.app?.config?.globalProperties?.$mazTranslations)return instance.appContext.app.config.globalProperties.$mazTranslations;throw Error(`[@maz-ui/translations] You must install the MazUi or MazUiTranslations plugin, or wrap your components in a MazUiProvider, before using useTranslations composable`)}export{useTranslations};
package/dist/index.js CHANGED
@@ -1,43 +1 @@
1
- import { useTranslations } from "./composables/useTranslations.js";
2
- import { MazUiTranslations } from "./plugin.js";
3
- import { globalState, locale } from "./states.js";
4
- import { createMazUiTranslations } from "./utils/instance.js";
5
- import { default as default2 } from "./locales/de.js";
6
- import { default as default3 } from "./locales/en.js";
7
- import { default as default4 } from "./locales/es.js";
8
- import { default as default5 } from "./locales/fr.js";
9
- import { g, a, b, c, i, d, e, l, f, m, s, h, t } from "./chunks/locales.6t4KrYgf.js";
10
- import { injectTranslations } from "./utils/inject.js";
11
- import { default as default6 } from "./locales/it.js";
12
- import { default as default7 } from "./locales/ja.js";
13
- import { default as default8 } from "./locales/pt.js";
14
- import { default as default9 } from "./locales/zh-CN.js";
15
- export {
16
- MazUiTranslations,
17
- createMazUiTranslations,
18
- default2 as de,
19
- default3 as en,
20
- default4 as es,
21
- default5 as fr,
22
- g as getAvailableLocales,
23
- a as getLoadedLocales,
24
- b as getMessage,
25
- c as getMessages,
26
- globalState,
27
- injectTranslations,
28
- i as interpolate,
29
- d as isLocaleLoaded,
30
- e as isLocaleLoading,
31
- default6 as it,
32
- default7 as ja,
33
- l as loadDefaultMessages,
34
- f as loadLocale,
35
- locale,
36
- m as mergeMessages,
37
- default8 as pt,
38
- s as setLocale,
39
- h as setLocaleMessage,
40
- t,
41
- useTranslations,
42
- default9 as zhCN
43
- };
1
+ import{globalState,locale}from"./states.js";import{injectTranslations}from"./utils/inject.js";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.CBblmV4c.js";import{createMazUiTranslations}from"./utils/instance.js";import{MazUiTranslations}from"./plugin.js";import zh_CN_default from"./locales/zh-CN.js";import pt_default from"./locales/pt.js";import ja_default from"./locales/ja.js";import it_default from"./locales/it.js";import fr_default from"./locales/fr.js";import es_default from"./locales/es.js";import en_default from"./locales/en.js";import de_default from"./locales/de.js";import{useTranslations}from"./composables/useTranslations.js";import"./locales/index.js";import"./utils/index.js";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};
@@ -1,97 +1 @@
1
- const de = {
2
- selectCountry: {
3
- searchPlaceholder: "Land suchen"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "Ländercode",
8
- error: "Land wählen",
9
- searchPlaceholder: "Land suchen"
10
- },
11
- phoneInput: {
12
- placeholder: "Telefonnummer",
13
- example: "Beispiel: {example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "Dateien ablegen",
18
- selectFile: "Datei auswählen",
19
- divider: "oder",
20
- fileMaxCount: "Maximal {count} Dateien",
21
- fileMaxSize: "Maximal {size} MB pro Datei",
22
- fileTypes: "Erlaubte Dateitypen: {types}",
23
- types: {
24
- image: "Bilder",
25
- video: "Videos",
26
- audio: "Audios",
27
- text: "Texte"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "Letzte 7 Tage",
33
- lastThirtyDays: "Letzte 30 Tage",
34
- thisWeek: "Diese Woche",
35
- lastWeek: "Letzte Woche",
36
- thisMonth: "Dieser Monat",
37
- thisYear: "Dieses Jahr",
38
- lastYear: "Letztes Jahr"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "Dropdown-Menü öffnen"
43
- },
44
- select: {
45
- searchPlaceholder: "Suchen"
46
- },
47
- table: {
48
- noResults: "Keine Ergebnisse",
49
- actionColumnTitle: "Aktionen",
50
- searchByInput: {
51
- all: "Alle",
52
- placeholder: "Suchen nach"
53
- },
54
- searchInput: {
55
- placeholder: "Suchen"
56
- },
57
- pagination: {
58
- all: "Alle",
59
- rowsPerPage: "Zeilen pro Seite",
60
- of: "von"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "Seitennavigation",
65
- screenReader: {
66
- firstPage: "Erste Seite, Seite {page}",
67
- previousPage: "Vorherige Seite, Seite {page}",
68
- page: "Seite {page}",
69
- nextPage: "Nächste Seite, Seite {page}",
70
- lastPage: "Letzte Seite, Seite {page}"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "Zu vorherigen Elementen scrollen",
76
- nextButton: "Zu nächsten Elementen scrollen"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "Keine Ergebnisse gefunden",
81
- searchInput: {
82
- placeholder: "Suchen"
83
- }
84
- },
85
- readMore: {
86
- expand: "Mehr lesen",
87
- collapse: "Weniger lesen",
88
- ariaLabel: "Erweiterbarer Inhalt"
89
- },
90
- skeleton: {
91
- ariaLabel: "Inhalt wird geladen",
92
- loadingText: "Laden..."
93
- }
94
- };
95
- export {
96
- de as default
97
- };
1
+ var de_default={selectCountry:{searchPlaceholder:`Land suchen`},inputPhoneNumber:{countrySelect:{placeholder:`Ländercode`,error:`Land wählen`,searchPlaceholder:`Land suchen`},phoneInput:{placeholder:`Telefonnummer`,example:`Beispiel: {example}`}},dropzone:{dragAndDrop:`Dateien ablegen`,selectFile:`Datei auswählen`,divider:`oder`,fileMaxCount:`Maximal {count} Dateien`,fileMaxSize:`Maximal {size} MB pro Datei`,fileTypes:`Erlaubte Dateitypen: {types}`,types:{image:`Bilder`,video:`Videos`,audio:`Audios`,text:`Texte`}},datePicker:{shortcuts:{lastSevenDays:`Letzte 7 Tage`,lastThirtyDays:`Letzte 30 Tage`,thisWeek:`Diese Woche`,lastWeek:`Letzte Woche`,thisMonth:`Dieser Monat`,thisYear:`Dieses Jahr`,lastYear:`Letztes Jahr`}},dropdown:{screenReaderDescription:`Dropdown-Menü öffnen`},select:{searchPlaceholder:`Suchen`},table:{noResults:`Keine Ergebnisse`,actionColumnTitle:`Aktionen`,searchByInput:{all:`Alle`,placeholder:`Suchen nach`},searchInput:{placeholder:`Suchen`},pagination:{all:`Alle`,rowsPerPage:`Zeilen pro Seite`,of:`von`}},pagination:{navAriaLabel:`Seitennavigation`,screenReader:{firstPage:`Erste Seite, Seite {page}`,previousPage:`Vorherige Seite, Seite {page}`,page:`Seite {page}`,nextPage:`Nächste Seite, Seite {page}`,lastPage:`Letzte Seite, Seite {page}`}},carousel:{ariaLabel:{previousButton:`Zu vorherigen Elementen scrollen`,nextButton:`Zu nächsten Elementen scrollen`}},checklist:{noResultsFound:`Keine Ergebnisse gefunden`,searchInput:{placeholder:`Suchen`}},readMore:{expand:`Mehr lesen`,collapse:`Weniger lesen`,ariaLabel:`Erweiterbarer Inhalt`},skeleton:{ariaLabel:`Inhalt wird geladen`,loadingText:`Laden...`}};export{de_default as default};
@@ -1,185 +1 @@
1
- const en = {
2
- /**
3
- * This is the translation for the input phone number component.
4
- * The keys are:
5
- * - countrySelect: The translation for the country select.
6
- * - phoneInput: The translation for the phone input.
7
- */
8
- selectCountry: {
9
- searchPlaceholder: "Search country"
10
- },
11
- inputPhoneNumber: {
12
- /**
13
- * This is the translation for the country select component.
14
- * The keys are:
15
- * - placeholder: The translation for the placeholder text.
16
- * - error: The translation for the error text.
17
- * - searchPlaceholder: The translation for the search placeholder text.
18
- */
19
- countrySelect: {
20
- placeholder: "Country code",
21
- error: "Choose country",
22
- searchPlaceholder: "Search the country"
23
- },
24
- /**
25
- * This is the translation for the phone input component.
26
- * The keys are:
27
- * - placeholder: The translation for the placeholder text.
28
- * - example: The translation for the example text.
29
- */
30
- phoneInput: {
31
- placeholder: "Phone number",
32
- example: "Example: {example}"
33
- }
34
- },
35
- /**
36
- * This is the translation for the dropzone component.
37
- * The keys are:
38
- * - dragAndDrop: The translation for the drag and drop text.
39
- * - selectFile: The translation for the select file button.
40
- * - divider: The translation for the divider text.
41
- * - fileMaxCount: The translation for the maximum number of files.
42
- * - fileMaxSize: The translation for the maximum size of the files.
43
- * - fileTypes: The translation for the allowed file types.
44
- */
45
- dropzone: {
46
- dragAndDrop: "Drop your files",
47
- selectFile: "select file",
48
- divider: "or",
49
- fileMaxCount: "Maximum {count} files",
50
- fileMaxSize: "Maximum {size} MB per file",
51
- fileTypes: "Allowed file types: {types}",
52
- types: {
53
- image: "images",
54
- video: "videos",
55
- audio: "audios",
56
- text: "texts"
57
- }
58
- },
59
- /**
60
- * This is the translation for the date picker component.
61
- * The keys are:
62
- * - shortcuts: The translation for the shortcuts.
63
- */
64
- datePicker: {
65
- shortcuts: {
66
- lastSevenDays: "Last 7 days",
67
- lastThirtyDays: "Last 30 days",
68
- thisWeek: "This week",
69
- lastWeek: "Last week",
70
- thisMonth: "This month",
71
- thisYear: "This year",
72
- lastYear: "Last year"
73
- }
74
- },
75
- /**
76
- * This is the translation for the dropdown component.
77
- * The keys are:
78
- * - screenReaderDescription: The translation for the screen reader description.
79
- */
80
- dropdown: {
81
- screenReaderDescription: "Open menu dropdown"
82
- },
83
- /**
84
- * This is the translation for the select component.
85
- * The keys are:
86
- * - searchPlaceholder: The translation for the search placeholder text.
87
- */
88
- select: {
89
- searchPlaceholder: "Search"
90
- },
91
- /**
92
- * This is the translation for the table component.
93
- * The keys are:
94
- * - noResults: The translation for the no results text.
95
- * - actionColumnTitle: The translation for the action column title.
96
- * - searchByInput: The translation for the search by input.
97
- * - searchInput: The translation for the search input.
98
- * - pagination: The translation for the pagination component.
99
- */
100
- table: {
101
- noResults: "No results",
102
- actionColumnTitle: "Actions",
103
- searchByInput: {
104
- all: "All",
105
- placeholder: "Search by"
106
- },
107
- searchInput: {
108
- placeholder: "Search"
109
- },
110
- pagination: {
111
- all: "All",
112
- rowsPerPage: "Rows per page",
113
- of: "of"
114
- }
115
- },
116
- /**
117
- * This is the translation for the pagination component.
118
- * The keys are:
119
- * - navAriaLabel: The aria-label for the navigation (nav) element.
120
- * - screenReader.firstPage: The translation for the first page button (screen reader).
121
- * - screenReader.previousPage: The translation for the previous page button (screen reader).
122
- * - screenReader.page: The translation for the current page button (screen reader).
123
- * - screenReader.nextPage: The translation for the next page button (screen reader).
124
- * - screenReader.lastPage: The translation for the last page button (screen reader).
125
- */
126
- pagination: {
127
- navAriaLabel: "page navigation",
128
- screenReader: {
129
- firstPage: "First Page, page {page}",
130
- previousPage: "Previous Page, page {page}",
131
- page: "Page {page}",
132
- nextPage: "Next Page, page {page}",
133
- lastPage: "Last Page, page {page}"
134
- }
135
- },
136
- /**
137
- * This is the translation for the carousel component.
138
- * The keys are:
139
- * - ariaLabel.previousButton: The aria-label for the previous button.
140
- * - ariaLabel.nextButton: The aria-label for the next button.
141
- */
142
- carousel: {
143
- ariaLabel: {
144
- previousButton: "Scroll to previous items",
145
- nextButton: "Scroll to next items"
146
- }
147
- },
148
- /**
149
- * This is the translation for the checklist component.
150
- * The keys are:
151
- * - noResultsFound: The translation for the no results found text.
152
- * - searchInput.placeholder: The translation for the search input placeholder.
153
- */
154
- checklist: {
155
- noResultsFound: "No results found",
156
- searchInput: {
157
- placeholder: "Search"
158
- }
159
- },
160
- /**
161
- * This is the translation for the read more component.
162
- * The keys are:
163
- * - expand: The translation for the expand text.
164
- * - collapse: The translation for the collapse text.
165
- * - ariaLabel: The translation for the aria label.
166
- */
167
- readMore: {
168
- expand: "Read more",
169
- collapse: "Read less",
170
- ariaLabel: "Expandable content"
171
- },
172
- /**
173
- * This is the translation for the skeleton component.
174
- * The keys are:
175
- * - ariaLabel: The translation for the aria label.
176
- * - loadingText: The translation for the loading text.
177
- */
178
- skeleton: {
179
- ariaLabel: "Loading content",
180
- loadingText: "Loading..."
181
- }
182
- };
183
- export {
184
- en as default
185
- };
1
+ var en_default={selectCountry:{searchPlaceholder:`Search country`},inputPhoneNumber:{countrySelect:{placeholder:`Country code`,error:`Choose country`,searchPlaceholder:`Search the country`},phoneInput:{placeholder:`Phone number`,example:`Example: {example}`}},dropzone:{dragAndDrop:`Drop your files`,selectFile:`select file`,divider:`or`,fileMaxCount:`Maximum {count} files`,fileMaxSize:`Maximum {size} MB per file`,fileTypes:`Allowed file types: {types}`,types:{image:`images`,video:`videos`,audio:`audios`,text:`texts`}},datePicker:{shortcuts:{lastSevenDays:`Last 7 days`,lastThirtyDays:`Last 30 days`,thisWeek:`This week`,lastWeek:`Last week`,thisMonth:`This month`,thisYear:`This year`,lastYear:`Last year`}},dropdown:{screenReaderDescription:`Open menu dropdown`},select:{searchPlaceholder:`Search`},table:{noResults:`No results`,actionColumnTitle:`Actions`,searchByInput:{all:`All`,placeholder:`Search by`},searchInput:{placeholder:`Search`},pagination:{all:`All`,rowsPerPage:`Rows per page`,of:`of`}},pagination:{navAriaLabel:`page navigation`,screenReader:{firstPage:`First Page, page {page}`,previousPage:`Previous Page, page {page}`,page:`Page {page}`,nextPage:`Next Page, page {page}`,lastPage:`Last Page, page {page}`}},carousel:{ariaLabel:{previousButton:`Scroll to previous items`,nextButton:`Scroll to next items`}},checklist:{noResultsFound:`No results found`,searchInput:{placeholder:`Search`}},readMore:{expand:`Read more`,collapse:`Read less`,ariaLabel:`Expandable content`},skeleton:{ariaLabel:`Loading content`,loadingText:`Loading...`}};export{en_default as default};
@@ -1,97 +1 @@
1
- const es = {
2
- selectCountry: {
3
- searchPlaceholder: "Buscar país"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "Código de país",
8
- error: "Elegir país",
9
- searchPlaceholder: "Buscar país"
10
- },
11
- phoneInput: {
12
- placeholder: "Número de teléfono",
13
- example: "Ejemplo: {example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "Arrastra tus archivos",
18
- selectFile: "seleccionar archivo",
19
- divider: "o",
20
- fileMaxCount: "Máximo {count} archivos",
21
- fileMaxSize: "Máximo {size} MB por archivo",
22
- fileTypes: "Tipos de archivo permitidos: {types}",
23
- types: {
24
- image: "imágenes",
25
- video: "vídeos",
26
- audio: "audios",
27
- text: "textos"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "Últimos 7 días",
33
- lastThirtyDays: "Últimos 30 días",
34
- thisWeek: "Esta semana",
35
- lastWeek: "Semana pasada",
36
- thisMonth: "Este mes",
37
- thisYear: "Este año",
38
- lastYear: "Año pasado"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "Abrir menú desplegable"
43
- },
44
- select: {
45
- searchPlaceholder: "Buscar"
46
- },
47
- table: {
48
- noResults: "Sin resultados",
49
- actionColumnTitle: "Acciones",
50
- searchByInput: {
51
- all: "Todos",
52
- placeholder: "Buscar por"
53
- },
54
- searchInput: {
55
- placeholder: "Buscar"
56
- },
57
- pagination: {
58
- all: "Todos",
59
- rowsPerPage: "Filas por página",
60
- of: "de"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "navegación de páginas",
65
- screenReader: {
66
- firstPage: "Primera página, página {page}",
67
- previousPage: "Página anterior, página {page}",
68
- page: "Página {page}",
69
- nextPage: "Página siguiente, página {page}",
70
- lastPage: "Última página, página {page}"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "Desplazar a elementos anteriores",
76
- nextButton: "Desplazar a elementos siguientes"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "No se encontraron resultados",
81
- searchInput: {
82
- placeholder: "Buscar"
83
- }
84
- },
85
- readMore: {
86
- expand: "Leer más",
87
- collapse: "Leer menos",
88
- ariaLabel: "Contenido expandible"
89
- },
90
- skeleton: {
91
- ariaLabel: "Contenido en carga",
92
- loadingText: "Cargando..."
93
- }
94
- };
95
- export {
96
- es as default
97
- };
1
+ var es_default={selectCountry:{searchPlaceholder:`Buscar país`},inputPhoneNumber:{countrySelect:{placeholder:`Código de país`,error:`Elegir país`,searchPlaceholder:`Buscar país`},phoneInput:{placeholder:`Número de teléfono`,example:`Ejemplo: {example}`}},dropzone:{dragAndDrop:`Arrastra tus archivos`,selectFile:`seleccionar archivo`,divider:`o`,fileMaxCount:`Máximo {count} archivos`,fileMaxSize:`Máximo {size} MB por archivo`,fileTypes:`Tipos de archivo permitidos: {types}`,types:{image:`imágenes`,video:`vídeos`,audio:`audios`,text:`textos`}},datePicker:{shortcuts:{lastSevenDays:`Últimos 7 días`,lastThirtyDays:`Últimos 30 días`,thisWeek:`Esta semana`,lastWeek:`Semana pasada`,thisMonth:`Este mes`,thisYear:`Este año`,lastYear:`Año pasado`}},dropdown:{screenReaderDescription:`Abrir menú desplegable`},select:{searchPlaceholder:`Buscar`},table:{noResults:`Sin resultados`,actionColumnTitle:`Acciones`,searchByInput:{all:`Todos`,placeholder:`Buscar por`},searchInput:{placeholder:`Buscar`},pagination:{all:`Todos`,rowsPerPage:`Filas por página`,of:`de`}},pagination:{navAriaLabel:`navegación de páginas`,screenReader:{firstPage:`Primera página, página {page}`,previousPage:`Página anterior, página {page}`,page:`Página {page}`,nextPage:`Página siguiente, página {page}`,lastPage:`Última página, página {page}`}},carousel:{ariaLabel:{previousButton:`Desplazar a elementos anteriores`,nextButton:`Desplazar a elementos siguientes`}},checklist:{noResultsFound:`No se encontraron resultados`,searchInput:{placeholder:`Buscar`}},readMore:{expand:`Leer más`,collapse:`Leer menos`,ariaLabel:`Contenido expandible`},skeleton:{ariaLabel:`Contenido en carga`,loadingText:`Cargando...`}};export{es_default as default};
@@ -1,97 +1 @@
1
- const fr = {
2
- selectCountry: {
3
- searchPlaceholder: "Rechercher un pays"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "Code pays",
8
- error: "Choisir le pays",
9
- searchPlaceholder: "Rechercher un pays"
10
- },
11
- phoneInput: {
12
- placeholder: "Numéro de téléphone",
13
- example: "Exemple: {example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "Déposer vos fichiers",
18
- divider: "ou",
19
- selectFile: "sélectionner un fichier",
20
- fileMaxCount: "Maximum {count} fichiers",
21
- fileMaxSize: "Maximum {size} MB par fichier",
22
- fileTypes: "Types de fichiers autorisés: {types}",
23
- types: {
24
- image: "images",
25
- video: "videos",
26
- audio: "audios",
27
- text: "textes"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "Derniers 7 jours",
33
- lastThirtyDays: "Derniers 30 jours",
34
- thisWeek: "Cette semaine",
35
- lastWeek: "Semaine précédente",
36
- thisMonth: "Ce mois",
37
- thisYear: "Cette année",
38
- lastYear: "Année précédente"
39
- }
40
- },
41
- checklist: {
42
- noResultsFound: "Aucun résultat trouvé",
43
- searchInput: {
44
- placeholder: "Rechercher..."
45
- }
46
- },
47
- carousel: {
48
- ariaLabel: {
49
- previousButton: "Scroller vers la gauche",
50
- nextButton: "Scroller vers la droite"
51
- }
52
- },
53
- dropdown: {
54
- screenReaderDescription: "Ouvrir le menu déroulant"
55
- },
56
- select: {
57
- searchPlaceholder: "Rechercher"
58
- },
59
- pagination: {
60
- navAriaLabel: "Navigation",
61
- screenReader: {
62
- firstPage: "Première page",
63
- previousPage: "Page précédente",
64
- page: "Page {page}",
65
- nextPage: "Page suivante",
66
- lastPage: "Dernière page"
67
- }
68
- },
69
- table: {
70
- actionColumnTitle: "Actions",
71
- noResults: "Aucun résultat",
72
- searchByInput: {
73
- all: "Tous",
74
- placeholder: "Rechercher par"
75
- },
76
- searchInput: {
77
- placeholder: "Rechercher"
78
- },
79
- pagination: {
80
- all: "Tous",
81
- rowsPerPage: "Lignes par page",
82
- of: "sur"
83
- }
84
- },
85
- readMore: {
86
- expand: "Lire plus",
87
- collapse: "Lire moins",
88
- ariaLabel: "Contenu extensible"
89
- },
90
- skeleton: {
91
- ariaLabel: "Contenu en chargement",
92
- loadingText: "Chargement..."
93
- }
94
- };
95
- export {
96
- fr as default
97
- };
1
+ var fr_default={selectCountry:{searchPlaceholder:`Rechercher un pays`},inputPhoneNumber:{countrySelect:{placeholder:`Code pays`,error:`Choisir le pays`,searchPlaceholder:`Rechercher un pays`},phoneInput:{placeholder:`Numéro de téléphone`,example:`Exemple: {example}`}},dropzone:{dragAndDrop:`Déposer vos fichiers`,divider:`ou`,selectFile:`sélectionner un fichier`,fileMaxCount:`Maximum {count} fichiers`,fileMaxSize:`Maximum {size} MB par fichier`,fileTypes:`Types de fichiers autorisés: {types}`,types:{image:`images`,video:`videos`,audio:`audios`,text:`textes`}},datePicker:{shortcuts:{lastSevenDays:`Derniers 7 jours`,lastThirtyDays:`Derniers 30 jours`,thisWeek:`Cette semaine`,lastWeek:`Semaine précédente`,thisMonth:`Ce mois`,thisYear:`Cette année`,lastYear:`Année précédente`}},checklist:{noResultsFound:`Aucun résultat trouvé`,searchInput:{placeholder:`Rechercher...`}},carousel:{ariaLabel:{previousButton:`Scroller vers la gauche`,nextButton:`Scroller vers la droite`}},dropdown:{screenReaderDescription:`Ouvrir le menu déroulant`},select:{searchPlaceholder:`Rechercher`},pagination:{navAriaLabel:`Navigation`,screenReader:{firstPage:`Première page`,previousPage:`Page précédente`,page:`Page {page}`,nextPage:`Page suivante`,lastPage:`Dernière page`}},table:{actionColumnTitle:`Actions`,noResults:`Aucun résultat`,searchByInput:{all:`Tous`,placeholder:`Rechercher par`},searchInput:{placeholder:`Rechercher`},pagination:{all:`Tous`,rowsPerPage:`Lignes par page`,of:`sur`}},readMore:{expand:`Lire plus`,collapse:`Lire moins`,ariaLabel:`Contenu extensible`},skeleton:{ariaLabel:`Contenu en chargement`,loadingText:`Chargement...`}};export{fr_default as default};
@@ -1,18 +1 @@
1
- import { default as default2 } from "./de.js";
2
- import { default as default3 } from "./en.js";
3
- import { default as default4 } from "./es.js";
4
- import { default as default5 } from "./fr.js";
5
- import { default as default6 } from "./it.js";
6
- import { default as default7 } from "./ja.js";
7
- import { default as default8 } from "./pt.js";
8
- import { default as default9 } from "./zh-CN.js";
9
- export {
10
- default2 as de,
11
- default3 as en,
12
- default4 as es,
13
- default5 as fr,
14
- default6 as it,
15
- default7 as ja,
16
- default8 as pt,
17
- default9 as zhCN
18
- };
1
+ import zh_CN_default from"./zh-CN.js";import pt_default from"./pt.js";import ja_default from"./ja.js";import it_default from"./it.js";import fr_default from"./fr.js";import es_default from"./es.js";import en_default from"./en.js";import de_default from"./de.js";export{de_default as de,en_default as en,es_default as es,fr_default as fr,it_default as it,ja_default as ja,pt_default as pt,zh_CN_default as zhCN};
@@ -1,97 +1 @@
1
- const it = {
2
- selectCountry: {
3
- searchPlaceholder: "Cerca paese"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "Codice paese",
8
- error: "Scegli paese",
9
- searchPlaceholder: "Cerca paese"
10
- },
11
- phoneInput: {
12
- placeholder: "Numero di telefono",
13
- example: "Esempio: {example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "Trascina i tuoi file",
18
- selectFile: "seleziona file",
19
- divider: "o",
20
- fileMaxCount: "Massimo {count} file",
21
- fileMaxSize: "Massimo {size} MB per file",
22
- fileTypes: "Tipi di file consentiti: {types}",
23
- types: {
24
- image: "immagini",
25
- video: "video",
26
- audio: "audio",
27
- text: "testi"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "Ultimi 7 giorni",
33
- lastThirtyDays: "Ultimi 30 giorni",
34
- thisWeek: "Questa settimana",
35
- lastWeek: "Settimana scorsa",
36
- thisMonth: "Questo mese",
37
- thisYear: "Quest'anno",
38
- lastYear: "Anno scorso"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "Apri menu a discesa"
43
- },
44
- select: {
45
- searchPlaceholder: "Cerca"
46
- },
47
- table: {
48
- noResults: "Nessun risultato",
49
- actionColumnTitle: "Azioni",
50
- searchByInput: {
51
- all: "Tutti",
52
- placeholder: "Cerca per"
53
- },
54
- searchInput: {
55
- placeholder: "Cerca"
56
- },
57
- pagination: {
58
- all: "Tutti",
59
- rowsPerPage: "Righe per pagina",
60
- of: "di"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "navigazione pagine",
65
- screenReader: {
66
- firstPage: "Prima pagina, pagina {page}",
67
- previousPage: "Pagina precedente, pagina {page}",
68
- page: "Pagina {page}",
69
- nextPage: "Pagina successiva, pagina {page}",
70
- lastPage: "Ultima pagina, pagina {page}"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "Scorri agli elementi precedenti",
76
- nextButton: "Scorri agli elementi successivi"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "Nessun risultato trovato",
81
- searchInput: {
82
- placeholder: "Cerca"
83
- }
84
- },
85
- readMore: {
86
- expand: "Leggi di più",
87
- collapse: "Leggi di meno",
88
- ariaLabel: "Contenuto espandibile"
89
- },
90
- skeleton: {
91
- ariaLabel: "Contenuto in caricamento",
92
- loadingText: "Caricamento..."
93
- }
94
- };
95
- export {
96
- it as default
97
- };
1
+ var it_default={selectCountry:{searchPlaceholder:`Cerca paese`},inputPhoneNumber:{countrySelect:{placeholder:`Codice paese`,error:`Scegli paese`,searchPlaceholder:`Cerca paese`},phoneInput:{placeholder:`Numero di telefono`,example:`Esempio: {example}`}},dropzone:{dragAndDrop:`Trascina i tuoi file`,selectFile:`seleziona file`,divider:`o`,fileMaxCount:`Massimo {count} file`,fileMaxSize:`Massimo {size} MB per file`,fileTypes:`Tipi di file consentiti: {types}`,types:{image:`immagini`,video:`video`,audio:`audio`,text:`testi`}},datePicker:{shortcuts:{lastSevenDays:`Ultimi 7 giorni`,lastThirtyDays:`Ultimi 30 giorni`,thisWeek:`Questa settimana`,lastWeek:`Settimana scorsa`,thisMonth:`Questo mese`,thisYear:`Quest'anno`,lastYear:`Anno scorso`}},dropdown:{screenReaderDescription:`Apri menu a discesa`},select:{searchPlaceholder:`Cerca`},table:{noResults:`Nessun risultato`,actionColumnTitle:`Azioni`,searchByInput:{all:`Tutti`,placeholder:`Cerca per`},searchInput:{placeholder:`Cerca`},pagination:{all:`Tutti`,rowsPerPage:`Righe per pagina`,of:`di`}},pagination:{navAriaLabel:`navigazione pagine`,screenReader:{firstPage:`Prima pagina, pagina {page}`,previousPage:`Pagina precedente, pagina {page}`,page:`Pagina {page}`,nextPage:`Pagina successiva, pagina {page}`,lastPage:`Ultima pagina, pagina {page}`}},carousel:{ariaLabel:{previousButton:`Scorri agli elementi precedenti`,nextButton:`Scorri agli elementi successivi`}},checklist:{noResultsFound:`Nessun risultato trovato`,searchInput:{placeholder:`Cerca`}},readMore:{expand:`Leggi di più`,collapse:`Leggi di meno`,ariaLabel:`Contenuto espandibile`},skeleton:{ariaLabel:`Contenuto in caricamento`,loadingText:`Caricamento...`}};export{it_default as default};
@@ -1,97 +1 @@
1
- const ja = {
2
- selectCountry: {
3
- searchPlaceholder: "国を検索"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "国番号",
8
- error: "国を選択",
9
- searchPlaceholder: "国を検索"
10
- },
11
- phoneInput: {
12
- placeholder: "電話番号",
13
- example: "例:{example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "ファイルをドロップ",
18
- selectFile: "ファイルを選択",
19
- divider: "または",
20
- fileMaxCount: "最大 {count} ファイル",
21
- fileMaxSize: "最大 {size} MB / ファイル",
22
- fileTypes: "許可されるファイルタイプ:{types}",
23
- types: {
24
- image: "画像",
25
- video: "ビデオ",
26
- audio: "音声",
27
- text: "テキスト"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "過去7日間",
33
- lastThirtyDays: "過去30日間",
34
- thisWeek: "今週",
35
- lastWeek: "先週",
36
- thisMonth: "今月",
37
- thisYear: "今年",
38
- lastYear: "昨年"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "ドロップダウンメニューを開く"
43
- },
44
- select: {
45
- searchPlaceholder: "検索"
46
- },
47
- table: {
48
- noResults: "結果なし",
49
- actionColumnTitle: "アクション",
50
- searchByInput: {
51
- all: "すべて",
52
- placeholder: "検索条件"
53
- },
54
- searchInput: {
55
- placeholder: "検索"
56
- },
57
- pagination: {
58
- all: "すべて",
59
- rowsPerPage: "ページあたりの行数",
60
- of: "/"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "ページナビゲーション",
65
- screenReader: {
66
- firstPage: "最初のページ、ページ {page}",
67
- previousPage: "前のページ、ページ {page}",
68
- page: "ページ {page}",
69
- nextPage: "次のページ、ページ {page}",
70
- lastPage: "最後のページ、ページ {page}"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "前のアイテムにスクロール",
76
- nextButton: "次のアイテムにスクロール"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "結果が見つかりません",
81
- searchInput: {
82
- placeholder: "検索"
83
- }
84
- },
85
- readMore: {
86
- expand: "もっと読む",
87
- collapse: "閉じる",
88
- ariaLabel: "展開可能なコンテンツ"
89
- },
90
- skeleton: {
91
- ariaLabel: "コンテンツの読み込み中",
92
- loadingText: "読み込み中..."
93
- }
94
- };
95
- export {
96
- ja as default
97
- };
1
+ var ja_default={selectCountry:{searchPlaceholder:`国を検索`},inputPhoneNumber:{countrySelect:{placeholder:`国番号`,error:`国を選択`,searchPlaceholder:`国を検索`},phoneInput:{placeholder:`電話番号`,example:`例:{example}`}},dropzone:{dragAndDrop:`ファイルをドロップ`,selectFile:`ファイルを選択`,divider:`または`,fileMaxCount:`最大 {count} ファイル`,fileMaxSize:`最大 {size} MB / ファイル`,fileTypes:`許可されるファイルタイプ:{types}`,types:{image:`画像`,video:`ビデオ`,audio:`音声`,text:`テキスト`}},datePicker:{shortcuts:{lastSevenDays:`過去7日間`,lastThirtyDays:`過去30日間`,thisWeek:`今週`,lastWeek:`先週`,thisMonth:`今月`,thisYear:`今年`,lastYear:`昨年`}},dropdown:{screenReaderDescription:`ドロップダウンメニューを開く`},select:{searchPlaceholder:`検索`},table:{noResults:`結果なし`,actionColumnTitle:`アクション`,searchByInput:{all:`すべて`,placeholder:`検索条件`},searchInput:{placeholder:`検索`},pagination:{all:`すべて`,rowsPerPage:`ページあたりの行数`,of:`/`}},pagination:{navAriaLabel:`ページナビゲーション`,screenReader:{firstPage:`最初のページ、ページ {page}`,previousPage:`前のページ、ページ {page}`,page:`ページ {page}`,nextPage:`次のページ、ページ {page}`,lastPage:`最後のページ、ページ {page}`}},carousel:{ariaLabel:{previousButton:`前のアイテムにスクロール`,nextButton:`次のアイテムにスクロール`}},checklist:{noResultsFound:`結果が見つかりません`,searchInput:{placeholder:`検索`}},readMore:{expand:`もっと読む`,collapse:`閉じる`,ariaLabel:`展開可能なコンテンツ`},skeleton:{ariaLabel:`コンテンツの読み込み中`,loadingText:`読み込み中...`}};export{ja_default as default};
@@ -1,97 +1 @@
1
- const pt = {
2
- selectCountry: {
3
- searchPlaceholder: "Pesquisar país"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "Código do país",
8
- error: "Escolher país",
9
- searchPlaceholder: "Pesquisar país"
10
- },
11
- phoneInput: {
12
- placeholder: "Número de telefone",
13
- example: "Exemplo: {example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "Solte seus arquivos",
18
- selectFile: "selecionar arquivo",
19
- divider: "ou",
20
- fileMaxCount: "Máximo {count} arquivos",
21
- fileMaxSize: "Máximo {size} MB por arquivo",
22
- fileTypes: "Tipos de arquivo permitidos: {types}",
23
- types: {
24
- image: "imagens",
25
- video: "vídeos",
26
- audio: "audios",
27
- text: "textos"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "Últimos 7 dias",
33
- lastThirtyDays: "Últimos 30 dias",
34
- thisWeek: "Esta semana",
35
- lastWeek: "Semana passada",
36
- thisMonth: "Este mês",
37
- thisYear: "Este ano",
38
- lastYear: "Ano passado"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "Abrir menu suspenso"
43
- },
44
- select: {
45
- searchPlaceholder: "Pesquisar"
46
- },
47
- table: {
48
- noResults: "Sem resultados",
49
- actionColumnTitle: "Ações",
50
- searchByInput: {
51
- all: "Todos",
52
- placeholder: "Pesquisar por"
53
- },
54
- searchInput: {
55
- placeholder: "Pesquisar"
56
- },
57
- pagination: {
58
- all: "Todos",
59
- rowsPerPage: "Linhas por página",
60
- of: "de"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "navegação de páginas",
65
- screenReader: {
66
- firstPage: "Primeira página, página {page}",
67
- previousPage: "Página anterior, página {page}",
68
- page: "Página {page}",
69
- nextPage: "Próxima página, página {page}",
70
- lastPage: "Última página, página {page}"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "Rolar para itens anteriores",
76
- nextButton: "Rolar para próximos itens"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "Nenhum resultado encontrado",
81
- searchInput: {
82
- placeholder: "Pesquisar"
83
- }
84
- },
85
- readMore: {
86
- expand: "Ler mais",
87
- collapse: "Ler menos",
88
- ariaLabel: "Conteúdo expansível"
89
- },
90
- skeleton: {
91
- ariaLabel: "Conteúdo em carregamento",
92
- loadingText: "Carregando..."
93
- }
94
- };
95
- export {
96
- pt as default
97
- };
1
+ var pt_default={selectCountry:{searchPlaceholder:`Pesquisar país`},inputPhoneNumber:{countrySelect:{placeholder:`Código do país`,error:`Escolher país`,searchPlaceholder:`Pesquisar país`},phoneInput:{placeholder:`Número de telefone`,example:`Exemplo: {example}`}},dropzone:{dragAndDrop:`Solte seus arquivos`,selectFile:`selecionar arquivo`,divider:`ou`,fileMaxCount:`Máximo {count} arquivos`,fileMaxSize:`Máximo {size} MB por arquivo`,fileTypes:`Tipos de arquivo permitidos: {types}`,types:{image:`imagens`,video:`vídeos`,audio:`audios`,text:`textos`}},datePicker:{shortcuts:{lastSevenDays:`Últimos 7 dias`,lastThirtyDays:`Últimos 30 dias`,thisWeek:`Esta semana`,lastWeek:`Semana passada`,thisMonth:`Este mês`,thisYear:`Este ano`,lastYear:`Ano passado`}},dropdown:{screenReaderDescription:`Abrir menu suspenso`},select:{searchPlaceholder:`Pesquisar`},table:{noResults:`Sem resultados`,actionColumnTitle:`Ações`,searchByInput:{all:`Todos`,placeholder:`Pesquisar por`},searchInput:{placeholder:`Pesquisar`},pagination:{all:`Todos`,rowsPerPage:`Linhas por página`,of:`de`}},pagination:{navAriaLabel:`navegação de páginas`,screenReader:{firstPage:`Primeira página, página {page}`,previousPage:`Página anterior, página {page}`,page:`Página {page}`,nextPage:`Próxima página, página {page}`,lastPage:`Última página, página {page}`}},carousel:{ariaLabel:{previousButton:`Rolar para itens anteriores`,nextButton:`Rolar para próximos itens`}},checklist:{noResultsFound:`Nenhum resultado encontrado`,searchInput:{placeholder:`Pesquisar`}},readMore:{expand:`Ler mais`,collapse:`Ler menos`,ariaLabel:`Conteúdo expansível`},skeleton:{ariaLabel:`Conteúdo em carregamento`,loadingText:`Carregando...`}};export{pt_default as default};
@@ -1,97 +1 @@
1
- const zhCN = {
2
- selectCountry: {
3
- searchPlaceholder: "搜索国家"
4
- },
5
- inputPhoneNumber: {
6
- countrySelect: {
7
- placeholder: "国家代码",
8
- error: "选择国家",
9
- searchPlaceholder: "搜索国家"
10
- },
11
- phoneInput: {
12
- placeholder: "电话号码",
13
- example: "示例:{example}"
14
- }
15
- },
16
- dropzone: {
17
- dragAndDrop: "拖放文件",
18
- selectFile: "选择文件",
19
- divider: "或",
20
- fileMaxCount: "最多 {count} 个文件",
21
- fileMaxSize: "最大 {size} MB 每个文件",
22
- fileTypes: "允许的文件类型:{types}",
23
- types: {
24
- image: "图片",
25
- video: "视频",
26
- audio: "音频",
27
- text: "文本"
28
- }
29
- },
30
- datePicker: {
31
- shortcuts: {
32
- lastSevenDays: "最近7天",
33
- lastThirtyDays: "最近30天",
34
- thisWeek: "本周",
35
- lastWeek: "上周",
36
- thisMonth: "本月",
37
- thisYear: "今年",
38
- lastYear: "去年"
39
- }
40
- },
41
- dropdown: {
42
- screenReaderDescription: "打开下拉菜单"
43
- },
44
- select: {
45
- searchPlaceholder: "搜索"
46
- },
47
- table: {
48
- noResults: "无结果",
49
- actionColumnTitle: "操作",
50
- searchByInput: {
51
- all: "全部",
52
- placeholder: "搜索条件"
53
- },
54
- searchInput: {
55
- placeholder: "搜索"
56
- },
57
- pagination: {
58
- all: "全部",
59
- rowsPerPage: "每页行数",
60
- of: "共"
61
- }
62
- },
63
- pagination: {
64
- navAriaLabel: "页面导航",
65
- screenReader: {
66
- firstPage: "第一页,第 {page} 页",
67
- previousPage: "上一页,第 {page} 页",
68
- page: "第 {page} 页",
69
- nextPage: "下一页,第 {page} 页",
70
- lastPage: "最后一页,第 {page} 页"
71
- }
72
- },
73
- carousel: {
74
- ariaLabel: {
75
- previousButton: "滚动到上一项",
76
- nextButton: "滚动到下一项"
77
- }
78
- },
79
- checklist: {
80
- noResultsFound: "未找到结果",
81
- searchInput: {
82
- placeholder: "搜索"
83
- }
84
- },
85
- readMore: {
86
- expand: "阅读更多",
87
- collapse: "阅读更少",
88
- ariaLabel: "可展开内容"
89
- },
90
- skeleton: {
91
- ariaLabel: "内容加载中",
92
- loadingText: "加载中..."
93
- }
94
- };
95
- export {
96
- zhCN as default
97
- };
1
+ var zh_CN_default={selectCountry:{searchPlaceholder:`搜索国家`},inputPhoneNumber:{countrySelect:{placeholder:`国家代码`,error:`选择国家`,searchPlaceholder:`搜索国家`},phoneInput:{placeholder:`电话号码`,example:`示例:{example}`}},dropzone:{dragAndDrop:`拖放文件`,selectFile:`选择文件`,divider:`或`,fileMaxCount:`最多 {count} 个文件`,fileMaxSize:`最大 {size} MB 每个文件`,fileTypes:`允许的文件类型:{types}`,types:{image:`图片`,video:`视频`,audio:`音频`,text:`文本`}},datePicker:{shortcuts:{lastSevenDays:`最近7天`,lastThirtyDays:`最近30天`,thisWeek:`本周`,lastWeek:`上周`,thisMonth:`本月`,thisYear:`今年`,lastYear:`去年`}},dropdown:{screenReaderDescription:`打开下拉菜单`},select:{searchPlaceholder:`搜索`},table:{noResults:`无结果`,actionColumnTitle:`操作`,searchByInput:{all:`全部`,placeholder:`搜索条件`},searchInput:{placeholder:`搜索`},pagination:{all:`全部`,rowsPerPage:`每页行数`,of:`共`}},pagination:{navAriaLabel:`页面导航`,screenReader:{firstPage:`第一页,第 {page} 页`,previousPage:`上一页,第 {page} 页`,page:`第 {page} 页`,nextPage:`下一页,第 {page} 页`,lastPage:`最后一页,第 {page} 页`}},carousel:{ariaLabel:{previousButton:`滚动到上一项`,nextButton:`滚动到下一项`}},checklist:{noResultsFound:`未找到结果`,searchInput:{placeholder:`搜索`}},readMore:{expand:`阅读更多`,collapse:`阅读更少`,ariaLabel:`可展开内容`},skeleton:{ariaLabel:`内容加载中`,loadingText:`加载中...`}};export{zh_CN_default as default};
package/dist/plugin.js CHANGED
@@ -1,11 +1 @@
1
- import { injectTranslations } from "./utils/inject.js";
2
- import { createMazUiTranslations } from "./utils/instance.js";
3
- const MazUiTranslations = {
4
- install(app, options = {}) {
5
- const i18n = createMazUiTranslations(options);
6
- return injectTranslations({ app, i18n }), i18n;
7
- }
8
- };
9
- export {
10
- MazUiTranslations
11
- };
1
+ import{injectTranslations}from"./utils/inject.js";import{createMazUiTranslations}from"./utils/instance.js";var MazUiTranslations={install(app,options={}){let i18n=createMazUiTranslations(options);return injectTranslations({app,i18n}),i18n}};export{MazUiTranslations};
package/dist/states.js CHANGED
@@ -1,11 +1 @@
1
- import { ref, reactive } from "vue";
2
- const locale = ref("en"), globalState = reactive({
3
- loadedLocales: /* @__PURE__ */ new Set(),
4
- messages: {},
5
- userMessages: {},
6
- loadingPromises: /* @__PURE__ */ new Map()
7
- });
8
- export {
9
- globalState,
10
- locale
11
- };
1
+ import{reactive,ref}from"vue";var locale=ref(`en`);var globalState=reactive({loadedLocales:new Set,messages:{},userMessages:{},loadingPromises:new Map});export{globalState,locale};
@@ -1,20 +1 @@
1
- import { injectTranslations } from "./inject.js";
2
- import { createMazUiTranslations } from "./instance.js";
3
- import { g, a, b, c, i, d, e, l, f, m, s, h, t } from "../chunks/locales.6t4KrYgf.js";
4
- export {
5
- createMazUiTranslations,
6
- g as getAvailableLocales,
7
- a as getLoadedLocales,
8
- b as getMessage,
9
- c as getMessages,
10
- injectTranslations,
11
- i as interpolate,
12
- d as isLocaleLoaded,
13
- e as isLocaleLoading,
14
- l as loadDefaultMessages,
15
- f as loadLocale,
16
- m as mergeMessages,
17
- s as setLocale,
18
- h as setLocaleMessage,
19
- t
20
- };
1
+ import{injectTranslations}from"./inject.js";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.CBblmV4c.js";import{createMazUiTranslations}from"./instance.js";export{createMazUiTranslations,getAvailableLocales,getLoadedLocales,getMessage,getMessages,injectTranslations,interpolate,isLocaleLoaded,isLocaleLoading,loadDefaultMessages,loadLocale,mergeMessages,setLocale,setLocaleMessage,t};
@@ -1,11 +1 @@
1
- function injectTranslations({
2
- app,
3
- i18n
4
- }) {
5
- if (!app)
6
- throw new Error("[@maz-ui/translations](injectTranslations) No app instance provided");
7
- app.config.globalProperties.$mazTranslations = i18n, app.provide("mazTranslations", i18n);
8
- }
9
- export {
10
- injectTranslations
11
- };
1
+ function injectTranslations({app,i18n}){if(!app)throw Error(`[@maz-ui/translations](injectTranslations) No app instance provided`);app.config.globalProperties.$mazTranslations=i18n,app.provide(`mazTranslations`,i18n)}export{injectTranslations};
@@ -1,31 +1 @@
1
- import { locale, globalState } from "../states.js";
2
- import { f as loadLocale, g as getAvailableLocales, a as getLoadedLocales, c as getMessages, h as setLocaleMessage, e as isLocaleLoading, d as isLocaleLoaded, s as setLocale, t } from "../chunks/locales.6t4KrYgf.js";
3
- function createMazUiTranslations(options = {}) {
4
- const {
5
- locale: initialLocale = "en",
6
- fallbackLocale = "en",
7
- preloadFallback = !0,
8
- messages = {
9
- en: {}
10
- }
11
- } = options;
12
- locale.value = initialLocale;
13
- for (const [loc, msgs] of Object.entries(messages))
14
- globalState.userMessages[loc] = msgs, msgs && typeof msgs == "object" && (globalState.messages[loc] = { ...globalState.messages[loc], ...msgs });
15
- return setTimeout(() => {
16
- loadLocale(initialLocale).catch((error) => console.error(`[@maz-ui/translations] Failed to load locale: "${initialLocale}"`, error)), preloadFallback && fallbackLocale !== initialLocale && loadLocale(fallbackLocale).catch((error) => console.error(`[@maz-ui/translations] Failed to load fallback locale: "${fallbackLocale}"`, error));
17
- }, 0), {
18
- locale,
19
- t: (key, variables) => t(key, variables, fallbackLocale),
20
- setLocale,
21
- isLocaleLoaded,
22
- isLocaleLoading,
23
- setLocaleMessage,
24
- getMessages,
25
- getLoadedLocales,
26
- getAvailableLocales
27
- };
28
- }
29
- export {
30
- createMazUiTranslations
31
- };
1
+ import{globalState,locale}from"../states.js";import{a as isLocaleLoading,c as setLocale,i as isLocaleLoaded,l as setLocaleMessage,n as getLoadedLocales,p as t,r as getMessages,s as loadLocale,t as getAvailableLocales}from"../chunks/locales.CBblmV4c.js";function createMazUiTranslations(options={}){let{locale:initialLocale=`en`,fallbackLocale=`en`,preloadFallback=!0,messages={en:{}}}=options;locale.value=initialLocale;for(let[loc,msgs]of Object.entries(messages))globalState.userMessages[loc]=msgs,msgs&&typeof msgs==`object`&&(globalState.messages[loc]={...globalState.messages[loc],...msgs});return setTimeout(()=>{loadLocale(initialLocale).catch(error=>console.error(`[@maz-ui/translations] Failed to load locale: "${initialLocale}"`,error)),preloadFallback&&fallbackLocale!==initialLocale&&loadLocale(fallbackLocale).catch(error=>console.error(`[@maz-ui/translations] Failed to load fallback locale: "${fallbackLocale}"`,error))},0),{locale,t:(key,variables)=>t(key,variables,fallbackLocale),setLocale,isLocaleLoaded,isLocaleLoading,setLocaleMessage,getMessages,getLoadedLocales,getAvailableLocales}}export{createMazUiTranslations};
@@ -1,13 +1 @@
1
- import "../states.js";
2
- import { g, a, c, d, e, l, f, s, h } from "../chunks/locales.6t4KrYgf.js";
3
- export {
4
- g as getAvailableLocales,
5
- a as getLoadedLocales,
6
- c as getMessages,
7
- d as isLocaleLoaded,
8
- e as isLocaleLoading,
9
- l as loadDefaultMessages,
10
- f as loadLocale,
11
- s as setLocale,
12
- h as setLocaleMessage
13
- };
1
+ import{a as isLocaleLoading,c as setLocale,i as isLocaleLoaded,l as setLocaleMessage,n as getLoadedLocales,o as loadDefaultMessages,r as getMessages,s as loadLocale,t as getAvailableLocales}from"../chunks/locales.CBblmV4c.js";export{getAvailableLocales,getLoadedLocales,getMessages,isLocaleLoaded,isLocaleLoading,loadDefaultMessages,loadLocale,setLocale,setLocaleMessage};
@@ -1,8 +1 @@
1
- import "../states.js";
2
- import { b, i, m, t } from "../chunks/locales.6t4KrYgf.js";
3
- export {
4
- b as getMessage,
5
- i as interpolate,
6
- m as mergeMessages,
7
- t
8
- };
1
+ import{d as interpolate,f as mergeMessages,p as t,u as getMessage}from"../chunks/locales.CBblmV4c.js";export{getMessage,interpolate,mergeMessages,t};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/translations",
3
3
  "type": "module",
4
- "version": "4.7.4",
4
+ "version": "4.7.6",
5
5
  "description": "Translations for Maz-UI library",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -71,7 +71,7 @@
71
71
  "vue": ">=3.5.0 <4.0.0"
72
72
  },
73
73
  "dependencies": {
74
- "@maz-ui/utils": "4.7.4"
74
+ "@maz-ui/utils": "4.7.6"
75
75
  },
76
76
  "devDependencies": {
77
77
  "unbuild": "^3.6.1"
@@ -1,130 +0,0 @@
1
- import { globalState, locale } from "../states.js";
2
- function getMessage(obj, path) {
3
- return path.split(".").reduce((current, key) => current?.[key], obj);
4
- }
5
- function setMessage(obj, path, value) {
6
- const keys = path.split("."), lastKey = keys.pop(), target = keys.reduce((current, key) => ((!current[key] || typeof current[key] != "object") && (current[key] = {}), current[key]), obj);
7
- target[lastKey] = value;
8
- }
9
- function isFlattenedObject(obj) {
10
- return !obj || typeof obj != "object" ? !1 : Object.keys(obj).some((key) => key.includes("."));
11
- }
12
- function flattenToNested(flatObj) {
13
- if (!isFlattenedObject(flatObj))
14
- return flatObj;
15
- const nested = {};
16
- for (const [key, value] of Object.entries(flatObj))
17
- key.includes(".") ? setMessage(nested, key, value) : nested[key] = value;
18
- return nested;
19
- }
20
- function mergeMessages(target, source) {
21
- const normalizedSource = flattenToNested(source), result = { ...flattenToNested(target) };
22
- for (const key in normalizedSource)
23
- normalizedSource[key] && typeof normalizedSource[key] == "object" ? result[key] = mergeMessages(result[key] || {}, normalizedSource[key]) : result[key] = normalizedSource[key];
24
- return result;
25
- }
26
- function interpolate(message, variables) {
27
- return variables ? message.replace(/\{(\w+)\}/g, (match, key) => variables[key] !== void 0 ? String(variables[key]) : match) : message;
28
- }
29
- function t(key, variables, fallbackLocale) {
30
- let message = getMessage(globalState.messages[locale.value], key);
31
- 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") {
32
- if (!globalState.loadedLocales.has("en"))
33
- 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
- const defaultLocalesLoaders = {
39
- "./locales/en.ts": () => import("../locales/en.js").then((m) => ({ default: m.default })),
40
- "./locales/de.ts": () => import("../locales/de.js").then((m) => ({ default: m.default })),
41
- "./locales/es.ts": () => import("../locales/es.js").then((m) => ({ default: m.default })),
42
- "./locales/fr.ts": () => import("../locales/fr.js").then((m) => ({ default: m.default })),
43
- "./locales/it.ts": () => import("../locales/it.js").then((m) => ({ default: m.default })),
44
- "./locales/ja.ts": () => import("../locales/ja.js").then((m) => ({ default: m.default })),
45
- "./locales/pt.ts": () => import("../locales/pt.js").then((m) => ({ default: m.default })),
46
- "./locales/zh-CN.ts": () => import("../locales/zh-CN.js").then((m) => ({ default: m.default }))
47
- }, defaultMessagesCache = /* @__PURE__ */ new Map();
48
- async function loadDefaultMessages(locale2) {
49
- if (defaultMessagesCache.has(locale2))
50
- return defaultMessagesCache.get(locale2);
51
- const loaderPath = `./locales/${locale2}.ts`, loader = defaultLocalesLoaders[loaderPath];
52
- if (!loader)
53
- return {};
54
- try {
55
- const messages = (await loader()).default;
56
- return defaultMessagesCache.set(locale2, messages), messages;
57
- } catch (error) {
58
- return console.error(`Failed to load default messages for locale "${locale2}":`, error), {};
59
- }
60
- }
61
- function getAvailableLocales() {
62
- const locales = /* @__PURE__ */ new Set();
63
- for (const [path, loader] of Object.entries(defaultLocalesLoaders))
64
- loader && typeof loader == "function" && locales.add(path.replace("./locales/", "").replace(".ts", ""));
65
- for (const path of Object.keys(globalState.userMessages))
66
- locales.add(path);
67
- return Array.from(locales);
68
- }
69
- function loadLocale(targetLocale) {
70
- if (globalState.loadedLocales.has(targetLocale))
71
- return Promise.resolve();
72
- if (globalState.loadingPromises.has(targetLocale))
73
- return globalState.loadingPromises.get(targetLocale);
74
- const loadingPromise = (async () => {
75
- try {
76
- const localeDefaultMessages = await loadDefaultMessages(targetLocale);
77
- let localeUserMessages = {};
78
- const userLoader = globalState.userMessages[targetLocale];
79
- if (userLoader)
80
- if (typeof userLoader == "function")
81
- try {
82
- const userMessages = await userLoader();
83
- localeUserMessages = "default" in userMessages ? userMessages.default : userMessages;
84
- } catch (error) {
85
- console.error(`Failed to load user translations for locale "${targetLocale}":`, error), localeUserMessages = {};
86
- }
87
- else
88
- localeUserMessages = userLoader;
89
- globalState.messages[targetLocale] = mergeMessages(localeDefaultMessages, localeUserMessages), globalState.loadedLocales.add(targetLocale);
90
- } catch (error) {
91
- console.error(`Failed to load translations for locale "${targetLocale}":`, error), globalState.messages[targetLocale] = {}, globalState.loadedLocales.add(targetLocale);
92
- } finally {
93
- globalState.loadingPromises.delete(targetLocale);
94
- }
95
- })();
96
- return globalState.loadingPromises.set(targetLocale, loadingPromise), loadingPromise;
97
- }
98
- function getMessages() {
99
- return globalState.messages;
100
- }
101
- function isLocaleLoaded(localeToCheck) {
102
- return globalState.loadedLocales.has(localeToCheck);
103
- }
104
- function isLocaleLoading(localeToCheck) {
105
- return globalState.loadingPromises.has(localeToCheck);
106
- }
107
- function setLocaleMessage(targetLocale, messages) {
108
- globalState.messages[targetLocale] || (globalState.messages[targetLocale] = {}), globalState.messages[targetLocale] = mergeMessages(globalState.messages[targetLocale], messages), globalState.loadedLocales.add(targetLocale);
109
- }
110
- async function setLocale(newLocale) {
111
- globalState.loadedLocales.has(newLocale) || await loadLocale(newLocale), locale.value = newLocale;
112
- }
113
- function getLoadedLocales() {
114
- return Object.keys(globalState.messages);
115
- }
116
- export {
117
- getLoadedLocales as a,
118
- getMessage as b,
119
- getMessages as c,
120
- isLocaleLoaded as d,
121
- isLocaleLoading as e,
122
- loadLocale as f,
123
- getAvailableLocales as g,
124
- setLocaleMessage as h,
125
- interpolate as i,
126
- loadDefaultMessages as l,
127
- mergeMessages as m,
128
- setLocale as s,
129
- t
130
- };