Translated empty strings display gibberish when non-en-US locale is selected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
EG 3.3+
When using a locale other than en-US, the l() TT2 function will translate an empty string into locale-related gibberish.
Steps to reproduce:
[1] In eg_vhost.conf, enable a locale other than en-US (by uncommenting some OILSWebLocale definitions under <Location /eg>) and reload Apache.
[2] In an OPAC TT2 template, add an empty string: [% l('') %]
[3] Change your OPAC locale by selecting something other than "English (US)" in the locale picker and clicking the "Change" button.
[4] View the page where you added the empty string (refresh the page if necessary). Instead of showing an empty string, you will see something like this:
Project-Id-Version: evergreen Report-
The l() function ought to produce an empty string for all locales if the input is an empty string.
tags: | added: i18n |
Here's an example. When I add [% l('') %] to the beginning of topnav.tt2 and select a non-en-US locale, it shows bad text in the page header (see top of accompanying screenshot).