Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Customising/Localising error messages

Customising/Localising error messages 3 years 4 months ago #93591

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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.
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93592

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
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
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93593

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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'.
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93602

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9254
  • Thank you received: 1319
  • Karma: 382
What is your version ?

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

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93604

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
I'm using Limesurvey 2.00+ Build 130226
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93606

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9254
  • Thank you received: 1319
  • Karma: 382
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 developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.
The following user(s) said Thank You: XimG

Customising/Localising error messages 3 years 4 months ago #93609

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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?
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93616

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
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
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
Last Edit: 3 years 4 months ago by Ben_V.
The administrator has disabled public write access.
The following user(s) said Thank You: XimG

Customising/Localising error messages 3 years 4 months ago #93622

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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.
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93623

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5062
  • Thank you received: 747
  • Karma: 227
It means that whenever there is an update of Spanish your changes will be overwritten.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93626

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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.
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93632

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
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
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93633

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1790
  • Thank you received: 439
  • Karma: 110
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
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Customising/Localising error messages 3 years 4 months ago #93634

  • XimG
  • XimG's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.685 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form