Backfill missing 2.4 localization resources and bump nanoid - #835
Merged
Conversation
Resources added during 2.4 development landed only in DefaultLanguage.xml, which is imported on a fresh install. Existing installations upgraded by MigrationUpdateResourceString read Upgrade/en_240.xml, which never received them, so every new Store panel screen rendered raw resource keys instead of labels. Admin.GiftVouchers.Permissions had the mirror-image problem: present only in en_240.xml, so fresh installs were the ones missing it. Also moves the 2.4 entries in the admin.common, admin.configuration.currencies and admin.configuration.languages families into their alphabetical position and fixes four entries indented without a leading tab; they had been appended at the end of their section. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrGY1NnCzdkn7wUxbyHzsX
Transitive dependency of the Vite build chain. npm audit reported one high severity advisory; the bump clears it with no change to the produced bundles - app.runtime.bundle.js, libs.css, style.min.css and style.rtl.min.css are byte-identical before and after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrGY1NnCzdkn7wUxbyHzsX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type: bugfix
Issue
No linked issue — found while checking why Store panel screens show raw resource keys.
New user-facing strings have to land in two files:
App_Data/Resources/DefaultLanguage.xml, imported on a fresh install, andApp_Data/Resources/Upgrade/en_240.xml, imported for existing installations byMigrationUpdateResourceString(src/Modules/Grand.Module.Migration/Migrations/2.4/MigrationUpdateResourceString.cs). During 2.4 development 81 resources were added toDefaultLanguage.xmland only 15 of them reacheden_240.xml.Result: an installation upgraded to 2.4 renders raw keys instead of labels on every new Store panel screen — Languages, Currencies, Shipping (delivery dates, methods, pickup points, warehouses), MessageTemplates, Pages/News, customer/address/catalog attributes — plus
permission.AccessStorePanelandstore.portal.Admin.GiftVouchers.Permissionshad the mirror-image problem: it exists only inen_240.xml, so fresh installs were the ones missing it, even thoughGrand.Web.Store/Controllers/GiftVoucherController.cs:39uses it.Reproduce: install 2.3, upgrade to 2.4, sign in to the Store panel and open Configuration → Languages. The grid header and action buttons show
admin.configuration.languages.setdefaultlanguageand friends instead of text.Solution
Upgrade/en_240.xml: added the 66 resources that were new since tag2.3.0and absent from the upgrade file (17 → 83 entries).DefaultLanguage.xml: addedadmin.giftvouchers.permissions, which existed only in the upgrade file.DefaultLanguage.xml: moved the 24 entries of theadmin.common.*,admin.configuration.currencies.*andadmin.configuration.languages.*families into their alphabetical position — they had been appended at the end of their section — and fixed four entries written without a leading tab.nanoidto 3.3.19 invueapp/package-lock.jsonto clear GHSA-2v37-7h3g-55p8 (high). It is a transitive dependency of the Vite build chain;package.jsonis untouched.Note that
DefaultLanguage.xmlis UTF-16, so GitHub renders its diff as binary. Verification was done by parsing both files and comparing the resource sets:DefaultLanguage.xml5958 → 5959 entries, zero content changes to existing keys (name → area + value compared against the base revision), UTF-16 LE BOM and CRLF preserved.en_240.xml83 entries, no duplicates, every row agreeing withDefaultLanguage.xmlon area and value.app.runtime.bundle.js,libs.css,style.min.cssandstyle.rtl.min.cssare byte-identical to the committed ones, so no bundle changes are included.Two pre-existing problems were left alone:
DefaultLanguage.xmlcarries 24 duplicate keys (admin.plugins,permission.accessvendorpanel,vendors.list, …) and ~26 out-of-order entries in other sections, anden_110.xml/en_210.xmlreference five keys that no longer exist inDefaultLanguage.xml(for exampleStores.Fields.SecureUrl.WrongFormat, removed in #834).Breaking changes
None. Resource-data only; no entity, view model, setting, permission or public interface changed. Existing resource values are untouched — the upgrade migration only inserts keys that fresh installs already have.
Testing
Upgrade/en_240.xmlmigration has not run yet) and start GrandNode so the 2.4 migrations execute.admin.configuration.languages.*keys.cd src/Web/Grand.Web/vueapp && npm ci && npm auditreports 0 vulnerabilities, andnpm run buildleavessrc/Web/Grand.Web/wwwroot/bundles/unchanged ingit status.🤖 Generated with Claude Code