EasyRPG / Tools

Assorted tools to handle RPG Maker 2000/2003 files
https://easyrpg.org/tools/
49 stars 18 forks source link

lcftrans: Add new mode "Match". #58

Closed Ghabry closed 3 years ago

Ghabry commented 3 years ago

This takes two folders with Po-Files and attempts to match the source text with the target text. Very useful to generate translation files from games that have hardcoded translations directly in the game files.

Assuming you have two translated games. e.g. Vampires Dawn de and en.

First you create two new translations from the two translated game versions:

# Create translation dirs
mkdir -p vd1_de/languages/de vd1_de/languages/en vd1_de/languages/en_matched

# Dump German strings in languages/de
lcftrans -c -o vd1_de/languages/de vd1_de 1252

# Dump English strings in languages/en
lcftrans -c -o vd1_de/languages/en vd1_en 1252

Then you match them:

# Match English strings with German strings.
# The English strings are now the translation of the German strings.
# (put in languages/en_matched)
lcftrans -m vd1_de/languages/en -o vd1_de/languages/en_matched vd1_de/languages/de

Image: Left German, Middle English, Right Merged There are "#, fuzzy" markers when the line did not match (so the translation that was put there could be wrong)

Screenshot_20210308_143342-fs8