Translated empty strings display gibberish when non-en-US locale is selected

Bug #1847658 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
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-Msgid-Bugs-To: FULL NAME POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE PO-Revision-Date: 2019-02-13 00:46+0000 Last-Translator: Jennifer Pringle Language-Team: English (Canada) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: Launchpad (build 18910) X-Launchpad-Export-Date: 2019-03-29 05:38+0000

The l() function ought to produce an empty string for all locales if the input is an empty string.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

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).

tags: added: i18n
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers