Removing orphaned translated blocks

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Triority
Regular
Posts: 185
Joined: Fri Jul 20, 2018 1:28 pm
Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
Projects: Welcome To... Chichester series
Organization: Triority
Tumblr: Sku-te
itch: triority
Location: England
Discord: sku_te
Contact:

Removing orphaned translated blocks

#1 Post by Triority »

Is there an easier way of deleting large blocks of orphaned translated blocks than just searching for each ID and then removing the block?

User avatar
m_from_space
Miko-Class Veteran
Posts: 981
Joined: Sun Feb 21, 2021 3:36 am
Contact:

Re: Removing orphaned translated blocks

#2 Post by m_from_space »

Triority wrote: Sun Feb 18, 2024 2:27 pm Is there an easier way of deleting large blocks of orphaned translated blocks than just searching for each ID and then removing the block?
So a while ago I wrote myself a python script, that takes in a Renpy translation file and an untranslated version of that file and outputs a cleaned version of your original translation file, even marking lines that are not translated yet with "# TODO". Attached you will find the script, containing a Readme.txt

Do whatever you want with it! It never touches your actual project, as described in the Readme. But still, use at your own risk and also backup your project!

Let me know if that worked out for you!

(P.S. I didn't write it for anybody else than me, so there might be bugs and cases where it doesn't work properly regarding any special characters...)
Attachments
Renpy Clean TL.zip
A python script that can clean Renpy translation files one at a time.
(3.1 KiB) Downloaded 15 times

User avatar
Triority
Regular
Posts: 185
Joined: Fri Jul 20, 2018 1:28 pm
Completed: Welcome To... Chichester 0, 1,2 OVN 1, OVN 2, OVN 3, No Regrets For The Future
Projects: Welcome To... Chichester series
Organization: Triority
Tumblr: Sku-te
itch: triority
Location: England
Discord: sku_te
Contact:

Re: Removing orphaned translated blocks

#3 Post by Triority »

That sounds interesting! Thanks!

Post Reply

Who is online

Users browsing this forum: decocloud