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

@@ -18,6 +18,8 @@ class _Probe extends StatelessWidget {
Text(l.settings),
Text(l.toolEraser),
Text(l.importPdf),
Text(l.themeSystem),
Text(l.searchHint),
]),
);
}
@@ -38,6 +40,8 @@ void main() {
expect(find.text('Settings'), findsOneWidget);
expect(find.text('Eraser'), findsOneWidget);
expect(find.text('Import PDF'), findsOneWidget);
expect(find.text('System'), findsOneWidget);
expect(find.text('Search notes and documents...'), findsOneWidget);
});
testWidgets('Chinese locale resolves Chinese strings', (tester) async {
@@ -45,6 +49,8 @@ void main() {
expect(find.text('设置'), findsOneWidget);
expect(find.text('橡皮擦'), findsOneWidget);
expect(find.text('导入 PDF'), findsOneWidget);
expect(find.text('跟随系统'), findsOneWidget);
expect(find.text('搜索笔记和文档…'), findsOneWidget);
});
test('both locales are supported', () {