Merge lp:~jcsackett/launchpad/translations-message-links-404 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Curtis Hovey | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 16187 | ||||
Proposed branch: | lp:~jcsackett/launchpad/translations-message-links-404 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
107 lines (+41/-4) 4 files modified
lib/lp/translations/browser/tests/test_translationmessage_view.py (+31/-0) lib/lp/translations/browser/tests/translationmessage-views.txt (+2/-1) lib/lp/translations/browser/translationmessage.py (+2/-0) lib/lp/translations/templates/translations-macros.pt (+6/-3) |
||||
To merge this branch: | bzr merge lp:~jcsackett/launchpad/translations-message-links-404 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+131052@code.launchpad.net |
Commit message
Blocks rendering of links to untraversable translation suggestions.
Description of the change
Summary
=======
Translations creates links to translations suggestions, but some of these
suggestions aren't traversable because they are no longer contained properly
in a potmsgset (which creates an index of 0 for the message).
The solution is simply to add a guard around rendering the suggestion, so the
information is not linkified if it's untraversable.
Preimp
======
Spoke with Curtis Hovey.
Implementation
==============
Submission, a stub class used to wrap translation messages, has a guard added
to check if the message index is 0.
The TAL checks for this guard, rendering the information as a link if it is
traversable, and as text if not.
Tests
=====
bin/test -vvct test_submission
QA
==
Ensure that the bad data example in the bug is not rendering as a link.
LoC
===
I have approximately 400 LoC of credit.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
thank you