Wires the locale provided by Fuchsia. (#13045)
The FIDL service `fuchsia.intl.PropertyProvider` is a service that the flutter runner can use to obtain information on system preferred locales. This change sends a platform message "setLocale" on the channel "flutter/localization", based on the values provided by the above mentioned FIDL service. Credit: most of this was initially written by @kpozin; I ported it to out-of-tree flutter engine. Tested: 1. Compile and publish the unit tests package as shown in the script below. 2. In a Fuchsia repository (pointed to by `$FUCHSIA_DIR`), run `fx serve` 3. `fx shell run fuchsia-pkg://fuchsia.com/flutter_runner_tests#meta/flutter_runner_tests.cmx` The script used to update the unit tests. ```bash set -x FLUTTER_ENGINE_DIR="${FLUTTER_ENGINE_DIR:-$HOME/fx/flutter/engine/src}" readonly OUT_DIR="${FLUTTER_ENGINE_DIR}/out" ( cd ${FLUTTER_ENGINE_DIR} ./flutter/tools/gn --fuchsia --fuchsia-cpu x64 --unoptimized ninja -j 100 -C "${OUT_DIR}/fuchsia_debug_unopt_x64" cp "${OUT_DIR}/compile_commands.json" "${FLUTTER_ENGINE_DIR}" echo "Publishing the tests package" "${FLUTTER_ENGINE_DIR}/fuchsia/sdk/linux/tools/pm" publish \ -a -r $FUCHSIA_DIR/out/release/amber-files \ -f "${FLUTTER_ENGINE_DIR}/out/fuchsia_debug_unopt_x64/flutter_runner_tests-0.far" ) ```
Showing
想要评论请 注册 或 登录