Remove Special Handling of Norwegian Locales (#63034)
* Regenerate _no.arb and _nb.arb from scratch * Revert no <--> nb synonym logic
This commit is contained in:
parent
787e567de3
commit
c36b75e45b
@ -173,13 +173,6 @@ Set<String> _supportedLocales() {
|
||||
supportedLocales.add(filenameRE.firstMatch(filePath)[1]);
|
||||
}
|
||||
|
||||
// See https://github.com/flutter/flutter/issues/53036 for context on why
|
||||
// 'no' is being used as a synonym for 'nb'. It only uses this synonym
|
||||
// if 'nb' is not detected as a valid arb file.
|
||||
if (supportedLocales.contains('no') && !supportedLocales.contains('nb')) {
|
||||
supportedLocales.add('nb');
|
||||
}
|
||||
|
||||
return supportedLocales;
|
||||
}
|
||||
|
||||
|
@ -78,11 +78,6 @@ String generateArbBasedLocalizationSubclasses({
|
||||
assert(supportedLanguagesConstant.isNotEmpty);
|
||||
assert(supportedLanguagesDocMacro.isNotEmpty);
|
||||
|
||||
// See https://github.com/flutter/flutter/issues/53036 for context on why
|
||||
// 'no' is being used as a synonym for 'nb'. It only uses this synonym
|
||||
// if 'nb' is not detected as a valid arb file.
|
||||
bool isNbSynonymOfNo = false;
|
||||
|
||||
final StringBuffer output = StringBuffer();
|
||||
output.writeln(generateHeader('dart dev/tools/localization/bin/gen_localizations.dart --overwrite'));
|
||||
|
||||
@ -108,12 +103,6 @@ String generateArbBasedLocalizationSubclasses({
|
||||
allResourceIdentifiers.addAll(localeToResources[locale].keys.toList()..sort());
|
||||
}
|
||||
|
||||
if (languageToLocales['no'] != null && languageToLocales['nb'] == null) {
|
||||
languageToLocales['nb'] ??= <LocaleInfo>[];
|
||||
languageToLocales['nb'].add(LocaleInfo.fromString('nb'));
|
||||
isNbSynonymOfNo = true;
|
||||
}
|
||||
|
||||
// We generate one class per supported language (e.g.
|
||||
// `MaterialLocalizationEn`). These implement everything that is needed by the
|
||||
// superclass (e.g. GlobalMaterialLocalizations).
|
||||
@ -144,21 +133,6 @@ String generateArbBasedLocalizationSubclasses({
|
||||
for (final String languageName in languageCodes) {
|
||||
final LocaleInfo languageLocale = LocaleInfo.fromString(languageName);
|
||||
|
||||
// See https://github.com/flutter/flutter/issues/53036 for context on why
|
||||
// 'no' is being used as a synonym for 'nb'. It only uses this synonym
|
||||
// if 'nb' is not detected as a valid arb file.
|
||||
if (languageName == 'nb' && isNbSynonymOfNo) {
|
||||
output.writeln(generateClassDeclaration(
|
||||
languageLocale,
|
||||
generatedClassPrefix,
|
||||
'${generatedClassPrefix}No'),
|
||||
);
|
||||
output.writeln(generateConstructor(languageLocale));
|
||||
output.writeln('}');
|
||||
supportedLocales.writeln('/// * `$languageName` - ${describeLocale(languageName)}, which, in this library, is a synonym of `no`');
|
||||
continue;
|
||||
}
|
||||
|
||||
output.writeln(generateClassDeclaration(languageLocale, generatedClassPrefix, baseClass));
|
||||
output.writeln(generateConstructor(languageLocale));
|
||||
|
||||
|
24
packages/flutter_localizations/lib/src/l10n/cupertino_nb.arb
Normal file
24
packages/flutter_localizations/lib/src/l10n/cupertino_nb.arb
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"datePickerHourSemanticsLabelOne": "$hour null-null",
|
||||
"datePickerHourSemanticsLabelOther": "$hour null-null",
|
||||
"datePickerMinuteSemanticsLabelOne": "1 minutt",
|
||||
"datePickerMinuteSemanticsLabelOther": "$minute minutter",
|
||||
"datePickerDateOrder": "dmy",
|
||||
"datePickerDateTimeOrder": "date_time_dayPeriod",
|
||||
"anteMeridiemAbbreviation": "AM",
|
||||
"postMeridiemAbbreviation": "PM",
|
||||
"todayLabel": "I dag",
|
||||
"alertDialogLabel": "Varsel",
|
||||
"tabSemanticsLabel": "Fane $tabIndex av $tabCount",
|
||||
"timerPickerHourLabelOne": "time",
|
||||
"timerPickerHourLabelOther": "timer",
|
||||
"timerPickerMinuteLabelOne": "min.",
|
||||
"timerPickerMinuteLabelOther": "min.",
|
||||
"timerPickerSecondLabelOne": "sek.",
|
||||
"timerPickerSecondLabelOther": "sek.",
|
||||
"cutButtonLabel": "Klipp ut",
|
||||
"copyButtonLabel": "Kopiér",
|
||||
"pasteButtonLabel": "Lim inn",
|
||||
"selectAllButtonLabel": "Velg alle",
|
||||
"modalBarrierDismissLabel": "Avvis"
|
||||
}
|
@ -9,6 +9,7 @@
|
||||
"postMeridiemAbbreviation": "PM",
|
||||
"todayLabel": "I dag",
|
||||
"alertDialogLabel": "Varsel",
|
||||
"tabSemanticsLabel": "Fane $tabIndex av $tabCount",
|
||||
"timerPickerHourLabelOne": "time",
|
||||
"timerPickerHourLabelOther": "timer",
|
||||
"timerPickerMinuteLabelOne": "min.",
|
||||
@ -19,6 +20,5 @@
|
||||
"copyButtonLabel": "Kopiér",
|
||||
"pasteButtonLabel": "Lim inn",
|
||||
"selectAllButtonLabel": "Velg alle",
|
||||
"tabSemanticsLabel": "Fane $tabIndex av $tabCount",
|
||||
"modalBarrierDismissLabel": "Avvis"
|
||||
}
|
||||
|
@ -8783,7 +8783,7 @@ class CupertinoLocalizationMy extends GlobalCupertinoLocalizations {
|
||||
}
|
||||
|
||||
/// The translations for Norwegian Bokmål (`nb`).
|
||||
class CupertinoLocalizationNb extends CupertinoLocalizationNo {
|
||||
class CupertinoLocalizationNb extends GlobalCupertinoLocalizations {
|
||||
/// Create an instance of the translation bundle for Norwegian Bokmål.
|
||||
///
|
||||
/// For details on the meaning of the arguments, see [GlobalCupertinoLocalizations].
|
||||
@ -8808,6 +8808,132 @@ class CupertinoLocalizationNb extends CupertinoLocalizationNo {
|
||||
singleDigitSecondFormat: singleDigitSecondFormat,
|
||||
decimalFormat: decimalFormat,
|
||||
);
|
||||
|
||||
@override
|
||||
String get alertDialogLabel => 'Varsel';
|
||||
|
||||
@override
|
||||
String get anteMeridiemAbbreviation => 'AM';
|
||||
|
||||
@override
|
||||
String get copyButtonLabel => 'Kopiér';
|
||||
|
||||
@override
|
||||
String get cutButtonLabel => 'Klipp ut';
|
||||
|
||||
@override
|
||||
String get datePickerDateOrderString => 'dmy';
|
||||
|
||||
@override
|
||||
String get datePickerDateTimeOrderString => 'date_time_dayPeriod';
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelFew => null;
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelMany => null;
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelOne => '\$hour null-null';
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelOther => '\$hour null-null';
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelTwo => null;
|
||||
|
||||
@override
|
||||
String get datePickerHourSemanticsLabelZero => null;
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelFew => null;
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelMany => null;
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelOne => '1 minutt';
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelOther => '\$minute minutter';
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelTwo => null;
|
||||
|
||||
@override
|
||||
String get datePickerMinuteSemanticsLabelZero => null;
|
||||
|
||||
@override
|
||||
String get modalBarrierDismissLabel => 'Avvis';
|
||||
|
||||
@override
|
||||
String get pasteButtonLabel => 'Lim inn';
|
||||
|
||||
@override
|
||||
String get postMeridiemAbbreviation => 'PM';
|
||||
|
||||
@override
|
||||
String get selectAllButtonLabel => 'Velg alle';
|
||||
|
||||
@override
|
||||
String get tabSemanticsLabelRaw => 'Fane \$tabIndex av \$tabCount';
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelFew => null;
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelMany => null;
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelOne => 'time';
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelOther => 'timer';
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelTwo => null;
|
||||
|
||||
@override
|
||||
String get timerPickerHourLabelZero => null;
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelFew => null;
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelMany => null;
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelOne => 'min.';
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelOther => 'min.';
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelTwo => null;
|
||||
|
||||
@override
|
||||
String get timerPickerMinuteLabelZero => null;
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelFew => null;
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelMany => null;
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelOne => 'sek.';
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelOther => 'sek.';
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelTwo => null;
|
||||
|
||||
@override
|
||||
String get timerPickerSecondLabelZero => null;
|
||||
|
||||
@override
|
||||
String get todayLabel => 'I dag';
|
||||
}
|
||||
|
||||
/// The translations for Nepali (`ne`).
|
||||
@ -13479,7 +13605,7 @@ final Set<String> kCupertinoSupportedLanguages = HashSet<String>.from(const <Str
|
||||
/// * `mr` - Marathi
|
||||
/// * `ms` - Malay
|
||||
/// * `my` - Burmese
|
||||
/// * `nb` - Norwegian Bokmål, which, in this library, is a synonym of `no`
|
||||
/// * `nb` - Norwegian Bokmål
|
||||
/// * `ne` - Nepali
|
||||
/// * `nl` - Dutch Flemish
|
||||
/// * `no` - Norwegian
|
||||
@ -13693,6 +13819,8 @@ GlobalCupertinoLocalizations getCupertinoTranslation(
|
||||
return CupertinoLocalizationMs(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
case 'my':
|
||||
return CupertinoLocalizationMy(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
case 'nb':
|
||||
return CupertinoLocalizationNb(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
case 'ne':
|
||||
return CupertinoLocalizationNe(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
case 'nl':
|
||||
@ -13782,8 +13910,6 @@ GlobalCupertinoLocalizations getCupertinoTranslation(
|
||||
}
|
||||
case 'zu':
|
||||
return CupertinoLocalizationZu(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
case 'nb':
|
||||
return CupertinoLocalizationNb(fullYearFormat: fullYearFormat, dayFormat: dayFormat, mediumDateFormat: mediumDateFormat, singleDigitHourFormat: singleDigitHourFormat, singleDigitMinuteFormat: singleDigitMinuteFormat, doubleDigitMinuteFormat: doubleDigitMinuteFormat, singleDigitSecondFormat: singleDigitSecondFormat, decimalFormat: decimalFormat);
|
||||
}
|
||||
assert(false, 'getCupertinoTranslation() called for unsupported locale "$locale"');
|
||||
return null;
|
||||
|
@ -18301,7 +18301,7 @@ class MaterialLocalizationMy extends GlobalMaterialLocalizations {
|
||||
}
|
||||
|
||||
/// The translations for Norwegian Bokmål (`nb`).
|
||||
class MaterialLocalizationNb extends MaterialLocalizationNo {
|
||||
class MaterialLocalizationNb extends GlobalMaterialLocalizations {
|
||||
/// Create an instance of the translation bundle for Norwegian Bokmål.
|
||||
///
|
||||
/// For details on the meaning of the arguments, see [GlobalMaterialLocalizations].
|
||||
@ -18328,6 +18328,282 @@ class MaterialLocalizationNb extends MaterialLocalizationNo {
|
||||
decimalFormat: decimalFormat,
|
||||
twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat,
|
||||
);
|
||||
|
||||
@override
|
||||
String get aboutListTileTitleRaw => 'Om \$applicationName';
|
||||
|
||||
@override
|
||||
String get alertDialogLabel => 'Varsel';
|
||||
|
||||
@override
|
||||
String get anteMeridiemAbbreviation => 'AM';
|
||||
|
||||
@override
|
||||
String get backButtonTooltip => 'Tilbake';
|
||||
|
||||
@override
|
||||
String get calendarModeButtonLabel => 'Bytt til kalender';
|
||||
|
||||
@override
|
||||
String get cancelButtonLabel => 'AVBRYT';
|
||||
|
||||
@override
|
||||
String get closeButtonLabel => 'LUKK';
|
||||
|
||||
@override
|
||||
String get closeButtonTooltip => 'Lukk';
|
||||
|
||||
@override
|
||||
String get collapsedIconTapHint => 'Vis';
|
||||
|
||||
@override
|
||||
String get continueButtonLabel => 'FORTSETT';
|
||||
|
||||
@override
|
||||
String get copyButtonLabel => 'Kopiér';
|
||||
|
||||
@override
|
||||
String get cutButtonLabel => 'Klipp ut';
|
||||
|
||||
@override
|
||||
String get dateHelpText => 'mm/dd/åååå';
|
||||
|
||||
@override
|
||||
String get dateInputLabel => 'Skriv inn datoen';
|
||||
|
||||
@override
|
||||
String get dateOutOfRangeLabel => 'Utenfor perioden.';
|
||||
|
||||
@override
|
||||
String get datePickerHelpText => 'VELG DATOEN';
|
||||
|
||||
@override
|
||||
String get dateRangeEndDateSemanticLabelRaw => 'Sluttdato \$fullDate';
|
||||
|
||||
@override
|
||||
String get dateRangeEndLabel => 'Sluttdato';
|
||||
|
||||
@override
|
||||
String get dateRangePickerHelpText => 'VELG PERIODEN';
|
||||
|
||||
@override
|
||||
String get dateRangeStartDateSemanticLabelRaw => 'Startdato \$fullDate';
|
||||
|
||||
@override
|
||||
String get dateRangeStartLabel => 'Startdato';
|
||||
|
||||
@override
|
||||
String get dateSeparator => '/';
|
||||
|
||||
@override
|
||||
String get deleteButtonTooltip => 'Slett';
|
||||
|
||||
@override
|
||||
String get dialModeButtonLabel => 'Bytt til modus for valg fra urskive';
|
||||
|
||||
@override
|
||||
String get dialogLabel => 'Dialogboks';
|
||||
|
||||
@override
|
||||
String get drawerLabel => 'Navigasjonsmeny';
|
||||
|
||||
@override
|
||||
String get expandedIconTapHint => 'Skjul';
|
||||
|
||||
@override
|
||||
String get hideAccountsLabel => 'Skjul kontoer';
|
||||
|
||||
@override
|
||||
String get inputDateModeButtonLabel => 'Bytt til innskriving';
|
||||
|
||||
@override
|
||||
String get inputTimeModeButtonLabel => 'Bytt til tekstinndatamodus';
|
||||
|
||||
@override
|
||||
String get invalidDateFormatLabel => 'Ugyldig format.';
|
||||
|
||||
@override
|
||||
String get invalidDateRangeLabel => 'Ugyldig periode.';
|
||||
|
||||
@override
|
||||
String get invalidTimeLabel => 'Angi et gyldig klokkeslett';
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextFew => null;
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextMany => null;
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextOne => '1 lisens';
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextOther => '\$licenseCount lisenser';
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextTwo => null;
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextZero => null;
|
||||
|
||||
@override
|
||||
String get licensesPageTitle => 'Lisenser';
|
||||
|
||||
@override
|
||||
String get modalBarrierDismissLabel => 'Avvis';
|
||||
|
||||
@override
|
||||
String get moreButtonTooltip => 'Mer';
|
||||
|
||||
@override
|
||||
String get nextMonthTooltip => 'Neste måned';
|
||||
|
||||
@override
|
||||
String get nextPageTooltip => 'Neste side';
|
||||
|
||||
@override
|
||||
String get okButtonLabel => 'OK';
|
||||
|
||||
@override
|
||||
String get openAppDrawerTooltip => 'Åpne navigasjonsmenyen';
|
||||
|
||||
@override
|
||||
String get pageRowsInfoTitleRaw => '\$firstRow–\$lastRow av \$rowCount';
|
||||
|
||||
@override
|
||||
String get pageRowsInfoTitleApproximateRaw => '\$firstRow–\$lastRow av omtrent \$rowCount';
|
||||
|
||||
@override
|
||||
String get pasteButtonLabel => 'Lim inn';
|
||||
|
||||
@override
|
||||
String get popupMenuLabel => 'Forgrunnsmeny';
|
||||
|
||||
@override
|
||||
String get postMeridiemAbbreviation => 'PM';
|
||||
|
||||
@override
|
||||
String get previousMonthTooltip => 'Forrige måned';
|
||||
|
||||
@override
|
||||
String get previousPageTooltip => 'Forrige side';
|
||||
|
||||
@override
|
||||
String get refreshIndicatorSemanticLabel => 'Laster inn på nytt';
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountFew => null;
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountMany => null;
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountOne => '1 tegn gjenstår';
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountOther => '\$remainingCount tegn gjenstår';
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountTwo => null;
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountZero => null;
|
||||
|
||||
@override
|
||||
String get reorderItemDown => 'Flytt ned';
|
||||
|
||||
@override
|
||||
String get reorderItemLeft => 'Flytt til venstre';
|
||||
|
||||
@override
|
||||
String get reorderItemRight => 'Flytt til høyre';
|
||||
|
||||
@override
|
||||
String get reorderItemToEnd => 'Flytt til slutten';
|
||||
|
||||
@override
|
||||
String get reorderItemToStart => 'Flytt til starten';
|
||||
|
||||
@override
|
||||
String get reorderItemUp => 'Flytt opp';
|
||||
|
||||
@override
|
||||
String get rowsPerPageTitle => 'Rader per side:';
|
||||
|
||||
@override
|
||||
String get saveButtonLabel => 'LAGRE';
|
||||
|
||||
@override
|
||||
ScriptCategory get scriptCategory => ScriptCategory.englishLike;
|
||||
|
||||
@override
|
||||
String get searchFieldLabel => 'Søk';
|
||||
|
||||
@override
|
||||
String get selectAllButtonLabel => 'Velg alle';
|
||||
|
||||
@override
|
||||
String get selectYearSemanticsLabel => 'Velg året';
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleFew => null;
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleMany => null;
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleOne => '1 element er valgt';
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleOther => '\$selectedRowCount elementer er valgt';
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleTwo => null;
|
||||
|
||||
@override
|
||||
String get selectedRowCountTitleZero => null;
|
||||
|
||||
@override
|
||||
String get showAccountsLabel => 'Vis kontoer';
|
||||
|
||||
@override
|
||||
String get showMenuTooltip => 'Vis meny';
|
||||
|
||||
@override
|
||||
String get signedInLabel => 'Pålogget';
|
||||
|
||||
@override
|
||||
String get tabLabelRaw => 'Fane \$tabIndex av \$tabCount';
|
||||
|
||||
@override
|
||||
TimeOfDayFormat get timeOfDayFormatRaw => TimeOfDayFormat.HH_colon_mm;
|
||||
|
||||
@override
|
||||
String get timePickerDialHelpText => 'VELG KLOKKESLETT';
|
||||
|
||||
@override
|
||||
String get timePickerHourLabel => 'Time';
|
||||
|
||||
@override
|
||||
String get timePickerHourModeAnnouncement => 'Angi timer';
|
||||
|
||||
@override
|
||||
String get timePickerInputHelpText => 'ANGI ET KLOKKESLETT';
|
||||
|
||||
@override
|
||||
String get timePickerMinuteLabel => 'Minutt';
|
||||
|
||||
@override
|
||||
String get timePickerMinuteModeAnnouncement => 'Angi minutter';
|
||||
|
||||
@override
|
||||
String get unspecifiedDate => 'Dato';
|
||||
|
||||
@override
|
||||
String get unspecifiedDateRange => 'Datoperiode';
|
||||
|
||||
@override
|
||||
String get viewLicensesButtonLabel => 'SE LISENSER';
|
||||
}
|
||||
|
||||
/// The translations for Nepali (`ne`).
|
||||
@ -19086,7 +19362,7 @@ class MaterialLocalizationNo extends GlobalMaterialLocalizations {
|
||||
String get licensesPackageDetailTextTwo => null;
|
||||
|
||||
@override
|
||||
String get licensesPackageDetailTextZero => 'No licenses';
|
||||
String get licensesPackageDetailTextZero => null;
|
||||
|
||||
@override
|
||||
String get licensesPageTitle => 'Lisenser';
|
||||
@ -19149,7 +19425,7 @@ class MaterialLocalizationNo extends GlobalMaterialLocalizations {
|
||||
String get remainingTextFieldCharacterCountTwo => null;
|
||||
|
||||
@override
|
||||
String get remainingTextFieldCharacterCountZero => 'TBD';
|
||||
String get remainingTextFieldCharacterCountZero => null;
|
||||
|
||||
@override
|
||||
String get reorderItemDown => 'Flytt ned';
|
||||
@ -27883,7 +28159,7 @@ final Set<String> kMaterialSupportedLanguages = HashSet<String>.from(const <Stri
|
||||
/// * `mr` - Marathi
|
||||
/// * `ms` - Malay
|
||||
/// * `my` - Burmese
|
||||
/// * `nb` - Norwegian Bokmål, which, in this library, is a synonym of `no`
|
||||
/// * `nb` - Norwegian Bokmål
|
||||
/// * `ne` - Nepali
|
||||
/// * `nl` - Dutch Flemish
|
||||
/// * `no` - Norwegian
|
||||
@ -28099,6 +28375,8 @@ GlobalMaterialLocalizations getMaterialTranslation(
|
||||
return MaterialLocalizationMs(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
case 'my':
|
||||
return MaterialLocalizationMy(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
case 'nb':
|
||||
return MaterialLocalizationNb(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
case 'ne':
|
||||
return MaterialLocalizationNe(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
case 'nl':
|
||||
@ -28190,8 +28468,6 @@ GlobalMaterialLocalizations getMaterialTranslation(
|
||||
}
|
||||
case 'zu':
|
||||
return MaterialLocalizationZu(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
case 'nb':
|
||||
return MaterialLocalizationNb(fullYearFormat: fullYearFormat, compactDateFormat: compactDateFormat, shortDateFormat: shortDateFormat, mediumDateFormat: mediumDateFormat, longDateFormat: longDateFormat, yearMonthFormat: yearMonthFormat, shortMonthDayFormat: shortMonthDayFormat, decimalFormat: decimalFormat, twoDigitZeroPaddedFormat: twoDigitZeroPaddedFormat);
|
||||
}
|
||||
assert(false, 'getMaterialTranslation() called for unsupported locale "$locale"');
|
||||
return null;
|
||||
|
82
packages/flutter_localizations/lib/src/l10n/material_nb.arb
Normal file
82
packages/flutter_localizations/lib/src/l10n/material_nb.arb
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"scriptCategory": "English-like",
|
||||
"timeOfDayFormat": "HH:mm",
|
||||
"openAppDrawerTooltip": "Åpne navigasjonsmenyen",
|
||||
"backButtonTooltip": "Tilbake",
|
||||
"closeButtonTooltip": "Lukk",
|
||||
"deleteButtonTooltip": "Slett",
|
||||
"moreButtonTooltip": "Mer",
|
||||
"nextMonthTooltip": "Neste måned",
|
||||
"previousMonthTooltip": "Forrige måned",
|
||||
"nextPageTooltip": "Neste side",
|
||||
"previousPageTooltip": "Forrige side",
|
||||
"showMenuTooltip": "Vis meny",
|
||||
"aboutListTileTitle": "Om $applicationName",
|
||||
"licensesPageTitle": "Lisenser",
|
||||
"licensesPackageDetailTextOne": "1 lisens",
|
||||
"licensesPackageDetailTextOther": "$licenseCount lisenser",
|
||||
"pageRowsInfoTitle": "$firstRow–$lastRow av $rowCount",
|
||||
"pageRowsInfoTitleApproximate": "$firstRow–$lastRow av omtrent $rowCount",
|
||||
"rowsPerPageTitle": "Rader per side:",
|
||||
"tabLabel": "Fane $tabIndex av $tabCount",
|
||||
"selectedRowCountTitleOne": "1 element er valgt",
|
||||
"selectedRowCountTitleOther": "$selectedRowCount elementer er valgt",
|
||||
"cancelButtonLabel": "AVBRYT",
|
||||
"closeButtonLabel": "LUKK",
|
||||
"continueButtonLabel": "FORTSETT",
|
||||
"copyButtonLabel": "Kopiér",
|
||||
"cutButtonLabel": "Klipp ut",
|
||||
"okButtonLabel": "OK",
|
||||
"pasteButtonLabel": "Lim inn",
|
||||
"selectAllButtonLabel": "Velg alle",
|
||||
"viewLicensesButtonLabel": "SE LISENSER",
|
||||
"anteMeridiemAbbreviation": "AM",
|
||||
"postMeridiemAbbreviation": "PM",
|
||||
"timePickerHourModeAnnouncement": "Angi timer",
|
||||
"timePickerMinuteModeAnnouncement": "Angi minutter",
|
||||
"modalBarrierDismissLabel": "Avvis",
|
||||
"dateSeparator": "/",
|
||||
"dateHelpText": "mm/dd/åååå",
|
||||
"selectYearSemanticsLabel": "Velg året",
|
||||
"unspecifiedDate": "Dato",
|
||||
"unspecifiedDateRange": "Datoperiode",
|
||||
"dateInputLabel": "Skriv inn datoen",
|
||||
"dateRangeStartLabel": "Startdato",
|
||||
"dateRangeEndLabel": "Sluttdato",
|
||||
"dateRangeStartDateSemanticLabel": "Startdato $fullDate",
|
||||
"dateRangeEndDateSemanticLabel": "Sluttdato $fullDate",
|
||||
"invalidDateFormatLabel": "Ugyldig format.",
|
||||
"invalidDateRangeLabel": "Ugyldig periode.",
|
||||
"dateOutOfRangeLabel": "Utenfor perioden.",
|
||||
"saveButtonLabel": "LAGRE",
|
||||
"datePickerHelpText": "VELG DATOEN",
|
||||
"dateRangePickerHelpText": "VELG PERIODEN",
|
||||
"calendarModeButtonLabel": "Bytt til kalender",
|
||||
"inputDateModeButtonLabel": "Bytt til innskriving",
|
||||
"timePickerDialHelpText": "VELG KLOKKESLETT",
|
||||
"timePickerInputHelpText": "ANGI ET KLOKKESLETT",
|
||||
"timePickerHourLabel": "Time",
|
||||
"timePickerMinuteLabel": "Minutt",
|
||||
"invalidTimeLabel": "Angi et gyldig klokkeslett",
|
||||
"dialModeButtonLabel": "Bytt til modus for valg fra urskive",
|
||||
"inputTimeModeButtonLabel": "Bytt til tekstinndatamodus",
|
||||
"signedInLabel": "Pålogget",
|
||||
"hideAccountsLabel": "Skjul kontoer",
|
||||
"showAccountsLabel": "Vis kontoer",
|
||||
"drawerLabel": "Navigasjonsmeny",
|
||||
"popupMenuLabel": "Forgrunnsmeny",
|
||||
"dialogLabel": "Dialogboks",
|
||||
"alertDialogLabel": "Varsel",
|
||||
"searchFieldLabel": "Søk",
|
||||
"reorderItemToStart": "Flytt til starten",
|
||||
"reorderItemToEnd": "Flytt til slutten",
|
||||
"reorderItemUp": "Flytt opp",
|
||||
"reorderItemDown": "Flytt ned",
|
||||
"reorderItemLeft": "Flytt til venstre",
|
||||
"reorderItemRight": "Flytt til høyre",
|
||||
"expandedIconTapHint": "Skjul",
|
||||
"collapsedIconTapHint": "Vis",
|
||||
"remainingTextFieldCharacterCountOne": "1 tegn gjenstår",
|
||||
"remainingTextFieldCharacterCountOther": "$remainingCount tegn gjenstår",
|
||||
"refreshIndicatorSemanticLabel": "Laster inn på nytt"
|
||||
}
|
@ -13,6 +13,8 @@
|
||||
"showMenuTooltip": "Vis meny",
|
||||
"aboutListTileTitle": "Om $applicationName",
|
||||
"licensesPageTitle": "Lisenser",
|
||||
"licensesPackageDetailTextOne": "1 lisens",
|
||||
"licensesPackageDetailTextOther": "$licenseCount lisenser",
|
||||
"pageRowsInfoTitle": "$firstRow–$lastRow av $rowCount",
|
||||
"pageRowsInfoTitleApproximate": "$firstRow–$lastRow av omtrent $rowCount",
|
||||
"rowsPerPageTitle": "Rader per side:",
|
||||
@ -33,26 +35,6 @@
|
||||
"timePickerHourModeAnnouncement": "Angi timer",
|
||||
"timePickerMinuteModeAnnouncement": "Angi minutter",
|
||||
"modalBarrierDismissLabel": "Avvis",
|
||||
"signedInLabel": "Pålogget",
|
||||
"hideAccountsLabel": "Skjul kontoer",
|
||||
"showAccountsLabel": "Vis kontoer",
|
||||
"drawerLabel": "Navigasjonsmeny",
|
||||
"popupMenuLabel": "Forgrunnsmeny",
|
||||
"dialogLabel": "Dialogboks",
|
||||
"alertDialogLabel": "Varsel",
|
||||
"searchFieldLabel": "Søk",
|
||||
"reorderItemToStart": "Flytt til starten",
|
||||
"reorderItemToEnd": "Flytt til slutten",
|
||||
"reorderItemUp": "Flytt opp",
|
||||
"reorderItemDown": "Flytt ned",
|
||||
"reorderItemLeft": "Flytt til venstre",
|
||||
"reorderItemRight": "Flytt til høyre",
|
||||
"expandedIconTapHint": "Skjul",
|
||||
"collapsedIconTapHint": "Vis",
|
||||
"remainingTextFieldCharacterCountZero": "TBD",
|
||||
"remainingTextFieldCharacterCountOne": "1 tegn gjenstår",
|
||||
"remainingTextFieldCharacterCountOther": "$remainingCount tegn gjenstår",
|
||||
"refreshIndicatorSemanticLabel": "Laster inn på nytt",
|
||||
"dateSeparator": "/",
|
||||
"dateHelpText": "mm/dd/åååå",
|
||||
"selectYearSemanticsLabel": "Velg året",
|
||||
@ -78,7 +60,23 @@
|
||||
"invalidTimeLabel": "Angi et gyldig klokkeslett",
|
||||
"dialModeButtonLabel": "Bytt til modus for valg fra urskive",
|
||||
"inputTimeModeButtonLabel": "Bytt til tekstinndatamodus",
|
||||
"licensesPackageDetailTextZero": "No licenses",
|
||||
"licensesPackageDetailTextOne": "1 lisens",
|
||||
"licensesPackageDetailTextOther": "$licenseCount lisenser"
|
||||
"signedInLabel": "Pålogget",
|
||||
"hideAccountsLabel": "Skjul kontoer",
|
||||
"showAccountsLabel": "Vis kontoer",
|
||||
"drawerLabel": "Navigasjonsmeny",
|
||||
"popupMenuLabel": "Forgrunnsmeny",
|
||||
"dialogLabel": "Dialogboks",
|
||||
"alertDialogLabel": "Varsel",
|
||||
"searchFieldLabel": "Søk",
|
||||
"reorderItemToStart": "Flytt til starten",
|
||||
"reorderItemToEnd": "Flytt til slutten",
|
||||
"reorderItemUp": "Flytt opp",
|
||||
"reorderItemDown": "Flytt ned",
|
||||
"reorderItemLeft": "Flytt til venstre",
|
||||
"reorderItemRight": "Flytt til høyre",
|
||||
"expandedIconTapHint": "Skjul",
|
||||
"collapsedIconTapHint": "Vis",
|
||||
"remainingTextFieldCharacterCountOne": "1 tegn gjenstår",
|
||||
"remainingTextFieldCharacterCountOther": "$remainingCount tegn gjenstår",
|
||||
"refreshIndicatorSemanticLabel": "Laster inn på nytt"
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
@ -29,19 +28,6 @@ void main() {
|
||||
}, throwsAssertionError);
|
||||
});
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/53036.
|
||||
test('`nb` uses `no` as a synonym when `nb` arb file is not present', () async {
|
||||
final File nbMaterialArbFile = File('lib/src/l10n/material_nb.arb');
|
||||
final File noMaterialArbFile = File('lib/src/l10n/material_no.arb');
|
||||
|
||||
// No need to run test if `nb` arb file exists or if `no` arb file does not exist.
|
||||
if (noMaterialArbFile.existsSync() && !nbMaterialArbFile.existsSync()) {
|
||||
final GlobalMaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate
|
||||
.load(const Locale('nb')) as GlobalMaterialLocalizations;
|
||||
expect(localizations.formatMediumDate(DateTime(2020, 4, 3)), 'fre. 3. apr.');
|
||||
}
|
||||
});
|
||||
|
||||
group('formatHour', () {
|
||||
Future<String> formatHour(WidgetTester tester, Locale locale, TimeOfDay timeOfDay) async {
|
||||
final Completer<String> completer = Completer<String>();
|
||||
|
@ -472,38 +472,6 @@ void main() {
|
||||
expect(localizations.okButtonLabel, '確定');
|
||||
});
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/53036.
|
||||
testWidgets('`nb` uses `no` as its synonym when `nb` arb file is not present', (WidgetTester tester) async {
|
||||
final File nbMaterialArbFile = File(
|
||||
path.join(rootDirectoryPath, 'lib', 'src', 'l10n', 'material_nb.arb'),
|
||||
);
|
||||
final File noMaterialArbFile = File(
|
||||
path.join(rootDirectoryPath, 'lib', 'src', 'l10n', 'material_no.arb'),
|
||||
);
|
||||
|
||||
// No need to run test if `nb` arb file exists or if `no` arb file does not exist.
|
||||
if (noMaterialArbFile.existsSync() && !nbMaterialArbFile.existsSync()) {
|
||||
Locale locale = const Locale.fromSubtags(languageCode: 'no', scriptCode: null, countryCode: null);
|
||||
expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
|
||||
MaterialLocalizations localizations = await GlobalMaterialLocalizations.delegate.load(locale);
|
||||
expect(localizations, isA<MaterialLocalizationNo>());
|
||||
|
||||
final String alertDialogLabelNo = localizations.alertDialogLabel;
|
||||
final String anteMeridiemAbbreviationNo = localizations.anteMeridiemAbbreviation;
|
||||
final String closeButtonLabelNo = localizations.closeButtonLabel;
|
||||
final String okButtonLabelNo = localizations.okButtonLabel;
|
||||
|
||||
locale = const Locale.fromSubtags(languageCode: 'nb', scriptCode: null, countryCode: null);
|
||||
expect(GlobalMaterialLocalizations.delegate.isSupported(locale), isTrue);
|
||||
localizations = await GlobalMaterialLocalizations.delegate.load(locale);
|
||||
expect(localizations, isA<MaterialLocalizationNb>());
|
||||
expect(localizations.alertDialogLabel, alertDialogLabelNo);
|
||||
expect(localizations.anteMeridiemAbbreviation, anteMeridiemAbbreviationNo);
|
||||
expect(localizations.closeButtonLabel, closeButtonLabelNo);
|
||||
expect(localizations.okButtonLabel, okButtonLabelNo);
|
||||
}
|
||||
});
|
||||
|
||||
// Regression test for https://github.com/flutter/flutter/issues/36704.
|
||||
testWidgets('kn arb file should be properly Unicode escaped', (WidgetTester tester) async {
|
||||
final File file = File(
|
||||
|
Loading…
x
Reference in New Issue
Block a user