Jump to content
You need to play a total of 10 battles to post in this section.
Itouyou

How to rewrite language files

1 comment in this topic

Recommended Posts

81
[NOOB2]
[NOOB2]
Member
90 posts
4,859 battles

I wrote how to efficiently rewrite language files.

With this method it will be easier to upgrade the version and problems will not occur easily.
However, I think that it is very difficult to understand because I am impaired in English.
I hope that the kind person will make it easy to understand.

Also, I am sorry if it was already well-known content.

※日本語のドキュメントは既に書いたので以下を参照されたし。
http://hima-ari.hatenablog.com/entry/2018/05/07/002737


Use the following tools.

●PoEdit
https://poedit.net/

●WinMerge 日本語版
http://www.geocities.co.jp/SiliconValley-SanJose/8165/winmerge.html

●Familiar text editor

Why the WinMerge Japanese version is because it uses the 3-way merge function.
If you have a tool that has other 3-way merge functions that you are accustomed to, use it.

 

Procedure of creation

Copy in the following directory to an easy-to-use directory
C:\Program Files (x86)\Poedit\GettextTools\bin

image.png.eb9fcfad087556ffaf2bd9e6ee50c2b5.png

 

 

Create a batch file

#mo2poconv.bat
if "%time:~0,1%" == " " (
    msgunfmt.exe *.mo -o %date:~0,4%%date:~5,2%%date:~8,2%0%time:~1,1%%time:~3,2%%time:~6,2%.po
    goto complete
)
ELSE(
    msgunfmt.exe *.mo -o %date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%.po
    goto complete
)
:complete
pause

2018-1022-173704(1092x320).thumb.png.e6ddf93b91c5677fa087cd06edb107a5.png

 


#po2moconv.bat

msgfmt.exe *.po -o global.mo
pause

2018-1022-173736(604x138).png.dcfd0b48ef14452cab4fe13f46572638.png

 

 

Copy the translation file in the following directory to "GetTextTools" folder
C:\Games\World_of_Warships\res\texts\[your lang]\LC_MESSAGES\global.mo

image.png.59ad0b5e9d0189e91c64201943e75231.png

 

Execute #mo2poconv.bat
※The ".po" file before customization is necessary for version upgrade.

Change the name appropriately and take a backup.

Customize ".po" file created with familiar text editor.

Execute #po2moconv.bat

Place the completed "global.mo" in the directory below and check the operation.
C:\Games\World_of_Warships\res_mods\[target version]\texts\[your lang]\LC_MESSAGES\global.mo

image.png.84d27883e809e1db6c18a5ad3c30fc6e.png

 

 

 

Update procedure

Convert the new version of the "global.mo" file to a ".po" file as well as the procedure for creating it

 

Setting Win Merge

2018-1022-182503(638x150).png.a641b4a8a9b67d8c49ea032868402640.png

 

2018-1022-182518(528x455).png.87c9ff1099089a8a9c7dd4ed84a223f4.png

 

2018-1022-182820(714x518).png.af5fc3a4cb49630a86364d971342598b.png

 

Select the left pane

Perform automatic merge

2018-1022-183123(974x640).thumb.png.5ac8b768c251a55347bd352d9103fe6c.png

 

Fix conflicts
In the conflict part, basically align the left pane to the contents of the center pane.

 

Once you get used to it, work will be completed in a matter of minutes.
However, if newly added elements remain in English, you will need to modify them as necessary.

image.png

Edited by Itouyou

Share this post


Link to post
Share on other sites

×