Skip to content

Incorrect l10n for CupertinoDatePicker in monthYear mode #130930

Closed

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!

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Jul 20, 2023
  2. huycozy commented on Jul 20, 2023

    @huycozy
    Member

    Thanks for the report, @AndreySuworow
    I'm seeing this issue when comparing the rendered month between Reminder iOS native app and Flutter app.

    Demo
    iOS native Flutter
    flutter doctor -v (master)
    ```bash
    [!] Flutter (Channel master, 3.13.0-7.0.pre.27, on macOS 13.4.1 22F770820d darwin-x64, locale en-VN)
        • Flutter version 3.13.0-7.0.pre.27 on channel master at /Users/huynq/Documents/GitHub/flutter_master
        ! Warning: `flutter` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/huynq/Documents/GitHub/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/huynq/Documents/GitHub/flutter_master. Consider adding /Users/huynq/Documents/GitHub/flutter_master/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 123413b052 (39 minutes ago), 2023-07-19 22:37:23 -0400
        • Engine revision 56e88e8b0e
        • Dart version 3.1.0 (build 3.1.0-328.0.dev)
        • DevTools version 2.25.0
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
        • Android SDK at /Users/huynq/Library/Android/sdk
        • Platform android-33, build-tools 32.0.0
        • ANDROID_HOME = /Users/huynq/Library/Android/sdk
        • Java binary at: /Applications/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 /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.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.80.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.68.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 13.4.1 22F770820d darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.198
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
  3. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: internationalizationSupporting other languages or locales. (aka i18n)
    p: cupertino_uicupertino_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    on Jul 20, 2023
  4. added
    P2Important issues not at the top of the work list
    triaged-designTriaged by Design Languages team
    on Jul 27, 2023
  5. HansMuller commented on Jul 27, 2023

    @HansMuller
    Contributor

    @MitchellGoodwin - please work with @thkim1011 to get a TC request for an updated translation.

  6. MitchellGoodwin commented on Jul 28, 2023

    @MitchellGoodwin
    Contributor

    @HansMuller #130934 was opened and it fixes this issue by using existing localizations that we already have, so I do not think a TC request would be necessary.

  7. MitchellGoodwin commented on Aug 18, 2023

    @MitchellGoodwin
    Contributor

    Closed as fixed with #130934

  8. github-actions commented on Sep 1, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)f: 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 onp: cupertino_uicupertino_ui package in flutter/packagesteam-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