- Posts: 164
- Thank you received: 5
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Change button text
- brais24
- Topic Author
- Offline
- Elite Member
Less
More
2 years 7 months ago #219391
by brais24
Change button text was created by brais24
Hi there people, I made a survey on Galician Language, and Ive notice that the OK button on the popup when you push "save and clear", on Galician Language have a bad translate, is there any way to edit that button? My survey only have that language, I dont know if I can change it on the theme, and, if i can do it by that, where I found the text to edit it?
I have the 3.25.6+201229 version, I attach an image and mark with yellow the button that I want to edtit, Ive looking for information about this but dont found nothing.
Thanks for the help.
I have the 3.25.6+201229 version, I attach an image and mark with yellow the button that I want to edtit, Ive looking for information about this but dont found nothing.
Thanks for the help.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 7 months ago #219393
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change button text
I don't think you can modify the modal pop-ups via the theme manager but you have two other options.
1) Edit the translation - manual.limesurvey.org/Translating_LimeSurvey
2) Add something like this to your custom.js file. It will detect when the modal is shown and modify the button text.
1) Edit the translation - manual.limesurvey.org/Translating_LimeSurvey
2) Add something like this to your custom.js file. It will detect when the modal is shown and modify the button text.
Code:
$(document).on('ready pjax:scriptcomplete',function(){ // Modify clearall button text $('body').on('show.bs.modal', function(e) { if($.trim($('#identity__bsconfirmModal_button_ok').text()) == 'Valeu') { $('#identity__bsconfirmModal_button_ok').text('Está ben') } }); });
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- brais24
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 5
2 years 7 months ago #219395
by brais24
Replied by brais24 on topic Change button text
The topic has been locked.
- brais24
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 5
2 years 7 months ago #219396
by brais24
Replied by brais24 on topic Change button text
Ok, now it works, I dont have to change the first option, I have to change the second.
Thank you.
Thank you.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
2 years 7 months ago #219403
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Change button text
If the translation is actually wrong, please correct it for the Galician translation.
translate.limesurvey.org/projects/
translate.limesurvey.org/projects/
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 7 months ago - 2 years 7 months ago #219423
by DenisChenu
I think you can (except if someone broke the functionality after implementation) Just after <body> or somewhere like this :
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change button text
I don't think you can modify the modal pop-ups via the theme manager but you have two other options.
I think you can (except if someone broke the functionality after implementation) Just after <body> or somewhere like this :
Code:
<script> LSvar.lang.confirm.confirm_cancel = "My cancel"; LSvar.lang.confirm.confirm_ok = "My cancel"; </script>
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 2 years 7 months ago by DenisChenu. Reason: Fix bbcode
The following user(s) said Thank You: tpartner
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 7 months ago #219426
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change button text
Else :
github.com/LimeSurvey/LimeSurvey/blob/ma...rap_alert_modal.twig
for other modal.
for other modal.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 7 months ago - 2 years 7 months ago #219429
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change button text
Yes, but, as far as I can see, it's not accessible via the theme manager without modifying the <template_editor> files.Else : github.com/LimeSurvey/LimeSurvey/blob/ma...rap_alert_modal.twig
for other modal.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 7 months ago by tpartner.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13642
- Thank you received: 2491
2 years 7 months ago #219430
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Change button text
Yes , in skelvanilla i add it in error.
Yes, but, as far as I can see, it's not accessible via the theme manager without modifying the <template_editor> files.Else : github.com/LimeSurvey/LimeSurvey/blob/ma...rap_alert_modal.twig
for other modal.
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: tpartner
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
2 years 7 months ago #219437
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Change button text
This does still work in 5.1.5 but I'm surprised at how few items there are in the LSvar.lang object.I think you can (except if someone broke the functionality after implementation) Just after <body> or somewhere like this :
Code:<script> LSvar.lang.confirm.confirm_cancel = "My cancel"; LSvar.lang.confirm.confirm_ok = "My cancel"; </script>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- brais24
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 5
2 years 7 months ago #219525
by brais24
Replied by brais24 on topic Change button text
Ok, I submit the translation, but i have another question, ¿it is possible to change the text of the "Save now" button on the save and continue later screen? I try it with the same javascript changing the ID like this, but dont work, I attach image of the button
$(document).on('ready pjax:scriptcomplete',function(){
// Modify clearall button text
$('body').on('show.bs.modal', function(e) {
if($.trim($('#savebutton').text()) == 'Gardar Agora') {
$('#savebutton').text('Gardar agora')
}
});
});
$(document).on('ready pjax:scriptcomplete',function(){
// Modify clearall button text
$('body').on('show.bs.modal', function(e) {
if($.trim($('#savebutton').text()) == 'Gardar Agora') {
$('#savebutton').text('Gardar agora')
}
});
});
The topic has been locked.
- brais24
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 164
- Thank you received: 5
2 years 7 months ago #219526
by brais24
Replied by brais24 on topic Change button text
Is the screen to save the survey to continue later.
Thanks for the help.
Thanks for the help.
The topic has been locked.