[uiSettings/theme/version] override label to aid KBN_OPTIMIZER_THEMES discovery (#96069)
Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0fdb533ed6
commit
3336db0baa
|
@ -48,6 +48,8 @@ export const getThemeSettings = (
|
|||
): Record<string, UiSettingsParams> => {
|
||||
const { availableVersions, defaultDarkMode, defaultVersion } = getThemeInfo(options);
|
||||
|
||||
const onlyOneThemeAvailable = !options?.isDist && availableVersions.length === 1;
|
||||
|
||||
return {
|
||||
'theme:darkMode': {
|
||||
name: i18n.translate('core.ui_settings.params.darkModeTitle', {
|
||||
|
@ -68,10 +70,21 @@ export const getThemeSettings = (
|
|||
type: 'select',
|
||||
options: availableVersions,
|
||||
description: i18n.translate('core.ui_settings.params.themeVersionText', {
|
||||
defaultMessage: `Switch between the theme used for the current and next version of Kibana. A page refresh is required for the setting to be applied.`,
|
||||
defaultMessage:
|
||||
'Switch between the theme used for the current and next version of Kibana. A page refresh is required for the setting to be applied. {lessOptions}',
|
||||
values: {
|
||||
lessOptions: onlyOneThemeAvailable
|
||||
? '<br><br> There is only one theme available, set <code>KBN_OPTIMIZER_THEMES=v7light,v7dark,v8light,v8dark</code> to get more options.'
|
||||
: undefined,
|
||||
},
|
||||
}),
|
||||
requiresPageReload: true,
|
||||
schema: schema.oneOf(availableVersions.map((v) => schema.literal(v)) as [Type<string>]),
|
||||
optionLabels: onlyOneThemeAvailable
|
||||
? {
|
||||
[availableVersions[0]]: `${availableVersions[0]} (only)`,
|
||||
}
|
||||
: undefined,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
@ -541,7 +541,6 @@
|
|||
"core.ui_settings.params.notifications.warningLifetimeTitle": "警告通知時間",
|
||||
"core.ui_settings.params.storeUrlText": "URLが長くなりすぎるためブラウザーが対応できない場合があります。セッションストレージにURLの一部を保存することでこの問題に対処できるかどうかをテストしています。結果を教えてください!",
|
||||
"core.ui_settings.params.storeUrlTitle": "セッションストレージにURLを格納",
|
||||
"core.ui_settings.params.themeVersionText": "現在のバージョンと次のバージョンのKibanaで使用されるテーマを切り替えます。この設定を適用するにはページの更新が必要です。",
|
||||
"core.ui_settings.params.themeVersionTitle": "テーマバージョン",
|
||||
"core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel": "Elastic ホーム",
|
||||
"core.ui.chrome.headerGlobalNav.helpMenuAskElasticTitle": "Elastic に確認する",
|
||||
|
|
|
@ -544,7 +544,6 @@
|
|||
"core.ui_settings.params.notifications.warningLifetimeTitle": "警告通知生存时间",
|
||||
"core.ui_settings.params.storeUrlText": "有时,URL 可能会变得过长,使某些浏览器无法进行处理。为此,我们将正测试在会话存储中存储 URL 的组成部分是否会有所帮助。请向我们反馈您的体验!",
|
||||
"core.ui_settings.params.storeUrlTitle": "将 URL 存储在会话存储中",
|
||||
"core.ui_settings.params.themeVersionText": "在用于当前版和下一版 Kibana 的主题之间切换。需要刷新页面,才能应用设置。",
|
||||
"core.ui_settings.params.themeVersionTitle": "主题版本",
|
||||
"core.ui.chrome.headerGlobalNav.goHomePageIconAriaLabel": "Elastic 主页",
|
||||
"core.ui.chrome.headerGlobalNav.helpMenuAskElasticTitle": "问询 Elastic",
|
||||
|
|
Loading…
Reference in a new issue