Customising/Localising error messages

More
4 years 1 month ago #93591 by XimG
XimG created the topic: Customising/Localising error messages
Hi

I'm using Limesurvey for Spanish respondents and there are some messages that I would like to change from the Spanish version available at Limesurvey. However, I have not found them in the es.po file.

More specifically, I'm having trouble with a text string that is shown when no text is provided in an 'Other' textbox ("Si seleccionas 'Otros', por favor, explica tu elección en el área de texto que lo acompaña") .

I've looked for it thoroughly within the es.po file, but it is not there. I've also searched the forum and the documentation, but can't find how to modify this type of messages, other than the ones found in the .po files.

Thank you for any help in advance.

Please Log in to join the conversation.

More
4 years 1 month ago #93592 by Ben_V
Ben_V replied the topic: Customising/Localising error messages
Have a quick look at the advanced settings of your question in case there is already an available setting for:

Label for 'Other:'

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #93593 by XimG
XimG replied the topic: Customising/Localising error messages
Thank you, Ben_V, but the message I need to modify is a validation error message that appears when a mandatory question has not been answered or there is something missing in the question, not the label of the field 'Other'.

Please Log in to join the conversation.

More
4 years 1 month ago #93602 by DenisChenu
DenisChenu replied the topic: Customising/Localising error messages
What is your version ?

Think "other" label are used too with alert message.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 1 month ago #93604 by XimG
XimG replied the topic: Customising/Localising error messages
I'm using Limesurvey 2.00+ Build 130226

Please Log in to join the conversation.

More
4 years 1 month ago #93606 by DenisChenu
DenisChenu replied the topic: Customising/Localising error messages

XimG wrote: I'm using Limesurvey 2.00+ Build 130226

Yes,

confirmed in the source code: seem to always use:
$othertext=$qattr['other_replace_text'])
sprintf($this->gT("If you choose '%s' please also specify your choice in the accompanying text field."),$othertext);
If it not work under some condition, please fill a bug report with a lss example file.

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: XimG

Please Log in to join the conversation.

More
4 years 1 month ago #93609 by XimG
XimG replied the topic: Customising/Localising error messages
Merci, Denis. That piece of code seems to be the one I'm talking about.

Is it possible to modify it? If so, how and where could I find the Spanish string?

Please Log in to join the conversation.

More
4 years 1 month ago - 4 years 1 month ago #93616 by Ben_V
Ben_V replied the topic: Customising/Localising error messages
Encontrado!

Open your es.po file with poedit and look for 'accompanying' in the original strings


=> oJo con las actualizaciones ;)

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Attachments:
Last Edit: 4 years 1 month ago by Ben_V.
The following user(s) said Thank You: XimG

Please Log in to join the conversation.

More
4 years 1 month ago #93622 by XimG
XimG replied the topic: Customising/Localising error messages
Merci beaucoup, Benoit!

That's the piece of code in the po that I was looking for... I didn't realise it was using a variable for other... and actually, I had already modified this string ;)

Sorry about the newbie question, but what do you mean with "being aware of updates"? The po file won't be automatically updated unless I run a version update, will it?

Thank you all for your replies.

Please Log in to join the conversation.

More
4 years 1 month ago #93623 by holch
holch replied the topic: Customising/Localising error messages
It means that whenever there is an update of Spanish your changes will be overwritten.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 1 month ago #93626 by XimG
XimG replied the topic: Customising/Localising error messages
Correct me if I'm wrong, but if I edit the es.po file in my database, it won't be overwritten unless I run an update.

In that case, I guess I can back up the file and replace the one installed with the update.

Please Log in to join the conversation.

More
4 years 1 month ago #93632 by Ben_V
Ben_V replied the topic: Customising/Localising error messages

It means that whenever there is an update of Spanish your changes will be overwritten.

In the other hand if your modification is not specific to your sole use but could be an improvment for all users, it could take part of the original translation.

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #93633 by Ben_V
Ben_V replied the topic: Customising/Localising error messages

Correct me if I'm wrong, but if I edit the es.po file in my database, it won't be overwritten unless I run an update.
In that case, I guess I can back up the file and replace the one installed with the update.


You're right; but sometimes it could be better to save a text file with all the modifications you made and adapt the new .po file in case of important (translated) changes in the software

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)

Please Log in to join the conversation.

More
4 years 1 month ago #93634 by XimG
XimG replied the topic: Customising/Localising error messages
Thank you for the information. I have considered sending my localised po. However, although some of the modifications were corrections to the po file available, other were particularly addressed to the purpose of my survey.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.