Merge lp:~beuno/launchpad/ppa-icon-svg into lp:launchpad/db-devel

Proposed by Martin Albisetti
Status: Merged
Approved by: Curtis Hovey
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~beuno/launchpad/ppa-icon-svg
Merge into: lp:launchpad/db-devel
Diff against target: 348 lines (+257/-17)
4 files modified
lib/canonical/launchpad/images/src/ppa-icon.svg (+188/-0)
lib/lp/translations/model/pofile.py (+22/-8)
lib/lp/translations/scripts/fix_translation_credits.py (+2/-7)
lib/lp/translations/tests/test_pofile.py (+45/-2)
To merge this branch: bzr merge lp:~beuno/launchpad/ppa-icon-svg
Reviewer Review Type Date Requested Status
Curtis Hovey (community) Approve
Review via email: mp+15620@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) wrote :

This branch just adds the SVG for the PPA icon, which wasn't originally added with the PNG.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Free karma! This looks good to land.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'lib/canonical/launchpad/images/src/ppa-icon.svg'
2--- lib/canonical/launchpad/images/src/ppa-icon.svg 1970-01-01 00:00:00 +0000
3+++ lib/canonical/launchpad/images/src/ppa-icon.svg 2009-12-09 13:15:29 +0000
4@@ -0,0 +1,188 @@
5+<?xml version="1.0" encoding="utf-8"?>
6+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
7+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
8+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
9+ width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
10+<g id="BOX_1_">
11+
12+ <image overflow="visible" width="50" height="47" id="Shape_1_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAxCAYAAACYq/ofAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
13+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYpJREFUeNrsmbtKxFAQhs+6UUEE
14+b40gaGsjiog3FpWAsIjINmLhKyxYWYi1WFgJNj6ANjZiZaOIiJfF2lKxslBB0ErJGf/DxuBeolVg
15+JszAx4Rwinyc+fdsiDFavCpTfeNofWYJzWf8zM/uMRc2zkq/b3rVq4ioiJZjLPIS9lLsjhyuTbWi
16+vYEsY5EvcAwKhc1zW3dHsBvTzCVcNYIe0A/u4kR8IdluB0N/icwKEekC42C/JiMHq5OdaK9CRAJw
17+CuYXty4/K3aErM0LOjZcjrvBMLiuFCHKGVnVBgZrRKylvDARF4VRsBtlZG9lpBftUeA/kwswt7x9
18+++6V8yHm1ypuV0688lhZX6hIRxj4UITshFARF/iBKOwIelaoSANoikRwhoh/H/nJSFpEKCUipKOl
19+IpoRHS0VURENu46WiiQlQqQZUZFERIIgNRnRA5HbG2JKREjPER2tpEaLdLRUJAkR1BW4r7eADLUY
20+vt/e3YfQB3eR+W9lccz0oTUzFXGj9LFzY56MFrP6FmAAOfWmkypd0g4AAAAASUVORK5CYII=" transform="matrix(0.6965 0 0 0.6965 9 2.7646)">
21+ </image>
22+ <g id="Shape_2_1_">
23+ <g>
24+ <rect x="10.764" y="14.818" fill-rule="evenodd" clip-rule="evenodd" fill="#F1C28C" width="30.819" height="18.072"/>
25+ </g>
26+ </g>
27+
28+ <image overflow="visible" width="47" height="14" id="Shape_3_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAOCAYAAACGsPRkAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
29+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARBJREFUeNpiYBgGgBGXxKcdFc5A
30+inMQufUjEJ/j8+j4ii7BgtUDOyvFGP7/nwRkMg8iT9wH4g4gPkiUJ4AR5M7AyKg1yFKNIBDbY/ME
31+E3b1TIEQqUGFgZ5gMvu0q5aLYEx82lMPSkpOgzD/gtwqB8SGQHyUQHICJyX+QVoIiQKxDbonMJLT
32+f0bmQCBmGKRYEIgtPu5r4cIZEx/3tw3WpAQDbECsAMQ6QHwKe3JiZHIBRhr/IPYEKEmJQZPUKezJ
33+iZEpBIgZBjkWBmKrj4e6WTFi4uOhXqAPB3VSQk5SikCsDcQX0JOTFNCbh8g0WAAazfRKUn+hSQrN
34+E4yMd4FkCZkGg6KWg46x8Q+I38I4AAEGAM//Wq4oz2vYAAAAAElFTkSuQmCC" transform="matrix(0.6965 0 0 0.6965 9.6963 4.1587)">
35+ </image>
36+
37+ <image overflow="visible" opacity="0.15" width="40" height="22" id="Layer_2_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAYCAYAAABnRtT+AAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
38+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOxJREFUeNrUl9sNwjAUQ/tI6Ud3
39+QIzBNGzADKzGSn0ATdKm3CBfFIUOYCK5lvp15PSmTlH8wSqv5/IofhFVopWIrYLfjTxOohsxZBEh
40+N9EiakSeCLKBrwaAk6gT9USQHdwabPEjfp9wmnmBO4WcsO0T4XB/IAMS3MiS1OU1yTFJlGWFNMk4
41+OAMme2BKED5rkhHOkSXp95K0oifTwORHUDwfWzLINoXUJOMJPxNBHvIkFdIS/ha/SfbskJpkTVYw
42+TA45AnIhhHRpwWDrk/VewWAtvT+QgbCqeW1BL7zcmCEd8WVx1TuOJYYMbwEGABZMXtkY03JZAAAA
43+AElFTkSuQmCC" transform="matrix(0.6965 0 0 0.6965 12.4829 15.999)">
44+ </image>
45+
46+ <image overflow="visible" opacity="0.2" width="12" height="21" id="Layer_4_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAXCAYAAADQpsWBAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
47+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGNJREFUeNrMz7sRwCAMA1A5/qVI
48+kU1YgREzGqMwQhghqPBFd6Z7JyHtQgNw43uGredZ1zdQNzuwHTMjkCuBgmkKr2pKFwbh1ygZdEpR
49+U1DzkpjnUTXPnULEn1QxNs0Ek1eAAQAgkwVRB7ns7AAAAABJRU5ErkJggg==" transform="matrix(0.6965 0 0 0.6965 22.2334 3.4609)">
50+ </image>
51+
52+ <image overflow="visible" opacity="0.15" width="12" height="17" id="Layer_5_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAATCAYAAABLN4eXAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
53+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIFJREFUeNpiXFvpos/AwMAGxNeD
54+2/d8YcACgGpAlCYQiwDxJSYgMQGIFwKxGgNuAFJXD8S7gNiACSrIBpXAB+BqYAp/APFfApq+w9QQ
55+Mh2nW0c1jWrC1MQMxIwE1MLVwDSxQwXxAQ6YehYgvgDED4D4Ax4N/4H4NFTjB3K8xAAQYACJWRPY
56+yDPC1QAAAABJRU5ErkJggg==" transform="matrix(0.6965 0 0 0.6965 22.2334 5.5513)">
57+ </image>
58+
59+ <image overflow="visible" width="12" height="21" id="Layer_3_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAXCAYAAADQpsWBAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
60+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHRJREFUeNpi3N0Rqs/AwCDAQDy4
61+wAIk6oDYigRNQSBNa4D4FAmanjCMglFAOWDc2+ypBqR5SdBzk4WRkbEQyDAiQVMmCysLy0Ug4wsJ
62+mj7QMSByLRi5gTQzCXq+gnKuKxBLk6BpPUiTLRAbkKDpCFl+AggwAG4eEHY/on7LAAAAAElFTkSu
63+QmCC" transform="matrix(0.6965 0 0 0.6965 22.2334 3.4609)">
64+ </image>
65+</g>
66+<g id="BOX">
67+
68+ <image overflow="visible" width="50" height="47" id="Shape_1_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAxCAYAAACYq/ofAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
69+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYtJREFUeNpiYBgFgwswogtsqnZw
70+BFLuQCw4iN293q/1wA5kARZ0Ff///w8EUnFAzD+IPSIBxDtwxsiGSjtOILUdiO2wxdYgAu+AWCyg
71+/dBfrDECjA19ICU0yD3BAHWjGRAfx+URQyAlMETytz0+j5gM8kyODLyBuAMjj6wuteIFUtuA2GaI
72+eOQ7EAuHdh/7jhIj///9M4OmvaECQAWTExBvRfXI//+6g7zIxZVPUD3y79//oRYjIOABxGXwPLI0
73+30QMVI0AseUQbJ0IR088844Fkj/ApZUQw9AEoFhZxgJJVv+GUv2BDpwQHvn/TxtI8Q1Rj9jAMzsw
74+ozMNgWYJvmKYAZpH/g35/ggsjwwXj/wfJh75P5q0Rj0ymkdGk9aoR0Y9MprZR5PWqEdo5ZH//4dJ
75+Hvn79+9o0hotfmmTR0ZjZLD1EIdL0hqtR0aTFq2S1v/RpDXqEVp4BAiuMUBmc9nQFfxn+M8BVTdY
76+B7lfMBDjuBxzBnEgBZrxZRqkHvk95STDfYZRMMgAQIABAFTZnmRKxAyAAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 4.25 26.7646)">
77+ </image>
78+ <g id="Shape_2">
79+ <g>
80+ <rect x="6.163" y="39.83" fill-rule="evenodd" clip-rule="evenodd" fill="#F1C28C" width="33.407" height="19.59"/>
81+ </g>
82+ </g>
83+
84+ <image overflow="visible" width="47" height="14" id="Shape_3_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAPCAYAAACiLkz/AAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
85+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARFJREFUeNpiYBjigBGb4KcdFc5A
86+inMQufMjEJ/j8+j4ii7BguH4nZViDP//TwIymQeRB+4DcQcQHyToAWCkuDMwMmoNspQiCMT22DzA
87+hKmWKRAiPKgw0ANMZp921XLhjYFPe+pBycdpEOZVkDvlgNgQiI/iSULg5MM/SAsbUSC2QfcAShL6
88+z8gcCMQMgxQLArHFx30tXFhj4OP+tsGafGCADYgVgFgHiE9hJiFGJhdgRPEPYg+AkpEYNBmdwkxC
89+jEwhQMwwyLEwEFt9PNTNihIDHw/1An02qJMPcjJSBGJtIL6AnISkgN47RKahAtCopVcy+gtNRkge
90+YGS8CyRLyDQUFJ0cdIyFf0D8lmG4AIAAAwBHPVquBSCWMAAAAABJRU5ErkJggg==" transform="matrix(0.755 0 0 0.755 5.0049 28.2754)">
91+ </image>
92+
93+ <image overflow="visible" opacity="0.15" width="40" height="22" id="Layer_2_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAWCAYAAABdTLWOAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
94+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPlJREFUeNrMlk0OgjAQhQutGFZe
95+xwN4HbdexMt4BDceRqAKFKzFvJqhC+JK3iQvw8/my7xpZ7LjPrsopbZBneKJPEgH3c5XfzLh4YAP
96+IxFkBn1igmyCdsgsYeDuM77UQSUySxTIjwhp8WKJIB3sbqXdJZndUyW9tNsCkq2SSlayBjlTT26C
97+BtmTd5GZIF10N/akJryCnKxkhR8VGWSX2v0i60mDc2LlwRkjNUlo9OXM7oEdcrK7jxcnEaRJ7e4A
98+urCU+DVWtdkVVCxD+n9XMgdbK8diL0YRyz6p5exukAfFFXm6YLBu5l+72zVOxo+gTs5IRkgV3X0L
99+MADeXFGfcwGqnQAAAABJRU5ErkJggg==" transform="matrix(0.755 0 0 0.755 8.0249 41.1104)">
100+ </image>
101+
102+ <image overflow="visible" opacity="0.2" width="12" height="21" id="Layer_4_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAWCAYAAAAb+hYkAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
103+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAF9JREFUeNrM1LsNgEAMA1CH/CiQ
104+GAX2r24ERrkRrmEA4iLC/ZOdJnIdOAHc+J5pLxgFNMw2lGNmBHIlUDBN4V1N6cIg/Bolg3Zpagpq
105+XhLzPLrmuVOIuEkVs/gjniXAAFSMBtFzi9wwAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 18.5947 27.52)">
106+ </image>
107+
108+ <image overflow="visible" opacity="0.15" width="12" height="17" id="Layer_5_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAASCAYAAACAa1QyAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
109+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNpiYCADMK6tdLEH0huB
110+eElw+54cbIqAakCUJRCvBuLbTFBxFiDmJmABSA0PiAHT9AeIvxLQBFLzBVkTSWBU06gmKmpiBWI+
111+AmpBaviRNf0G4k8ENIHUfAQxAAIMAK8LEEsHEmKZAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 18.5947 29.7852)">
112+ </image>
113+
114+ <image overflow="visible" width="12" height="21" id="Layer_3_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAWCAYAAAAb+hYkAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
115+GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi3N0Rys/AwGDAQDz4
116+wAIktIB4BQmajoE0PQHiCSRoesQwCkYB5YBxb7MnD5BWJ0HPZxZGRkY1IGMaCZrOsbCysHwAMg6R
117+oOkuHQMi14KRGUhzk6DnLyjnigNxIAmanoI0iQJxEAmaLgAEGAB7dhHeJO4hBwAAAABJRU5ErkJg
118+gg==" transform="matrix(0.755 0 0 0.755 18.5947 27.52)">
119+ </image>
120+</g>
121+<g id="layer2" inkscape:groupmode="layer">
122+ <g id="g3267" transform="translate(-70,0)">
123+
124+ <radialGradient id="path2411_1_" cx="267.7158" cy="-255.1616" r="17.2123" fx="266.9747" fy="-259.1443" gradientTransform="matrix(1.6668 0 0 -1.1576 -333.8102 -243.3599)" gradientUnits="userSpaceOnUse">
125+ <stop offset="0" style="stop-color:#5E90D2"/>
126+ <stop offset="0.4529" style="stop-color:#265899"/>
127+ <stop offset="1" style="stop-color:#133055"/>
128+ </radialGradient>
129+ <path id="path2411" sodipodi:nodetypes="csssc" fill="url(#path2411_1_)" stroke="#204A87" stroke-linecap="square" d="M131,55.15
130+ c0,5.424-7.561,7.85-16.875,7.85S97.25,60.574,97.25,55.15s7.561-12.4,16.875-12.4S131,49.727,131,55.15z"/>
131+
132+ <linearGradient id="path3257_1_" gradientUnits="userSpaceOnUse" x1="381.625" y1="-331.6309" x2="381.625" y2="-315.3755" gradientTransform="matrix(1 0 0 -1 -267.5 -258)">
133+ <stop offset="0" style="stop-color:#000000"/>
134+ <stop offset="1" style="stop-color:#000000"/>
135+ </linearGradient>
136+ <path id="path3257" sodipodi:nodetypes="csssc" opacity="0.12" fill="url(#path3257_1_)" enable-background="new " d="
137+ M131,55.15c0,5.424-7.561,7.85-16.875,7.85S97.25,60.574,97.25,55.15s7.561-12.4,16.875-12.4S131,49.727,131,55.15z"/>
138+ <linearGradient id="path3194_1_" gradientUnits="userSpaceOnUse" x1="119.75" y1="92.501" x2="119.75" y2="65.7139">
139+ <stop offset="0" style="stop-color:#FFFFFF"/>
140+ <stop offset="1" style="stop-color:#FFFFFF"/>
141+ </linearGradient>
142+
143+ <path id="path3194" sodipodi:nodetypes="csssc" opacity="0.6275" fill="none" stroke="url(#path3194_1_)" stroke-linecap="square" stroke-opacity="0.6099" enable-background="new " d="
144+ M130.325,54.999c0,5.062-7.258,7.326-16.2,7.326s-16.2-2.264-16.2-7.326c0-5.062,7.258-11.574,16.2-11.574
145+ S130.325,49.938,130.325,54.999z"/>
146+ <path id="path3201" sodipodi:nodetypes="cscc" fill="#EEEEEC" stroke="#204A87" d="M106.025,45.331c0,0,0.763,8.219,4.338,8.219
147+ c4.913,0,10.233-8.774,10.233-8.774L106.025,45.331z"/>
148+ <linearGradient id="path3203_1_" gradientUnits="userSpaceOnUse" x1="26.3228" y1="80.751" x2="26.3228" y2="93.5462">
149+ <stop offset="0" style="stop-color:#FFFFFF"/>
150+ <stop offset="1" style="stop-color:#FFFFFF"/>
151+ </linearGradient>
152+
153+ <path id="path3203" sodipodi:nodetypes="cscc" opacity="0.6275" fill="none" stroke="url(#path3203_1_)" stroke-width="1" enable-background="new " d="
154+ M105.35,44.461c0,0,0.824,9.689,4.682,9.763c5.963,0.116,11.519-9.684,11.519-9.684L105.35,44.461z"/>
155+
156+ <radialGradient id="path3247_1_" cx="281.3223" cy="-357.4326" r="5.3999" gradientTransform="matrix(1.5368 0 0 -0.8903 -319.6941 -271.8306)" gradientUnits="userSpaceOnUse">
157+ <stop offset="0" style="stop-color:#000000"/>
158+ <stop offset="1" style="stop-color:#000000"/>
159+ </radialGradient>
160+
161+ <path id="path3247" sodipodi:cx="96.75" sodipodi:cy="40.75" sodipodi:rx="8" sodipodi:ry="8" sodipodi:type="arc" opacity="0.5" fill="url(#path3247_1_)" d="
162+ M120.935,46.38c0,2.655-3.716,4.808-8.298,4.808c-4.584,0-8.299-2.152-8.299-4.808s3.715-4.808,8.299-4.808
163+ C117.219,41.572,120.935,43.725,120.935,46.38z"/>
164+
165+ <radialGradient id="path3190_1_" cx="221.6953" cy="-98.4678" r="6.7893" gradientTransform="matrix(1.6381 0 0.1864 -1.9856 -234.0083 -159.8562)" gradientUnits="userSpaceOnUse">
166+ <stop offset="0" style="stop-color:#EBCD9F"/>
167+ <stop offset="1" style="stop-color:#DBA756"/>
168+ </radialGradient>
169+
170+ <path id="path3190" sodipodi:cx="27.108572" sodipodi:cy="26.422857" sodipodi:rx="9.7371426" sodipodi:ry="13.257143" sodipodi:type="arc" fill="url(#path3190_1_)" stroke="#805612" stroke-width="0.6442" stroke-linecap="square" stroke-opacity="0.9922" d="
171+ M124.179,35.662c-0.683,7.27-6.057,13.163-12.003,13.163c-5.945,0-10.213-5.894-9.53-13.163
172+ c0.683-7.269,6.056-13.162,12.002-13.162S124.861,28.393,124.179,35.662z"/>
173+
174+ <path id="path3192" sodipodi:cx="27.108572" sodipodi:cy="26.422857" sodipodi:rx="9.7371426" sodipodi:ry="13.257143" sodipodi:type="arc" fill="none" stroke="#FFFFFF" stroke-width="0.6856" stroke-linecap="square" stroke-opacity="0.5919" d="
175+ M123.432,35.662c-0.635,6.896-5.637,12.488-11.17,12.488c-5.534,0-9.506-5.592-8.87-12.488s5.637-12.487,11.171-12.487
176+ C120.096,23.175,124.067,28.766,123.432,35.662z"/>
177+
178+ <radialGradient id="path3196_1_" cx="379.498" cy="-341.6455" r="12.466" gradientTransform="matrix(1 0 0 -0.8772 -267.5 -272.1577)" gradientUnits="userSpaceOnUse">
179+ <stop offset="0" style="stop-color:#868983"/>
180+ <stop offset="1" style="stop-color:#4C4E4A"/>
181+ </radialGradient>
182+
183+ <path id="path3196" sodipodi:nodetypes="cccsc" fill="url(#path3196_1_)" stroke="#2F3537" stroke-linecap="square" stroke-opacity="0.9725" d="
184+ M125.441,35.325c-0.3,2.859-1.396,5.512-3.016,7.695c3.575-13.346-22.546-5.287-21.102-10.678
185+ c1.877-6.019,7.281-10.518,13.17-10.518C121.32,21.825,126.225,27.873,125.441,35.325z"/>
186+
187+ <path id="path3199" sodipodi:nodetypes="cccsc" opacity="0.6275" fill="none" stroke="#FFFFFF" stroke-linecap="square" stroke-opacity="0.6323" enable-background="new " d="
188+ M124.738,35.14c-0.284,2.678-0.39,4.051-1.915,6.096c2.944-10.99-21.849-4.949-20.794-8.887c1.768-5.635,6.856-9.848,12.4-9.848
189+ C120.857,22.5,125.475,28.163,124.738,35.14z"/>
190+ </g>
191+</g>
192+</svg>
193
194=== modified file 'lib/lp/translations/model/pofile.py'
195--- lib/lp/translations/model/pofile.py 2009-11-27 19:25:30 +0000
196+++ lib/lp/translations/model/pofile.py 2009-12-09 13:15:29 +0000
197@@ -70,7 +70,7 @@
198 from lp.translations.utilities.translation_common_format import (
199 TranslationMessageData)
200
201-from storm.expr import And, In, Join, LeftJoin, Or, SQL
202+from storm.expr import And, Exists, In, Join, LeftJoin, Not, Or, Select, SQL
203 from storm.info import ClassAlias
204 from storm.store import Store
205
206@@ -1576,15 +1576,29 @@
207 return POFile.select(
208 "id >= %s" % quote(starting_id), orderBy="id", limit=batch_size)
209
210- def getPOFilesWithTranslationCredits(self):
211+ def getPOFilesWithTranslationCredits(self, untranslated=False):
212 """See `IPOFileSet`."""
213 store = getUtility(IStoreSelector).get(MAIN_STORE, MASTER_FLAVOR)
214- result = store.find(
215- (POFile, POTMsgSet),
216- TranslationTemplateItem.potemplateID == POFile.potemplateID,
217- POTMsgSet.id == TranslationTemplateItem.potmsgsetID,
218- POTMsgSet.msgid_singular == POMsgID.id,
219- In(POMsgID.msgid, POTMsgSet.credits_message_ids))
220+ clauses = [
221+ TranslationTemplateItem.potemplateID == POFile.potemplateID,
222+ POTMsgSet.id == TranslationTemplateItem.potmsgsetID,
223+ POTMsgSet.msgid_singular == POMsgID.id,
224+ In(POMsgID.msgid, POTMsgSet.credits_message_ids)]
225+ if untranslated:
226+ message_select = Select(
227+ True,
228+ And(
229+ TranslationMessage.potmsgsetID == POTMsgSet.id,
230+ TranslationMessage.potemplate == None,
231+ POFile.languageID == TranslationMessage.languageID,
232+ Or(And(
233+ POFile.variant == None,
234+ TranslationMessage.variant == None),
235+ POFile.variant == TranslationMessage.variant),
236+ TranslationMessage.is_current == True),
237+ (TranslationMessage))
238+ clauses.append(Not(Exists(message_select)))
239+ result = store.find((POFile, POTMsgSet), clauses)
240 return result.order_by('POFile.id')
241
242 def getPOFilesTouchedSince(self, date):
243
244=== modified file 'lib/lp/translations/scripts/fix_translation_credits.py'
245--- lib/lp/translations/scripts/fix_translation_credits.py 2009-10-30 15:00:12 +0000
246+++ lib/lp/translations/scripts/fix_translation_credits.py 2009-12-09 13:15:29 +0000
247@@ -9,19 +9,13 @@
248 __all__ = ['VerifyPOFileStatsProcess']
249
250
251-from datetime import datetime, timedelta
252 import logging
253-import pytz
254
255 from zope.component import getUtility
256 from zope.interface import implements
257
258-from canonical.config import config
259-from canonical.launchpad import helpers
260 from canonical.launchpad.interfaces.looptuner import ITunableLoop
261 from lp.translations.interfaces.pofile import IPOFileSet
262-from lp.services.mail.sendmail import simple_sendmail
263-from canonical.launchpad.mailnotification import MailWrapper
264 from canonical.launchpad.utilities.looptuner import DBLoopTuner
265
266
267@@ -35,7 +29,8 @@
268 self.start_at = start_at
269
270 pofileset = getUtility(IPOFileSet)
271- self.pofiles = pofileset.getPOFilesWithTranslationCredits()
272+ self.pofiles = pofileset.getPOFilesWithTranslationCredits(
273+ untranslated=True)
274 self.logger.info(
275 "Figuring out POFiles that need fixing: this may take a while...")
276 self.total = self.pofiles.count()
277
278=== modified file 'lib/lp/translations/tests/test_pofile.py'
279--- lib/lp/translations/tests/test_pofile.py 2009-11-25 15:06:43 +0000
280+++ lib/lp/translations/tests/test_pofile.py 2009-12-09 13:15:29 +0000
281@@ -20,7 +20,7 @@
282 from lp.translations.interfaces.translationcommonformat import (
283 ITranslationFileData)
284 from lp.testing import TestCaseWithFactory, verifyObject
285-from canonical.testing import ZopelessDatabaseLayer
286+from canonical.testing import LaunchpadZopelessLayer, ZopelessDatabaseLayer
287 from canonical.launchpad.webapp.publisher import canonical_url
288
289
290@@ -1210,7 +1210,7 @@
291 class TestPOFileSet(TestCaseWithFactory):
292 """Test PO file set methods."""
293
294- layer = ZopelessDatabaseLayer
295+ layer = LaunchpadZopelessLayer
296
297 def setUp(self):
298 # Create a POFileSet to work with.
299@@ -1447,6 +1447,49 @@
300 list_of_tuples_into_list(
301 self.pofileset.getPOFilesWithTranslationCredits()))
302
303+ def test_getPOFilesWithTranslationCredits_untranslated(self):
304+ # We need absolute DB access to be able to remove a translation
305+ # message.
306+ LaunchpadZopelessLayer.switchDbUser('postgres')
307+
308+ # Initially, we only get data from the sampledata, all of which
309+ # are untranslated.
310+ sampledata_pofiles = list(
311+ self.pofileset.getPOFilesWithTranslationCredits(
312+ untranslated=True))
313+ total = len(sampledata_pofiles)
314+ self.assertEquals(3, total)
315+
316+ # All POFiles with translation credits messages are
317+ # returned along with relevant POTMsgSets.
318+ potemplate1 = self.factory.makePOTemplate()
319+ credits_potmsgset = self.factory.makePOTMsgSet(
320+ potemplate1, singular=u'translator-credits', sequence=1)
321+
322+ sr_pofile = self.factory.makePOFile('sr', potemplate=potemplate1)
323+ pofiles_with_credits = (
324+ self.pofileset.getPOFilesWithTranslationCredits(
325+ untranslated=True))
326+ self.assertNotIn((sr_pofile, credits_potmsgset),
327+ list(pofiles_with_credits))
328+ self.assertEquals(
329+ total,
330+ pofiles_with_credits.count())
331+
332+ # Removing a translation for this message, removes it
333+ # from a result set when untranslated=True is passed in.
334+ message = credits_potmsgset.getSharedTranslationMessage(
335+ sr_pofile.language)
336+ message.destroySelf()
337+ pofiles_with_credits = (
338+ self.pofileset.getPOFilesWithTranslationCredits(
339+ untranslated=True))
340+ self.assertIn((sr_pofile, credits_potmsgset),
341+ list(pofiles_with_credits))
342+ self.assertEquals(
343+ total + 1,
344+ pofiles_with_credits.count())
345+
346
347 class TestPOFileStatistics(TestCaseWithFactory):
348 """Test PO files statistics calculation."""

Subscribers

People subscribed via source and target branches

to status/vote changes: