-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)found in release: 3.24Found to occur in 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
Steps to reproduce
Similar to #116716, but without isCustomDateFormat.
app_en.arb
{
"@@locale": "en",
"large": "N:{number}",
"@large": {
"placeholders": {
"number": {
"type": "int",
"format": "compact"
}
}
},
"spring": "S:{springStartDate}",
"@spring": {
"placeholders": {
"springStartDate": {
"type": "DateTime",
"format": "MMMd"
}
}
}
}app_ja.arb
{
"@@locale": "ja",
"large": "数:{number}",
"@large": {
"placeholders": {
"number": {
"type": "int",
"format": "compactLong"
}
}
},
"spring": "春:{springStartDate}",
"@spring": {
"placeholders": {
"springStartDate": {
"type": "DateTime",
"format": "MMMMd"
}
}
}
}Expected results
app_localizations_ja.dart
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for Japanese (`ja`).
class AppLocalizationsJa extends AppLocalizations {
AppLocalizationsJa([String locale = 'ja']) : super(locale);
@override
String large(int number) {
final intl.NumberFormat numberNumberFormat = intl.NumberFormat.compactLong(
locale: localeName,
);
final String numberString = numberNumberFormat.format(number);
return '数:$numberString';
}
@override
String spring(DateTime springStartDate) {
final intl.DateFormat springStartDateDateFormat = intl.DateFormat.MMMMd(localeName);
final String springStartDateString = springStartDateDateFormat.format(springStartDate);
return '春:$springStartDateString';
}
}Actual results
app_localizations_ja.dart
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for Japanese (`ja`).
class AppLocalizationsJa extends AppLocalizations {
AppLocalizationsJa([String locale = 'ja']) : super(locale);
@override
String large(int number) {
final intl.NumberFormat numberNumberFormat = intl.NumberFormat.compact(
locale: localeName,
);
final String numberString = numberNumberFormat.format(number);
return '数:$numberString';
}
@override
String spring(DateTime springStartDate) {
final intl.DateFormat springStartDateDateFormat = intl.DateFormat.MMMd(localeName);
final String springStartDateString = springStartDateDateFormat.format(springStartDate);
return '春:$springStartDateString';
}
}Code sample
Code sample
app_en.arb
{
"@@locale": "en",
"large": "N:{number}",
"@large": {
"placeholders": {
"number": {
"type": "int",
"format": "compact"
}
}
},
"spring": "S:{springStartDate}",
"@spring": {
"placeholders": {
"springStartDate": {
"type": "DateTime",
"format": "MMMd"
}
}
}
}app_ja.arb
{
"@@locale": "ja",
"large": "数:{number}",
"@large": {
"placeholders": {
"number": {
"type": "int",
"format": "compactLong"
}
}
},
"spring": "春:{springStartDate}",
"@spring": {
"placeholders": {
"springStartDate": {
"type": "DateTime",
"format": "MMMMd"
}
}
}
}Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale ja-JP)
• Flutter version 3.24.0 on channel stable at /Users/kzrnm/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 80c2e84975 (2 weeks ago), 2024-07-30 23:06:49 +0700
• Engine revision b8800d88be
• Dart version 3.5.0
• DevTools version 2.37.2
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/kzrnm/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.92.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.94.0
[✓] Connected device (3 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.119
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)found in release: 3.24Found to occur in 3.24Found to occur in 3.24frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team