Skip to content

Need Cupertino Translations #13452

Description

@goderbauer

Currently, we only have infrastructure to provide internationalized strings for things in the Material layer. We need to extend that infrastructure to also allow internationalized strings in the Cupertino layer.

This will be required to fix #13451 as one of the ModalRoutes lives in the Cupertino layer and will have to be translated there.

/cc @HansMuller

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Jul 22, 2018
  2. added this to the milestone on Nov 27, 2018
  3. self-assigned this
    on Nov 28, 2018
  4. modified the milestones: , December 2019 on Nov 28, 2018
  5. szotp commented on Nov 28, 2018

    @szotp

    Uh... is milestone name correct, 2019?

  6. xster commented on Nov 28, 2018

    @xster
    Member

    Oops, wrong date

  7. chunlea commented on Dec 10, 2018

    @chunlea

    Before this issue fixed, we can follow #22624 (comment) use

    ThemeData(platform: TargetPlatform.android)

    to fix this.

    It will force flutter to use the Android style text copy menu on iOS.

    Looks like this in Chinese:

    screenshot 2018-12-10 at 7 37 18 pm

  8. xster commented on Dec 11, 2018

    @xster
    Member

    This is being worked on at this moment. If you found this bug via a cut/copy/paste crash bug, you can currently resolve this in your app by adding more localizationsDelegates to your Material or CupertinoApp for your supported locals.

    In those delegates, point each required locale to a CupertinoLocalizations subclass that provides the needed strings.

  9. 41 remaining items

  10. aBuder commented on Jun 17, 2019

    @aBuder

    Is there an workaround possible

  11. hpoul commented on Jun 17, 2019

    @hpoul
    Contributor

    @aBuder might sound stupid, but did you add GlobalCupertinoLocalizations.delegate to the localizationsDelegates? This solved the problems for me on dev channel. (It took me quite some time to figure that out, since it's missing from the https://flutter.dev/docs/development/accessibility-and-localization/internationalization example

  12. added a commit that references this issue on Jul 4, 2019
  13. andersonmendesdev commented on Jul 31, 2019

    @andersonmendesdev

    My CupertinoTimerPicker still gets error when using locale ('pt') and Cupertino delegate. If someone needs the complete mistake just say that post everything.

    The following assertion was thrown building CupertinoTimerPicker(dirty, dependencies:
    flutter: [_LocalizationsScope-[GlobalKey#e9e55], Directionality], state: _CupertinoTimerPickerState#b4279):
    flutter: A non-null String must be provided to a Text widget.
    flutter: 'package:flutter/src/widgets/text.dart': Failed assertion: line 241 pos 10: 'data != null'

  14. lgfranco commented on Jul 31, 2019

    @lgfranco

    You probably forgot to add the delegates:

        CupertinoApp(
          localizationsDelegates: [
            GlobalCupertinoLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
            GlobalMaterialLocalizations.delegate
          ],
          //...
        );
    

    OR

        MaterialApp(
          localizationsDelegates: [
            GlobalCupertinoLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
            GlobalMaterialLocalizations.delegate
          ],
          //...
        );
    
  15. andersonmendesdev commented on Jul 31, 2019

    @andersonmendesdev

    Unfortunately I have it added.

  16. uiboy commented on Aug 2, 2019

    @uiboy

    Its weird, my localization issue was solved since I have the GlobalCupertinoLocalizations.delegate, added, but in a TextFormField the copy and paste buttons do not show up on ios until there is at least one letter typed. The enableInteractiveSelection is also set to the default true. 🤔

    This worked before we did localization.

  17. added
    a: annoyanceRepeatedly frustrating issues with non-experimental functionality
    on Sep 11, 2019
  18. riamehdi commented on Sep 17, 2020

    @riamehdi

    https://www.kikt.top/posts/flutter/framework/cupertino-paste-tooltip/

    I fixed mine by following this

    For me work fine, i make same code lake explain in link, juste ajuste for French context

  19. reasje commented on Apr 28, 2021

    @reasje

    Wrap the widget with MetrialApp widget to use the default localization .
    This way the time picker will have English localization .
    But the problem is not solved waiting for the solution ...

  20. github-actions commented on Aug 2, 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.

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

Metadata

Metadata

Assignees

Labels

a: annoyanceRepeatedly frustrating issues with non-experimental functionalitya: internationalizationSupporting other languages or locales. (aka i18n)c: new featureNothing broken; request for a new capabilitycustomer: productframeworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packages

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions