Hello,
I have a problem when translating strings that have a integrated parameter in them, for example:
# renpy/common/00action_file.rpy:26
old "{#weekday}Monday"
new "{#weekday}Понедельник"
The translated version doesn't show up, and it concerns all instances of translation strings that have { } brackets. All other translations seem to work fine. Am I missing something? Should I translate these parameters in some other file?
Currently, for example, save games in English show the date/time, and the Russian translation does not. It displays no text whatsoever.
[SOLVED ]How to translate a save game date correctly?
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.
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.
-
- Newbie
- Posts: 23
- Joined: Wed Dec 09, 2020 4:04 pm
- Contact:
[SOLVED ]How to translate a save game date correctly?
Last edited by facesit-inc on Tue Apr 13, 2021 7:58 am, edited 1 time in total.
- Jackkel Dragon
- Veteran
- Posts: 283
- Joined: Mon Mar 31, 2014 7:17 pm
- Organization: Nightshade, Team Despair
- itch: jackkel-dragon
- Location: USA
- Contact:
Re: How to translate a save game date correctly?
Not sure if it's the case here, but one thing to keep in mind for translating strings with parameters is that the string only translates if the parameter exists in the line to be translated.
For instance, using the substitution you posted, I believe the results would be as follows:
"Monday night."
Monday night.
"{#weekday}Monday night."
Понедельник night.
I'm not familiar with the default code that creates timestamps for save files, though, so I'm not sure of what specifically may be wrong with the translation. I'd have assumed it would have the parameters, but maybe it doesn't...
For instance, using the substitution you posted, I believe the results would be as follows:
"Monday night."
Monday night.
"{#weekday}Monday night."
Понедельник night.
I'm not familiar with the default code that creates timestamps for save files, though, so I'm not sure of what specifically may be wrong with the translation. I'd have assumed it would have the parameters, but maybe it doesn't...
Main Website
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
Includes information about and links to many of my current and past projects.
Major Game Projects
[Nightshade] Eldritch Academy, Eldritch University, Blooming Nightshade, Flowering Nightshade, Life as Designed
[Team Despair] Corpse Party D2 series
Re: How to translate a save game date correctly?
Isn't the syntax as follows?As I understand the documentation, it seems the syntax you are using is meant to differentiate between labels that seems the same but for which translation can vary depending on the context they are used ...
Code: Select all
old "[weekday!t]Monday"
new "[weekday!t]Понедельник"
- IrinaLazareva
- Veteran
- Posts: 399
- Joined: Wed Jun 08, 2016 1:49 pm
- Projects: Legacy
- Organization: SunShI
- Location: St.Petersburg, Russia
- Contact:
Re: How to translate a save game date correctly?
Yes. I'm going to guess, that the solution of your problem not here.facesit-inc wrote: ↑Mon Apr 12, 2021 9:22 am Am I missing something? Should I translate these parameters in some other file?
Open the file screens.rpy ([yourproject]/game/tl/russian/screens.rpy)
Find the line:
Code: Select all
old "{#file_time}%A, %B %d %Y, %H:%M"
new ""
Code: Select all
new "{#file_time}%A, %B %d %Y, %H:%M"
-
- Newbie
- Posts: 23
- Joined: Wed Dec 09, 2020 4:04 pm
- Contact:
Re: How to translate a save game date correctly?
Thank your all kindly for your answers, but this
It seems that having translated all date/time parameters, I missed the string, which was supposed to implement and show them.
Problem solved!
actually worked.IrinaLazareva wrote: ↑Mon Apr 12, 2021 5:06 pm
Open the file screens.rpy ([yourproject]/game/tl/russian/screens.rpy)
Find the line:and replaceCode: Select all
old "{#file_time}%A, %B %d %Y, %H:%M" new ""
Code: Select all
new "{#file_time}%A, %B %d %Y, %H:%M"
It seems that having translated all date/time parameters, I missed the string, which was supposed to implement and show them.
Problem solved!
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot]