Skip to content

TimePicker is not correct in RTL languages  #62775

Closed

Description

@omidh28

timerpicker_bug

To reproduce, Set app locale to a right-to-left language (fa for example) then open timepicker.

Besides that "Select Time" which not translated, Why is that the time of day format is in mm:hh format instead of hh:mm?

RTL doesn't mean everything should be written right to left, Those languages still use hh:mm for time format.
Also it wasn't an issue in previous TimePicker widget.

Flutter Doctor
[√] Flutter (Channel beta, 1.20.0-7.3.pre, on Microsoft Windows [Version 10.0.19041.388], locale en-US)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit
https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code, 64-bit edition (version 1.47.3)
[√] Connected device (4 available)

Activity

  1. darshankawar commented on Aug 3, 2020

    @darshankawar
    Member

    Issue replicable on latest dev channel.

    code sample
    import 'package:flutter/material.dart';
    import 'package:flutter_localizations/flutter_localizations.dart';
    
    void main() {
      runApp(App());
    }
    
    class App extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          supportedLocales: [Locale('fa')],
          localizationsDelegates: [
            GlobalMaterialLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
            GlobalCupertinoLocalizations.delegate,
          ],
          home: Scaffold(
            body: Builder(
              builder: (context) => Center(
                child: FlatButton(
                  color: Colors.red.shade200,
                  child: Text('Show time picker'),
                  onPressed: () {
                    showTimePicker(
                      context: context,
                      initialTime: TimeOfDay.fromDateTime(
                        DateTime(2020, 7, 28, 19, 3),
                      ),
                    );
                  },
                ),
              ),
            ),
          ),
        );
      }
    }
    
  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: internationalizationSupporting other languages or locales. (aka i18n)
    p: material_uimaterial_ui package in flutter/packages
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    on Aug 3, 2020
  3. HansMuller commented on Aug 3, 2020

    @HansMuller
    Contributor
  4. rami-a commented on Aug 4, 2020

    @rami-a
    Contributor

    Looks like you are correct, I have created a fix for this in #62803

    The "select time" string will be translated soon.

  5. github-actions commented on Aug 17, 2021

    @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.

  6. locked as resolved and limited conversation to collaborators on Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: internationalizationSupporting other languages or locales. (aka i18n)c: regressionIt was better in the past than it is nowf: date/time pickerDate or time picker widgetsfound in release: 1.21Found to occur in 1.21frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions