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 11import i18next from 'i18next' ;
22import LanguageDetector from 'i18next-browser-languagedetector' ;
33import { default as fallbackResources , languages } from '../../translations' ;
4+ import { VERSION } from './constants' ;
45
56if ( typeof IS_MINIFIED === 'undefined' ) {
67 // internationalization is only for the unminified build
@@ -147,8 +148,12 @@ export const initialize = () => {
147148 } ,
148149 backend : {
149150 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`
152157 } ,
153158 partialBundledLanguages : true ,
154159 resources : fallbackResources
You can’t perform that action at this time.
0 commit comments