File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import i18next from 'i18next' ;
2
2
import LanguageDetector from 'i18next-browser-languagedetector' ;
3
3
import { default as fallbackResources , languages } from '../../translations' ;
4
+ import { VERSION } from './constants' ;
4
5
5
6
if ( typeof IS_MINIFIED === 'undefined' ) {
6
7
// internationalization is only for the unminified build
@@ -147,8 +148,12 @@ export const initialize = () => {
147
148
} ,
148
149
backend : {
149
150
fallback : 'en' ,
150
- loadPath :
151
- 'https://cdn.jsdelivr.net/npm/p5/translations/{{lng}}/{{ns}}.json'
151
+
152
+ // ensure that the FES internationalization strings are loaded
153
+ // from the latest patch of the current minor version of p5.js
154
+ loadPath : `https://cdn.jsdelivr.net/npm/p5@${
155
+ VERSION . replace ( / ^ ( \d + \. \d + ) \. \d + .* $ / , '$1' )
156
+ } /translations/{{lng}}/{{ns}}.json`
152
157
} ,
153
158
partialBundledLanguages : true ,
154
159
resources : fallbackResources
You can’t perform that action at this time.
0 commit comments