(EN) A code translation method, comprising: obtaining a first code, the first code being written on the basis of a platform-dependent language of a source platform; then determining at least one translation rule matching the first code, the translation rule being used to directly translate a code of one platform to a code of another platform; and next, translating the first code by means of the translation rule to obtain a second code suitable for a target platform. The method achieves automatic cross-platform translation of codes by means of translation rules, and improves translation efficiency and translation accuracy.
(FR) Un procédé de traduction de code consiste : à obtenir un premier code, le premier code étant écrit sur la base d'un langage dépendant de la plateforme d'une plateforme source ; puis à déterminer au moins une règle de traduction correspondant au premier code, la règle de traduction étant utilisée pour traduire directement un code d'une plateforme en code d'une autre plateforme ; puis à traduire le premier code au moyen de la règle de traduction pour obtenir un second code approprié pour une plateforme cible. Le procédé permet d'obtenir une traduction automatique inter-plateformes de codes au moyen de règles de traduction, et améliorer l'efficacité de traduction et la précision de traduction.
(ZH) 一种代码翻译方法,包括:获取第一代码,该第一代码基于源平台的平台依赖语言编写,然后确定与第一代码匹配的至少一个翻译规则,该翻译规则用于将一个平台的代码直接翻译为另一个平台的代码,接着利用翻译规则对第一代码进行翻译,得到适用于目标平台的第二代码。该方法通过翻译规则实现了对代码进行自动地跨平台翻译,提高了翻译效率以及翻译精度。