Skip to content

TimePicker not Localized #63165

@JCKodel

Description

@JCKodel

Steps to Reproduce

  1. Use the new showTimePicker in Flutter 1.20 while the app is localized to brazilian portuguese (using the oficial documentation, localization delegates, etc.)
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: const [Locale("pt", "BR"), Locale("pt")],
      locale: const Locale("pt", "BR"),

Expected results:

Input mode:

image

  1. Hour and Minute are not translatable (there are no options in showTimePicker).
  2. CANCEL is capitalized (the new Material guideline recommends it to be lowercase, right?)
  3. If Ok and CANCEL are translated, why title is not? (not important, since title, ok and cancel can be manually translated)
  4. Error messages are also not translatable

image

  1. The current value should be selected when field get focus (so user just type the new value instead of having to delete it before edit)
  2. Use maxlength to allow only 2 characters
  3. It would be nice if we couldn't type 25 in hours, 61 in minutes, etc.
  4. It would be nice if there was a ⬆ and ⬇ buttons beneath each textbox (so user can use it to increment/decrement the value instead of typing it). Or, better yet: let us provide builders for each part of those dialogs.

Dial mode:

image

  1. I had users complaining about the old time picker because "it was not possible to pick times other than 00 - 12". My user didn't get that it was possible to pick times from 12 to 24h because Android time picker is not user friendly (at least to some users). The fact that the new time picker hides odd hours will lead to the same kind of issue in those... less intelectual gifted users. Please, consider putting all numbers in the clock (even if it is smaller than the others). It would be a plus if we could have builders for those numbers (so we can choose fonts, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: internationalizationSupporting other languages or locales. (aka i18n)f: date/time pickerDate or time picker widgetsf: material designflutter/packages/flutter/material repository.found 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 onr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions