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
=== added file 'lib/canonical/launchpad/images/src/ppa-icon.svg'
--- lib/canonical/launchpad/images/src/ppa-icon.svg 1970-01-01 00:00:00 +0000
+++ lib/canonical/launchpad/images/src/ppa-icon.svg 2009-12-09 13:15:29 +0000
@@ -0,0 +1,188 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<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"
5 width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
6<g id="BOX_1_">
7
8 <image overflow="visible" width="50" height="47" id="Shape_1_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAxCAYAAACYq/ofAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
9GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYpJREFUeNrsmbtKxFAQhs+6UUEE
10b40gaGsjiog3FpWAsIjINmLhKyxYWYi1WFgJNj6ANjZiZaOIiJfF2lKxslBB0ErJGf/DxuBeolVg
11JszAx4Rwinyc+fdsiDFavCpTfeNofWYJzWf8zM/uMRc2zkq/b3rVq4ioiJZjLPIS9lLsjhyuTbWi
12vYEsY5EvcAwKhc1zW3dHsBvTzCVcNYIe0A/u4kR8IdluB0N/icwKEekC42C/JiMHq5OdaK9CRAJw
13CuYXty4/K3aErM0LOjZcjrvBMLiuFCHKGVnVBgZrRKylvDARF4VRsBtlZG9lpBftUeA/kwswt7x9
14++6V8yHm1ypuV0688lhZX6hIRxj4UITshFARF/iBKOwIelaoSANoikRwhoh/H/nJSFpEKCUipKOl
15IpoRHS0VURENu46WiiQlQqQZUZFERIIgNRnRA5HbG2JKREjPER2tpEaLdLRUJAkR1BW4r7eADLUY
16vt/e3YfQB3eR+W9lccz0oTUzFXGj9LFzY56MFrP6FmAAOfWmkypd0g4AAAAASUVORK5CYII=" transform="matrix(0.6965 0 0 0.6965 9 2.7646)">
17 </image>
18 <g id="Shape_2_1_">
19 <g>
20 <rect x="10.764" y="14.818" fill-rule="evenodd" clip-rule="evenodd" fill="#F1C28C" width="30.819" height="18.072"/>
21 </g>
22 </g>
23
24 <image overflow="visible" width="47" height="14" id="Shape_3_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAOCAYAAACGsPRkAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
25GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARBJREFUeNpiYBgGgBGXxKcdFc5A
26inMQufUjEJ/j8+j4ii7BgtUDOyvFGP7/nwRkMg8iT9wH4g4gPkiUJ4AR5M7AyKg1yFKNIBDbY/ME
27E3b1TIEQqUGFgZ5gMvu0q5aLYEx82lMPSkpOgzD/gtwqB8SGQHyUQHICJyX+QVoIiQKxDbonMJLT
28f0bmQCBmGKRYEIgtPu5r4cIZEx/3tw3WpAQDbECsAMQ6QHwKe3JiZHIBRhr/IPYEKEmJQZPUKezJ
29iZEpBIgZBjkWBmKrj4e6WTFi4uOhXqAPB3VSQk5SikCsDcQX0JOTFNCbh8g0WAAazfRKUn+hSQrN
30E4yMd4FkCZkGg6KWg46x8Q+I38I4AAEGAM//Wq4oz2vYAAAAAElFTkSuQmCC" transform="matrix(0.6965 0 0 0.6965 9.6963 4.1587)">
31 </image>
32
33 <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
34GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAOxJREFUeNrUl9sNwjAUQ/tI6Ud3
35QIzBNGzADKzGSn0ATdKm3CBfFIUOYCK5lvp15PSmTlH8wSqv5/IofhFVopWIrYLfjTxOohsxZBEh
36N9EiakSeCLKBrwaAk6gT9USQHdwabPEjfp9wmnmBO4WcsO0T4XB/IAMS3MiS1OU1yTFJlGWFNMk4
37OAMme2BKED5rkhHOkSXp95K0oifTwORHUDwfWzLINoXUJOMJPxNBHvIkFdIS/ha/SfbskJpkTVYw
38TA45AnIhhHRpwWDrk/VewWAtvT+QgbCqeW1BL7zcmCEd8WVx1TuOJYYMbwEGABZMXtkY03JZAAAA
39AElFTkSuQmCC" transform="matrix(0.6965 0 0 0.6965 12.4829 15.999)">
40 </image>
41
42 <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
43GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGNJREFUeNrMz7sRwCAMA1A5/qVI
44kU1YgREzGqMwQhghqPBFd6Z7JyHtQgNw43uGredZ1zdQNzuwHTMjkCuBgmkKr2pKFwbh1ygZdEpR
45U1DzkpjnUTXPnULEn1QxNs0Ek1eAAQAgkwVRB7ns7AAAAABJRU5ErkJggg==" transform="matrix(0.6965 0 0 0.6965 22.2334 3.4609)">
46 </image>
47
48 <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
49GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIFJREFUeNpiXFvpos/AwMAGxNeD
502/d8YcACgGpAlCYQiwDxJSYgMQGIFwKxGgNuAFJXD8S7gNiACSrIBpXAB+BqYAp/APFfApq+w9QQ
51Mh2nW0c1jWrC1MQMxIwE1MLVwDSxQwXxAQ6YehYgvgDED4D4Ax4N/4H4NFTjB3K8xAAQYACJWRPY
52yDPC1QAAAABJRU5ErkJggg==" transform="matrix(0.6965 0 0 0.6965 22.2334 5.5513)">
53 </image>
54
55 <image overflow="visible" width="12" height="21" id="Layer_3_xA0_Image_1_" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAXCAYAAADQpsWBAAAACXBIWXMAAA/XAAAP1wHWM14/AAAA
56GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHRJREFUeNpi3N0Rqs/AwCDAQDy4
57wAIk6oDYigRNQSBNa4D4FAmanjCMglFAOWDc2+ypBqR5SdBzk4WRkbEQyDAiQVMmCysLy0Ug4wsJ
58mj7QMSByLRi5gTQzCXq+gnKuKxBLk6BpPUiTLRAbkKDpCFl+AggwAG4eEHY/on7LAAAAAElFTkSu
59QmCC" transform="matrix(0.6965 0 0 0.6965 22.2334 3.4609)">
60 </image>
61</g>
62<g id="BOX">
63
64 <image overflow="visible" width="50" height="47" id="Shape_1_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAxCAYAAACYq/ofAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
65GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAYtJREFUeNpiYBgFgwswogtsqnZw
66BFLuQCw4iN293q/1wA5kARZ0Ff///w8EUnFAzD+IPSIBxDtwxsiGSjtOILUdiO2wxdYgAu+AWCyg
67/dBfrDECjA19ICU0yD3BAHWjGRAfx+URQyAlMETytz0+j5gM8kyODLyBuAMjj6wuteIFUtuA2GaI
68eOQ7EAuHdh/7jhIj///9M4OmvaECQAWTExBvRfXI//+6g7zIxZVPUD3y79//oRYjIOABxGXwPLI0
6930QMVI0AseUQbJ0IR088844Fkj/ApZUQw9AEoFhZxgJJVv+GUv2BDpwQHvn/TxtI8Q1Rj9jAMzsw
70ozMNgWYJvmKYAZpH/g35/ggsjwwXj/wfJh75P5q0Rj0ymkdGk9aoR0Y9MprZR5PWqEdo5ZH//4dJ
71Hvn79+9o0hotfmmTR0ZjZLD1EIdL0hqtR0aTFq2S1v/RpDXqEVp4BAiuMUBmc9nQFfxn+M8BVTdY
72B7lfMBDjuBxzBnEgBZrxZRqkHvk95STDfYZRMMgAQIABAFTZnmRKxAyAAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 4.25 26.7646)">
73 </image>
74 <g id="Shape_2">
75 <g>
76 <rect x="6.163" y="39.83" fill-rule="evenodd" clip-rule="evenodd" fill="#F1C28C" width="33.407" height="19.59"/>
77 </g>
78 </g>
79
80 <image overflow="visible" width="47" height="14" id="Shape_3_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAPCAYAAACiLkz/AAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
81GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARFJREFUeNpiYBjigBGb4KcdFc5A
82inMQufMjEJ/j8+j4ii7BguH4nZViDP//TwIymQeRB+4DcQcQHyToAWCkuDMwMmoNspQiCMT22DzA
83hKmWKRAiPKgw0ANMZp921XLhjYFPe+pBycdpEOZVkDvlgNgQiI/iSULg5MM/SAsbUSC2QfcAShL6
84z8gcCMQMgxQLArHFx30tXFhj4OP+tsGafGCADYgVgFgHiE9hJiFGJhdgRPEPYg+AkpEYNBmdwkxC
85jEwhQMwwyLEwEFt9PNTNihIDHw/1An02qJMPcjJSBGJtIL6AnISkgN47RKahAtCopVcy+gtNRkge
86YGS8CyRLyDQUFJ0cdIyFf0D8lmG4AIAAAwBHPVquBSCWMAAAAABJRU5ErkJggg==" transform="matrix(0.755 0 0 0.755 5.0049 28.2754)">
87 </image>
88
89 <image overflow="visible" opacity="0.15" width="40" height="22" id="Layer_2_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAWCAYAAABdTLWOAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
90GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPlJREFUeNrMlk0OgjAQhQutGFZe
91xwN4HbdexMt4BDceRqAKFKzFvJqhC+JK3iQvw8/my7xpZ7LjPrsopbZBneKJPEgH3c5XfzLh4YAP
92IxFkBn1igmyCdsgsYeDuM77UQSUySxTIjwhp8WKJIB3sbqXdJZndUyW9tNsCkq2SSlayBjlTT26C
93BtmTd5GZIF10N/akJryCnKxkhR8VGWSX2v0i60mDc2LlwRkjNUlo9OXM7oEdcrK7jxcnEaRJ7e4A
94urCU+DVWtdkVVCxD+n9XMgdbK8diL0YRyz6p5exukAfFFXm6YLBu5l+72zVOxo+gTs5IRkgV3X0L
95MADeXFGfcwGqnQAAAABJRU5ErkJggg==" transform="matrix(0.755 0 0 0.755 8.0249 41.1104)">
96 </image>
97
98 <image overflow="visible" opacity="0.2" width="12" height="21" id="Layer_4_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAWCAYAAAAb+hYkAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
99GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAF9JREFUeNrM1LsNgEAMA1CH/CiQ
100GAX2r24ERrkRrmEA4iLC/ZOdJnIdOAHc+J5pLxgFNMw2lGNmBHIlUDBN4V1N6cIg/Bolg3Zpagpq
101XhLzPLrmuVOIuEkVs/gjniXAAFSMBtFzi9wwAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 18.5947 27.52)">
102 </image>
103
104 <image overflow="visible" opacity="0.15" width="12" height="17" id="Layer_5_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAASCAYAAACAa1QyAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
105GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGJJREFUeNpiYCADMK6tdLEH0huB
106eElw+54cbIqAakCUJRCvBuLbTFBxFiDmJmABSA0PiAHT9AeIvxLQBFLzBVkTSWBU06gmKmpiBWI+
107AmpBaviRNf0G4k8ENIHUfAQxAAIMAK8LEEsHEmKZAAAAAElFTkSuQmCC" transform="matrix(0.755 0 0 0.755 18.5947 29.7852)">
108 </image>
109
110 <image overflow="visible" width="12" height="21" id="Layer_3_xA0_Image" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAWCAYAAAAb+hYkAAAACXBIWXMAAA6cAAAOnAEHlFPdAAAA
111GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi3N0Rys/AwGDAQDz4
112wAIktIB4BQmajoE0PQHiCSRoesQwCkYB5YBxb7MnD5BWJ0HPZxZGRkY1IGMaCZrOsbCysHwAMg6R
113oOkuHQMi14KRGUhzk6DnLyjnigNxIAmanoI0iQJxEAmaLgAEGAB7dhHeJO4hBwAAAABJRU5ErkJg
114gg==" transform="matrix(0.755 0 0 0.755 18.5947 27.52)">
115 </image>
116</g>
117<g id="layer2" inkscape:groupmode="layer">
118 <g id="g3267" transform="translate(-70,0)">
119
120 <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">
121 <stop offset="0" style="stop-color:#5E90D2"/>
122 <stop offset="0.4529" style="stop-color:#265899"/>
123 <stop offset="1" style="stop-color:#133055"/>
124 </radialGradient>
125 <path id="path2411" sodipodi:nodetypes="csssc" fill="url(#path2411_1_)" stroke="#204A87" stroke-linecap="square" d="M131,55.15
126 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"/>
127
128 <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)">
129 <stop offset="0" style="stop-color:#000000"/>
130 <stop offset="1" style="stop-color:#000000"/>
131 </linearGradient>
132 <path id="path3257" sodipodi:nodetypes="csssc" opacity="0.12" fill="url(#path3257_1_)" enable-background="new " d="
133 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"/>
134 <linearGradient id="path3194_1_" gradientUnits="userSpaceOnUse" x1="119.75" y1="92.501" x2="119.75" y2="65.7139">
135 <stop offset="0" style="stop-color:#FFFFFF"/>
136 <stop offset="1" style="stop-color:#FFFFFF"/>
137 </linearGradient>
138
139 <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="
140 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
141 S130.325,49.938,130.325,54.999z"/>
142 <path id="path3201" sodipodi:nodetypes="cscc" fill="#EEEEEC" stroke="#204A87" d="M106.025,45.331c0,0,0.763,8.219,4.338,8.219
143 c4.913,0,10.233-8.774,10.233-8.774L106.025,45.331z"/>
144 <linearGradient id="path3203_1_" gradientUnits="userSpaceOnUse" x1="26.3228" y1="80.751" x2="26.3228" y2="93.5462">
145 <stop offset="0" style="stop-color:#FFFFFF"/>
146 <stop offset="1" style="stop-color:#FFFFFF"/>
147 </linearGradient>
148
149 <path id="path3203" sodipodi:nodetypes="cscc" opacity="0.6275" fill="none" stroke="url(#path3203_1_)" stroke-width="1" enable-background="new " d="
150 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"/>
151
152 <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">
153 <stop offset="0" style="stop-color:#000000"/>
154 <stop offset="1" style="stop-color:#000000"/>
155 </radialGradient>
156
157 <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="
158 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
159 C117.219,41.572,120.935,43.725,120.935,46.38z"/>
160
161 <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">
162 <stop offset="0" style="stop-color:#EBCD9F"/>
163 <stop offset="1" style="stop-color:#DBA756"/>
164 </radialGradient>
165
166 <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="
167 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
168 c0.683-7.269,6.056-13.162,12.002-13.162S124.861,28.393,124.179,35.662z"/>
169
170 <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="
171 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
172 C120.096,23.175,124.067,28.766,123.432,35.662z"/>
173
174 <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">
175 <stop offset="0" style="stop-color:#868983"/>
176 <stop offset="1" style="stop-color:#4C4E4A"/>
177 </radialGradient>
178
179 <path id="path3196" sodipodi:nodetypes="cccsc" fill="url(#path3196_1_)" stroke="#2F3537" stroke-linecap="square" stroke-opacity="0.9725" d="
180 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
181 c1.877-6.019,7.281-10.518,13.17-10.518C121.32,21.825,126.225,27.873,125.441,35.325z"/>
182
183 <path id="path3199" sodipodi:nodetypes="cccsc" opacity="0.6275" fill="none" stroke="#FFFFFF" stroke-linecap="square" stroke-opacity="0.6323" enable-background="new " d="
184 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
185 C120.857,22.5,125.475,28.163,124.738,35.14z"/>
186 </g>
187</g>
188</svg>
0189
=== modified file 'lib/lp/translations/model/pofile.py'
--- lib/lp/translations/model/pofile.py 2009-11-27 19:25:30 +0000
+++ lib/lp/translations/model/pofile.py 2009-12-09 13:15:29 +0000
@@ -70,7 +70,7 @@
70from lp.translations.utilities.translation_common_format import (70from lp.translations.utilities.translation_common_format import (
71 TranslationMessageData)71 TranslationMessageData)
7272
73from storm.expr import And, In, Join, LeftJoin, Or, SQL73from storm.expr import And, Exists, In, Join, LeftJoin, Not, Or, Select, SQL
74from storm.info import ClassAlias74from storm.info import ClassAlias
75from storm.store import Store75from storm.store import Store
7676
@@ -1576,15 +1576,29 @@
1576 return POFile.select(1576 return POFile.select(
1577 "id >= %s" % quote(starting_id), orderBy="id", limit=batch_size)1577 "id >= %s" % quote(starting_id), orderBy="id", limit=batch_size)
15781578
1579 def getPOFilesWithTranslationCredits(self):1579 def getPOFilesWithTranslationCredits(self, untranslated=False):
1580 """See `IPOFileSet`."""1580 """See `IPOFileSet`."""
1581 store = getUtility(IStoreSelector).get(MAIN_STORE, MASTER_FLAVOR)1581 store = getUtility(IStoreSelector).get(MAIN_STORE, MASTER_FLAVOR)
1582 result = store.find(1582 clauses = [
1583 (POFile, POTMsgSet),1583 TranslationTemplateItem.potemplateID == POFile.potemplateID,
1584 TranslationTemplateItem.potemplateID == POFile.potemplateID,1584 POTMsgSet.id == TranslationTemplateItem.potmsgsetID,
1585 POTMsgSet.id == TranslationTemplateItem.potmsgsetID,1585 POTMsgSet.msgid_singular == POMsgID.id,
1586 POTMsgSet.msgid_singular == POMsgID.id,1586 In(POMsgID.msgid, POTMsgSet.credits_message_ids)]
1587 In(POMsgID.msgid, POTMsgSet.credits_message_ids))1587 if untranslated:
1588 message_select = Select(
1589 True,
1590 And(
1591 TranslationMessage.potmsgsetID == POTMsgSet.id,
1592 TranslationMessage.potemplate == None,
1593 POFile.languageID == TranslationMessage.languageID,
1594 Or(And(
1595 POFile.variant == None,
1596 TranslationMessage.variant == None),
1597 POFile.variant == TranslationMessage.variant),
1598 TranslationMessage.is_current == True),
1599 (TranslationMessage))
1600 clauses.append(Not(Exists(message_select)))
1601 result = store.find((POFile, POTMsgSet), clauses)
1588 return result.order_by('POFile.id')1602 return result.order_by('POFile.id')
15891603
1590 def getPOFilesTouchedSince(self, date):1604 def getPOFilesTouchedSince(self, date):
15911605
=== modified file 'lib/lp/translations/scripts/fix_translation_credits.py'
--- lib/lp/translations/scripts/fix_translation_credits.py 2009-10-30 15:00:12 +0000
+++ lib/lp/translations/scripts/fix_translation_credits.py 2009-12-09 13:15:29 +0000
@@ -9,19 +9,13 @@
9__all__ = ['VerifyPOFileStatsProcess']9__all__ = ['VerifyPOFileStatsProcess']
1010
1111
12from datetime import datetime, timedelta
13import logging12import logging
14import pytz
1513
16from zope.component import getUtility14from zope.component import getUtility
17from zope.interface import implements15from zope.interface import implements
1816
19from canonical.config import config
20from canonical.launchpad import helpers
21from canonical.launchpad.interfaces.looptuner import ITunableLoop17from canonical.launchpad.interfaces.looptuner import ITunableLoop
22from lp.translations.interfaces.pofile import IPOFileSet18from lp.translations.interfaces.pofile import IPOFileSet
23from lp.services.mail.sendmail import simple_sendmail
24from canonical.launchpad.mailnotification import MailWrapper
25from canonical.launchpad.utilities.looptuner import DBLoopTuner19from canonical.launchpad.utilities.looptuner import DBLoopTuner
2620
2721
@@ -35,7 +29,8 @@
35 self.start_at = start_at29 self.start_at = start_at
3630
37 pofileset = getUtility(IPOFileSet)31 pofileset = getUtility(IPOFileSet)
38 self.pofiles = pofileset.getPOFilesWithTranslationCredits()32 self.pofiles = pofileset.getPOFilesWithTranslationCredits(
33 untranslated=True)
39 self.logger.info(34 self.logger.info(
40 "Figuring out POFiles that need fixing: this may take a while...")35 "Figuring out POFiles that need fixing: this may take a while...")
41 self.total = self.pofiles.count()36 self.total = self.pofiles.count()
4237
=== modified file 'lib/lp/translations/tests/test_pofile.py'
--- lib/lp/translations/tests/test_pofile.py 2009-11-25 15:06:43 +0000
+++ lib/lp/translations/tests/test_pofile.py 2009-12-09 13:15:29 +0000
@@ -20,7 +20,7 @@
20from lp.translations.interfaces.translationcommonformat import (20from lp.translations.interfaces.translationcommonformat import (
21 ITranslationFileData)21 ITranslationFileData)
22from lp.testing import TestCaseWithFactory, verifyObject22from lp.testing import TestCaseWithFactory, verifyObject
23from canonical.testing import ZopelessDatabaseLayer23from canonical.testing import LaunchpadZopelessLayer, ZopelessDatabaseLayer
24from canonical.launchpad.webapp.publisher import canonical_url24from canonical.launchpad.webapp.publisher import canonical_url
2525
2626
@@ -1210,7 +1210,7 @@
1210class TestPOFileSet(TestCaseWithFactory):1210class TestPOFileSet(TestCaseWithFactory):
1211 """Test PO file set methods."""1211 """Test PO file set methods."""
12121212
1213 layer = ZopelessDatabaseLayer1213 layer = LaunchpadZopelessLayer
12141214
1215 def setUp(self):1215 def setUp(self):
1216 # Create a POFileSet to work with.1216 # Create a POFileSet to work with.
@@ -1447,6 +1447,49 @@
1447 list_of_tuples_into_list(1447 list_of_tuples_into_list(
1448 self.pofileset.getPOFilesWithTranslationCredits()))1448 self.pofileset.getPOFilesWithTranslationCredits()))
14491449
1450 def test_getPOFilesWithTranslationCredits_untranslated(self):
1451 # We need absolute DB access to be able to remove a translation
1452 # message.
1453 LaunchpadZopelessLayer.switchDbUser('postgres')
1454
1455 # Initially, we only get data from the sampledata, all of which
1456 # are untranslated.
1457 sampledata_pofiles = list(
1458 self.pofileset.getPOFilesWithTranslationCredits(
1459 untranslated=True))
1460 total = len(sampledata_pofiles)
1461 self.assertEquals(3, total)
1462
1463 # All POFiles with translation credits messages are
1464 # returned along with relevant POTMsgSets.
1465 potemplate1 = self.factory.makePOTemplate()
1466 credits_potmsgset = self.factory.makePOTMsgSet(
1467 potemplate1, singular=u'translator-credits', sequence=1)
1468
1469 sr_pofile = self.factory.makePOFile('sr', potemplate=potemplate1)
1470 pofiles_with_credits = (
1471 self.pofileset.getPOFilesWithTranslationCredits(
1472 untranslated=True))
1473 self.assertNotIn((sr_pofile, credits_potmsgset),
1474 list(pofiles_with_credits))
1475 self.assertEquals(
1476 total,
1477 pofiles_with_credits.count())
1478
1479 # Removing a translation for this message, removes it
1480 # from a result set when untranslated=True is passed in.
1481 message = credits_potmsgset.getSharedTranslationMessage(
1482 sr_pofile.language)
1483 message.destroySelf()
1484 pofiles_with_credits = (
1485 self.pofileset.getPOFilesWithTranslationCredits(
1486 untranslated=True))
1487 self.assertIn((sr_pofile, credits_potmsgset),
1488 list(pofiles_with_credits))
1489 self.assertEquals(
1490 total + 1,
1491 pofiles_with_credits.count())
1492
14501493
1451class TestPOFileStatistics(TestCaseWithFactory):1494class TestPOFileStatistics(TestCaseWithFactory):
1452 """Test PO files statistics calculation."""1495 """Test PO files statistics calculation."""

Subscribers

People subscribed via source and target branches

to status/vote changes: