Page 1 of 1

Translation already exists?

Posted: Wed Feb 16, 2022 4:24 pm
by thirstyoctopus
Hey guys

So I'm working on the translation for my game, and there are two language directories, simplified_chinese and traditional_chinese. Everything has been fine so far, but there were a few missing translations due to me moving labels around in a chapter so I put it back to how it was and when I tried to recompile, I got the following traceback error:

Code: Select all

While running game code:
  File "game/tl/traditional_chinese/scripts/chapter_3.rpy", line 3164, in script
    old "I promise I won't"
  File "game/tl/traditional_chinese/scripts/chapter_3.rpy", line 3164, in script
    old "I promise I won't"
Exception: A translation for "I promise I won't" already exists at game/tl/simplified_chinese/scripts/chapter_3.rpy:3165.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/bootstrap.py", line 326, in bootstrap
    renpy.main.main()
  File "renpy/main.py", line 515, in main
    renpy.game.context().run(node)
  File "game/tl/traditional_chinese/scripts/chapter_3.rpy", line 3164, in script
    old "I promise I won't"
  File "game/tl/traditional_chinese/scripts/chapter_3.rpy", line 3164, in script
    old "I promise I won't"
  File "renpy/ast.py", line 2470, in execute
    renpy.translation.add_string_translation(self.language, self.old, self.new, newloc)
  File "renpy/translation/__init__.py", line 453, in add_string_translation
    stl.add(old, new, newloc)
  File "renpy/translation/__init__.py", line 394, in add
    quote_unicode(old), fn, line))
Exception: A translation for "I promise I won't" already exists at game/tl/simplified_chinese/scripts/chapter_3.rpy:3165.
Now this makes sense, because there ARE two translations of this particular line, but they are in different language folders. I don't understand why it's complaining when they are in separate files in separate language directories. Is there something I'm missing? I would appreciate any help with this if someone may have encountered a similar situation.

Thanks

Re: Translation already exists?

Posted: Wed Feb 16, 2022 4:52 pm
by Ocelot
What are language names for those lines in both traditional_chinese/scripts/chapter_3.rpy and simplified_chinese/scripts/chapter_3.rpy?
For the record I mean something starting with translate None... just before problem lines in both files. I am interested in what is written instead of None

Re: Translation already exists?

Posted: Wed Feb 16, 2022 5:15 pm
by thirstyoctopus
Hah, you're right - seems like the simplified chinese translation strings were copy/pasted into the traditional file! Honestly did not notice that until you brought it up, thank you!