generate translations, duplicate menu options

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
smollvrn
Newbie
Posts: 14
Joined: Sun Mar 14, 2021 3:24 pm
Contact:

generate translations, duplicate menu options

#1 Post by smollvrn »

does not generate translate strings if they duplicate in menu options

"yes" and "no" in code generate only one time in translate strings

Code: Select all

01 # The script of the game goes in this file.
02 
03 # Declare characters used by this game. The color argument colorizes the
04 # name of the character.
05 define e = Character("Eileen")
06 # The game starts here.
07 label start:
08     # Show a background. This uses a placeholder by default, but you can
09     # add a file (named either "bg room.png" or "bg room.jpg") to the
10     # images directory to show it.
11     scene bg room
12     # This shows a character sprite. A placeholder is used, but you can
13     # replace it by adding a file named "eileen happy.png" to the images
14     # directory.
15     show eileen happy
16     # These display lines of dialogue.
17     e "1"
18     menu:
19         "Yes":
20             e "2"
21         "Yes (lie)":
22             e "3"
23         "No":
24             e "4"
25     e "5"
26     menu:
27         "Yes":
28             e "6"
29         "No": 
30                e "7"        
31     e "8"
32     menu:
33         "Yes":
34             e "9"
35         "No": 
36                e "10"
37     menu:
38         "Yes (truth)":
39             e "11"
40         "No (truth)": 
41                e "12"
42     menu:
43         "Yes":
44             e "13"
45         "No": 
46                e "14"     
47     menu:
48         "Yes (truth)":
49             e "15"
50         "No (truth)": 
51                e "16"            
52     # This ends the game.
53     return
after generate translations in game/tl/russian/script.rpy

short

Code: Select all

translate russian strings:
    # game/script.rpy:18
    old "Yes"
    new "Yes"
    # game/script.rpy:18
    old "Yes (lie)"
    new "Yes (lie)"
    # game/script.rpy:18
    old "No"
    new "No"
    # game/script.rpy:37
    old "Yes (truth)"
    new "Yes (truth)"
    # game/script.rpy:37
    old "No (truth)"
    new "No (truth)"
full

Code: Select all

# game/script.rpy:17
translate russian start_179afab5:
    # e "1"
    e "1"
# game/script.rpy:20
translate russian start_8b798626:
    # e "2"
    e "2"
# game/script.rpy:22
translate russian start_9d9a5b18:
    # e "3"
    e "3"
# game/script.rpy:24
translate russian start_1805ae75:
    # e "4"
    e "4"
# game/script.rpy:25
translate russian start_2cf98aa7:
    # e "5"
    e "5"
# game/script.rpy:28
translate russian start_e6d715c0:
    # e "6"
    e "6"
# game/script.rpy:30
translate russian start_5c3853ad:
    # e "7"
    e "7"
# game/script.rpy:31
translate russian start_27b4ce36:
    # e "8"
    e "8"
# game/script.rpy:34
translate russian start_84b66dc1:
    # e "9"
    e "9"
# game/script.rpy:36
translate russian start_7f636f71:
    # e "10"
    e "10"
# game/script.rpy:39
translate russian start_f2124a17:
    # e "11"
    e "11"
# game/script.rpy:41
translate russian start_7179bdb9:
    # e "12"
    e "12"
# game/script.rpy:44
translate russian start_59d0fe3c:
    # e "13"
    e "13"
# game/script.rpy:46
translate russian start_29186db6:
    # e "14"
    e "14"
# game/script.rpy:49
translate russian start_131483ac:
    # e "15"
    e "15"
# game/script.rpy:51
translate russian start_f521287f:
    # e "16"
    e "16"
translate russian strings:
    # game/script.rpy:18
    old "Yes"
    new "Yes"
    # game/script.rpy:18
    old "Yes (lie)"
    new "Yes (lie)"
    # game/script.rpy:18
    old "No"
    new "No"
    # game/script.rpy:37
    old "Yes (truth)"
    new "Yes (truth)"
    # game/script.rpy:37
    old "No (truth)"
    new "No (truth)"

User avatar
qirien
Miko-Class Veteran
Posts: 541
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
itch: qirien
Location: New Mexico, USA
Discord: qirien
Contact:

Re: generate translations, duplicate menu options

#2 Post by qirien »

I think this is generally considered to be a feature, not a bug -- if you have the same text, why translated it more than once?
However, I suppose there are some times when the original language might have the same words but they need to be translated differently. You can use {#tags} in the original to tell the context so that you can translate them differently if you need to, like this example from https://www.renpy.org/doc/html/translat ... anslations

"New"
"New{#project}"
"New{#game}"
"New{#playlist}"
Finished games:
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: No registered users