-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some small problems #1
Comments
Hello.
Just curious, to what language you translate? |
Hello, thanks for you fast reply.
I am from Germany and translate in German. We have characters like ü, ä, ö and ß I tried to fix this myself, but i never worked with python. But I had some success. I could generate the right path for 3. and 4. but I havent figured out how to get the new folder to the part of the script where it actualy generates the PO file.
With this change I see the right Path in the log, but it still generates the old path. So I think I need to get basefile to po.save(pofilename). Edit: But you change helps me a lot, I think I can fix problem 3 at least now. Still the Patches folder problem persits, as I need the parent_node.tag for the new filepath. Edit 2: This works for the Things Problem:
|
I think I got it. I added this part and till now, the Patch folder is generated right. I will confirm after I test the finished translation ingame. ´´´
´´´ And here it is: https://pastebin.com/vKJ5u7E6 I put the hole thing in Pastebin. Please watch out, I changed the meta generation, too and filled it with my dates on the top. |
Remove logging with missing pofilename
Hello,
i really like you tool and tried to start a routine with it for translating. But i ran into some errors.
When trying to Generating translated files it wouldn't do anything for me. It said pofilename was empty. I could fix that by changing:
logging.info("Creating XML file " + pofilename)
to
logging.info("Creating XML file " + xml_filename)
My language needs special characters, but in the finished xml files these characters were wrong encoded. Fixed this by changing:
target = open(xml_filename, 'w')
to
target = open(xml_filename, 'w', encoding='utf8')
Now the point I think I can't fix anymore. After creating a translation with your tool I had problems that a part of the translations didn't showed up. After some research I think it's the folder structure. When there are folders like ThingDefs_Buildings and ThingDefs_Items under Defs your script copies them directly to the languages folder, but all files of these folders need to be combined into ThingDef folder. After changing this manually all translations showed up. I don't know if there are more special combining rules for translation. Maybe look at the core translation for hints. If you could include rewrite rules for the ThingDefs_.... folder to ThingDef I can help with testing more combinations while translating mods and tell you about.
And one more, I am so sorry. If a mod adds new labels and description with a patch file, there will be no string for translation.
The text was updated successfully, but these errors were encountered: