-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
My ARB file (fragment):
"remove_all_done_dialog_body": "Are you sure you want to remove {count, plural, =1 {1 item} other {all {count} items}}? This operation cannot be undone.",
"@remove_all_done_dialog_body": {
"placeholders": {
"count": {
"type": "int",
"format": "compactLong"
}
}
}And this is the output (fragment of app_localizations_en.dart):
@override
String remove_all_done_dialog_body(int count) {
final intl.NumberFormat countNumberFormat = intl.NumberFormat.compactLong(
locale: localeName,
);
final String countString = countNumberFormat.format(count);
return intl.Intl.pluralLogic(
count,
locale: localeName,
one: '1 item',
other: 'all ${count} items',
);
}What should be outputted (more or less):
@override
String remove_all_done_dialog_body(int count) {
final intl.NumberFormat countNumberFormat = intl.NumberFormat.compactLong(
locale: localeName,
);
final String countString = countNumberFormat.format(count);
final String pluralString = intl.Intl.pluralLogic(
count,
locale: localeName,
one: '1 item',
other: 'all ${countString} items',
);
return 'Are you sure you want to remove ${pluralString}? This operation cannot be undone.';
}gen_l10n tool completely ignores the text outside of the {count, plural...}.
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (9 days ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
orestesgaolin, Albert221, Delgan, albertms10, ened and 1 more
Metadata
Metadata
Assignees
Labels
a: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.