• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

How to Translate Dialogues without Breaking Python Scripts

Newbie Spellweaver
Joined
Jun 2, 2021
Messages
19
Reaction score
11
Русский
Просто переводите весь документ на ваш язык , а плохой переведенный участок заменить на оригинал , чтобы не сломать скрипты. Это конечно страшно , но лучше чем ебаться недели две
English
Just translate the entire document into your language, and replace the bad translated section with the original so as not to break the scripts.
It's scary, of course, but it's better than Ducking for two weeks.
Code:
[COLOR=#808080]#replace your translate [/COLOR][COLOR=#808080]# нпс to npc
[/COLOR][COLOR=#808080]# #бр to #br
[/COLOR][COLOR=#cc7832]if [/COLOR]__name__ == [COLOR=#6a8759]'__main__'[/COLOR]:
    [COLOR=#cc7832]with [/COLOR][COLOR=#8888c6]open[/COLOR]([COLOR=#6a8759]'T_Dialogue.ini'[/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'r'[/COLOR]) [COLOR=#cc7832]as [/COLOR]f:
        old_data = f.read()

    new_data = old_data.replace([COLOR=#6a8759]'нпс'[/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'npc'[/COLOR])

    [COLOR=#cc7832]with [/COLOR][COLOR=#8888c6]open[/COLOR]([COLOR=#6a8759]'T_Dialogue.ini'[/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'w'[/COLOR]) [COLOR=#cc7832]as [/COLOR]f:
        f.write(new_data)
 
Back
Top