mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
[l10n] Remove the localized DevTools experiment
The localized DevTools experiment has been enabled by default since M94. With M97, we remove the experiment altogether. Users won't be affected as English is always the default locale for DevTools even with the experiment enabled. R=dsv@chromium.org Bug: None Change-Id: I88bedfbcc38b9ace58dfbf3bfa84b4e3214fdebe Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3240943 Reviewed-by: Danil Somsikov <dsv@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
d9b23066c3
commit
d4f932ff17
@@ -569,7 +569,6 @@ export const DevtoolsExperiments: {
|
||||
'ignoreListJSFramesOnTimeline': 43,
|
||||
'contrastIssues': 44,
|
||||
'experimentalCookieFeatures': 45,
|
||||
'localizedDevTools': 46,
|
||||
'bfcacheDebugging': 47,
|
||||
'hideIssuesFeature': 48,
|
||||
'reportingApiDebugging': 49,
|
||||
|
||||
@@ -554,7 +554,6 @@ export enum ExperimentName {
|
||||
ALL = '*',
|
||||
PROTOCOL_MONITOR = 'protocolMonitor',
|
||||
WEBAUTHN_PANE = 'webauthnPane',
|
||||
LOCALIZED_DEVTOOLS = 'localizedDevTools',
|
||||
SYNC_SETTINGS = 'syncSettings',
|
||||
}
|
||||
|
||||
|
||||
@@ -151,13 +151,7 @@ export class MainImpl {
|
||||
}
|
||||
|
||||
async requestAndRegisterLocaleData(): Promise<void> {
|
||||
// The language setting is only available when the experiment is enabled.
|
||||
// TODO(crbug.com/1163928): Remove the check when the experiment is gone.
|
||||
let settingLanguage = 'en-US';
|
||||
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS)) {
|
||||
settingLanguage = Common.Settings.Settings.instance().moduleSetting<string>('language').get();
|
||||
}
|
||||
|
||||
const settingLanguage = Common.Settings.Settings.instance().moduleSetting<string>('language').get();
|
||||
const devToolsLocale = i18n.DevToolsLocale.DevToolsLocale.instance({
|
||||
create: true,
|
||||
data: {
|
||||
@@ -325,15 +319,11 @@ export class MainImpl {
|
||||
// Hide Issues Feature.
|
||||
Root.Runtime.experiments.register('groupAndHideIssuesByKind', 'Allow grouping and hiding of issues by IssueKind');
|
||||
|
||||
// Localized DevTools, hide "locale selector" setting behind an experiment.
|
||||
Root.Runtime.experiments.register(Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS, 'Enable localized DevTools');
|
||||
|
||||
// Checkbox in the Settings UI to enable Chrome Sync is behind this experiment.
|
||||
Root.Runtime.experiments.register(
|
||||
Root.Runtime.ExperimentName.SYNC_SETTINGS, 'Sync DevTools settings with Chrome Sync');
|
||||
|
||||
Root.Runtime.experiments.enableExperimentsByDefault([
|
||||
Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS,
|
||||
'sourceOrderViewer',
|
||||
'hideIssuesFeature',
|
||||
'bfcacheDebugging',
|
||||
|
||||
@@ -769,7 +769,6 @@ Common.Settings.registerSettingExtension({
|
||||
...filterLocalesForSettings().map(locale => createOptionForLocale(locale)),
|
||||
],
|
||||
reloadRequired: true,
|
||||
experiment: Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS,
|
||||
});
|
||||
|
||||
Common.Settings.registerSettingExtension({
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import * as i18n from '../../core/i18n/i18n.js';
|
||||
import type * as ProtocolClient from '../../core/protocol_client/protocol_client.js';
|
||||
import * as SDK from '../../core/sdk/sdk.js';
|
||||
import * as Root from '../../core/root/root.js';
|
||||
|
||||
import type * as ReportRenderer from './LighthouseReporterTypes.js';
|
||||
|
||||
@@ -35,10 +34,7 @@ export class ProtocolService {
|
||||
}
|
||||
|
||||
getLocales(): readonly string[] {
|
||||
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS)) {
|
||||
return [i18n.DevToolsLocale.DevToolsLocale.instance().locale];
|
||||
}
|
||||
return navigator.languages;
|
||||
return [i18n.DevToolsLocale.DevToolsLocale.instance().locale];
|
||||
}
|
||||
|
||||
startLighthouse(auditURL: string, categoryIDs: string[], flags: Object): Promise<ReportRenderer.RunnerResult> {
|
||||
|
||||
@@ -443,10 +443,6 @@ function getDisableLocaleInfoBarSetting(): Common.Settings.Setting<boolean> {
|
||||
}
|
||||
|
||||
function shouldShowLocaleInfobar(): boolean {
|
||||
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getDisableLocaleInfoBarSetting().get()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user