feat(i18n): localize settings + search screens
Some checks failed
CI / Windows build (push) Has been cancelled

Extend the en/zh localization to the two screens reached from the home
app bar (the "全都用 + 多语言" ask):
- settings: title, theme-mode segments (System/Light/Dark), seed-color
  description, color-picker + clear-data dialogs.
- search: hint, error, empty/no-results states, Notes/Documents section
  headers, page label.

New ARB keys regenerated; l10n_test now asserts the new keys resolve in
both English and Chinese.

flutter analyze: 0 issues. l10n_test: 3/3.
This commit is contained in:
2026-06-23 10:03:02 +08:00
parent d1b265dc70
commit a7d71e7cfd
8 changed files with 283 additions and 27 deletions

View File

@@ -15,6 +15,31 @@
"openInSplitView": "Open in Split View",
"splitViewSubtitle": "PDF reference + scratchpad",
"removeDocument": "Remove document",
"ok": "OK",
"pickColor": "Pick a color",
"clearSettingsTitle": "Clear all local settings?",
"clear": "Clear",
"settingsReset": "Settings reset to defaults",
"themeSystem": "System",
"themeLight": "Light",
"themeDark": "Dark",
"seedColorDesc": "Seed color for Material 3 theme",
"searchHint": "Search notes and documents...",
"searchError": "Search error: {error}",
"@searchError": {
"placeholders": { "error": { "type": "String" } }
},
"noResultsFor": "No results for \"{query}\"",
"@noResultsFor": {
"placeholders": { "query": { "type": "String" } }
},
"typeToSearch": "Type to search your notes and documents",
"sectionNotes": "Notes",
"sectionDocuments": "Documents",
"pageLabel": "Page {page}",
"@pageLabel": {
"placeholders": { "page": { "type": "int" } }
},
"processingPptx": "Processing PPTX...",
"processingPresentation": "Processing presentation...",
"couldNotOpenPresentation": "Could not open presentation.",

View File

@@ -188,6 +188,102 @@ abstract class AppLocalizations {
/// **'Remove document'**
String get removeDocument;
/// No description provided for @ok.
///
/// In en, this message translates to:
/// **'OK'**
String get ok;
/// No description provided for @pickColor.
///
/// In en, this message translates to:
/// **'Pick a color'**
String get pickColor;
/// No description provided for @clearSettingsTitle.
///
/// In en, this message translates to:
/// **'Clear all local settings?'**
String get clearSettingsTitle;
/// No description provided for @clear.
///
/// In en, this message translates to:
/// **'Clear'**
String get clear;
/// No description provided for @settingsReset.
///
/// In en, this message translates to:
/// **'Settings reset to defaults'**
String get settingsReset;
/// No description provided for @themeSystem.
///
/// In en, this message translates to:
/// **'System'**
String get themeSystem;
/// No description provided for @themeLight.
///
/// In en, this message translates to:
/// **'Light'**
String get themeLight;
/// No description provided for @themeDark.
///
/// In en, this message translates to:
/// **'Dark'**
String get themeDark;
/// No description provided for @seedColorDesc.
///
/// In en, this message translates to:
/// **'Seed color for Material 3 theme'**
String get seedColorDesc;
/// No description provided for @searchHint.
///
/// In en, this message translates to:
/// **'Search notes and documents...'**
String get searchHint;
/// No description provided for @searchError.
///
/// In en, this message translates to:
/// **'Search error: {error}'**
String searchError(String error);
/// No description provided for @noResultsFor.
///
/// In en, this message translates to:
/// **'No results for \"{query}\"'**
String noResultsFor(String query);
/// No description provided for @typeToSearch.
///
/// In en, this message translates to:
/// **'Type to search your notes and documents'**
String get typeToSearch;
/// No description provided for @sectionNotes.
///
/// In en, this message translates to:
/// **'Notes'**
String get sectionNotes;
/// No description provided for @sectionDocuments.
///
/// In en, this message translates to:
/// **'Documents'**
String get sectionDocuments;
/// No description provided for @pageLabel.
///
/// In en, this message translates to:
/// **'Page {page}'**
String pageLabel(int page);
/// No description provided for @processingPptx.
///
/// In en, this message translates to:

View File

@@ -53,6 +53,60 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get removeDocument => 'Remove document';
@override
String get ok => 'OK';
@override
String get pickColor => 'Pick a color';
@override
String get clearSettingsTitle => 'Clear all local settings?';
@override
String get clear => 'Clear';
@override
String get settingsReset => 'Settings reset to defaults';
@override
String get themeSystem => 'System';
@override
String get themeLight => 'Light';
@override
String get themeDark => 'Dark';
@override
String get seedColorDesc => 'Seed color for Material 3 theme';
@override
String get searchHint => 'Search notes and documents...';
@override
String searchError(String error) {
return 'Search error: $error';
}
@override
String noResultsFor(String query) {
return 'No results for \"$query\"';
}
@override
String get typeToSearch => 'Type to search your notes and documents';
@override
String get sectionNotes => 'Notes';
@override
String get sectionDocuments => 'Documents';
@override
String pageLabel(int page) {
return 'Page $page';
}
@override
String get processingPptx => 'Processing PPTX...';

View File

@@ -53,6 +53,60 @@ class AppLocalizationsZh extends AppLocalizations {
@override
String get removeDocument => '移除文档';
@override
String get ok => '确定';
@override
String get pickColor => '选择颜色';
@override
String get clearSettingsTitle => '清除所有本地设置?';
@override
String get clear => '清除';
@override
String get settingsReset => '设置已恢复默认';
@override
String get themeSystem => '跟随系统';
@override
String get themeLight => '浅色';
@override
String get themeDark => '深色';
@override
String get seedColorDesc => 'Material 3 主题种子色';
@override
String get searchHint => '搜索笔记和文档…';
@override
String searchError(String error) {
return '搜索出错:$error';
}
@override
String noResultsFor(String query) {
return '没有“$query”的结果';
}
@override
String get typeToSearch => '输入以搜索你的笔记和文档';
@override
String get sectionNotes => '笔记';
@override
String get sectionDocuments => '文档';
@override
String pageLabel(int page) {
return '$page';
}
@override
String get processingPptx => '正在处理 PPTX…';

View File

@@ -15,6 +15,22 @@
"openInSplitView": "分屏打开",
"splitViewSubtitle": "PDF 参考 + 草稿纸",
"removeDocument": "移除文档",
"ok": "确定",
"pickColor": "选择颜色",
"clearSettingsTitle": "清除所有本地设置?",
"clear": "清除",
"settingsReset": "设置已恢复默认",
"themeSystem": "跟随系统",
"themeLight": "浅色",
"themeDark": "深色",
"seedColorDesc": "Material 3 主题种子色",
"searchHint": "搜索笔记和文档…",
"searchError": "搜索出错:{error}",
"noResultsFor": "没有“{query}”的结果",
"typeToSearch": "输入以搜索你的笔记和文档",
"sectionNotes": "笔记",
"sectionDocuments": "文档",
"pageLabel": "第 {page} 页",
"processingPptx": "正在处理 PPTX…",
"processingPresentation": "正在处理演示文稿…",
"couldNotOpenPresentation": "无法打开演示文稿。",