Skip to content

Commit 151a9ee

Browse files
committed
specify FES i18n in one line
1 parent 3887266 commit 151a9ee

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/internationalization.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ export let translator = (key, values) => {
129129
* Set up our translation function, with loaded languages
130130
*/
131131
export const initialize = () => {
132-
let latestMinorVersionPath = 'https://cdn.jsdelivr.net/npm/p5@' + constants.VERSION.replace(/^(\d+\.\d+)\.\d+.*$/, '$1');
133132
let i18init = i18next
134133
.use(LanguageDetector)
135134
.use(FetchResources)
@@ -152,7 +151,7 @@ export const initialize = () => {
152151
},
153152
backend: {
154153
fallback: 'en',
155-
loadPath: latestMinorVersionPath + '/translations/{{lng}}/{{ns}}.json'
154+
loadPath: `https://cdn.jsdelivr.net/npm/p5@${constants.VERSION.replace(/^(\d+\.\d+)\.\d+.*$/, '$1')}/translations/{{lng}}/{{ns}}.json`
156155
},
157156
partialBundledLanguages: true,
158157
resources: fallbackResources

0 commit comments

Comments
 (0)