Welcome, Guest
Username: Password: Remember me

TOPIC: Problem with email layouts translation

Problem with email layouts translation 2 years 1 week ago #87054

  • pes130
  • pes130's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hi,

We have a problem with email layouts translations (some of them don't work). These messages are in properties files, and I assume they work this way:
with 'invitation_subject'=>$oLanguage->gT("Invitation to participate in a survey",$mode) we look in our properties file (es.mo in our case) for the string with 'msgid' "Invitation to participate in a survey" and get the 'msgstr' value.

We can see that in \limesurvey\admin\admin_functions.php line 305.

Up to here, this works fine, but the problem comes with more complex texts, like in line 306 in the same file. I don't know why, but in this case in doesn't recover the translated text. I think it's because there is a difference between text in admin_functions.php and the msgid value in properties file.

Is this a bug? I think I could fix it by rewritting the msgstr or the php file, but it's not a proper solution because we'll have problem as soon as we update limesurvey.

We have limesurvey Versión 1.92+ Build 120822 installed,

Thanks,
Pablo
Last Edit: 2 years 1 week ago by pes130. Reason: mark some text for a better comprehension
The administrator has disabled public write access.

Re: Problem with email layouts translation 2 years 6 days ago #87269

  • pes130
  • pes130's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Any ideas or workaround?

Thanks,
Pablo
The administrator has disabled public write access.

Re: Problem with email layouts translation 2 years 4 days ago #87387

  • pes130
  • pes130's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Maybe my exposure of the problem was too complex... It's just that email default messages translations don't work for me.

Has anyone the same problem?

Thanks,
Pablo
The administrator has disabled public write access.

Re: Problem with email layouts translation 2 years 4 days ago #87408

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6471
  • Thank you received: 854
  • Karma: 254
Did you have some " or ' in the translation or in the original ?
If yes, think the new translation method don't work good wit " and '.

You can change the string and the translation because LS aren't updated for 1.92.

Denis
The administrator has disabled public write access.

Re: Problem with email layouts translation 2 years 1 day ago #87496

  • pes130
  • pes130's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hi Denis,

This is one of the properties value which is not working properly:

msgid ""
"Dear {FIRSTNAME},\\n\\nyou have been invited to participate in a survey.\\n"
"\\nThe survey is titled:\\n\\\"{SURVEYNAME}\\\"\\n\\n\\"
"\"{SURVEYDESCRIPTION}\\\"\\n\\nTo participate, please click on the link "
"below.\\n\\nSincerely,\\n\\n{ADMINNAME} ({ADMINEMAIL})\\n"
"\\n
\\nClick here to do the "
"survey:\\n{SURVEYURL}"
msgstr ""
"Estimado/a {FIRSTNAME} {LASTNAME}:\\n\\nHa sido invitado a participar en la "
"siguiente encuesta:\\n\\n«{SURVEYNAME}»\\n\\n«{SURVEYDESCRIPTION}»\\n"
"\\nPara hacerlo, por favor pulse en el siguiente enlace:\\n\\n{SURVEYURL}\\n"
"\\n¡Muchas gracias por su interés y colaboración!\\n\\nAtentamente,\\n\\n"
"{ADMINNAME} ({ADMINEMAIL})"

I have got it from es.mo file with poedit. It has many ", is that the problem you are refering to?

Thanks in advance
The administrator has disabled public write access.

Re: Problem with email layouts translation 2 years 1 day ago #87514

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6471
  • Thank you received: 854
  • Karma: 254
pes130 wrote:
I have got it from es.mo file with poedit. It has many ", is that the problem you are refering to?
Yep,

You can try to use html curly quote to replace quote.

Denis
The administrator has disabled public write access.
The following user(s) said Thank You: pes130

Re: Problem with email layouts translation 1 year 11 months ago #87636

  • pes130
  • pes130's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hi Denis,

You are right, that was the problem. But using curly quote didn't work for me... In admin_functions.php and also in es.po, I've replaced " for '

I would have prefered not having to touch admin_functions.php...

Thank you Denis,
Regards,
Pablo
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.111 seconds
Donation Image