CN110780919B - Method and system for manufacturing and maintaining application program language package - Google Patents

Method and system for manufacturing and maintaining application program language package Download PDF

Info

Publication number
CN110780919B
CN110780919B CN201910879680.1A CN201910879680A CN110780919B CN 110780919 B CN110780919 B CN 110780919B CN 201910879680 A CN201910879680 A CN 201910879680A CN 110780919 B CN110780919 B CN 110780919B
Authority
CN
China
Prior art keywords
translation
language
language package
directory
file
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
CN201910879680.1A
Other languages
Chinese (zh)
Other versions
CN110780919A (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.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering 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 NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN201910879680.1A priority Critical patent/CN110780919B/en
Publication of CN110780919A publication Critical patent/CN110780919A/en
Application granted granted Critical
Publication of CN110780919B publication Critical patent/CN110780919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Library & Information Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method for manufacturing and maintaining a language package of an application program, which comprises the steps of setting a source directory, a target directory and a translation language of a language package file, wherein the language package file comprises source text, translation text, a translation language and translation state information; initializing a language package; translating the original text to be translated in the language package file, making a translation or maintaining the existing translation, and simultaneously, also discloses a system thereof; the method can effectively realize on-site maintenance and expansion of the language pack, and solve the technical problems of complex flow, scattered work, low efficiency and long period of the language pack manufacturing and maintaining method.

Description

Method and system for manufacturing and maintaining application program language package
Technical Field
The invention relates to the technical field of automation technology and computer software, in particular to a method and a system for manufacturing and maintaining an application program language package.
Background
In order to better cope with software internationalization and expand the internationalized market, a plurality of application software have the capability of supporting multinational languages at present, and a part of software realizes the decoupling of a language package and a program. The decoupling of the language packs and the programs brings convenience to software development and maintenance to a certain extent. However, the maintenance and expansion of the language package still depends on research and development personnel seriously, and has the defects of complex flow, scattered work, low efficiency and long period, and the research and development personnel do not necessarily have the translation capability of multinational languages.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a method and a system for manufacturing and maintaining a language package of an application program, which further improve the maintenance and manufacturing process of the language package, realize the centralized management of the files of the language package, effectively realize the on-site maintenance and expansion of the language package and solve the technical problems of complicated process, scattered work, low efficiency and long period of the method for manufacturing and maintaining the language package on the premise of decoupling the language package and the program.
The technical problem to be solved by the invention is realized by the following technical scheme:
a method for manufacturing and maintaining an application program language package comprises the following steps:
setting a source directory, a target directory and a translation language of a language package file, wherein the language package file comprises source text, translation text, a translation language and translation state information;
initializing a language package;
and translating the original text needing to be translated in the language pack file, and making a translation or maintaining the existing translation.
Further, the language pack initialization specifically includes the following steps:
judging whether a source directory and a target directory of the language package files are the same or not, if so, acquiring a language package file list of the target directory, and if not, copying the source directory into the target directory and acquiring a language package file list under the target directory;
and sequentially judging whether the language of the translation of each language packet file in the language packet file list is consistent with the setting, if so, using the set language of the translation, if not, modifying the language of the translation of the current language packet file into the set language of the translation, and setting the translation state of each entry in the current language packet file into a translation unfinished state.
Further, the translation method of the translation language package file specifically comprises the following steps:
setting entry original text, translated text and a search range to be translated;
matching entries in the language pack file in the search range according to the matching principle that entry original texts in the language pack file are the same as the set entry original texts to be translated, and entry translations in the language pack file are different from the set translations;
replacing the matched translation of the vocabulary entry with a set translation, modifying the translation state of the current vocabulary entry into a translation completion state, and updating the number of translated vocabulary entries and the translation progress of the language package file where the current vocabulary entry is located; and then continue to match the next entry.
The target directory is a storage directory of language package files to be manufactured or maintained.
Further, when setting the language package file source directory, the target directory and the language of the translation, if maintaining the existing language package, the source directory and the target directory are both the file directories of the existing language package; if a new language package is made, the source directory is the file directory of the existing language package, and the target directory is the storage directory of the new language package file.
Furthermore, the language package file must contain translation language information, and the entries in the language package file must contain translation states, which only include a translation incomplete state and a translation complete state.
Further, a calculation formula for calculating the translation progress of each language package file is as follows: number of translated terms/total number of terms 100%;
further, a calculation formula for calculating the translation progress of the file to which the matched entry belongs is as follows: number of translated terms/total number of terms 100%.
A production maintenance system for an application language package, comprising:
the language package setting module is used for setting a language package file source directory, a target directory and a translation language;
the initialization module is used for initializing the language pack;
the translation editing module is used for translating the original text to be translated in the language package file and making a translation or maintaining the existing translation;
the vocabulary entry searching module is used for searching vocabulary entries of the original text needing translation in the language pack file;
and the translation progress updating module is used for updating the translation progress.
Compared with the prior art, the invention has the beneficial effects that:
the method and the system for manufacturing and maintaining the application program language package realize the on-site centralized management of the language package files, provide an effective means for the on-site centralized maintenance and the unified extension of the language package, have the advantages of simple manufacturing and maintaining process, centralized work, high efficiency, short period and the like, and greatly reduce the translation workload of research and development personnel.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flowchart of language pack initialization of the present embodiment;
FIG. 3 is a flowchart of the translation language pack file of the present embodiment;
fig. 4 is a conventional manual selection translation flow of the present embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Examples
As shown in fig. 1, the method for creating and maintaining an application language package according to the present invention includes the following steps:
and step S1, setting the source directory, the target directory and the language of the translation of the language package file. The language package file must contain information such as source text, translation language and translation state; the translated language can be represented by language code abbreviations, such as English represented by en and Chinese represented by zh;
step S2, initializing the language package, as shown in fig. 2, the specific steps are as follows:
1) judging whether the source directory and the target directory are the same or not, if so, acquiring a language package file list of the target directory, and if not, copying the language package files under the source directory into the target directory and acquiring a language package file list under the target directory;
2) and acquiring a target directory language package file list, and recording the list as A. Initializing parameters, namely k is 0, the number of files N is size (A), a total number of terms array sum [ N ], and a translated term array refined [ N ];
3) sequentially judging each language package file A [ k ] in the language package file list A](note as a) k ) Is identical with the language of the translation set in the step S1, if so, the set language of the translation is used, if not, it is modified to the language of the translation set in the step S1, and the language package file a is written k Setting the translation states of all the entries in the Chinese vocabulary to be an incomplete state (Unfinished);
4) statistical language package file a k Calculating the translation progress according to the total number of the entries and the number of the translated entries;
5) and judging whether the initialization of the language package file is completed or not, namely judging whether k is equal to N-1 or not. If not, k is k +1, and the process returns to the step 3) to continue the process.
And step S3, language package production or maintenance, namely, translating the original text needing to be translated in the language package file, producing a translation or maintaining the existing translation.
The present embodiment employs an automatic search translation or a conventional manual selection translation.
The automatic search translation process, as shown in fig. 3, includes the following specific steps:
1) setting entry original text to be translated, translation corresponding to the original text and a search range;
2) searching and matching entries in the language pack file in the search range, wherein the matching principle is that entry original texts in the language pack file are the same as the set entry original texts to be translated, and entry translations in the language pack file are different from the set translations;
3) replacing the translation of the matched entry with the set translation; then checking the translation state of the entry, if the current state is a translation incomplete state (Unfinished), modifying the translation incomplete state into a translation complete state (Finished), and updating the number of translated entries and the translation progress of the language package file where the entry is located;
4) and continuing to match the next entry until the automatic search translation process is finished.
The conventional manual translation selection process, as shown in fig. 4, includes the following specific steps:
1) selecting a language package file to be translated;
2) selecting a vocabulary entry to be translated, and editing a translated text;
3) after editing is Finished, setting the entry translation state as a translation Finished state (Finished), and updating the number of translated entries and the translation progress;
4) if the translation of the selected language package file is not finished, the step 2) is continuously executed, otherwise, the translation is finished.
It should be noted that, in this embodiment, the target directory is a storage directory of the language pack file to be created or maintained.
In this embodiment, when setting the language package file source directory, target directory and translation language, if maintaining the existing language package, the source directory and the target directory are both the file directories of the existing language package; if a new language package is made, the source directory is a file directory of the existing language package, and the target directory is a storage directory of the new language package file.
In this embodiment, the language package file must include language information of a translated language, and the entries in the language package file must include translation states, which only include a translation incomplete state and a translation complete state.
In this embodiment, the calculation formulas for calculating the translation progress of each language package file and the file to which the matched entry belongs are as follows: number of translated terms/total number of terms 100%.
The system for manufacturing and maintaining the application program language package of the embodiment includes:
the language package setting module is used for setting a language package file source directory, a target directory and a translation language;
the initialization module is used for initializing the language pack;
the translation editing module is used for translating the original text to be translated in the language package file and making a translation or maintaining the existing translation;
the vocabulary entry searching module is used for searching vocabulary entries of the original text needing translation in the language pack file;
and the translation progress updating module is used for updating the translation progress.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (6)

1. A method for manufacturing and maintaining an application program language package is characterized by comprising the following steps:
setting a source directory, a target directory and a translation language of a language package file, wherein the language package file comprises source text, translation text, the translation language and translation state information;
initializing a language package;
translating the original text to be translated in the language package file, and making a translation or maintaining the existing translation;
the language package initialization specifically comprises the following steps:
judging whether a source directory and a target directory of the language package files are the same or not, if so, acquiring a language package file list of the target directory, and if not, copying the source directory into the target directory and acquiring a language package file list under the target directory;
sequentially judging whether the translation language type of each language package file in the language package file list is consistent with the setting, if so, using the set translation language type, if not, modifying the translation language type of the current language package file into the set translation language type, and setting the translation state of each entry in the current language package file into a translation unfinished state;
the translation method of the translation language package file specifically comprises the following steps:
setting entry original text, translated text and a search range to be translated;
matching entries in the language package files in the search range according to the matching principle that entry original texts in the language package files are the same as the set entry original texts to be translated, and entry translated texts in the language package files are different from the set translated texts;
replacing the matched translation of the vocabulary entry with a set translation, modifying the translation state of the current vocabulary entry into a translation completion state, and updating the number of translated vocabulary entries and the translation progress of the language package file where the current vocabulary entry is located; then continuing to match the next entry;
when a language package file source directory, a target directory and a translation language are set, if an existing language package is maintained, the source directory and the target directory are both file directories of the existing language package; if a new language package is made, the source directory is the file directory of the existing language package, and the target directory is the storage directory of the new language package file.
2. The method for making and maintaining the application language package according to claim 1, wherein: the target directory is a storage directory of language package files to be manufactured or maintained.
3. The method for making and maintaining an application language package according to claim 1, wherein: the language package file must contain the information of the language of the translated language, the entries in the language package file must contain the translation state, and the translation state only has a translation unfinished state and a translation finished state.
4. The method for making and maintaining an application language package according to claim 1, wherein: the calculation formula for calculating the translation progress of each language package file is as follows: number of translated terms/total number of terms 100%.
5. The method for making and maintaining an application language package according to claim 1, wherein: the calculation formula for calculating the translation progress of the matched document to which the entry belongs is as follows: number of translated terms/total number of terms 100%.
6. A system for manufacturing and maintaining an application language package, comprising:
the language package setting module is used for setting a language package file source directory, a target directory and a translation language;
the initialization module is used for initializing the language pack;
the translation editing module is used for translating the original text to be translated in the language package file and making a translation or maintaining the existing translation;
the vocabulary entry searching module is used for searching vocabulary entries of the original text needing translation in the language pack file;
the translation progress updating module is used for updating the translation progress;
the language pack initialization specifically comprises the following steps:
judging whether the source directory and the target directory of the language package files are the same or not, if so, acquiring a language package file list of the target directory, and if not, copying the source directory into the target directory and acquiring a language package file list under the target directory;
sequentially judging whether the translation language type of each language package file in the language package file list is consistent with the setting, if so, using the set translation language type, if not, modifying the translation language type of the current language package file into the set translation language type, and setting the translation state of each entry in the current language package file into a translation unfinished state;
the translation method of the translation language package file specifically comprises the following steps:
setting an original entry, a translated entry and a search range to be translated;
matching entries in the language package files in the search range according to the matching principle that entry original texts in the language package files are the same as the set entry original texts to be translated, and entry translated texts in the language package files are different from the set translated texts;
replacing the matched translation of the vocabulary entry with a set translation, modifying the translation state of the current vocabulary entry into a translation completion state, and updating the number of translated vocabulary entries and the translation progress of the language package file where the current vocabulary entry is located; then continuing to match the next entry;
when a language package file source directory, a target directory and a translation language are set, if an existing language package is maintained, the source directory and the target directory are both file directories of the existing language package; if a new language package is made, the source directory is the file directory of the existing language package, and the target directory is the storage directory of the new language package file.
CN201910879680.1A 2019-09-18 2019-09-18 Method and system for manufacturing and maintaining application program language package Active CN110780919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910879680.1A CN110780919B (en) 2019-09-18 2019-09-18 Method and system for manufacturing and maintaining application program language package

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910879680.1A CN110780919B (en) 2019-09-18 2019-09-18 Method and system for manufacturing and maintaining application program language package

Publications (2)

Publication Number Publication Date
CN110780919A CN110780919A (en) 2020-02-11
CN110780919B true CN110780919B (en) 2022-09-23

Family

ID=69383706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910879680.1A Active CN110780919B (en) 2019-09-18 2019-09-18 Method and system for manufacturing and maintaining application program language package

Country Status (1)

Country Link
CN (1) CN110780919B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399064A (en) * 2017-02-07 2018-08-14 南京南瑞继保电气有限公司 Multilingual entry generation method based on Qt exploitations

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399064A (en) * 2017-02-07 2018-08-14 南京南瑞继保电气有限公司 Multilingual entry generation method based on Qt exploitations

Also Published As

Publication number Publication date
CN110780919A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN107918666B (en) Data synchronization method and system on block chain
CN102521254B (en) Uniform access method of isomeric database
CN104133772A (en) Automatic test data generation method
CN103617176A (en) Method for achieving automatic synchronization of multi-source heterogeneous data resources
CN104216888A (en) Data processing task relation setting method and system
CN106446019B (en) A kind of software function treating method and apparatus
CN103514223A (en) Data synchronism method and system of database
CN106844369B (en) Objectification SQL sentence construction method and apparatus
CN103885942B (en) A kind of rapid translation device and method
CN104199662A (en) Multi-language supporting technology suitable for FLEX project
CN106919697B (en) Method for simultaneously importing data into multiple Hadoop assemblies
US20120066237A1 (en) Delta language translation
CN111008020A (en) Method for analyzing logic expression into general query statement
WO2021253641A1 (en) Shading language translation method
CN106708972B (en) Method for optimizing ABAP program by utilizing SLT component based on HANA database
CN110780919B (en) Method and system for manufacturing and maintaining application program language package
CN102103494A (en) Method and device for changing software resource
CN109491904B (en) Automatic testing method and device for spark SQL application program
Wang The development of translation technology in the era of big data
CN116955393A (en) Data processing method and device, electronic equipment and storage medium
CN103809915A (en) Read-write method and device of magnetic disk files
CN105487912A (en) Public problem modification multi-branch maintenance system and method
CN115686493A (en) Method for automatically generating interface control document by C language data structure code
CN109614082B (en) Translation method, device and equipment for data query script
CN114925142A (en) Multi-type database compatibility method, device, equipment and medium of ORM framework

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