Skip to content

Commit

Permalink
[Eslint] Add a custom rule for enforcing as const in UIStrings
Browse files Browse the repository at this point in the history
We needed to update other l10n related eslint rules and
`collect-strings` script to look for `as const` definitions as well.

Fixed: 397381592
Change-Id: Ia3eb9a97fa1595093fb332525f996039f7546d8e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6287325
Commit-Queue: Ergün Erdoğmuş <[email protected]>
Reviewed-by: Nikolay Vitkov <[email protected]>
Reviewed-by: Mathias Bynens <[email protected]>
Reviewed-by: Simon Zünd <[email protected]>
  • Loading branch information
ergunsh authored and Devtools-frontend LUCI CQ committed Feb 21, 2025
1 parent f947981 commit 5efc7e9
Show file tree
Hide file tree
Showing 546 changed files with 678 additions and 573 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ export default [
rootFrontendDirectory: join(import.meta.dirname, 'front_end'),
},
],
'rulesdir/enforce-ui-strings-as-const': 'error',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/common/ResourceType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const UIStrings = {
*@description Name of a network initiator type
*/
webbundle: 'WebBundle',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/common/ResourceType.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/common/Revealer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const UIStrings = {
* @description The UI destination when revealing loaded resources through the Animations panel
*/
animationsPanel: 'Animations panel',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/common/Revealer.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/common/SettingRegistration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const UIStrings = {
* @description Text for the privacy section of the page.
*/
privacy: 'Privacy',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/common/SettingRegistration.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
let registeredSettings: SettingRegistration[] = [];
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/host/InspectorFrontendHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const UIStrings = {
*@example {example.com} PH1
*/
devtoolsS: 'DevTools - {PH1}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/host/InspectorFrontendHost.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/host/ResourceLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const UIStrings = {
*@description Name of an error category used in error messages
*/
decodingDataUrlFailed: 'Decoding Data URL failed',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/host/ResourceLoader.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
export const ResourceLoader = {};
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/CPUProfilerModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const UIStrings = {
*@example {2} PH1
*/
profileD: 'Profile {PH1}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/CPUProfilerModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/CPUThrottlingManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const UIStrings = {
* @description Text label indicating why an option is not available, because the user's device is not fast enough to emulate a device.
*/
calibrationErrorDeviceTooWeak: 'Device is not powerful enough',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/CPUThrottlingManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/CSSStyleSheetHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const UIStrings = {
*@description Error message to display when a source CSS file could not be retrieved.
*/
thereWasAnErrorRetrievingThe: 'There was an error retrieving the source styles.',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/CSSStyleSheetHeader.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/ChildTargetManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
* targets at the same time in some scenarios.
*/
main: 'Main',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/ChildTargetManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/CompilerSourceMappingContentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const UIStrings = {
*@example {An error occurred} PH2
*/
couldNotLoadContentForSS: 'Could not load content for {PH1} ({PH2})',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('core/sdk/CompilerSourceMappingContentProvider.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/Connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UIStrings = {
*@description Text on the remote debugging window to indicate the connection is lost
*/
websocketDisconnected: 'WebSocket disconnected',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/Connections.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
export class MainConnection implements ProtocolClient.InspectorBackend.Connection {
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/ConsoleModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const UIStrings = {
*@description Error message shown in the console after the user tries to save a JavaScript value to a temporary variable.
*/
failedToSaveToTempVariable: 'Failed to save to temp variable.',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('core/sdk/ConsoleModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/DebuggerModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const UIStrings = {
*@description Text in Scope Chain Sidebar Pane of the Sources panel
*/
returnValue: 'Return value',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/DebuggerModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/NetworkManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const UIStrings = {
*@example {https://example.com} PH3
*/
sFinishedLoadingSS: '{PH1} finished loading: {PH2} "{PH3}".',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/NetworkManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/NetworkRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ const UIStrings = {
*@description Tooltip to explain why the cookie should have been blocked by third-party cookie phaseout but is exempted.
*/
exemptionReasonScheme: 'This cookie is allowed by the top-level url scheme',
};
} as const;
// clang-format on

const str_ = i18n.i18n.registerUIStrings('core/sdk/NetworkRequest.ts', UIStrings);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/OverlayModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
*@description Text in Overlay Model
*/
pausedInDebugger: 'Paused in debugger',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/OverlayModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/PageResourceLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const UIStrings = {
*@description Error message for canceled source map loads
*/
loadCanceledDueToReloadOf: 'Load canceled due to reload of inspected page',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/PageResourceLoader.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/RehydratingConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const UIStrings = {
* @description Text to indicate that there is an error loading the log
*/
errorLoadingLog: 'Error loading log',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/RehydratingConnection.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/Script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const UIStrings = {
*@description Error message when failing to load a script source text
*/
unableToFetchScriptSource: 'Unable to fetch script source.',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/Script.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/ServerTiming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const UIStrings = {
*@example {2.0} PH2
*/
unableToParseSValueS: 'Unable to parse "{PH1}" value "{PH2}".',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('core/sdk/ServerTiming.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/ServiceWorkerCacheModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const UIStrings = {
*@example {error message} PH2
*/
serviceworkercacheagentError: '`ServiceWorkerCacheAgent` error deleting cache entry {PH1} in cache: {PH2}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/ServiceWorkerCacheModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/ServiceWorkerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const UIStrings = {
*@example {activated} PH3
*/
sSS: '{PH1} #{PH2} ({PH3})',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/ServiceWorkerManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/SourceMapScopeChainEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const UIStrings = {
*@description Text in Scope Chain Sidebar Pane of the Sources panel
*/
returnValue: 'Return value',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/SourceMapScopeChainEntry.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/core/sdk/sdk-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const UIStrings = {
*/
networkCacheExplanation:
'Disabling the network cache will simulate a network experience similar to a first time visitor.',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('core/sdk/sdk-meta.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/inspector_main/InspectorMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const UIStrings = {
* @description A message that prompts the user to open devtools for a specific environment (Node.js)
*/
openDedicatedTools: 'Open dedicated DevTools for `Node.js`',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/InspectorMain.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
let inspectorMainImplInstance: InspectorMainImpl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const UIStrings = {
*@example {top} PH1
*/
targetS: 'Page: {PH1}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/OutermostTargetSelector.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/inspector_main/RenderingOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const UIStrings = {
* @description Explanation text for the 'Forces CSS forced-colors' setting in the Rendering tool.
*/
forcesCssForcedColors: 'Forces CSS forced-colors media feature',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/RenderingOptions.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const UIStrings = {
* "forces CSS prefers-color-scheme" color
*/
toggleCssPrefersColorSchemeMedia: 'Toggle CSS media feature prefers-color-scheme',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/inspector_main-meta.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/js_app/js_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const UIStrings = {
*@description Command for showing the 'Scripts' tool in the Network Navigator View, which is part of the Sources tool
*/
showNode: 'Show Scripts',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('entrypoints/js_app/js_app.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/main/MainImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const UIStrings = {
*@description Text describing how to navigate the dock side menu
*/
dockSideNaviation: 'Use left and right arrow keys to navigate the options',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/main/MainImpl.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/main/main-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const UIStrings = {
* @description Command to turn the browser color scheme matching off through the command menu.
*/
dontMatchChromeColorSchemeCommand: 'Don\'t match Chrome color scheme',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/main/main-meta.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
let loadedMainModule: (typeof Main|undefined);
Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/node_app/NodeConnectionsPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const UIStrings = {
*@description Text in Node Connections Panel of the Sources panel when debugging a Node.js app
*/
networkAddressEgLocalhost: 'Network address (e.g. localhost:9229)',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/NodeConnectionsPanel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/node_app/NodeMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const UIStrings = {
*@example {example.com} PH1
*/
NodejsTitleS: 'DevTools - Node.js: {PH1}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/NodeMain.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
let nodeMainImplInstance: NodeMainImpl;
Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/node_app/node_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const UIStrings = {
*@description Command for showing the 'Node' tool in the Network Navigator View, which is part of the Sources tool
*/
showNode: 'Show Node',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/node_app.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/entrypoints/worker_app/WorkerMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const UIStrings = {
*@description Text that refers to the main target.
*/
main: 'Main',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('entrypoints/worker_app/WorkerMain.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/models/bindings/ContentProviderBasedProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const UIStrings = {
* @description Error message that is displayed in the Sources panel when can't be loaded.
*/
unknownErrorLoadingFile: 'Unknown error loading file',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('models/bindings/ContentProviderBasedProject.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/models/bindings/DebuggerLanguagePlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const UIStrings = {
*@example {mainp.debug.wasm.dwp} PH1
*/
debugSymbolsIncomplete: 'The debug information for function {PH1} is incomplete',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('models/bindings/DebuggerLanguagePlugins.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/models/bindings/IgnoreListManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const UIStrings = {
addAllContentScriptsToIgnoreList: 'Add all extension scripts to ignore list',
addAllThirdPartyScriptsToIgnoreList: 'Add all third-party scripts to ignore list',
addAllAnonymousScriptsToIgnoreList: 'Add all anonymous scripts to ignore list',
};
} as const;

const sourceMapThirdPartyFolderUrl = urlString`http://a.b.c/lib`;
const sourceMapThirdPartyUrl = urlString`http://a.b.c/lib/source1.ts`;
Expand Down
2 changes: 1 addition & 1 deletion front_end/models/bindings/IgnoreListManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const UIStrings = {
*@description A context menu item in the Call Stack Sidebar Pane of the Sources panel
*/
addAllAnonymousScriptsToIgnoreList: 'Add all anonymous scripts to ignore list',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('models/bindings/IgnoreListManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/models/bindings/ResourceScriptMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const UIStrings = {
*@example {connection lost} PH1
*/
liveEditCompileFailed: '`LiveEdit` compile failed: {PH1}',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('models/bindings/ResourceScriptMapping.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/models/crux-manager/CrUXManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const UIStrings = {
* @description Warning message indicating that the user will see real user data for a URL which is different from the URL they are currently looking at.
*/
fieldOverrideWarning: 'Field data is configured for a different URL than the current page.',
};
} as const;

const str_ = i18n.i18n.registerUIStrings('models/crux-manager/CrUXManager.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
Expand Down
2 changes: 1 addition & 1 deletion front_end/models/emulation/DeviceModeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const UIStrings = {
* @example {0} PH1
*/
devicePixelRatioMustBeGreater: 'Device pixel ratio must be greater than or equal to {PH1}.',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('models/emulation/DeviceModeModel.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);

Expand Down
2 changes: 1 addition & 1 deletion front_end/models/emulation/EmulatedDevices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const UIStrings = {
*@description Title of the Laptop with MDPI screen device
*/
laptopWithMDPIScreen: 'Laptop with MDPI screen',
};
} as const;
const str_ = i18n.i18n.registerUIStrings('models/emulation/EmulatedDevices.ts', UIStrings);
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);

Expand Down
Loading

0 comments on commit 5efc7e9

Please sign in to comment.