diff --git a/src/ui/i18n/en.rs b/src/ui/i18n/en.rs index 9673924f..07ffb22e 100644 --- a/src/ui/i18n/en.rs +++ b/src/ui/i18n/en.rs @@ -607,6 +607,12 @@ pub fn translate_en(key: L10nKey) -> &'static str { "proxy http https socks socks5 clash v2ray network download update" } L10nKey::SettingsSearchAnsiColorsKeywords => "palette 16 terminal colours theme", + L10nKey::SettingsSearchBackgroundImageKeywords => { + "background image wallpaper picture photo backdrop theme" + } + L10nKey::SettingsSearchImageOpacityKeywords => { + "background image opacity strength fade wallpaper" + } L10nKey::SettingsSearchArgumentsKeywords => "shell flags login args", L10nKey::SettingsSearchBlurKeywords => { "transparency translucent frosted vibrancy window background" @@ -626,7 +632,7 @@ pub fn translate_en(key: L10nKey) -> &'static str { L10nKey::SettingsSearchCursorBlinkKeywords => "caret blinking flash", L10nKey::SettingsSearchCursorShapeKeywords => "caret block bar underline beam", L10nKey::SettingsSearchCustomThemesKeywords => { - "theme duplicate edit colors folder yaml import" + "theme duplicate edit colors folder yaml import background image wallpaper" } L10nKey::SettingsSearchDetectUrlsKeywords => "links hyperlink clickable open", L10nKey::SettingsSearchDiffPreviewFromCountsKeywords => { diff --git a/src/ui/i18n/ja.rs b/src/ui/i18n/ja.rs index 54f81773..f10b38d7 100644 --- a/src/ui/i18n/ja.rs +++ b/src/ui/i18n/ja.rs @@ -608,6 +608,12 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> { L10nKey::SettingsSearchAnsiColorsKeywords => { "パレット 16 ANSI カラー ターミナル テーマ ansi colors palette terminal theme colours" } + L10nKey::SettingsSearchBackgroundImageKeywords => { + "背景画像 壁紙 画像 写真 テーマ background image wallpaper picture theme" + } + L10nKey::SettingsSearchImageOpacityKeywords => { + "背景画像 不透明度 透明度 強さ 壁紙 background image opacity strength fade" + } L10nKey::SettingsSearchArgumentsKeywords => { "シェル フラグ ログイン 引数 arguments shell flags login args" } @@ -639,7 +645,7 @@ pub fn translate_ja(key: L10nKey) -> Option<&'static str> { "カーソル 形状 ブロック バー アンダーライン ビーム cursor shape caret block bar underline beam" } L10nKey::SettingsSearchCustomThemesKeywords => { - "テーマ 複製 編集 色 フォルダ yaml インポート custom themes duplicate edit colors folder import" + "テーマ 複製 編集 色 フォルダ 背景画像 壁紙 yaml インポート custom themes duplicate edit colors folder import background image wallpaper" } L10nKey::SettingsSearchDetectUrlsKeywords => { "リンク ハイパーリンク クリック可能 開く detect urls links hyperlink clickable open" diff --git a/src/ui/i18n/mod.rs b/src/ui/i18n/mod.rs index 7d8772ca..47e6b307 100644 --- a/src/ui/i18n/mod.rs +++ b/src/ui/i18n/mod.rs @@ -509,6 +509,8 @@ l10n_keys! { SettingsSearchCheckUpdatesOnLaunchKeywords, SettingsSearchUpdateChannelKeywords, SettingsSearchAnsiColorsKeywords, + SettingsSearchBackgroundImageKeywords, + SettingsSearchImageOpacityKeywords, SettingsSearchArgumentsKeywords, SettingsSearchBlurKeywords, SettingsSearchBoldFontKeywords, diff --git a/src/ui/i18n/zh.rs b/src/ui/i18n/zh.rs index de53b6f0..4d53d38c 100644 --- a/src/ui/i18n/zh.rs +++ b/src/ui/i18n/zh.rs @@ -539,6 +539,12 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> { L10nKey::SettingsSearchAnsiColorsKeywords => { "ANSI颜色 调色板 终端颜色 主题 ansi colors palette terminal theme" } + L10nKey::SettingsSearchBackgroundImageKeywords => { + "背景图片 背景图 壁纸 图片 照片 主题 background image wallpaper picture theme" + } + L10nKey::SettingsSearchImageOpacityKeywords => { + "背景图片 不透明度 透明度 强度 壁纸 background image opacity strength fade" + } L10nKey::SettingsSearchArgumentsKeywords => { "参数 shell 启动参数 登录参数 arguments shell flags login args" } @@ -568,7 +574,7 @@ pub fn translate_zh(key: L10nKey) -> Option<&'static str> { "光标形状 光标 块 竖线 下划线 cursor shape caret block bar underline beam" } L10nKey::SettingsSearchCustomThemesKeywords => { - "自定义主题 复制 编辑 颜色 文件夹 yaml 导入 theme custom edit duplicate colors import" + "自定义主题 复制 编辑 颜色 文件夹 背景图片 壁纸 yaml 导入 theme custom edit duplicate colors import background image wallpaper" } L10nKey::SettingsSearchDetectUrlsKeywords => { "检测URL 链接 超链接 可点击 打开 detect urls links hyperlink open" diff --git a/src/ui/settings.rs b/src/ui/settings.rs index cf1e7a05..507d7ed8 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -199,6 +199,16 @@ fn settings_search_entries() -> &'static [SearchEntry] { title: SettingsAnsiColors, keywords: SettingsSearchAnsiColorsKeywords, }, + SearchEntry { + section: Appearance, + title: SettingsBackgroundImage, + keywords: SettingsSearchBackgroundImageKeywords, + }, + SearchEntry { + section: Appearance, + title: SettingsImageOpacity, + keywords: SettingsSearchImageOpacityKeywords, + }, SearchEntry { section: Terminal, title: SettingsProgram, @@ -5754,6 +5764,13 @@ mod tests { ("channel", About), ("metered", About), ("automatic", About), + // A headline feature the index had never heard of: "background + // image" matched nothing, and typing it walked the page to About + // because "background" alone hits Download updates in the + // background. + ("background image", Appearance), + ("wallpaper", Appearance), + ("image opacity", Appearance), ]; for (query, expected) in cases { assert_eq!(