Language 'None' dialogue translation

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Hijikata
Newbie
Posts: 17
Joined: Mon Oct 02, 2017 9:00 am
Completed: Lucy Got Problems
Projects: CrocApoca!!
Organization: Flat Chest
itch: flatchest
Contact:

Language 'None' dialogue translation

#1 Post by Hijikata »

Hello, folks! I have a pretty specific question about Ren'Py translation system.

Tl;DR: Why are dialogue translations for the default None language handled differently than those of any other language?

Long explanation: We've released a demo for our new project during the recent Steam Game Festival, and as it often happens our players found some typos and awkward wording in the English text. We wanted to release a quick hotfix with those errors removed, bu-u-ut... we have a bunch of translations, and as we know, changing the original dialogue lines even slightly, will change the line's unique identifier, that would require updating it in every language translation.

I thought of a possible solution to do it quickly by creating blank translation files in the game/tl/None folder and filling them with only the lines that needed to be changed. I actually used it as a way to change some GUI strings without reimporting all the translations, so I was sure it would also work for dialogue translations as well. My thinking was that as with any other language, if there wouldn't be a "translation" for all the unchanged lines, it would just fall back to the original language lines.

I was wrong. What it does in practice, is play the lines preceding the "translated" lines, then showing any "translated" lines, skipping all the lines that are not in the doc, and then it returns into the main menu. Duh.

Of course we decided against releasing the hotfix, but now that the Festival is over, I decided to look into it, because I think using the None dialogue translation could be a really neat way to non-destructively edit the in-game lines without touching all the other translations, wasting time and risking regression. My theory was that somehow, unlike with normal translations, the game was switching entirely to the translation blocks themselves and executing them in sequence. And today I found this quote in renpy.ast.Translation source

Code: Select all

 If language is None, when executed this transfers control to the translate
statement in the current language, if any, and otherwise runs the block.
If language is not None, causes an error to occur if control reaches this
statement.
So, is there a possibility to make the None language translations behave consistently with how other languages do, or is it the cornerstone of the whole translation system, and it would collapse without this disparity? Has anyone else tried doing something similar? Do you think it is a relevant use case?
Image Image Follow us on Twitter
Resident hacker cat.

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Language 'None' dialogue translation

#2 Post by rames44 »

I can’t speak to the “None” issue, but you could probably have done what you wanted by adding an “English” translation that modified the critical lines and have your patch set that as the default. Might have required tweaking the language selection code, of course.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Language 'None' dialogue translation

#3 Post by xavimat »

Renpy translation system is designed to translate games that are completed in the original language. Developing a game in several languages at the same time causes those problems.

What I do, as rames44 has suggested, is a "translation " also for the original language. And, if I need to correct something, I correct in the translation, and not in the original.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Hijikata
Newbie
Posts: 17
Joined: Mon Oct 02, 2017 9:00 am
Completed: Lucy Got Problems
Projects: CrocApoca!!
Organization: Flat Chest
itch: flatchest
Contact:

Re: Language 'None' dialogue translation

#4 Post by Hijikata »

rames44 wrote: Thu Jul 02, 2020 12:25 pm I can’t speak to the “None” issue, but you could probably have done what you wanted by adding an “English” translation that modified the critical lines and have your patch set that as the default. Might have required tweaking the language selection code, of course.
Thanks a lot for the suggestion. I was thinking of a separate English "translation" as a possible solution but by the time this occurred to me, the event was already over.^^' I was also hoping there might be a "cleaner" solution, so I went looking at the source code.
xavimat wrote: Fri Jul 03, 2020 1:26 am Renpy translation system is designed to translate games that are completed in the original language. Developing a game in several languages at the same time causes those problems.
That's a feeling I get too. We never ran into these limitations with our first project, where translations happened post-release, and were not done all at the same time. And now with the current project we started noticing some places where the translation system doesn't scale that well.
xavimat wrote: Fri Jul 03, 2020 1:26 amWhat I do, as rames44 has suggested, is a "translation " also for the original language. And, if I need to correct something, I correct in the translation, and not in the original.
Guess that's what I'll roll with for production. The ability to fix lines in the base language without reimporting all the other language translations is super useful.
Image Image Follow us on Twitter
Resident hacker cat.

Post Reply

Who is online

Users browsing this forum: No registered users