fix _() when context isn't found

RESOLVED FIXED in 5.8

Status

addons.mozilla.org Graveyard
Code Quality
RESOLVED FIXED
8 years ago
2 years ago

People

(Reporter: clouserw, Assigned: clouserw)

Tracking

unspecified

Details

(Assignee)

Description

8 years ago
diff --git a/lib/l10n/tests/tests.py b/lib/l10n/tests/tests.py
index 4da6c12..43a4508 100644
--- a/lib/l10n/tests/tests.py
+++ b/lib/l10n/tests/tests.py
@@ -44,6 +44,12 @@ def test_ugettext():


 @with_setup(setup, teardown)
+def test_ugettext_not_found():
+    eq_('yo', _('yo'))
+    eq_('yo', _('yo', 'context'))
+
+
+@with_setup(setup, teardown)
 def test_ungettext():
     # No context
     a_singular = " one\t\r\n\nlight \n\n!\n"
(Assignee)

Comment 1

8 years ago
http://github.com/jbalogh/zamboni/commit/f62f1870b9995b9e327163337153f5fcf3374612
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.