missing link tooltip ends up in english

RESOLVED FIXED in 2013Q1

Status

support.mozilla.org
Knowledge Base Software
P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: willkg, Assigned: rrosario)

Tracking

unspecified
2013Q1

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: u=user c=wiki p=1 s=2013.4)

If you do the following:

1. Translate a kb article adding a missing link. For example, "[[Ricky Rocks]]".
2. Approve the translation.
3. View the translation. If you hover over "Ricky Rocks", it'll say a tooltip like "Page 
   does not exist" in the language you're looking at it in (assuming that language has 
   it translated (I used the Pirate translation, but had to re-add it to LANGUAGE_CHOICES
   first)).
4. Then run:

      ./manage.py cron rebuild_kb

   which will go through and re-parse everything.
5. Once that is done (takes like 30 minutes on my machine--good coffee break), then go
   back and view the translation again.

Outcome:

The tool tip is in English because rebuild_kb parses everything using the english locale so gettext calls all return English.

Expected:

The tool tip is in the appropriate language.

Updated

5 years ago
Priority: -- → P3
Whiteboard: u=user c=wiki p= s=2013.4
Target Milestone: --- → 2013Q1
I just fiddled with similar things when doing email template stuff and wrote a context manager for setting the locale. In the code we'd create a context, then do the gettext/rendering calls, and it'd work fine.

I'm pretty sure this is a 1 pointer.
Whiteboard: u=user c=wiki p= s=2013.4 → u=user c=wiki p=1 s=2013.4
Assignee: nobody → rdalal
(Assignee)

Comment 2

5 years ago
Stealing!
Assignee: rdalal → rrosario
(Assignee)

Comment 3

5 years ago
In a pull request:
https://github.com/mozilla/kitsune/pull/1179
(Assignee)

Comment 4

5 years ago
Landed on master:
https://github.com/mozilla/kitsune/commit/58df24c49fdeefb74cda547390984fd3b8ba95e2
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

5 years ago
GAH! I didn't deploy yet
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 6

5 years ago
Deployed to prod now.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.