svelte-intlayer 9.5.11 → 9.5.12
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/plugins.js +5 -5
- package/package.json +7 -7
package/dist/plugins.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { editor, internationalization } from '@intlayer/config/built';
|
|
2
|
-
import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, resolveInsertedSelector, selectPlugin, transformInterpolableNode, translationPlugin, } from '@intlayer/core/interpreter';
|
|
2
|
+
import { conditionPlugin, enumerationPlugin, fallbackPlugin, filePlugin, genderPlugin, isInterpolableWrapperNode, nestedPlugin, pluralPlugin, resolveInsertedSelector, resolveInterpreterLocale, selectPlugin, transformInterpolableNode, translationPlugin, } from '@intlayer/core/interpreter';
|
|
3
3
|
import * as NodeTypes from '@intlayer/types/nodeType';
|
|
4
4
|
import { reportExposure } from './analytics/exposureSink';
|
|
5
5
|
import { default as ContentSelector } from './editor/ContentSelector.svelte';
|
|
@@ -321,7 +321,7 @@ const pluginsCache = new Map();
|
|
|
321
321
|
* This function is used by both getIntlayer and getDictionary to ensure consistent plugin configuration.
|
|
322
322
|
*/
|
|
323
323
|
export const getPlugins = (locale, fallback = true) => {
|
|
324
|
-
const currentLocale = locale
|
|
324
|
+
const currentLocale = resolveInterpreterLocale(locale);
|
|
325
325
|
const cacheKey = `${currentLocale}_${fallback}`;
|
|
326
326
|
if (pluginsCache.has(cacheKey)) {
|
|
327
327
|
return pluginsCache.get(cacheKey);
|
|
@@ -329,11 +329,11 @@ export const getPlugins = (locale, fallback = true) => {
|
|
|
329
329
|
const plugins = [
|
|
330
330
|
// First: most nodes are plain strings, which every other plugin rejects
|
|
331
331
|
intlayerNodePlugins,
|
|
332
|
-
translationPlugin(
|
|
332
|
+
translationPlugin(currentLocale, fallback ? internationalization.defaultLocale : undefined),
|
|
333
333
|
enumerationPlugin,
|
|
334
|
-
pluralPlugin(
|
|
334
|
+
pluralPlugin(currentLocale),
|
|
335
335
|
conditionPlugin,
|
|
336
|
-
nestedPlugin(
|
|
336
|
+
nestedPlugin(currentLocale),
|
|
337
337
|
filePlugin,
|
|
338
338
|
genderPlugin,
|
|
339
339
|
selectPlugin,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-intlayer",
|
|
3
|
-
"version": "9.5.
|
|
3
|
+
"version": "9.5.12",
|
|
4
4
|
"description": "Easily internationalize i18n your Svelte applications with type-safe multilingual content management.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intlayer",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
|
-
"@intlayer/api": "9.5.
|
|
87
|
-
"@intlayer/config": "9.5.
|
|
88
|
-
"@intlayer/core": "9.5.
|
|
89
|
-
"@intlayer/editor": "9.5.
|
|
90
|
-
"@intlayer/types": "9.5.
|
|
86
|
+
"@intlayer/api": "9.5.12",
|
|
87
|
+
"@intlayer/config": "9.5.12",
|
|
88
|
+
"@intlayer/core": "9.5.12",
|
|
89
|
+
"@intlayer/editor": "9.5.12",
|
|
90
|
+
"@intlayer/types": "9.5.12"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@sveltejs/adapter-auto": "7.0.1",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"svelte": ">=5.0.0"
|
|
110
110
|
},
|
|
111
111
|
"optionalDependencies": {
|
|
112
|
-
"@intlayer/analytics": "9.5.
|
|
112
|
+
"@intlayer/analytics": "9.5.12"
|
|
113
113
|
},
|
|
114
114
|
"engines": {
|
|
115
115
|
"node": ">=14.18"
|