Files
formipay/node_modules/lighthouse/shared/localization/swap-locale.d.ts
dwindown e8fbfb14c1 fix: prevent asset conflicts between React and Grid.js versions
Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 17:02:14 +07:00

39 lines
1.4 KiB
TypeScript

/**
* @fileoverview Use the lhr.i18n.icuMessagePaths object to change locales.
*
* `icuMessagePaths` is an object keyed by `LH.IcuMessage['i18nId']`s. Within each is either
* 1) an array of strings, which are just object paths to where that message is used in the LHR
* 2) an array of `LH.IcuMessagePath`s which include both a `path` and a `values` object
* which will be used in the replacement within `format.getFormatted()`
*
* An example:
"icuMessagePaths": {
"core/audits/metrics/first-contentful-paint.js | title": [
"audits[first-contentful-paint].title"
],
"core/audits/server-response-time.js | displayValue": [
{
"values": {
"timeInMs": 570.5630000000001
},
"path": "audits[server-response-time].displayValue"
}
],
"core/lib/i18n/i18n.js | columnTimeSpent": [
"audits[mainthread-work-breakdown].details.headings[1].text",
"audits[network-rtt].details.headings[1].text",
"audits[network-server-latency].details.headings[1].text"
],
...
*/
/**
* Returns a new LHR with all strings changed to the new `requestedLocale`.
* @param {LH.Result} lhr
* @param {LH.Locale} requestedLocale
* @return {{lhr: LH.Result, missingIcuMessageIds: string[]}}
*/
export function swapLocale(lhr: LH.Result, requestedLocale: LH.Locale): {
lhr: LH.Result;
missingIcuMessageIds: string[];
};
//# sourceMappingURL=swap-locale.d.ts.map