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 b8b5f8f9f02ca8327940d80cff6d912085c1e8e9..36d725f79f8c1deeaebaaf23c29239aa4dce3d46 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); };