feat(app): the app speaks British and American English and German
Settings offers English (UK), English (US) and Deutsch after the device's language, each named in its own language. app_en.arb, the template, is now British English (colour, centre) and the fallback for any language the app doesn't speak; app_en_US.arb overrides the five messages American English spells differently, and app_en_GB.arb is empty, there so that Material's texts and dates are British too. The German translation says "du" and keeps one set of terms throughout (Lernset, Karteikarte, Lernpfad; Anki's own Stapel and Unterstapel in the Anki import). arb_files_test checks that German has every message of the template and that every translation keeps its placeholders. resolveAppLocale picks the first language the device prefers that the app speaks, in its country's variant where there is one; other English is British, and a country alone never picks a language (Spanish in the United States isn't American English), which Flutter's own resolution would do. Both MaterialApps take material_ui's GlobalMaterialLocalizations delegates: gen-l10n's list brings flutter_localizations', which serve only package:flutter/material.dart, so material_ui's widgets found no Material texts in German and threw. The editor's own text blocks show our placeholders while empty (list item, to-do, quote, heading, and the desktop's / hint): the editor's own follow a locale of their own, process-wide, in few languages. The last texts written into widgets (the person's data failing to open, the cards failing to read, the About dialog) moved into the arb files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
55a0a7fdf0
commit
3ee9bce0c5
1 changed files with 4239 additions and 60 deletions
|
|
@ -99,7 +99,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
'Shown as a small label above the title.';
|
||||
|
||||
@override
|
||||
String get studysetSheetColor => 'Color';
|
||||
String get studysetSheetColor => 'Colour';
|
||||
|
||||
@override
|
||||
String get studysetSheetDiscardTitle => 'Discard changes?';
|
||||
|
|
@ -144,7 +144,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
|
||||
@override
|
||||
String colorPickerLabel(String color) {
|
||||
return 'Color: $color';
|
||||
return 'Colour: $color';
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -788,7 +788,8 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get studysetSheetDescriptionAdd => 'Add a description';
|
||||
|
||||
@override
|
||||
String get studysetSheetInheritColor => 'Same color as the studyset it is in';
|
||||
String get studysetSheetInheritColor =>
|
||||
'Same colour as the studyset it is in';
|
||||
|
||||
@override
|
||||
String get exploreTitle => 'Explore';
|
||||
|
|
@ -860,6 +861,17 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get settingsAbout => 'About Halkyon Learn';
|
||||
|
||||
@override
|
||||
String get aboutLegalese =>
|
||||
'Free software: the app is under the GNU Affero General Public License, version 3 or any later version, the server under the Server Side Public License, version 1.';
|
||||
|
||||
@override
|
||||
String get aboutSourceCode => 'The source of what this instance runs:';
|
||||
|
||||
@override
|
||||
String get aboutSourceUnreachable =>
|
||||
'Couldn\'t reach this instance to ask where its source is.';
|
||||
|
||||
@override
|
||||
String get settingsAppearance => 'Appearance';
|
||||
|
||||
|
|
@ -974,7 +986,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
}
|
||||
|
||||
@override
|
||||
String get tagSheetColor => 'Color';
|
||||
String get tagSheetColor => 'Colour';
|
||||
|
||||
@override
|
||||
String get tagSheetCreate => 'Create';
|
||||
|
|
@ -1080,6 +1092,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get cardFilterNothing => 'No flashcards have this tag.';
|
||||
|
||||
@override
|
||||
String get cardListFailed => 'Couldn\'t read the cards.';
|
||||
|
||||
@override
|
||||
String get cardListMore => 'More';
|
||||
|
||||
|
|
@ -1268,7 +1283,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get formatAlignLeft => 'Align left';
|
||||
|
||||
@override
|
||||
String get formatAlignCenter => 'Center';
|
||||
String get formatAlignCenter => 'Centre';
|
||||
|
||||
@override
|
||||
String get formatAlignRight => 'Align right';
|
||||
|
|
@ -1769,6 +1784,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get commonTryAgain => 'Try again';
|
||||
|
||||
@override
|
||||
String get personDataFailed => 'Couldn\'t open this device\'s data.';
|
||||
|
||||
@override
|
||||
String get sessionUnreachable => 'Couldn\'t reach the server.';
|
||||
|
||||
|
|
@ -1862,6 +1880,16 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
@override
|
||||
String get blockQuote => 'Quote';
|
||||
|
||||
@override
|
||||
String get blockListItem => 'List item';
|
||||
|
||||
@override
|
||||
String get blockChecklistItem => 'To-do';
|
||||
|
||||
@override
|
||||
String get editorSlashHint =>
|
||||
'Type / to insert a block, or just start typing';
|
||||
|
||||
@override
|
||||
String get blockDivider => 'Divider';
|
||||
|
||||
|
|
@ -2783,3 +2811,30 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
return '$_temp0';
|
||||
}
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United Kingdom (`en_GB`).
|
||||
class AppLocalizationsEnGb extends AppLocalizationsEn {
|
||||
AppLocalizationsEnGb() : super('en_GB');
|
||||
}
|
||||
|
||||
/// The translations for English, as used in the United States (`en_US`).
|
||||
class AppLocalizationsEnUs extends AppLocalizationsEn {
|
||||
AppLocalizationsEnUs() : super('en_US');
|
||||
|
||||
@override
|
||||
String get studysetSheetColor => 'Color';
|
||||
|
||||
@override
|
||||
String colorPickerLabel(String color) {
|
||||
return 'Color: $color';
|
||||
}
|
||||
|
||||
@override
|
||||
String get studysetSheetInheritColor => 'Same color as the studyset it is in';
|
||||
|
||||
@override
|
||||
String get tagSheetColor => 'Color';
|
||||
|
||||
@override
|
||||
String get formatAlignCenter => 'Center';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue