CN111443979B - Document processing method, device, computer equipment and storage medium - Google Patents

Document processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN111443979B
CN111443979B CN202010312904.3A CN202010312904A CN111443979B CN 111443979 B CN111443979 B CN 111443979B CN 202010312904 A CN202010312904 A CN 202010312904A CN 111443979 B CN111443979 B CN 111443979B
Authority
CN
China
Prior art keywords
dart
language
function call
document
target document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010312904.3A
Other languages
Chinese (zh)
Other versions
CN111443979A (en
Inventor
谭荣申
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huya Technology Co Ltd
Original Assignee
Guangzhou Huya Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huya Technology Co Ltd filed Critical Guangzhou Huya Technology Co Ltd
Priority to CN202010312904.3A priority Critical patent/CN111443979B/en
Publication of CN111443979A publication Critical patent/CN111443979A/en
Application granted granted Critical
Publication of CN111443979B publication Critical patent/CN111443979B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a document processing method, a document processing device, computer equipment and a storage medium. The method comprises the following steps: acquiring a target document, wherein the target document comprises texts in multiple languages; converting the text in the target document into a function call statement of Dart language; translating text content in the function call statement according to a preset language type; storing the translated function call statement into a Dart file corresponding to the preset language type; the corresponding Dart file is read according to the selected language type using the multi-language home agent. Compared with the current conversion of the Dart language by manual work, the proposal provided by the application can generate the function call statement of the Dart language by the electronic equipment according to the following document. The generated function call sentences are stored in the corresponding Dart documents, and the Dart languages of different language types are stored by using a plurality of Dart documents respectively without manual translation, so that the electronic equipment can quickly generate and use the Dart files, the internationalization speed of the flutter documents is improved, and the document editing efficiency is improved.

Description

Document processing method, device, computer equipment and storage medium
Technical Field
Embodiments of the present application relate to computer device technologies, and in particular, to a document processing method, a document processing device, a computer device, and a storage medium.
Background
Flutter is an open source mobile application development framework pushed by google, and a developer can develop an application program (APP) through the Dart language. When accessing the router in the application, the router needs to be internationalized.
However, the internationalization adaptation scheme provided by the official of flutter is applicable to local multi-language codes, and when internationalization is performed on documents used by flutter, manual editing of Dart documents is required, and document editing efficiency is low.
Disclosure of Invention
The application provides a document processing method, a document processing device, computer equipment and a storage medium, which are used for realizing the improvement of internationalization speed of a flutter document and the improvement of document editing efficiency.
In a first aspect, an embodiment of the present application provides a document processing method, including:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function call statement of Dart language;
translating text content in the function call statement according to a preset language type;
storing the translated function call statement into a Dart file corresponding to the preset language type;
the corresponding Dart file is read according to the selected language type using the multi-language home agent.
In a second aspect, an embodiment of the present application further provides a document processing apparatus, including:
the acquisition module is used for acquiring a target document, wherein the target document comprises texts in multiple languages;
the conversion module is used for converting the text in the target document into a function call statement of the Dart language;
the translation module is used for translating the text content in the function call statement according to the preset language type;
the storage module is used for storing the translated function call statement to a Dart file corresponding to the preset language type;
and the reading module is used for reading the corresponding Dart file according to the selected language type by using the multilingual home agent.
In a third aspect, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the document processing method provided in the embodiment of the present application when executing the program.
In a fourth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions which, when executed by a computer processor, are used to perform a document processing method as provided by embodiments of the present application.
According to the document processing scheme provided by the embodiment of the application, the target document can be obtained, the text in the target document is converted into the function call statement of the Dart language, the text content in the function call statement is translated according to the preset language type, and the translated function call statement is stored in the corresponding Dart file, so that the Dart language of the preset language type is stored in the Dart file. When the Dart file is used, the multi-language local agent is used for reading the Dart file with the preset language type, and executing the function in the Dart file. Compared with the existing method that when the Dart language is converted manually, the method has the advantages that the manual conversion speed is low, and the problems of pen errors and the like easily occur during manual input, and according to the document processing scheme provided by the embodiment, function call sentences of the Dart language can be generated by the electronic equipment according to the target document. The generated function call sentences are stored in the corresponding Dart documents, and the Dart languages of different language types are stored by using a plurality of Dart documents respectively without manual translation, so that the electronic equipment can quickly generate and use the Dart files, the internationalization speed of the flutter documents is improved, and the document editing efficiency is improved.
Drawings
FIG. 1 is a flow chart of a document processing method according to a first embodiment of the present application;
FIG. 2 is a flow chart of a document processing method in a second embodiment of the application;
FIG. 3 is a flow chart of a document processing method in a third embodiment of the present application;
FIG. 4 is a flow chart of a document processing method in a fourth embodiment of the present application;
FIG. 5 is a schematic diagram of a document processing apparatus in a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device in a sixth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Example 1
Fig. 1 is a flow chart of a document processing method according to an embodiment of the present application, where the embodiment is applicable to a case of internationally adapting a document in a router, and the method may be executed by a terminal or a server, and the method includes the following steps:
step 110, obtaining a target document, wherein the target document contains texts in multiple languages.
Flutter is a mobile UI framework provided by google corporation for implementing high quality native user interfaces that are fast iOS and Android (Android) frameworks. Dart is a computer programming language developed by Google, inc., dart is an object-oriented, class-defined, single-inherited language.
Text for rendering the Flutter is recorded in the target document. The text may contain text content in different languages. The target document may be stored locally at the terminal or in the network device.
Optionally, downloading an online document, and taking the online document as a target document. The online document is downloaded from the network device to the local via the network as a target document in a subsequent step. Optionally, the online document is checked during or after the download process. If the verification is successful, step 120 is performed.
Step 120, converting the text in the target document into a function call statement in the Dart language.
The Dart language is composed of statements, and for the content of the target document regarding the displayed text, the output function call statement of the Dart language can be used to complete the equivalent implementation. For data processing statements, function call statements in Dart language may be used to accomplish equivalent implementations. And carrying out clauses according to the symbols in the target document, and converting the clauses into Dart language function call sentences.
And 130, translating the text content in the function call statement according to the preset language type.
The preset language type may be one or more. The preset language type includes Chinese, english, japanese, etc. The text content in the function call statement may include text content to be output in the Dart language output. In the process of flutter internationalization, the same content needs to be converted into different language types for output so as to be convenient for readers to understand. The preset language may be a language type set by the operating system, or may be selected by a user. To facilitate switching between languages, the target document may be translated into a function call statement in the Dart language that is applicable to different language types after the target document is obtained. The target document may contain text of multiple language types, and at this time, contents of different language types need to be translated into preset language types in a unified manner.
And 140, storing the translated function call statement in a Dart file corresponding to the preset language type.
And establishing a plurality of Dart files, wherein each Dart file is used for storing Dart languages of a preset language type. The Dart file is a file with a suffix ". Dart". The generated Dart function call statement is merged into the Dart file of the corresponding language.
Step 150, using the multi-language local agent to read the corresponding Dart file according to the selected language type.
By establishing a transitiondelegate class instance, a multilingual home agent is established. Multiple language conversion is achieved by invoking the instance.
Illustratively, a multilingual home agent; acquiring the selected language type; the Dart file associated with the selected language type is invoked by the multi-language home agent.
The multilingual home agent may be a transactor delegate class instance. The selected language type is determined by the language type currently set by the operating system. A Dart file for a plurality of language types has been generated before step 150. At this time, the Dart file associated with the selected language type is determined according to the selected language type, and the Dart file associated with the selected language type is called through the multi-language local agent. In one implementation, a proxy is generated that uniformly manages the multilingual localization delete. And setting a self-generated agent at the program starting position, setting the display direction of the text according to the type of the multiple languages, and realizing the multiple language adaptation effect.
According to the document processing method provided by the embodiment of the application, the target document can be obtained, the text in the target document is converted into the function call statement of the Dart language, the text content in the function call statement is translated according to the preset language type, and the translated function call statement is stored in the corresponding Dart file, so that the Dart language of the preset language type is stored in the Dart file. When the Dart file is used, the multi-language local agent is used for reading the Dart file with the preset language type, and executing the function in the Dart file. Compared with the existing method that when the Dart language is converted manually, the method has the advantages that the manual conversion speed is low, and the problems of pen errors and the like easily occur during manual input, and according to the document processing scheme provided by the embodiment, function call sentences of the Dart language can be generated by the electronic equipment according to the target document. The generated function call sentences are stored in the corresponding Dart documents, and the Dart languages of different language types are stored by using a plurality of Dart documents respectively without manual translation, so that the electronic equipment can quickly generate and use the Dart files, the internationalization speed of the flutter documents is improved, and the document editing efficiency is improved. Further, the Dart language in the Dart file is an editable object-oriented language. When the program changes, such as version updating or bug repairing, a programmer can edit the Dart file, so that the editing efficiency is improved. Meanwhile, the method can be realized through the script, when the multi-language configuration scheme is changed, only the corresponding script is required to be modified, the Dart files of each language are not required to be encoded respectively, and the encoding efficiency is improved.
Example two
FIG. 2 is a schematic flow chart of a document processing method according to an embodiment of the present application, in which step 120, converting text in a target document into a function call sentence in Dart language may be implemented to parse keywords in the target document; and converting the keywords into function call sentences of the Dart language according to the semantics of the keywords. As a further illustration of the above embodiments, the above method may be carried out by the following steps:
step 210, obtaining a target document, wherein the target document contains texts in multiple languages.
Step 220, analyzing keywords in the target document.
The target document may include a plurality of natural vocabulary. A spreadsheet may be used to record the functions of the natural language vocabulary corresponding to the vocabulary of the different language types and the Dart language.
The electronic form may include a plurality of natural language vocabulary columns for recording vocabulary of different language types (e.g., chinese, english, german, etc.). The electronic form also comprises a keyword column, and the keyword column is used for representing a function of the Dart language corresponding to the corresponding vocabulary. The natural language vocabulary column represents the semantics of the dart language. The natural language vocabulary of different columns located in the same row, the semantics of the representation are the same. For example, the spreadsheet includes three columns, the first for recording simplified Chinese vocabulary, the second for recording English vocabulary, and the third for recording Dart's language functions.
By word segmentation processing on the target document, a plurality of keywords can be obtained, the keywords are matched with natural language words in the electronic table, and then the row where the keywords are located is found in the electronic table, and further a Dart language function corresponding to the keywords is obtained.
Step 230, converting the keywords into function call sentences of Dart language according to the semantics of the keywords.
When a certain row is matched in the electronic table, a table unit consistent with the keyword is contained in the electronic table, and a function call statement of the Dart language is determined according to the row where the keyword is located. For example, if the keyword is "display" in the first column (simplified chinese vocabulary) in the above example, a function in the Dart language (e.g., a display function in the call Dart language) in the same line as "display" is used as a function call statement in the converted Dart language.
Step 240, translating the text content in the function call statement according to the preset language type.
According to the preset language type, searching the vocabulary which is in the same row with the keywords in the corresponding column in the electronic table, and taking the vocabulary as a translation result of the keywords.
Step 250, storing the translated function call statement in a Dart file corresponding to the preset language type.
And writing the translation result of the selected preset language type and a function call statement of the Dart language into the Dart file.
Step 260, using the multi-language home agent to read the corresponding Dart file according to the selected language type.
According to the document processing method provided by the embodiment of the application, the keywords can be determined through analysis, and the search of the keywords and the query of the function call statement of the Dart language corresponding to the keywords can be realized by combining the translation results of multiple languages and the function call statement of the Dart language provided by the electronic form, so that the vocabulary in the target document is converted into the Dart language, and the accuracy of the Dart language conversion is improved.
Example III
FIG. 3 is a schematic flow chart of a document processing method according to an embodiment of the present application, in which step 120, converting text in a target document into a function call statement in Dart language may be implemented as parsing wild cards in the target document; converting the wild card into a function call statement of Dart language in a function parameter call mode. As a further illustration of the above embodiments, the above method may be carried out by the following steps:
step 310, downloading a target document, wherein the target document contains texts in multiple languages.
Step 320, parsing wild cards in the target document.
Wild cards are special characters in a target document. The special character is combined with the front and rear characters to form a wild card for use in representing the special meaning. The definition of the wildcard is known and the wildcard can be parsed from the target document based on the known meaning of the wildcard and the character characteristics of the wildcard before and after.
Step 330, converting the wild card into a function call statement of Dart language in a function parameter call mode.
The parsed wildcards are converted in the form of function parameters according to the meaning of the known wildcards. Exemplarily, assume question marks "? And if the query function is analyzed to be the query term, the query function is called, and the term after the query function is used as the input parameter of the query function. The generated function will be stored to the Dart file. And then, according to the wild card, the words associated with the wild card are used as the input parameters in the function call statement. Illustratively, assume that the plus sign "+" identifies that the word it connected before is added to the word it connected after. If the called function is to take the operation symbol and the operation object as input parameters, the function calculation function is called by taking the plus sign "+", the word connected in front of the plus sign "+", and the word connected behind the plus sign "+", as parameters. The implementation calls the function with the wildcards and the positions of the wildcard associations as parameters.
And 340, translating the text content in the function call statement according to the preset language type.
And 350, storing the translated function call statement into a Dart file corresponding to the preset language type.
Step 360, the corresponding Dart file is read according to the selected language type by using the multi-language home agent.
The document processing method provided by the embodiment of the application can identify the wildcard in the target document, and convert the wildcard or the text associated with the wildcard into the function call statement of Dart language in the function parameter call mode according to the preset wildcard semantics. Through recognition of the wild cards, which vocabulary in the target document needs to be translated can be accurately obtained, and further translation of specific vocabulary is carried out according to the preset language type, so that more accurate language conversion is achieved. For example, the sentence "hello, very high, and John meet", john needs to be translated into english, while the other text is simplified chinese. At this time, john may be marked in english by a wild card, or John may be marked in simplified chinese, and "John" in the translated document is translated into "John".
Example IV
FIG. 4 is a flowchart of a document processing method according to an embodiment of the present application, in which step 120, converting text in a target document into a function call sentence in Dart language may be implemented by parsing a preset specific character in the target document, where the preset specific character includes a double-quotation mark; and taking the text content indexed by the preset specific character as the data to be translated. Step 130, translating the text content in the function call statement according to the preset language type, may be implemented as: as a further explanation of the above embodiment, the method may be implemented by the following steps:
step 410, obtaining a target document, wherein the target document contains texts in multiple languages.
Step 420, analyzing preset specific characters in the target document.
The preset specific character may be used to identify the text content to output to. Illustratively, the preset specific symbol includes a double-quotation mark or a single quotation mark, or the like. By traversing the target document, a preset specific character in the target document may be determined.
And 430, taking the text content indexed by the preset specific character as data to be translated.
Step 440, translating the data to be translated in the function call statement according to the preset language type.
Step 450, storing the translated function call statement in the Dart file corresponding to the preset language type.
Step 460, using the multi-language home agent to read the corresponding Dart file according to the selected language type.
The document processing method provided by the embodiment of the application can translate the text content indexed by the preset specific character, and improve the translation accuracy.
Example five
Fig. 5 is a schematic structural diagram of a document processing device according to an embodiment of the present application, where the device is located in a terminal or a server, and includes: the system comprises an acquisition module 510, a conversion module 520, a translation module 530, a storage module 540 and a reading module 550. Wherein:
an obtaining module 510, configured to obtain a target document, where the target document includes texts in multiple languages;
a conversion module 520, configured to convert text in the target document into a function call sentence in the Dart language;
a translation module 530, configured to translate text content in the function call statement according to a preset language type;
the storage module 540 is configured to store the translated function call statement in a Dart file corresponding to a preset language type;
a reading module 550, configured to read the corresponding Dart file according to the selected language type using the multilingual home agent.
Further, the conversion module 520 is configured to:
analyzing keywords in the target document;
and converting the keywords into function call sentences of the Dart language according to the semantics of the keywords.
Further, the conversion module 520 is configured to:
resolving wild cards in the target document;
converting the wild card into a function call statement of Dart language in a function parameter call mode.
Further, the conversion module 520 is configured to: analyzing preset specific characters in the target document, wherein the preset specific characters comprise double quotation marks;
taking the text content indexed by preset specific characters as data to be translated;
accordingly, the translation module 530 is configured to: and translating the data to be translated in the function call statement according to the preset language type.
Further, the reading module 550 is configured to; a multilingual home agent;
acquiring the selected language type;
the Dart file associated with the selected language type is invoked by the multi-language home agent.
Further, the obtaining module 510 is configured to download an online document, and take the online document as a target document, where the target document includes texts in multiple languages.
In the document processing device provided by the embodiment of the application, the obtaining module 510 obtains the target document, the converting module 520 converts the text in the target document into the function call statement of the Dart language, the translating module 530 translates the text content in the function call statement according to the preset language type, and the storage module 540 stores the translated function call statement in the corresponding Dart file, so that the Dart language of the preset language type is stored in the Dart file. When the Dart file is used, the reading module 550 reads the Dart file of a preset language type using the multi-language home agent, and executes a function in the Dart file. Compared with the existing method that when the Dart language is converted manually, the method has the advantages that the manual conversion speed is low, and the problems that errors occur easily during manual input and the like are solved, and according to the document processing scheme provided by the embodiment, function call sentences of the Dart language can be generated by the electronic equipment according to the following documents. The generated function call sentences are stored in the corresponding Dart documents, and the Dart languages of different language types are stored by using a plurality of Dart documents respectively without manual translation, so that the electronic equipment can quickly generate and use the Dart files, the internationalization speed of the flutter documents is improved, and the document editing efficiency is improved.
The document processing device provided by the embodiment of the application can execute the document processing method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example six
Fig. 6 is a schematic structural diagram of a computer device according to a sixth embodiment of the present application, and as shown in fig. 6, the computer device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the computer device may be one or more, one processor 60 being taken as an example in fig. 6; the processor 60, the memory 61, the input means 62 and the output means 63 in the computer device may be connected by a bus or by other means, in fig. 6 by way of example.
The memory 61 is a computer-readable storage medium that may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules (e.g., the acquisition module 510, the conversion module 520, the translation module 530, the storage module 540, and the reading module 550) corresponding to the document processing method in the embodiment of the present application. The processor 60 executes various functional applications of the computer device and data processing, that is, implements the above-described document processing method, by running software programs, instructions, and modules stored in the memory 61.
The memory 61 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 61 may further comprise memory remotely located relative to processor 60, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 62 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the computer device. The output 63 may comprise a display device such as a display screen.
Example seven
A seventh embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing a document processing method, the method comprising:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function call statement of Dart language;
translating text content in the function call statement according to a preset language type;
storing the translated function call statement into a Dart file corresponding to the preset language type;
the corresponding Dart file is read according to the selected language type using the multi-language home agent.
Further, converting the text in the target document into a function call sentence in the Dart language includes:
analyzing keywords in the target document;
and converting the keywords into function call sentences of the Dart language according to the semantics of the keywords.
Further, converting the text in the target document into a function call sentence in the Dart language includes:
resolving wild cards in the target document;
converting the wild card into a function call statement of Dart language in a function parameter call mode.
Further, converting the text in the target document into a function call sentence in the Dart language includes:
analyzing preset specific characters in the target document, wherein the preset specific characters comprise double quotation marks;
taking the text content indexed by preset specific characters as data to be translated;
correspondingly, translating the text content in the function call statement according to the preset language type comprises the following steps:
and translating the data to be translated in the function call statement according to the preset language type.
Further, using the multi-language home agent to read the corresponding Dart file according to the selected language type, comprising:
a multilingual home agent;
acquiring the selected language type;
the Dart file associated with the selected language type is invoked by the multi-language home agent.
Further, a target document is obtained, wherein the target document contains texts in multiple languages, and the method comprises the following steps:
and downloading an online document, and taking the online document as a target document, wherein the target document contains texts in multiple languages.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, but may also perform the related operations in the document processing provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present application.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (9)

1. A method for processing a Flutter document, comprising:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function call statement of the Dart language;
translating the text content in the function call statement according to a preset language type;
storing the translated function call statement into a Dart file corresponding to the preset language type;
using the multi-language local agent to read the corresponding Dart file according to the selected language type;
the function call statement for converting the text in the target document into the Dart language comprises the following steps:
resolving wild cards in the target document;
and converting the wild card into a function call statement of the Dart language in a function parameter call mode.
2. The method for processing the Flutter document according to claim 1, wherein said converting the text in the target document into a function call sentence in the Dart language comprises:
analyzing keywords in the target document;
and converting the keywords into function call sentences of the Dart language according to the semantics of the keywords.
3. The method for processing the Flutter document according to claim 1, wherein said converting the text in the target document into a function call sentence in the Dart language comprises:
analyzing preset specific characters in the target document, wherein the preset specific characters comprise double quotation marks;
taking the text content indexed by the preset specific character as data to be translated;
correspondingly, the translating the text content in the function call statement according to the preset language type comprises the following steps:
and translating the data to be translated in the function call statement according to a preset language type.
4. The method for processing a Flutter document according to claim 1, wherein said using a multi-language home agent to read a corresponding Dart file according to a selected language type comprises:
a multilingual home agent;
acquiring the selected language type;
calling the Dart file associated with the selected language type through the multi-language local agent.
5. The method for processing a Flutter document according to claim 1, wherein a target document is acquired, the target document containing texts in a plurality of languages, comprising:
and downloading an online document, and taking the online document as a target document, wherein the target document contains texts in multiple languages.
6. A Flutter document processing apparatus, comprising:
the acquisition module is used for acquiring a target document, wherein the target document comprises texts in multiple languages;
the conversion module is used for converting the text in the target document into a function call statement of Dart language;
the translation module is used for translating the text content in the function call statement according to a preset language type;
the storage module is used for storing the translated function call statement to the Dart file corresponding to the preset language type;
the reading module is used for reading the corresponding Dart file according to the selected language type by using the multilingual local agent;
the conversion module is used for:
resolving wild cards in the target document;
converting the wild card into a function call statement of Dart language in a function parameter call mode.
7. The Flutter document processing apparatus of claim 6, wherein the conversion module is configured to:
analyzing keywords in the target document;
and converting the keywords into function call sentences of the Dart language according to the semantics of the keywords.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the Flutter document processing method of any one of claims 1-5 when the program is executed by the processor.
9. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the Flutter document processing method of any one of claims 1-5.
CN202010312904.3A 2020-04-20 2020-04-20 Document processing method, device, computer equipment and storage medium Active CN111443979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010312904.3A CN111443979B (en) 2020-04-20 2020-04-20 Document processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010312904.3A CN111443979B (en) 2020-04-20 2020-04-20 Document processing method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111443979A CN111443979A (en) 2020-07-24
CN111443979B true CN111443979B (en) 2023-09-05

Family

ID=71654323

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010312904.3A Active CN111443979B (en) 2020-04-20 2020-04-20 Document processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111443979B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118245048A (en) * 2022-12-23 2024-06-25 博泰车联网科技(上海)股份有限公司 Method, system and electronic device for forming Flutter page based on Flutter frame component
CN116681051B (en) * 2023-05-23 2024-08-20 成都安易迅科技有限公司 Multi-language testing method and device for application program, storage medium and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284145A (en) * 2018-08-28 2019-01-29 北京城市网邻信息技术有限公司 The generation of multilingual configuration file and methods of exhibiting and device, equipment and medium
CN109635251A (en) * 2018-10-16 2019-04-16 平安普惠企业管理有限公司 Text conversion method, device, equipment and the storage medium of application
CN110659028A (en) * 2019-09-30 2020-01-07 北京达佳互联信息技术有限公司 Data processing system, method, device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9734820B2 (en) * 2013-11-14 2017-08-15 Nuance Communications, Inc. System and method for translating real-time speech using segmentation based on conjunction locations

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109284145A (en) * 2018-08-28 2019-01-29 北京城市网邻信息技术有限公司 The generation of multilingual configuration file and methods of exhibiting and device, equipment and medium
CN109635251A (en) * 2018-10-16 2019-04-16 平安普惠企业管理有限公司 Text conversion method, device, equipment and the storage medium of application
CN110659028A (en) * 2019-09-30 2020-01-07 北京达佳互联信息技术有限公司 Data processing system, method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111443979A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN108595389B (en) Method for converting Word document into txt plain text document
CN111176650B (en) Parser generation method, search method, server, and storage medium
CN111831384B (en) Language switching method, device, equipment and storage medium
CN111443979B (en) Document processing method, device, computer equipment and storage medium
CN113139390A (en) Language conversion method and device applied to code character strings
CN113076167A (en) Code processing method and related equipment
CN111488155A (en) Coloring language translation method
CN113419721B (en) Web-based expression editing method, device, equipment and storage medium
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
CN111240790B (en) Multi-language adaptation method, device, client and storage medium for application
CN110275712B (en) Text replacement method, device and equipment
JP2022055305A (en) Text processing method for generating text summarization, apparatus, device, and storage medium
CN112965772A (en) Web page display method and device and electronic equipment
CN114327492A (en) Code translation method, device and equipment
CN112199962A (en) Code processing method and device, computer equipment and storage medium
CN113961300A (en) iOS APP character string resource file translation method and system
CN115618887B (en) Dynamic long text internationalization method, device, equipment and storage medium
CN114168189A (en) Vue project code translation method, device and medium
CN110618809B (en) Front-end webpage input constraint extraction method and device
CN114003489B (en) Front-end code file detection method and device, electronic equipment and storage medium
CN113296754B (en) Script language conversion method, editor, equipment and storage medium based on xml
CN113761171A (en) Auxiliary programming method and device, electronic equipment and storage medium
JP2723886B2 (en) Machine translation apparatus and translation rule creation method
CN113778594A (en) Multi-language application package generation method and system
CN114416035A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant