Code processing method and related equipment

A processing method and code technology, applied in the field of data processing, which can solve problems such as error-prone and time-consuming

Inactive Publication Date: 2021-07-06
HANGZHOU TUYA INFORMATION TECH CO LTD
View PDF2 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This process of manually generating internationalized resource files often takes a lot of time and is error-prone

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Code processing method and related equipment
  • Code processing method and related equipment
  • Code processing method and related equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0069] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, not to limit the present application. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

[0070] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and not necessarily Used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments descr...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a code processing method which is used for an internationalization processing process of a front-end project. The method comprises the following steps: obtaining an abstract syntax tree expression of a source code; determining a target node including a specific language document in the abstract syntax tree, and obtaining position information of the target node and a specific language document value included in the target node; generating an index value corresponding to the case value of the specific language based on a preset rule; on the basis of the position information of the target node, using an index value to replace a specific language file value included in the source code; and writing the index value and the case value of the specific language into a translation resource file. According to the technical scheme, the source code processing method and device have the advantages that the source code which does not comprise a specific language copywriting is obtained by performing abstract syntax tree processing on the source code and replacing the index value, so that front-end workers are prevented from tedious retrieval and index value setting work, and the efficiency of the code internationalization processing process is improved.

Description

technical field [0001] The embodiment of the present application relates to the field of data processing, in particular to a code processing method and related equipment Background technique [0002] With the advancement of technology, the same software and web pages can be used by users in different countries and regions. Users in different countries and regions generally use different languages, so different language support solutions need to be used for front-end display, and software Or front-end developers of web pages often use specific languages ​​to write copy content during the development process, and need follow-up support processing to meet the needs of users in different countries and regions. [0003] At present, support for multiple languages ​​needs to be configured in an international support environment during the development stage, such as I18n (the first and last characters I and n of the English word Internationalization, and 18 is the number of characte...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & AuthorityApplications(China)
IPC IPC(8): G06F9/451G06F8/73
CPCG06F9/454G06F8/73
Inventor钟天扬
OwnerHANGZHOU TUYA INFORMATION TECH CO LTD