From e4057bd6b77320bd054856cf33c2e66f2073eb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BA=A6=E7=A9=97?= Date: Mon, 11 Nov 2024 19:38:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DlocalizationChannel=E7=9A=84s?= =?UTF-8?q?endLocales=E6=96=B9=E6=B3=95=E7=9A=84=E6=96=AD=E8=A8=80?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=BA'zh-Hans-CN'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 麦穗 --- .../ets/test/plugin/localization/LocalizationPlugin.test.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets index b8b5f8f9f0..36d725f79f 100644 --- a/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets +++ b/shell/platform/ohos/flutter_embedding/application/src/ohosTest/ets/test/plugin/localization/LocalizationPlugin.test.ets @@ -37,7 +37,7 @@ export default function LocalizationPluginTest() { }); it('test_localeFromString', 0, () => { let localeString = "zh_CN"; - let expectedLocale = new intl.Locale("zh_CN"); + let expectedLocale = new intl.Locale("zh-Hans-CN"); let actualLocale = localizationPlugin.localeFromString(localeString); expect(actualLocale.language).assertEqual(expectedLocale.language); @@ -45,7 +45,7 @@ export default function LocalizationPluginTest() { expect(actualLocale.script).assertEqual(expectedLocale.script); }) it('testSendLocaleToFlutter', 0, () => { - let mockSystemLocale = 'zh-Hans-AL'; + let mockSystemLocale = 'zh-Hans-CN'; (localizationChannel as Any).sendLocales = (locales:Any) => { expect(locales).assertContain(mockSystemLocale); }; -- Gitee