Merge lp:~henninge/launchpad/devel-bugjamming-1 into lp:launchpad

Proposed by Henning Eggers
Status: Merged
Approved by: Henning Eggers
Approved revision: no longer in the source branch.
Merged at revision: 12105
Proposed branch: lp:~henninge/launchpad/devel-bugjamming-1
Merge into: lp:launchpad
Diff against target: 28 lines (+4/-2)
2 files modified
lib/lp/translations/interfaces/potemplate.py (+1/-1)
lib/lp/translations/templates/currenttranslationmessage-translate-one.pt (+3/-1)
To merge this branch: bzr merge lp:~henninge/launchpad/devel-bugjamming-1
Reviewer Review Type Date Requested Status
Curtis Hovey (community) ui Approve
Edwin Grubbs (community) ui* Approve
Brad Crittenden (community) code Approve
Review via email: mp+44070@code.launchpad.net

Commit message

[r=bac][ui=edwin-grubbs,sinzui][bug=619121,670821] Two small fixes: 'Template is active' checkbox and preserving formatting on source comments for translations.

Description of the change

= Summary =

Fixes two little ui bugs, bug 619121 and bug 670821.

== Proposed fix ==

Change the title of a template's 'iscurrent' property to "Template is
active". This is consistent with templates being called "inactive" in the
UI.

Add a <pre> tag around source comments on the translate page to preserve
their formatting. This is mostly important if the comments are multilined.

== Pre-implementation notes ==

Discussed with Danilo. He would also like to normalize leading spaces on
source comments but that would take this branch beyound 'trivial' (and it is
Friday night ;). So we agreed on this solution.

== Implementation details ==

There is a screenshot in the bug that shows a rather large comment that lost
all of its formatting.
https://bugs.launchpad.net/launchpad/+bug/670821/+attachment/1722666/+files/rosetta.png

Here is one I prepared myself, before and after.
http://people.canonical.com/~henninge/screenshots/source_comment_before.png
http://people.canonical.com/~henninge/screenshots/source_comment_after.png

The <pre> tag adds some of its own formatting but the discreet class makes
it look better in my opinion.

== Tests ==

No tests affected.

== Demo and Q/A ==

Demo for bug 619121:
 1. Go here: https://translations.launchpad.dev/evolution/trunk/+templates
 2. Click "Edit" on the first template.
 3. Scroll down to find the "Template is active" checkbox.
 4. Unchcheck it and click "Change"
 5. The template is now "inactive"

QA for bug 670821:
Any translate page of the chromioum-browser project should show multi-line
comments.

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/translations/interfaces/potemplate.py
  lib/lp/translations/templates/currenttranslationmessage-translate-one.pt

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Code looks fine.

review: Approve (code)
Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Henning,

These UI changes look good.

-Edwin

review: Approve (ui*)
Revision history for this message
Curtis Hovey (sinzui) wrote :

I think this is good to land.

review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/interfaces/potemplate.py'
2--- lib/lp/translations/interfaces/potemplate.py 2010-12-01 11:26:57 +0000
3+++ lib/lp/translations/interfaces/potemplate.py 2010-12-17 22:59:30 +0000
4@@ -134,7 +134,7 @@
5 required=True)
6
7 iscurrent = exported(Bool(
8- title=_("Accept translations?"),
9+ title=_("Template is active"),
10 description=_(
11 "If unchecked, people can no longer change the template's "
12 "translations."),
13
14=== modified file 'lib/lp/translations/templates/currenttranslationmessage-translate-one.pt'
15--- lib/lp/translations/templates/currenttranslationmessage-translate-one.pt 2010-12-01 11:26:57 +0000
16+++ lib/lp/translations/templates/currenttranslationmessage-translate-one.pt 2010-12-17 22:59:30 +0000
17@@ -102,8 +102,10 @@
18 <th class="icon left right">
19 <span class="sprite info" title="Developer's note to translators"></span>
20 </th>
21- <td tal:content="view/source_comment">
22+ <td>
23+ <pre class="discreet" tal:content="view/source_comment">
24 This refers to the content type.
25+ </pre>
26 </td>
27 </tr>
28 <tr