Closed Bug 556814 Opened 14 years ago Closed 14 years ago

KeyError: u'reg'

Categories

(addons.mozilla.org Graveyard :: Localization, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jbalogh, Assigned: clouserw)

References

()

Details

(Whiteboard: [z])

Attachments

(1 file, 2 obsolete files)

This is the same as bug 554696, but now I know the problem!

We crash inside this {% trans %} block: http://github.com/jbalogh/zamboni/blob/master/apps/addons/templates/addons/tags_box.html#L26

...because the msgstr does not match: http://github.com/clouserw/amo-locales/blob/master/de/LC_MESSAGES/messages.po#L1154

So, is this a php2pypo problem?  Or a localizer issue?  Or did we change the variable name and the string got fuzzy matched?
Attached patch fallback (obsolete) — Splinter Review
php2pypo only fills in msgid's and fuzzy matching is disabled, so this is from the localizer.

I'm attaching a patch that fixes it in Tower's tests (basically, catch the error and fall back to english).  Also, please add an __init__ to jingo's tests dir.
Attachment #436770 - Flags: review?(jbalogh)
Attached patch fallback for reals (obsolete) — Splinter Review
Alright, here's a patch for the actual code instead of the tests.  I added a test to tower to catch this.
Attachment #436770 - Attachment is obsolete: true
Attachment #436807 - Flags: review?(jbalogh)
Attachment #436770 - Flags: review?(jbalogh)
"-e git://github.com/clouserw/tower.git#egg=tower" didn't make it into the patch...
Comment on attachment 436807 [details] [diff] [review]
fallback for reals

Thanks for picking this up.  I think the test should go in jingo, and the `except` should be catching a specific exception, not all of them.
Attachment #436807 - Flags: review?(jbalogh) → review-
Attached patch move the testSplinter Review
Needs `git apply` for the .mo
Attachment #437057 - Flags: review?(jbalogh)
Attachment #436807 - Attachment is obsolete: true
Comment on attachment 437057 [details] [diff] [review]
move the test

Thanks!
Attachment #437057 - Flags: review?(jbalogh) → review+
http://github.com/jbalogh/jingo/commit/c73d2c55182301e6f3ce507fc9a17ea843fed24f
Assignee: nobody → clouserw
Status: NEW → RESOLVED
Closed: 14 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.

Attachment

General

Created:
Updated:
Size: