remove i18n toggle
This commit is contained in:
@@ -25,7 +25,6 @@ Some stable features are enabled by default. You can disable a stable feature by
|
||||
| `featureHighlights` | Highlight Grafana Enterprise features | |
|
||||
| `exploreMixedDatasource` | Enable mixed datasource in Explore | Yes |
|
||||
| `dataConnectionsConsole` | Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins. | Yes |
|
||||
| `internationalization` | Enables internationalization | Yes |
|
||||
| `topnav` | Enables new top navigation and page layouts | Yes |
|
||||
| `cloudWatchCrossAccountQuerying` | Enables cross-account querying in CloudWatch datasources | Yes |
|
||||
| `newPanelChromeUI` | Show updated look and feel of grafana-ui PanelChrome: panel header, icons, and menu | Yes |
|
||||
|
||||
@@ -45,7 +45,6 @@ export interface FeatureToggles {
|
||||
disableSecretsCompatibility?: boolean;
|
||||
logRequestsInstrumentedAsUnknown?: boolean;
|
||||
dataConnectionsConsole?: boolean;
|
||||
internationalization?: boolean;
|
||||
topnav?: boolean;
|
||||
grpcServer?: boolean;
|
||||
entityStore?: boolean;
|
||||
|
||||
@@ -186,13 +186,6 @@ var (
|
||||
Expression: "true", // turned on by default
|
||||
Owner: grafanaPluginsPlatformSquad,
|
||||
},
|
||||
{
|
||||
Name: "internationalization",
|
||||
Description: "Enables internationalization",
|
||||
State: FeatureStateStable,
|
||||
Expression: "true", // enabled by default
|
||||
Owner: grafanaUserEssentialsSquad,
|
||||
},
|
||||
{
|
||||
Name: "topnav",
|
||||
Description: "Enables new top navigation and page layouts",
|
||||
|
||||
@@ -26,7 +26,6 @@ scenes,alpha,@grafana/dashboards-squad,false,false,false,true
|
||||
disableSecretsCompatibility,alpha,@grafana/hosted-grafana-team,false,false,true,false
|
||||
logRequestsInstrumentedAsUnknown,alpha,@grafana/hosted-grafana-team,false,false,false,false
|
||||
dataConnectionsConsole,stable,@grafana/plugins-platform-backend,false,false,false,false
|
||||
internationalization,stable,@grafana/user-essentials,false,false,false,false
|
||||
topnav,stable,@grafana/user-essentials,false,false,false,false
|
||||
grpcServer,beta,@grafana/grafana-app-platform-squad,false,false,false,false
|
||||
entityStore,alpha,@grafana/grafana-app-platform-squad,true,false,false,false
|
||||
|
||||
|
@@ -115,10 +115,6 @@ const (
|
||||
// Enables a new top-level page called Connections. This page is an experiment that provides a better experience when you install and configure data sources and other plugins.
|
||||
FlagDataConnectionsConsole = "dataConnectionsConsole"
|
||||
|
||||
// FlagInternationalization
|
||||
// Enables internationalization
|
||||
FlagInternationalization = "internationalization"
|
||||
|
||||
// FlagTopnav
|
||||
// Enables new top navigation and page layouts
|
||||
FlagTopnav = "topnav"
|
||||
|
||||
@@ -7,19 +7,6 @@ import { Preferences as UserPreferencesDTO } from '@grafana/schema/src/raw/prefe
|
||||
|
||||
import SharedPreferences from './SharedPreferences';
|
||||
|
||||
jest.mock('@grafana/runtime', () => {
|
||||
const originalModule = jest.requireActual('@grafana/runtime');
|
||||
return {
|
||||
...originalModule,
|
||||
config: {
|
||||
...originalModule.config,
|
||||
featureToggles: {
|
||||
internationalization: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('app/core/services/backend_srv', () => {
|
||||
return {
|
||||
backendSrv: {
|
||||
|
||||
@@ -49,8 +49,6 @@ function getLanguageOptions(): Array<SelectableValue<string>> {
|
||||
return options;
|
||||
}
|
||||
|
||||
const i18nFlag = Boolean(config.featureToggles.internationalization);
|
||||
|
||||
export class SharedPreferences extends PureComponent<Props, State> {
|
||||
service: PreferencesService;
|
||||
themeOptions: SelectableValue[];
|
||||
@@ -195,27 +193,25 @@ export class SharedPreferences extends PureComponent<Props, State> {
|
||||
/>
|
||||
</Field>
|
||||
|
||||
{i18nFlag ? (
|
||||
<Field
|
||||
label={
|
||||
<Label htmlFor="locale-select">
|
||||
<span className={styles.labelText}>
|
||||
<Trans i18nKey="shared-preferences.fields.locale-label">Language</Trans>
|
||||
</span>
|
||||
<FeatureBadge featureState={FeatureState.beta} />
|
||||
</Label>
|
||||
}
|
||||
data-testid="User preferences language drop down"
|
||||
>
|
||||
<Select
|
||||
value={languages.find((lang) => lang.value === language)}
|
||||
onChange={(lang: SelectableValue<string>) => this.onLanguageChanged(lang.value ?? '')}
|
||||
options={languages}
|
||||
placeholder={t('shared-preferences.fields.locale-placeholder', 'Choose language')}
|
||||
inputId="locale-select"
|
||||
/>
|
||||
</Field>
|
||||
) : null}
|
||||
<Field
|
||||
label={
|
||||
<Label htmlFor="locale-select">
|
||||
<span className={styles.labelText}>
|
||||
<Trans i18nKey="shared-preferences.fields.locale-label">Language</Trans>
|
||||
</span>
|
||||
<FeatureBadge featureState={FeatureState.beta} />
|
||||
</Label>
|
||||
}
|
||||
data-testid="User preferences language drop down"
|
||||
>
|
||||
<Select
|
||||
value={languages.find((lang) => lang.value === language)}
|
||||
onChange={(lang: SelectableValue<string>) => this.onLanguageChanged(lang.value ?? '')}
|
||||
options={languages}
|
||||
placeholder={t('shared-preferences.fields.locale-placeholder', 'Choose language')}
|
||||
inputId="locale-select"
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<div className="gf-form-button-row">
|
||||
<Button
|
||||
|
||||
@@ -22,19 +22,6 @@ jest.mock('app/core/core', () => {
|
||||
};
|
||||
});
|
||||
|
||||
jest.mock('@grafana/runtime', () => {
|
||||
const originalModule = jest.requireActual('@grafana/runtime');
|
||||
return {
|
||||
...originalModule,
|
||||
config: {
|
||||
...originalModule.config,
|
||||
featureToggles: {
|
||||
internationalization: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const setup = (propOverrides?: object) => {
|
||||
jest.clearAllMocks();
|
||||
// needed because SharedPreferences is rendered in the test
|
||||
|
||||
Reference in New Issue
Block a user