Skip to content

Conversation

@swift-kim
Copy link
Member

Potentially fixes flutter-tizen/flutter-tizen#184. More testing is required.

@swift-kim swift-kim force-pushed the system-utils-common branch from e9e4bf6 to 2be4a1a Compare August 4, 2021 07:59
@swift-kim swift-kim changed the title Use common system_utils Pass only a preferred language to the engine Aug 4, 2021
@swift-kim swift-kim marked this pull request as ready for review August 4, 2021 08:00
@swift-kim
Copy link
Member Author

The previous change (e9e4bf6) was still okay for usual cases, but I wanted the implementation to be robust enough to handle special cases like zh_Hans_CN and decided to use i18n_ulocale again.

Please refer to https://flutter.dev/docs/development/accessibility-and-localization/internationalization for a simple reproduction case.

@bwikbs
Copy link
Member

bwikbs commented Aug 4, 2021

I'm little confused.. the previous change (e9e4bf6) has only filename change. (What am I missing?) and i18n_ulocale stuff was used at that time too? 👀

@swift-kim
Copy link
Member Author

@bwikbs Basically the both implementations (system_utils_tizen.cc and system_utils_linux.cc) work in the same way - they obtain the system's preferred language using the LANG environment variable. Thus it is technically possible to use system_utils_linux.cc for both Linux and Tizen.

i18n_ulocale is only used for extracting values such as language, territory, and script from a locale.

@bwikbs
Copy link
Member

bwikbs commented Aug 5, 2021

@swift-kim Now I understand! Thanks! ❤️

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swift-kim swift-kim merged commit 7ffeb87 into flutter-tizen:flutter-2.2.1-tizen Aug 5, 2021
swift-kim added a commit that referenced this pull request Sep 27, 2021
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Nov 14, 2021
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Dec 9, 2021
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Dec 17, 2021
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Feb 7, 2022
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Feb 11, 2022
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request May 12, 2022
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Aug 5, 2022
* Pass only a preferred language to the engine

* Log the current language
swift-kim added a commit that referenced this pull request Sep 1, 2022
* Pass only a preferred language to the engine

* Log the current language
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Locale priority issue

3 participants