Skip to content

Incorrect l10n for CupertinoDatePicker in monthYear mode #130930

@AndreySuworow

Description

@AndreySuworow

Is there an existing issue for this?

Steps to reproduce

  1. Add CupertinoDatePicker with mode: CupertinoDatePickerMode.monthYear
  2. Add GlobalCupertinoLocalizations.delegate to CupertinoApp
  3. Add locale corresponding to any language with cases (e.g. Locale('ru') for Russian)

Expected results

The name of the month in CupertinoDatePicker should be in base form, for example: Январь, Февраль ...

Actual results

The name of the month is in the case, in which the day must be presented before the name of the month: января, февраля...

Code sample

Code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return CupertinoApp(
      title: 'Flutter Demo',
      home: CupertinoPageScaffold(
        child: Center(
            child: CupertinoDatePicker(
          onDateTimeChanged: (_) {},
          mode: CupertinoDatePickerMode.monthYear,
        )),
      ),
      supportedLocales: const [Locale('ru')],
      localizationsDelegates: const [GlobalCupertinoLocalizations.delegate],
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration Снимок экрана 2023-07-19 в 22 10 18

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.13.0-7.0.pre.12, on macOS 13.4 22F66 darwin-arm64, locale ru-RU)
    • Flutter version 3.13.0-7.0.pre.12 on channel master at /Users/andrey/dev/tools/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 8d3a5cf1a5 (40 minutes ago), 2023-07-19 14:38:56 -0400
    • Engine revision 2fab8ab5ff
    • Dart version 3.1.0 (build 3.1.0-326.0.dev)
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/andrey/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Users/andrey/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/andrey/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/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.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.3)
    • IntelliJ at /Users/andrey/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9161.38/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 14 Pro Max (mobile) • FA8B4298-C114-40B3-8392-E949E954BB10 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 115.0.5790.98

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)f: cupertinoflutter/packages/flutter/cupertino repositoryf: date/time pickerDate or time picker widgetsfound in release: 3.13Found to occur in 3.13frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions