已关闭
Chinese API documentation missing for 46 arkts/builtin/static declaration files #26289
iop123123创建于  8月15日关闭于  25 天前
iop123123
8月15日 创建

Root cause
arkts/builtin/static/ currently ships 61 ArkTS static builtin declaration files, but zh-cn/arkts/builtin/static/ mirrors only 7 of them (Array, ArrayBuffer, ArrayLike, Chrono, Comparable, Global, Set). The remaining 46 declaration files listed below have no Chinese counterpart, so Chinese readers of the ArkTS built-in API get no documentation for them at all.

Missing files (46):
BigInt, Boolean, BuiltinArray, BuiltinArrayAlgorithms, BuiltinArraySort, Byte, Char, Class, ConcatArray, Console, DataView, Date, Double, Error, Errors, Exceptions, Float, Function, Functions, Int, Intl, Iterator, Json, Jsonx, Long, Map, Math, Numeric, Object, ReadonlyArray, ReflecStaticField, Reflect, ReflectConstructor, ReflectInstanceField, ReflectInstanceMethod, ReflectProxy, ReflectStaticMethod, RegExp, Short, SparseArray, String, StringBuilder, Tuple, TypedArrays, TypedUArrays, retention

Steps to reproduce

cd interface_sdk-js
comm -23 \
  <(ls arkts/builtin/static/*.static.d.ets | xargs -n1 basename | sort) \
  <(ls zh-cn/arkts/builtin/static/*.static.d.ets | xargs -n1 basename | sort)

Demo code

# The zh-cn tree must stay a structural mirror of the English tree: every
# declaration line identical, only JSDoc prose translated. Today this check
# cannot even run for the 46 files, because the zh-cn file does not exist.
f=arkts/builtin/static/String.static.d.ets
diff <(grep -vE '^[[:space:]]*(\*|/\*|//)' "$f") \
     <(grep -vE '^[[:space:]]*(\*|/\*|//)' "zh-cn/$f")
# => diff: zh-cn/arkts/builtin/static/String.static.d.ets: No such file or directory

Observed and expected behavior
Observed: zh-cn/arkts/builtin/static/ contains 7 files; 46 of the 61 English declaration files have no Chinese documentation.
Expected: each of the 46 files has a zh-cn/ mirror whose declaration lines are byte-identical to the English source, whose line count matches, and whose JSDoc prose is Chinese while @syscap / @since / @stagemodelonly and other metadata tags stay untouched.

likedislike
openharmony_ci
openharmony_ci成员
8月15日 评论:

感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@xiadengping20241118](https://gitcode.com/xiadengping20241118) 。如果需要调整订阅PR、Issue的变更状态,请访问链接


Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.

likedislike
openharmony_ciopenharmony_ci成员
8月15日 添加了label:waiting_for_assign
Iiop123123
8月15日 关联了pull request:docs: add Chinese API documentation for 46 arkts static builtins
Iiop123123
8月15日 关联了pull request:builtin merge SDK: register 46 zh-cn arkts static builtin API parts
openharmony_ciopenharmony_ci成员
25 天前 关闭了 issue
openharmony_ciopenharmony_ci成员
25 天前 issue状态由 待办的 改变为 已完成