Bug 38523 - Simple quote in ILL standard form JS can break translations
Summary: Simple quote in ILL standard form JS can break translations
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 36221 38340
Blocks:
  Show dependency treegraph
 
Reported: 2024-11-23 03:28 UTC by Victor Grousset/tuxayo
Modified: 2024-11-23 03:31 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2024-11-23 03:28:08 UTC
Follow-up of Bug 36221.

In Koha/ILL/Backend/shared-includes/shared.js

'" name="custom_key" placeholder="'+__('key')+'">' +
' ' +
'<input type="text" id="custom-value" name="custom_value" class="' +
( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="'+__('value')+'"> ' +
'<button type="button" class="btn btn-danger btn-sm ' +
'delete-new-field">' +
'<span class="fa fa-trash-can"></span> ' +
__('Delete') +
[...]
$('#custom-warning').text(__("The name '%s' is not permitted").format(val)).show();

-------

This will need to be tested once bug 38340 has patches.
For now stuff is not translatable but once it is, it's expected the JS can break if the translated string contains a simple quote.

-------

xt/single_quotes.t doesn't catch it because the test only searches in
koha-tmpl/opac-tmpl/bootstrap/en/
koha-tmpl/intranet-tmpl/prog/en/