JavaScript code translation method and device, computer equipment and storage medium

A computer and code technology, which is applied in the field of research and development, can solve the problem of high reconstruction risk of translation code reconstruction cost, and achieve the effect of saving reconstruction cost

Pending Publication Date: 2020-12-01
PINGAN INT SMART CITY TECH CO LTD
View PDF0 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The purpose of the embodiments of this application is to propose a method, device, computer equipment, and storage medium fo...

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
  • JavaScript code translation method and device, computer equipment and storage medium
  • JavaScript code translation method and device, computer equipment and storage medium
  • JavaScript code translation method and device, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the application; the terms used herein in the description of the application are only to describe specific embodiments The purpose is not to limit the present application; the terms "comprising" and "having" and any variations thereof in the specification and claims of the present application and the description of the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second" and the like in the description and claims of the present application or the above drawings are used to distinguish different objects, rather than to describe a specific order.

[0072] Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrenc...

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 belongs to the field of research and development, and relates to a JavaScript code translation method, which comprises the following steps: reading the JavaScript codesin a code file through node.Js; compiling the JavaScript code through a babylon or parser, and obtaining an abstract syntax tree; traversing a node object in the abstract syntax tree through traverseto obtain a target node object; identifying an initial language in the target node object through a regular expression; and converting the initial language in the node object into a target language.In addition, the invention further relates to a blockchain technology, and translation information can be stored in the blockchain. The invention further provides a JavaScript code translation device,computer equipment and a storage medium. And the code reconstruction cost is reduced.

Description

technical field [0001] The present application relates to the field of research and development, in particular to a method, device, computer equipment and storage medium for translating JavaScript codes. Background technique [0002] With the development of informatization and globalization, more and more products are positioned internationally. When developing pages, it is necessary to consider multilingual versions or preset multi-country application scenarios. For products that are localized, regionally developed, and maturely operated, but need to support multilingual scenarios in the future, the project needs to be invasively refactored, such as replacing text-related content at the interactive level with variables, and dynamically reading Take the value that exists in the mapping under different language configuration scenarios. However, when a mature product has gone through multiple iterations, it usually has tens of thousands of lines of code, and the relationship ...

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
IPC IPC(8): G06F8/41G06F40/154G06F40/58
CPCG06F8/42G06F8/43G06F40/154G06F40/58
Inventor 郑鸿生
Owner PINGAN INT SMART CITY TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products