Merge lp:~huwshimi/launchpad/language-link-510363 into lp:launchpad

Proposed by Huw Wilkins
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 13378
Proposed branch: lp:~huwshimi/launchpad/language-link-510363
Merge into: lp:launchpad
Diff against target: 49 lines (+9/-3)
3 files modified
lib/lp/translations/templates/object-pots.pt (+1/-1)
lib/lp/translations/templates/person-translations.pt (+7/-1)
lib/lp/translations/templates/translations-macros.pt (+1/-1)
To merge this branch: bzr merge lp:~huwshimi/launchpad/language-link-510363
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+66628@code.launchpad.net

Commit message

[r=gmb][bug=510363] Added language preferences link to person's translations page.

Description of the change

This branch adds a "Change your preferred languages" link to the sidebar of a person's translations page. This link used to only appear in the main content if you had not set any preferred languages.

A screenshot of the fix is here:
https://launchpadlibrarian.net/74403553/preferences_link.png

There was also an inconsistency with the link title between https://translations.launchpad.net/ and https://translations.launchpad.net/ubuntu/+translations ("Change your preferred languages" vs "Choose preferred languages"). so I have made them all "Change your preferred languages".

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/templates/object-pots.pt'
2--- lib/lp/translations/templates/object-pots.pt 2009-12-17 16:48:18 +0000
3+++ lib/lp/translations/templates/object-pots.pt 2011-07-01 15:36:02 +0000
4@@ -81,7 +81,7 @@
5 <div tal:replace="structure potemplate/@@+preferred-chart" />
6
7 <div align="right">
8- [ <a href="/+editmylanguages">Choose preferred languages...</a>
9+ [ <a href="/+editmylanguages">Change your preferred languages...</a>
10 &mdash;
11 <a tal:attributes="href potemplate/fmt:url">
12 View template &amp; all languages...</a>
13
14=== modified file 'lib/lp/translations/templates/person-translations.pt'
15--- lib/lp/translations/templates/person-translations.pt 2010-01-08 12:28:42 +0000
16+++ lib/lp/translations/templates/person-translations.pt 2011-07-01 15:36:02 +0000
17@@ -3,12 +3,18 @@
18 xmlns:tal="http://xml.zope.org/namespaces/tal"
19 xmlns:metal="http://xml.zope.org/namespaces/metal"
20 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
21- metal:use-macro="view/macro:page/main_only"
22+ metal:use-macro="view/macro:page/main_side"
23 i18n:domain="launchpad"
24 >
25
26 <body>
27
28+<metal:side fill-slot="side">
29+ <div class="portlet">
30+ <a href="/+editmylanguages" class="sprite edit">Change your preferred languages</a>
31+ </div>
32+</metal:side>
33+
34 <div metal:fill-slot="heading">
35 <h1 tal:content="view/page_title" />
36 </div>
37
38=== modified file 'lib/lp/translations/templates/translations-macros.pt'
39--- lib/lp/translations/templates/translations-macros.pt 2011-03-11 18:55:17 +0000
40+++ lib/lp/translations/templates/translations-macros.pt 2011-07-01 15:36:02 +0000
41@@ -182,7 +182,7 @@
42
43 <metal:languages-table-actions define-macro="languages-table-actions">
44 <div align="right">
45- [ <a href="/+editmylanguages">Choose preferred languages...</a>
46+ [ <a href="/+editmylanguages">Change your preferred languages...</a>
47 <tal:has-preferred condition="view/translatable_languages">&mdash;
48 <a href="#" id="toggle-languages-visibility">
49 View all languages</a>