From 574730975be8acee592945cf6a04d3114331595b Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 06:30:19 +0000 Subject: [PATCH 01/14] =?UTF-8?q?update=20ArkUI/entry/src/main/ets/pages/E?= =?UTF-8?q?nterProhibitedPromptPlanOne.ets.=20=E4=B8=AD=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../entry/src/main/ets/pages/EnterProhibitedPromptPlanOne.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArkUI/entry/src/main/ets/pages/EnterProhibitedPromptPlanOne.ets b/ArkUI/entry/src/main/ets/pages/EnterProhibitedPromptPlanOne.ets index a2e26d3..8974e81 100644 --- a/ArkUI/entry/src/main/ets/pages/EnterProhibitedPromptPlanOne.ets +++ b/ArkUI/entry/src/main/ets/pages/EnterProhibitedPromptPlanOne.ets @@ -24,7 +24,7 @@ struct TextAreaExample { @State text: string = 'TextArea editMenuOptions'; onCreateMenu(menuItems: Array) { - menuItems = menuItems.filter((item) => item.content !== '拍照输入'); // 也可以选择禁止全选等其他菜单选项 + menuItems = menuItems.filter((item) => item.content !== '拍照输入'); // Can also choose to disable other menu options such as "Aelect All". return menuItems; } @@ -36,7 +36,7 @@ struct TextAreaExample { .editMenuOptions({ onCreateMenu: this.onCreateMenu, onMenuItemClick: (menuItem: TextMenuItem, textRange: TextRange) => { - return false; // 返回为false,先执行自定义逻辑,再执行系统逻辑 + return false; // Return false, execute custom logic first, then execute system logic } }) .margin({ top: 100 }) -- Gitee From f808e7420a28b94fc42a1a349aa64d5634b1f70c Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 06:51:10 +0000 Subject: [PATCH 02/14] =?UTF-8?q?update=20ArkUI/entry/src/main/ets/pages/C?= =?UTF-8?q?omponentAttributeCompatibilityJudgment.ets.=20=E4=B8=AD?= =?UTF-8?q?=E6=96=87=E9=87=8A=E4=B9=89=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E9=87=8A=E4=B9=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../ets/pages/ComponentAttributeCompatibilityJudgment.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets b/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets index 1f80c19..c017c2a 100644 --- a/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets +++ b/ArkUI/entry/src/main/ets/pages/ComponentAttributeCompatibilityJudgment.ets @@ -27,7 +27,7 @@ struct ComponentAttributeCompatibilityJudgment { build() { List() { - // 列表内容 + // List content } .height('100%') .width('100%') @@ -37,10 +37,10 @@ struct ComponentAttributeCompatibilityJudgment { class MyListModifier implements AttributeModifier { applyNormalAttribute(instance: ListAttribute): void { - // 通过deviceInfo的api版本信息进行判断 + // Determine based on the API version information of deviceInfo if (deviceInfo.sdkApiVersion > 14) { - // 要适配的是List组件的backToTop属性 - // instance为List的属性对象,可以通过instance对象对属性进行修改 + // The property to be adapted is the backToTop attribute of the List component + // The instance is an attribute object of the List, and its properties can be modified through the instance instance.backToTop(true); } } -- Gitee From 206190b9463e6b75ce52d9632b14edd0de819ae9 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 06:53:51 +0000 Subject: [PATCH 03/14] =?UTF-8?q?update=20ArkUI/entry/src/main/ets/pages/F?= =?UTF-8?q?rameNodeJudgmentNode.ets.=20=E4=B8=AD=E6=96=87=E9=87=8A?= =?UTF-8?q?=E4=B9=89=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E9=87=8A=E4=B9=89?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- ArkUI/entry/src/main/ets/pages/FrameNodeJudgmentNode.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArkUI/entry/src/main/ets/pages/FrameNodeJudgmentNode.ets b/ArkUI/entry/src/main/ets/pages/FrameNodeJudgmentNode.ets index 078d078..ec6c4f7 100644 --- a/ArkUI/entry/src/main/ets/pages/FrameNodeJudgmentNode.ets +++ b/ArkUI/entry/src/main/ets/pages/FrameNodeJudgmentNode.ets @@ -28,10 +28,10 @@ class MyNodeController extends NodeController { makeNode(uiContext: UIContext): FrameNode | null { this.rootNode = new FrameNode(uiContext); this.node1 = new FrameNode(uiContext); - this.node1.commonAttribute.id('node1'); // 设置id + this.node1.commonAttribute.id('node1'); // Set id this.node2 = new FrameNode(uiContext); - this.node2.commonAttribute.id('node2'); // 设置id - this.rootNode.appendChild(this.node1); // node1在主树上,node2不在主树上 + this.node2.commonAttribute.id('node2'); // Set id + this.rootNode.appendChild(this.node1); // Node1 on the main tree, node2 not on the main tree. return this.rootNode; } } @@ -46,7 +46,7 @@ struct Index { NodeContainer(this.myNodeController) Button('Click') .onClick(() => { - // 如果通过getAttachedFrameNodeById获取不到节点,则说明节点没有被挂载到主树上 + // If the node cannot be obtained through getAttachedFrameNodeById, it indicates that the node has not been mounted to the main tree. console.info(`node1 is attached to main tree: ${(this.getUIContext().getAttachedFrameNodeById('node1') !== null)}`); console.info(`node2 is attached to main tree: ${(this.getUIContext().getAttachedFrameNodeById('node2') !== -- Gitee From ce14513d0637ab09ef3569b85a644452236cef0d Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:18:47 +0000 Subject: [PATCH 04/14] =?UTF-8?q?update=20Ndk/ndk1/IntegrateThirdPartySO1/?= =?UTF-8?q?src/main/cpp/CMakeLists.txt.=20=E4=B8=AD=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- Ndk/ndk1/IntegrateThirdPartySO1/src/main/cpp/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ndk/ndk1/IntegrateThirdPartySO1/src/main/cpp/CMakeLists.txt b/Ndk/ndk1/IntegrateThirdPartySO1/src/main/cpp/CMakeLists.txt index 30ad9a8..eb43900 100644 --- a/Ndk/ndk1/IntegrateThirdPartySO1/src/main/cpp/CMakeLists.txt +++ b/Ndk/ndk1/IntegrateThirdPartySO1/src/main/cpp/CMakeLists.txt @@ -3,6 +3,6 @@ # CMakeLists.txt cmake_minimum_required(VERSION 3.4.1) project(libSub) -#编译源码 +# Compile source code add_library(nativeSub SHARED sub.cpp) # [End native_sub] \ No newline at end of file -- Gitee From 0548f56cc19c7ade90272d632682354a45151532 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:27:18 +0000 Subject: [PATCH 05/14] =?UTF-8?q?update=20ArkDataKit/entry/src/main/ets/pa?= =?UTF-8?q?ges/LocalDatabaseReader.ets.=20=E4=B8=AD=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../entry/src/main/ets/pages/LocalDatabaseReader.ets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets b/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets index e353259..5a57dc6 100644 --- a/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets +++ b/ArkDataKit/entry/src/main/ets/pages/LocalDatabaseReader.ets @@ -23,14 +23,14 @@ import { relationalStore } from '@kit.ArkData'; import { common } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; -// 工具类中:在EntryAbility中获取Context后保存至AppStorage,然后在工具类中使用AppStorage获取 +// Obtaining the Context in EntryAbility, save it to AppStorage, then use AppStorage to retrieve it in the utility class. let context = AppStorage.get('context') as UIContext; let UiAbilityContent = context.getHostContext() as common.UIAbilityContext; let RDBDirectory = UiAbilityContent.databaseDir; let resource = UiAbilityContent.resourceManager; function initDatabase() { - // 创建数据库沙箱目录 + // Create a database sandbox directory try { let dirPath = RDBDirectory + '/entry'; fileIo.mkdirSync(dirPath); @@ -40,10 +40,10 @@ function initDatabase() { console.error(`mkdir rdbPath failed, error code: ${error.code}, message: ${error.message}.`); } - //数据库名称 + // Set db name let dbName: string = 'Objective.db'; - //读取rawfile目录下db文件 + // Read the db file in the rawfile directory try { let content = resource.getRawFileContentSync(dbName); let cFile = RDBDirectory + '/entry/rdb/' + dbName; -- Gitee From 6aeeb7cb2462ca2f73fef5cdad7bf683d00b99e1 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:31:58 +0000 Subject: [PATCH 06/14] =?UTF-8?q?update=20PreviewerOperating/entry/src/mai?= =?UTF-8?q?n/ets/pages/PreviewFailed.ets.=20=E5=8E=BB=E6=8E=89=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- PreviewerOperating/entry/src/main/ets/pages/PreviewFailed.ets | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/PreviewerOperating/entry/src/main/ets/pages/PreviewFailed.ets b/PreviewerOperating/entry/src/main/ets/pages/PreviewFailed.ets index 94c8f89..d58ce84 100644 --- a/PreviewerOperating/entry/src/main/ets/pages/PreviewFailed.ets +++ b/PreviewerOperating/entry/src/main/ets/pages/PreviewFailed.ets @@ -1,13 +1,12 @@ // FAQ:预览告警“@Consume/@Link decorated property not initialized” // [Start preview_fail] // Suggest adding @ Preview on ParentComp to preview the preview effect of ChildComp -@Preview //组件预览 +@Preview @Component struct ParentComp { // @Provide decoration is provided by the entrance component ParentComp as its descendant component @Provide reviewVotes: number = 10; - build() { Column() { Button(`reviewVotes(${this.reviewVotes}), give +1`) @@ -17,7 +16,6 @@ struct ParentComp { } } - // @Preview is not recommended to directly preview ChildComp @Component struct ChildComp { -- Gitee From 975bc0bde2ba93c14d285461d518abf29a7e81e3 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:39:41 +0000 Subject: [PATCH 07/14] =?UTF-8?q?update=20Ndk/ndk1/entry/src/main/cpp/Nati?= =?UTF-8?q?veMap/NativeMap.cpp.=20=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- Ndk/ndk1/entry/src/main/cpp/NativeMap/NativeMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ndk/ndk1/entry/src/main/cpp/NativeMap/NativeMap.cpp b/Ndk/ndk1/entry/src/main/cpp/NativeMap/NativeMap.cpp index 43b0245..afbb3be 100644 --- a/Ndk/ndk1/entry/src/main/cpp/NativeMap/NativeMap.cpp +++ b/Ndk/ndk1/entry/src/main/cpp/NativeMap/NativeMap.cpp @@ -22,8 +22,8 @@ * FAQ: ArkTS侧与Native侧如何进行map数据交互 */ // [Start native_map_cpp] -#define LOG_DOMAIN 0x3200 // 全局domain宏,标识业务领域 -#define LOG_TAG "MY_TAG" // 全局tag宏,标识模块日志tag +#define LOG_DOMAIN 0x3200 // Global domain macro, identifying the business domain +#define LOG_TAG "MY_TAG" // Global tag macro, identifying module log tag #include "NativeMap.h" #include "hilog/log.h" #include -- Gitee From e6258f2584535ac9fd74a792b42e5b2c507aef48 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:48:01 +0000 Subject: [PATCH 08/14] =?UTF-8?q?update=20Ndk/ndk1/dynamicallyload/src/mai?= =?UTF-8?q?n/cpp/napi=5Finit.cpp.=20=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- Ndk/ndk1/dynamicallyload/src/main/cpp/napi_init.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Ndk/ndk1/dynamicallyload/src/main/cpp/napi_init.cpp b/Ndk/ndk1/dynamicallyload/src/main/cpp/napi_init.cpp index 276a17d..173dd81 100644 --- a/Ndk/ndk1/dynamicallyload/src/main/cpp/napi_init.cpp +++ b/Ndk/ndk1/dynamicallyload/src/main/cpp/napi_init.cpp @@ -16,15 +16,15 @@ static napi_value AddByLibPath(napi_env env, napi_callback_info info) { napi_get_value_double(env, args[1], &value1); char path[255]; size_t size = 255; - napi_get_value_string_utf8(env, args[2], path, 255, &size); // 获取动态库路径信息 - void *handle = dlopen(path, RTLD_LAZY); // 打开一个动态链接库.路径为path + napi_get_value_string_utf8(env, args[2], path, 255, &size); // Obtain dynamic library path information + void *handle = dlopen(path, RTLD_LAZY); // Open a dynamic link library, The path is "path". dlerror(); - FUNC_ADD add_func = (FUNC_ADD)dlsym(handle, "add"); // 获取函数名为add的函数 + FUNC_ADD add_func = (FUNC_ADD)dlsym(handle, "add"); // Retrieve the function named "add" if (dlerror()) { return nullptr; } - double res = add_func(value0, value1); // 调用add并传递参数信息 - dlclose(handle); // 最后关闭动态库 + double res = add_func(value0, value1); // Call add and pass the parameter information + dlclose(handle); // Close the dynamic library napi_value sum; napi_create_double(env, res, &sum); return sum; -- Gitee From af7e70b6ae341d9f545a018e7c33e0ee51bfebe7 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 07:59:36 +0000 Subject: [PATCH 09/14] =?UTF-8?q?update=20LocationKit/entry/src/main/ets/p?= =?UTF-8?q?ages/FaultLog.ets.=20=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../entry/src/main/ets/pages/FaultLog.ets | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/LocationKit/entry/src/main/ets/pages/FaultLog.ets b/LocationKit/entry/src/main/ets/pages/FaultLog.ets index 7be8152..13176d1 100644 --- a/LocationKit/entry/src/main/ets/pages/FaultLog.ets +++ b/LocationKit/entry/src/main/ets/pages/FaultLog.ets @@ -29,30 +29,30 @@ const TAG: string = 'FaultLoggerUtils'; export class LogUtils { static async queryAndUploadFaultLog(context: common.UIAbilityContext, launchParam: AbilityConstant.LaunchParam) { if (launchParam.lastExitReason == AbilityConstant.LastExitReason.NORMAL) { - hilog.info(0x00000, TAG, '上次应用退出时未发生异常'); + hilog.info(0x00000, TAG, 'No exceptions occurred when the application was last exited'); return; } let value: Array = await FaultLogger.query(FaultLogger.FaultType.NO_SPECIFIC) - hilog.info(0x00000, TAG, '报错日志:' + value.toString()); + hilog.info(0x00000, TAG, 'error log:' + value.toString()); if (value) { let len = value.length; - hilog.info(0x00000, TAG, '报错日志数量:' + len); + hilog.info(0x00000, TAG, 'Number of error logs:' + len); if (len === 0) { return; } - //取得实例 + // Get instance let preference: preferences.Preferences = await preferences.getPreferences(context, 'STLiveness'); - // 查询上一次的处理的时间戳 + // Query the timestamp of the last processing time let lastFaultHandleTime = preference.getSync('faultHandleTime', 0); hilog.info(0x0000, TAG, 'lastFaultHandleTime:' + lastFaultHandleTime); for (let i = 0; i < len; i++) { let timestamp = value[i].timestamp; - hilog.info(0x00000, TAG, '日志文件名称#' + timestamp); + hilog.info(0x00000, TAG, 'Log File Name#' + timestamp); if (lastFaultHandleTime >= timestamp) { hilog.error(0x00000, TAG, 'Maple No New Logs.'); return; } - // 将日志保存到应用沙箱的目录 保存文件名为 时间戳.log + // Save the log to the application sandbox directory with the file name "timestamp.log" await LogUtils.save(value[i].fullLog, context.filesDir + '/crash', timestamp + '.log'); await preference.put('faultHandleTime', timestamp); await preference.flush(); @@ -61,8 +61,8 @@ export class LogUtils { } static async save(buffer: ArrayBuffer | string, destFilePath: string, name: string): Promise { await LogUtils.mkdir(destFilePath); - hilog.info(0x00000, TAG, '写入日志的内容为:' + buffer); - hilog.info(0x00000, TAG, '被写入的日志文件路径为:' + destFilePath); + hilog.info(0x00000, TAG, 'Write content:' + buffer); + hilog.info(0x00000, TAG, 'Log file path:' + destFilePath); if (buffer) { try { let file = fileIo.openSync(destFilePath + '/' + name, fileIo.OpenMode.READ_WRITE | fileIo.OpenMode.CREATE); @@ -77,13 +77,13 @@ export class LogUtils { } static async mkdir(destFilePath: string) { - hilog.info(0x00000, TAG, '开始创建目录:' + destFilePath); + hilog.info(0x00000, TAG, 'Start creating the directory:' + destFilePath); if (fileIo.accessSync(destFilePath)) { - hilog.info(0x00000, TAG, '目录已经存在,无需创建'); + hilog.info(0x00000, TAG, 'The directory already exists, no need to create it.'); return; } await fileIo.mkdir(destFilePath); - hilog.info(0x00000, TAG, '创建完成'); + hilog.info(0x00000, TAG, 'Create completed'); } } // [End faultLogger] \ No newline at end of file -- Gitee From 2f51bcd2481d25d02558ea2615945efbe208d72a Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 08:10:26 +0000 Subject: [PATCH 10/14] =?UTF-8?q?update=20Ndk/ndk1/nativeClass/src/main/cp?= =?UTF-8?q?p/types/libentry/Index.d.ts.=20=E4=B8=AD=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- Ndk/ndk1/nativeClass/src/main/cpp/types/libentry/Index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ndk/ndk1/nativeClass/src/main/cpp/types/libentry/Index.d.ts b/Ndk/ndk1/nativeClass/src/main/cpp/types/libentry/Index.d.ts index f1239b2..8c7b8b8 100644 --- a/Ndk/ndk1/nativeClass/src/main/cpp/types/libentry/Index.d.ts +++ b/Ndk/ndk1/nativeClass/src/main/cpp/types/libentry/Index.d.ts @@ -5,7 +5,7 @@ declare namespace testNapi { const add: (a: number, b: number) => number; const sub: (a: number, b: number) => number; - // 定义ArkTS接口 + // Defining the ArkTS Interface class MyDemo { constructor(name:string) name: string -- Gitee From 6b88dc5a684daa95a7f4d19984a2e359e3c46d23 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 08:16:14 +0000 Subject: [PATCH 11/14] =?UTF-8?q?update=20ArkUI/entry/src/main/ets/pages/C?= =?UTF-8?q?ustomTitleInNavigation.ets.=20=E4=B8=AD=E6=96=87=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=94=B9=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: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- ArkUI/entry/src/main/ets/pages/CustomTitleInNavigation.ets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArkUI/entry/src/main/ets/pages/CustomTitleInNavigation.ets b/ArkUI/entry/src/main/ets/pages/CustomTitleInNavigation.ets index 4f98bec..d9ef615 100644 --- a/ArkUI/entry/src/main/ets/pages/CustomTitleInNavigation.ets +++ b/ArkUI/entry/src/main/ets/pages/CustomTitleInNavigation.ets @@ -29,17 +29,17 @@ export struct MainPage { @LocalBuilder customTitleBuilder() { Row() { - Text('标题1') + Text('Title1') .fontSize(12) .fontWeight(FontWeight.Bold) .margin({ left: 7, right: 7, top: 7 }) - Text('标题2') + Text('Title2') .fontSize(12) .fontWeight(FontWeight.Bold) .margin({ left: 7, right: 7, top: 7 }) - Text('标题3') + Text('Title3') .fontSize(12) .fontWeight(FontWeight.Bold) .margin({ left: 7, right: 7, top: 7 }) -- Gitee From d0304454cd877fc9ee5f6488108bd63ba3ca3f62 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 08:24:53 +0000 Subject: [PATCH 12/14] =?UTF-8?q?update=20ArkUI/entry/src/main/ets/pages/N?= =?UTF-8?q?avPathStackExitsTheNavigationPage.ets.=20=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=94=B9=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: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../src/main/ets/pages/NavPathStackExitsTheNavigationPage.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArkUI/entry/src/main/ets/pages/NavPathStackExitsTheNavigationPage.ets b/ArkUI/entry/src/main/ets/pages/NavPathStackExitsTheNavigationPage.ets index 2db9cc7..5788071 100644 --- a/ArkUI/entry/src/main/ets/pages/NavPathStackExitsTheNavigationPage.ets +++ b/ArkUI/entry/src/main/ets/pages/NavPathStackExitsTheNavigationPage.ets @@ -37,7 +37,7 @@ struct NavPathStackExitsTheNavigationPage { build() { Navigation(this.pathInfos) { Column() { - Button('跳转至PageOne') + Button('Jump to PageOne') .width('100%') .borderRadius(20) .margin({ bottom: 16 }) -- Gitee From cf15fbd3ad11ce81eb0e8e4c172d90e726903447 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 08:46:22 +0000 Subject: [PATCH 13/14] =?UTF-8?q?update=20Ndk/Ndk2/NativeCrossModuleAccess?= =?UTF-8?q?Res/src/main/cpp/napi=5Finit.cpp.=20=E4=B8=AD=E6=96=87=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- .../src/main/cpp/napi_init.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Ndk/Ndk2/NativeCrossModuleAccessRes/src/main/cpp/napi_init.cpp b/Ndk/Ndk2/NativeCrossModuleAccessRes/src/main/cpp/napi_init.cpp index e2cc771..b8729be 100644 --- a/Ndk/Ndk2/NativeCrossModuleAccessRes/src/main/cpp/napi_init.cpp +++ b/Ndk/Ndk2/NativeCrossModuleAccessRes/src/main/cpp/napi_init.cpp @@ -57,28 +57,28 @@ static napi_value GetRawFileContent(napi_env env, napi_callback_info info) size_t requireArgc = 3; size_t argc = 2; napi_value argv[2] = { nullptr }; - // 获取参数信息 + // Obtain parameter information napi_get_cb_info(env, info, &argc, argv, nullptr, nullptr); - // argv[0]即为函数第一个参数Js资源对象,OH_ResourceManager_InitNativeResourceManager转为Native对象。 + // argv[0] is the first parameter of the function, the js resource object. OH_ResourceManager_InitNativeResourceManager convert to Native object. NativeResourceManager *mNativeResMgr = OH_ResourceManager_InitNativeResourceManager(env, argv[0]); size_t strSize; char strBuf[256]; napi_get_value_string_utf8(env, argv[1], strBuf, sizeof(strBuf), &strSize); std::string filename(strBuf, strSize); - // 获取rawfile指针对象 + // Get rawfile pointer object RawFile *rawFile = OH_ResourceManager_OpenRawFile(mNativeResMgr, filename.c_str()); if (rawFile != nullptr) { OH_LOG_Print(LOG_APP, LOG_ERROR, GLOBAL_RESMGR, TAG, "OH_ResourceManager_OpenRawFile success"); } - // 获取rawfile大小并申请内存 + // Obtain the size of the rawfile and allocate memory long len = OH_ResourceManager_GetRawFileSize(rawFile); std::unique_ptr data= std::make_unique(len); - // 一次性读取rawfile全部内容 + // Read the entire content of the rawfile one-off int res = OH_ResourceManager_ReadRawFile(rawFile, data.get(), len); - // 关闭打开的指针对象 + // Close the open pointer object OH_ResourceManager_CloseRawFile(rawFile); OH_ResourceManager_ReleaseNativeResourceManager(mNativeResMgr); - // 转为js对象 + // Convert to js object return CreateJsArrayValue(env, data, len); } // [End native_cross_module_access_res_cpp] -- Gitee From 4e0643321479af18ca780caf9bee745720b4ee05 Mon Sep 17 00:00:00 2001 From: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> Date: Mon, 8 Sep 2025 08:51:09 +0000 Subject: [PATCH 14/14] =?UTF-8?q?update=20Arkgraphics2D/entry/src/main/ets?= =?UTF-8?q?/pages/CreateShare.cpp.=20=E4=B8=AD=E6=96=87=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E8=8B=B1=E6=96=87=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: mkno1412222222 <12436341+mkno1412222222@user.noreply.gitee.com> --- Arkgraphics2D/entry/src/main/ets/pages/CreateShare.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Arkgraphics2D/entry/src/main/ets/pages/CreateShare.cpp b/Arkgraphics2D/entry/src/main/ets/pages/CreateShare.cpp index ed5d023..f1da94c 100644 --- a/Arkgraphics2D/entry/src/main/ets/pages/CreateShare.cpp +++ b/Arkgraphics2D/entry/src/main/ets/pages/CreateShare.cpp @@ -4,11 +4,11 @@ // [Start CreateShareEglContext] void CreateShareEglContext() { - if (renderContext == nullptr) { // renderContext是主线程context + if (renderContext == nullptr) { // RenderContext is the main thread context RS_LOGE("renderContext_ is nullptr"); return; } - eglShareContext = renderContext->CreateShareContext(); // 创建share context + eglShareContext = renderContext->CreateShareContext(); // Create share context if (eglShareContext == EGL_NO_CONTEXT) { RS_LOGE("eglShareContext is EGL_NO_CONTEXT"); return; -- Gitee