Summary: | Escape double quotes for strings going into Javascript | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | I18N/L10N | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | f.demians, jonathan.druart, oleonard, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35043 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
David Cook
2025-02-25 23:35:36 UTC
Related to commit 6757cd5f861e6f2972b48f669750003195e67304 Bug 35043: Use Locale::PO->quote And koha-i18n's commit 2460c96ab283407f9729f9a925129823b9012a8b Do not use Locale::PO to quote Looks like an historical behaviour. Will need more thoughts to know if it can be fixed (easily). (In reply to Jonathan Druart from comment #3) > Related to > commit 6757cd5f861e6f2972b48f669750003195e67304 > Bug 35043: Use Locale::PO->quote > > And > koha-i18n's commit 2460c96ab283407f9729f9a925129823b9012a8b > Do not use Locale::PO to quote > > Looks like an historical behaviour. Will need more thoughts to know if it > can be fixed (easily). Hmmm interesting. Looks like I have more to learn here about the translation process. I had hoped we'd be able to just deal with the Javascript tokens specifically, but looks like we might not be quite so lucky. In the case of itemsearch.tt and itemslost.tt, I think we could avoid needing _() if we used <template> instead, but I imagine there may be times it's difficult to avoid the _(). (I was looking a bit at the Vue.js and I think we're still using _() there a swell?) (In reply to David Cook from comment #4) > (In reply to Jonathan Druart from comment #3) > > Related to > > commit 6757cd5f861e6f2972b48f669750003195e67304 > > Bug 35043: Use Locale::PO->quote > > > > And > > koha-i18n's commit 2460c96ab283407f9729f9a925129823b9012a8b > > Do not use Locale::PO to quote > > > > Looks like an historical behaviour. Will need more thoughts to know if it > > can be fixed (easily). > > Hmmm interesting. Looks like I have more to learn here about the translation > process. > > I had hoped we'd be able to just deal with the Javascript tokens > specifically, but looks like we might not be quite so lucky. > > In the case of itemsearch.tt and itemslost.tt, I think we could avoid > needing _() if we used <template> instead, but I imagine there may be times > it's difficult to avoid the _(). (I was looking a bit at the Vue.js and I > think we're still using _() there a swell?) We are using __() in vue components. I don't think I will spend time on this soon if there is only one single occurrence of the problem. It can still be worked around using single quote. (In reply to Jonathan Druart from comment #5) > We are using __() in vue components. It's a shame we didn't go with something like the Vue i18n plugin but I can understand wanting to be consistently. (In reply to Jonathan Druart from comment #6) > I don't think I will spend time on this soon if there is only one single > occurrence of the problem. > > It can still be worked around using single quote. It could happen in lots of other cases, but it seems to me like something that could also be caught in translation approval/review instead/as well. After looking at the Koha translation code, I can understand not wanting to make changes to it. |