From c43a776c6b80a6328feb6073f992d90e6dc723e0 Mon Sep 17 00:00:00 2001 From: kuangning <2540487435@qq.com> Date: Thu, 15 May 2025 18:56:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?LocalizationKit=E6=B7=BB=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets | 4 ++-- .../entry/src/main/ets/pages/RawXmlFileToStringParser.ets | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets b/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets index d2fb4652..672d68ed 100644 --- a/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets +++ b/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets @@ -17,7 +17,7 @@ * FAQ:如何将app.media.app_icon,转换为PixelMap */ -// DocsCode 1 +// [Start ConvertAppIconToPixelMap] import { image } from '@kit.ImageKit'; @Entry @@ -60,4 +60,4 @@ struct Index { .padding(16) } } -// DocsCode 1 \ No newline at end of file +// [End ConvertAppIconToPixelMap] \ No newline at end of file diff --git a/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets b/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets index 9402569b..64925f7a 100644 --- a/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets +++ b/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets @@ -17,7 +17,7 @@ * FAQ:如何读取rawfile中的xml文件并转化为String类型 */ -// DocsCode 1 +// [Start RawXmlFileToStringParser] import { BusinessError } from '@kit.BasicServicesKit'; import { util } from '@kit.ArkTS'; @@ -39,4 +39,4 @@ try { let message = (error as BusinessError).message; console.error(`callback getRawFileContent failed, error code: ${code}, message: ${message}.`); } -// DocsCode 1 \ No newline at end of file +// [End RawXmlFileToStringParser] \ No newline at end of file -- Gitee From c87d3c4310a2711d0b16811b34ae0c3b2a653aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=93=83?= <2540487435@qq.com> Date: Sat, 17 May 2025 06:32:54 +0000 Subject: [PATCH 2/2] =?UTF-8?q?LocalizationKit=E4=BF=AE=E6=94=B9=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风铃 <2540487435@qq.com> --- .../entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets | 6 +++--- .../entry/src/main/ets/pages/RawXmlFileToStringParser.ets | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets b/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets index 672d68ed..c001b29c 100644 --- a/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets +++ b/LocalizationKit/entry/src/main/ets/pages/ConvertAppIconToPixelMap.ets @@ -27,7 +27,7 @@ struct Index { convert() { try { - // 媒体文件字节数组 + // Byte array of media files this.getUIContext().getHostContext()!.resourceManager.getMediaContent($r('app.media.startIcon').id, (error, value: ArrayBuffer) => { let opts: image.InitializationOptions = { editable: true, @@ -37,7 +37,7 @@ struct Index { let uint8Array: Uint8Array = new Uint8Array(value); let buffer: ArrayBuffer = uint8Array.buffer.slice(0); - // 创建PixelMap + // Create PixelMap image.createPixelMap(buffer, opts).then((pixelMap) => { // ... this.text = JSON.stringify(pixelMap); @@ -50,7 +50,7 @@ struct Index { build() { Column() { - Button('点击转换') + Button('Click to convert') .onClick(() => { this.convert(); }) diff --git a/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets b/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets index 64925f7a..3b013e4a 100644 --- a/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets +++ b/LocalizationKit/entry/src/main/ets/pages/RawXmlFileToStringParser.ets @@ -21,7 +21,7 @@ import { BusinessError } from '@kit.BasicServicesKit'; import { util } from '@kit.ArkTS'; -// 工具类中:在EntryAbility中获取Context后保存至AppStorage,然后在工具类中使用AppStorage获取 +// In the utility class, retrieve the Context from the Entry Ability and save it to AppStore, then use AppStore to retrieve it in the utility class let context = AppStorage.get("context") as UIContext; try { -- Gitee