CN109543157B - OSD language conversion method of android scheme - Google Patents
OSD language conversion method of android scheme Download PDFInfo
- Publication number
- CN109543157B CN109543157B CN201811238515.XA CN201811238515A CN109543157B CN 109543157 B CN109543157 B CN 109543157B CN 201811238515 A CN201811238515 A CN 201811238515A CN 109543157 B CN109543157 B CN 109543157B
- Authority
- CN
- China
- Prior art keywords
- file
- read
- country
- countries
- excel
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
Abstract
The invention relates to an android scheme OSD language conversion method, belongs to the technical field of android TVs, and has the advantage of improving modification efficiency. The method comprises the following steps: s101: traversing the language file in the xml format in the source code directory; s102: extracting ID in the language file in the xml format, and vocabularies and countries corresponding to the ID; s103: storing the extracted ID, the vocabulary and the country corresponding to the ID into excel in a csv format; s104: manually modifying vocabularies needing to be modified in the excel; s105: storing excel in csv format; s201: traversing an excel file in the csv format file; s202: creating a country file and establishing a new xml format every time a new country is read for the ID read in the excel file and the vocabulary and the country information corresponding to the ID; s203: writing the ID and the vocabulary configuration node corresponding to the ID into the corresponding xml format file according to the country; s204: and when traversing the csv format file is completed and the xml format file is generated, completing the operation.
Description
Technical Field
The invention relates to the technical field of android TVs, in particular to an android scheme OSD language conversion method.
Background
The specific translation needs to be modified for corresponding strings.xml, but the software preset by the TV is numerous, and the country corresponding to each software is a strings.xml file. The method of installing the apk to the TV was later adopted. The method comprises the following specific steps: and installing the apk to a prototype, inserting a USB flash disk, selecting software needing to modify the language, exporting excel, importing the excel into a TV to generate a corresponding xml language table after an engineer modifies the excel, and compiling the table into the software. This method is cumbersome and the modification efficiency is still not high.
Disclosure of Invention
The invention aims to provide an android scheme OSD language conversion method which has the advantage of improving the modification efficiency.
The above object of the present invention is achieved by the following technical solutions:
an android OSD language conversion method comprises the following steps: s101: traversing the language file in the xml format in the source code directory; s102: extracting ID in the language file in the xml format, and vocabularies and countries corresponding to the ID; s103: storing the extracted ID, the vocabulary corresponding to the ID and the country into excel; s104: manually modifying vocabularies needing to be modified in the excel; s105: storing excel in csv format; s201: traversing vocabularies corresponding to Chinese families of excel files in the csv format files; s202: creating a country file and establishing a new xml format every time a new country is read for the ID read in the excel file and the vocabulary and the country information corresponding to the ID; s203: writing the ID and the vocabulary configuration node corresponding to the ID into the corresponding xml format file according to the country; s204: and when traversing the csv format file is completed and the xml format file is generated, completing the operation.
Further, the method for traversing the language file in xml format in the source code directory in step S1O1 includes: and marking the processed language files in the xml format, and completing traversal when all the language files in the xml format are marked.
Further, the method for traversing an excel file in the csv format file in step S201 includes: and marking the vocabulary corresponding to the processed countries, and completing traversal when the vocabulary corresponding to all the countries is marked.
Further, when the information in the excel file is read in step S202, each time one piece of information is read, the read information is compared with the read information, if the read information is different from the read information, the vocabulary configuration nodes corresponding to the ID and the ID are written into the corresponding xml format file according to the country, and if the read information is the same as the read information, the writing is not performed until the information read in the excel file is the same as the read information.
Further, the method for judging that the read country is a new country in S202 includes: and comparing the read country with all countries of which the folders are created, and if the countries are not repeated, determining the countries as new countries.
Further, the method for determining completion of traversing the csv format file in S204 is as follows: and comparing the read countries with all countries of which the folders are created, and finishing traversal if the read countries and the countries of which the folders are created repeat or replace modified vocabularies.
In conclusion, the invention has the following beneficial effects: the language files in the xml format in the television source code directory are automatically exported to the excel file, and the language files in the xml format are automatically generated again after the vocabulary in the excel file is modified, so that the modification efficiency of the language files in the xml format is improved.
Drawings
FIG. 1 is a block flow diagram of a method of an embodiment of the invention;
FIG. 2 is a table showing the words and countries corresponding to the IDs and IDs according to the embodiment of the present invention.
Detailed Description
The technical solutions of the embodiments of the present invention will be described below with reference to the accompanying drawings.
The invention discloses an OSD language conversion method of an android scheme, which comprises the following steps:
s101: traversing the language file in the xml format in the source code directory;
specifically, traversing is to process all the language files in the xml format, in order to avoid the situation that the language files in the xml format are not processed, the language files in the processed xml format are marked, and when all the language files in the xml format are marked, traversing is completed.
S102: extracting ID in the language file in the xml format, and vocabularies and countries corresponding to the ID;
specifically, when extracting the ID, the vocabulary and the country corresponding to the ID, traversal is also needed, and data omission in the file is avoided, which results in incomplete data export. If the data export is not complete, the function is lost after the input import at the later stage.
S103: storing the extracted ID, the vocabulary and the country corresponding to the ID into excel in a csv format;
specifically, as shown in fig. 2, the tv is a table of a plurality of country IDs and vocabularies, and one of them is taken as an example: HikeenTeam stands for ID column, below which app _ name stands for ID, values-uk-rUA stands for the country Ukrainian, HotelMenu stands for the ID under Ukran: values-uk-rUA. In the excel table, each country creates a column filled with ID and vocabulary corresponding to the ID, and the storage format is csv.
S104: manually modifying vocabularies needing to be modified in the excel;
specifically, the staff can replace the vocabulary to be modified in the excel as required.
S105: storing excel in csv format;
s201: traversing an excel file in the csv format file;
specifically, in order to prevent the system from failing to completely traverse the vocabulary corresponding to the chinese family of the excel file, the method for traversing the vocabulary corresponding to the chinese family of the excel file in the csv format file comprises the following steps: and marking the vocabulary corresponding to the processed countries, and completing traversal when the vocabulary corresponding to all the countries is marked.
S202: creating a country file and establishing a new xml format every time a new country is read for the ID read in the excel file and the vocabulary and the country information corresponding to the ID;
specifically, in order to prevent the information read in the excel file from being omitted, when the information in the excel file is read, the information is compared with the read information every time one information is read, if the read information is different from the read information, vocabulary configuration nodes corresponding to the ID and the ID are written into a corresponding xml format file according to the country, and if the read information is the same as the read information, the vocabulary configuration nodes are not written until the information read in the excel file is the same as the read information. The method for judging that the read country is a new country comprises the following steps: and comparing the read country with all countries of which the folders are created, and if the countries are not repeated, determining the countries as new countries.
S203: writing the ID and the vocabulary configuration node corresponding to the ID into the corresponding xml format file according to the country;
s204: and when traversing the csv format file is completed and the xml format file is generated, completing the operation.
Specifically, the method for judging completion of traversing the csv format file comprises the following steps: and comparing the read countries with all countries of which the folders are created, and finishing traversal if the read countries and the countries of which the folders are created repeat or replace modified vocabularies. And on the premise of completing the traversal of the csv format file, finishing the generation of the xml format file and completing the operation.
Claims (5)
1. An android OSD language conversion method is characterized by comprising the following steps:
s101: traversing the language file in the xml format in the source code directory;
s102: extracting ID in the language file in the xml format, and vocabularies and countries corresponding to the ID;
s103: storing the extracted ID, the vocabulary and the country corresponding to the ID into excel in a csv format;
s104: manually modifying vocabularies needing to be modified in the excel;
s105: storing excel in csv format;
s201: traversing vocabularies corresponding to Chinese families of excel files in the csv format files;
s202: creating a country file and establishing a new xml format every time a new country is read for the ID read in the excel file and the vocabulary and the country information corresponding to the ID;
when the information in the excel file is read in the step S202, comparing the read information with the read information every time one information is read, if the read information is different from the read information, writing the vocabulary configuration nodes corresponding to the ID and the ID into the corresponding xml format file according to the country, and if the read information is the same as the read information, not writing the vocabulary configuration nodes until the read information in the excel file is the same as the read information;
s203: writing the ID and the vocabulary configuration node corresponding to the ID into the corresponding xml format file according to the country;
s204: and when traversing the csv format file is completed and the xml format file is generated, completing the operation.
2. The OSD language conversion method of claim 1, wherein the method for traversing the xml-formatted language file in the source code directory in step S1O1 is as follows: and marking the processed language files in the xml format, and completing traversal when all the language files in the xml format are marked.
3. The OSD language conversion method according to claim 1, wherein the method for traversing the vocabulary corresponding to the chinese family in the excel file in the csv format file in step S201 is as follows: and marking the vocabulary corresponding to the processed countries, and completing traversal when the vocabulary corresponding to all the countries is marked.
4. The OSD language conversion method according to claim 1, wherein the method of determining that the read country is a new country in S202 is: and comparing the read country with all countries of which the folders are created, and if the countries are not repeated, determining the countries as new countries.
5. The OSD language conversion method of claim 1, wherein the determination method for traversing the csv format file in S204 is: and comparing the read countries with all countries of which the folders are created, and finishing traversal if the read countries and the countries of which the folders are created repeat or replace modified vocabularies.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811238515.XA CN109543157B (en) | 2018-10-23 | 2018-10-23 | OSD language conversion method of android scheme |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811238515.XA CN109543157B (en) | 2018-10-23 | 2018-10-23 | OSD language conversion method of android scheme |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109543157A CN109543157A (en) | 2019-03-29 |
CN109543157B true CN109543157B (en) | 2021-02-05 |
Family
ID=65844368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811238515.XA Active CN109543157B (en) | 2018-10-23 | 2018-10-23 | OSD language conversion method of android scheme |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109543157B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101968783A (en) * | 2010-09-19 | 2011-02-09 | 深圳市万兴软件有限公司 | Method and device of converting XML document into Excel document |
CN104156342A (en) * | 2014-08-01 | 2014-11-19 | 福建星网视易信息系统有限公司 | Method and device for converting Excel format testing case into XML (extensive markup language) format |
CN106547841A (en) * | 2016-10-14 | 2017-03-29 | 西安工程大学 | A kind of data automatic switching method of Excel XML mappings |
CN108009264A (en) * | 2017-12-14 | 2018-05-08 | 北京航天测控技术有限公司 | A kind of comparative approach of versions of data for Excel format files |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10657206B2 (en) * | 2015-03-11 | 2020-05-19 | Stats Llc | Graphical user interface system and method for natural language generation editing |
-
2018
- 2018-10-23 CN CN201811238515.XA patent/CN109543157B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101968783A (en) * | 2010-09-19 | 2011-02-09 | 深圳市万兴软件有限公司 | Method and device of converting XML document into Excel document |
CN104156342A (en) * | 2014-08-01 | 2014-11-19 | 福建星网视易信息系统有限公司 | Method and device for converting Excel format testing case into XML (extensive markup language) format |
CN106547841A (en) * | 2016-10-14 | 2017-03-29 | 西安工程大学 | A kind of data automatic switching method of Excel XML mappings |
CN108009264A (en) * | 2017-12-14 | 2018-05-08 | 北京航天测控技术有限公司 | A kind of comparative approach of versions of data for Excel format files |
Also Published As
Publication number | Publication date |
---|---|
CN109543157A (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107918666B (en) | Data synchronization method and system on block chain | |
CN104239082B (en) | The hot patch implementation method of embedded system | |
CN107506219A (en) | A kind of general version upgrade method based on android system | |
CN101499069A (en) | Internal memory database file updating method and apparatus | |
CN104484269A (en) | Method for automatically generating testing script | |
CN104461484A (en) | Front-end template implementation method and device | |
CN105677324A (en) | Method for automatically generating entity type codes | |
CN110019111B (en) | Data processing method, data processing device, storage medium and processor | |
CN110502243B (en) | Method for generating personalized profile package data in an integrated circuit card | |
CN103761095B (en) | Method for generating universal upgrade file head data information | |
CN105446725A (en) | Method and system for model driven development | |
CN104133676A (en) | Function execution method and function execution device based on scripts | |
CN105554577A (en) | Smart television over-the-air technology (OTA) upgrading method and device, smart television | |
CN109543157B (en) | OSD language conversion method of android scheme | |
WO2018233673A1 (en) | Method and apparatus for configuring model code in controller, and storage medium | |
CN105468661A (en) | Method and system for searching symbol information in ELF file | |
CN104991810A (en) | Method and processing system for automatically adding APK into Android system | |
CN107797805A (en) | A kind of code wrap method, apparatus and computer-readable recording medium | |
CN103246605A (en) | Method and system for collocating remote controller key values based on xml (extensive markup language) | |
CN105653669A (en) | HTML (Hypertext Marked Language) generating method and device | |
CN104376113A (en) | Multi-language string processing method and system | |
CN102043853A (en) | Method and device for updating stored data | |
CN104391719A (en) | Compiling-free fast mirror image customizing method based on Android platform | |
CN103796193A (en) | Automatic PRI parameter configuration method and system of CDMA mobile terminal | |
CN106681914B (en) | Television picture quality debugging method and device |
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 |