Skip to content

Desktop application is using a random locale. #45152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rami-a opened this issue Nov 19, 2019 · 10 comments
Closed

Desktop application is using a random locale. #45152

rami-a opened this issue Nov 19, 2019 · 10 comments
Assignees
Labels
a: desktop Running on desktop a: internationalization Supporting other languages or locales. (aka i18n) customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. customer: web10 engine flutter/engine repository. See also e: labels. P1 High-priority issues at the top of the work list platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically

Comments

@rami-a
Copy link
Contributor

rami-a commented Nov 19, 2019

Steps to Reproduce

  • Application is utilizing i18n with support for a variety of locales
  • Build and launch application for macOS
  • Observe incorrect locale is being used.
    • It was immediately obvious from the tooltip for a back button

Target Platform: macOS
Target OS version/browser: 10.14.6
Devices: Macbook Pro

Logs

[✓] Flutter (Channel master, v1.11.1-pre.49, on Mac OS X 10.14.6 18G87, locale en-US)
    • Flutter version 1.11.1-pre.49 at /Users/*/Development/flutter
    • Framework revision c90d64b619 (5 days ago), 2019-11-14 01:16:17 -0500
    • Engine revision 7c2a4ec97f
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/*/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-stable, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.7.5

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

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] Connected device (4 available)
    • iPhone 11 Pro • E2273D43-1E56-4FB7-9C72-873055388DE9 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-1 (simulator)
    • macOS         • macOS                                • darwin-x64     • Mac OS X 10.14.6 18G87
    • Chrome        • chrome                               • web-javascript • Google Chrome 78.0.3904.108
    • Web Server    • web-server                           • web-javascript • Flutter Tools
@rami-a rami-a added the a: desktop Running on desktop label Nov 19, 2019
@rami-a
Copy link
Contributor Author

rami-a commented Nov 19, 2019

cc @stuartmorgan

@stuartmorgan-g stuartmorgan-g added engine flutter/engine repository. See also e: labels. platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically platform-linux Building on or for Linux specifically labels Nov 19, 2019
@stuartmorgan-g
Copy link
Contributor

We're not calling the (new?) API to set the locale in any of the desktop embeddings currently.

@HansMuller HansMuller added the a: internationalization Supporting other languages or locales. (aka i18n) label Nov 20, 2019
@rami-a
Copy link
Contributor Author

rami-a commented Nov 26, 2019

Appears to not be a "random" locale, but instead the first one listed in our supportedLocales list

@aliyazdi75
Copy link

aliyazdi75 commented Mar 12, 2020

Same issue #52403 on linux but it returns null.

@stuartmorgan-g
Copy link
Contributor

stuartmorgan-g commented Mar 12, 2020

This is already marked as an issue for all three desktop platforms. None are passing locale information, as I said above.

@aliyazdi75
Copy link

aliyazdi75 commented Mar 12, 2020

Sorry, I've just wanted to mention issue here for any further information.

@mariamhas mariamhas added customer: web10 customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. labels May 5, 2020
@HidenoriMatsubayashi
Copy link
Member

Has there been any progress?

I don't know if there is ways that can detect the dynamic locale setting change in each desktops (Linux/Windows/macOS), but I think that it is relatively easy to set the locale once when launch the app.

If there is no problem with the implementation that sets default locale setting at starting an app, I could support this issue.

@stuartmorgan-g stuartmorgan-g added the P1 High-priority issues at the top of the work list label Jun 9, 2020
@stuartmorgan-g
Copy link
Contributor

If there is no problem with the implementation that sets default locale setting at starting an app, I could support this issue.

Starting with just setting it on launch is fine. For systems where we get notifications about changes, we can add that later; it would leverage the code written for setting it at launch.

@stuartmorgan-g stuartmorgan-g self-assigned this Aug 12, 2020
@stuartmorgan-g stuartmorgan-g added this to the 1.22 - August 2020 milestone Aug 12, 2020
stuartmorgan-g added a commit to stuartmorgan-g/engine that referenced this issue Aug 12, 2020
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up.

Windows portion of flutter/flutter#45152
stuartmorgan-g added a commit to stuartmorgan-g/engine that referenced this issue Aug 12, 2020
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up, as well as after any OS locale change.

macOS portion of flutter/flutter#45152
stuartmorgan-g added a commit to flutter/engine that referenced this issue Aug 13, 2020
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up, as well as after any OS locale change.

macOS portion of flutter/flutter#45152
stuartmorgan-g added a commit to flutter/engine that referenced this issue Aug 17, 2020
Queries the system list of user-preferred languages, and sends it to the
engine just after starting it up.

Windows portion of flutter/flutter#45152
@stuartmorgan-g
Copy link
Contributor

All three desktop embeddings are sending initial locale information now.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: desktop Running on desktop a: internationalization Supporting other languages or locales. (aka i18n) customer: gallery Relating to flutter/gallery repository. Please transfer non-framework issues there. customer: web10 engine flutter/engine repository. See also e: labels. P1 High-priority issues at the top of the work list platform-linux Building on or for Linux specifically platform-mac Building on or for macOS specifically platform-windows Building on or for Windows specifically
Projects
None yet
Development

No branches or pull requests

6 participants