Skip to content

2.0.3

Choose a tag to compare

@PeopleInside PeopleInside released this 07 Jul 12:52

2.0.3
Fixed: with "Lingua editor / interfaccia admin" set to "Automatica (segui Grav)", the plugin stayed in English (both the status card's green banner and TinyMCE's own UI) on installs where Grav exposes the admin locale as a region-qualified BCP-47 tag (e.g. it-IT) rather than a bare it — which is the case for Admin Next's own window.__GRAV_I18N.locale store, and in some builds for document.documentElement.lang too. Every language check (client-side in moderneditor.js/moderneditorstatus.js, and server-side in getUiLanguage()/langOverride()) compared these values with strict equality against 'it', which silently failed even though the language was Italian. All of them now normalize a tag to its primary subtag (it-IT → it) before comparing. window.__GRAV_I18N.locale is also now read as the primary, most reliable client-side signal (it's the same source Grav itself uses to translate the rest of the Admin Next UI), ahead of the existing window.MODERN_EDITOR_ADMIN_LANG / document.documentElement.lang fallbacks. Forcing the language explicitly to "Italiano" already worked before this fix and is unaffected.