i18n: RTL smoke tests, Portuguese locale and a translation guide
- Add rtl_smoke_test covering inventory, detail (lot sheet) and settings under Directionality.rtl, with an Arabic label and vernacular name. - Ship pt.i18n.json (Portuguese) as proof the locale pipeline scales beyond es/en; wire its language tile in Settings. - docs/i18n.md documents the Weblate-ready flow for adding locales.
This commit is contained in:
parent
d6781870d9
commit
5d2b41a110
11 changed files with 1736 additions and 6 deletions
|
|
@ -3,10 +3,10 @@
|
|||
/// Source: lib/i18n
|
||||
/// To regenerate, run: `dart run slang`
|
||||
///
|
||||
/// Locales: 2
|
||||
/// Strings: 572 (286 per locale)
|
||||
/// Locales: 3
|
||||
/// Strings: 861 (287 per locale)
|
||||
///
|
||||
/// Built on 2026-07-09 at 20:28 UTC
|
||||
/// Built on 2026-07-09 at 20:35 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint, unused_import
|
||||
|
|
@ -19,6 +19,7 @@ import 'package:slang_flutter/slang_flutter.dart';
|
|||
export 'package:slang_flutter/slang_flutter.dart';
|
||||
|
||||
import 'strings_es.g.dart' as l_es;
|
||||
import 'strings_pt.g.dart' as l_pt;
|
||||
part 'strings_en.g.dart';
|
||||
|
||||
/// Supported locales.
|
||||
|
|
@ -29,7 +30,8 @@ part 'strings_en.g.dart';
|
|||
/// - if (LocaleSettings.currentLocale == AppLocale.en) // locale check
|
||||
enum AppLocale with BaseAppLocale<AppLocale, Translations> {
|
||||
en(languageCode: 'en'),
|
||||
es(languageCode: 'es');
|
||||
es(languageCode: 'es'),
|
||||
pt(languageCode: 'pt');
|
||||
|
||||
const AppLocale({
|
||||
required this.languageCode,
|
||||
|
|
@ -73,6 +75,12 @@ enum AppLocale with BaseAppLocale<AppLocale, Translations> {
|
|||
cardinalResolver: cardinalResolver,
|
||||
ordinalResolver: ordinalResolver,
|
||||
);
|
||||
case AppLocale.pt:
|
||||
return l_pt.TranslationsPt(
|
||||
overrides: overrides,
|
||||
cardinalResolver: cardinalResolver,
|
||||
ordinalResolver: ordinalResolver,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue