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
|
|
@ -60,6 +60,7 @@ Widget wrapScreen({
|
|||
required VarietyRepository repository,
|
||||
required Widget child,
|
||||
AppLocale locale = AppLocale.en,
|
||||
TextDirection? textDirection,
|
||||
}) {
|
||||
LocaleSettings.setLocaleSync(locale);
|
||||
return TranslationProvider(
|
||||
|
|
@ -75,7 +76,9 @@ Widget wrapScreen({
|
|||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
home: child,
|
||||
home: textDirection == null
|
||||
? child
|
||||
: Directionality(textDirection: textDirection, child: child),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -88,6 +91,7 @@ Widget wrapDetail({
|
|||
required String varietyId,
|
||||
SpeciesRepository? species,
|
||||
AppLocale locale = AppLocale.en,
|
||||
TextDirection? textDirection,
|
||||
}) {
|
||||
LocaleSettings.setLocaleSync(locale);
|
||||
return TranslationProvider(
|
||||
|
|
@ -106,7 +110,12 @@ Widget wrapDetail({
|
|||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
home: const VarietyDetailScreen(),
|
||||
home: textDirection == null
|
||||
? const VarietyDetailScreen()
|
||||
: Directionality(
|
||||
textDirection: textDirection,
|
||||
child: const VarietyDetailScreen(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue