Merge lp:~knitzsche/ubuntu-translations/ul10n-custom into lp:~ubuntu-translations-coordinators/ubuntu-translations/ul10n-stats

Proposed by Kyle Nitzsche
Status: Merged
Approved by: Kyle Nitzsche
Approved revision: 24
Merged at revision: 24
Proposed branch: lp:~knitzsche/ubuntu-translations/ul10n-custom
Merge into: lp:~ubuntu-translations-coordinators/ubuntu-translations/ul10n-stats
Diff against target: 2933 lines (+2009/-565)
16 files modified
common/css/light.css (+321/-0)
common/templates/custom_blacklisted_file.py (+119/-0)
common/templates/custom_blacklisted_priority.py (+119/-0)
common/templates/custom_report.py (+128/-0)
common/templates/custom_src_excluded.py (+123/-0)
common/templates/custom_src_included.py (+119/-0)
common/templates/html_report_template.py (+13/-13)
common/utils.py (+13/-2)
config/blacklist.conf (+0/-423)
config/blacklist.lucid.conf (+141/-0)
config/blacklist.maverick.conf (+423/-0)
config/settings.conf (+1/-1)
ubuntu-translations-stats.py (+182/-57)
ul10n_stats/ul10n_custom.py (+4/-2)
ul10n_stats/ul10n_iso_pots_get.py (+31/-35)
ul10n_stats/ul10n_stats_calc.py (+272/-32)
To merge this branch: bzr merge lp:~knitzsche/ubuntu-translations/ul10n-custom

Description of the change

a whole bunch of changes described in bzr log and in person. overview: custom stats optionally derive from build manifest, custom stats have src pkgs in and out links/html pages and blacklisted file and black listed priority links/html pages.

To post a comment you must log in.
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

with rev 33 and 34 I added release specific black lists. Now config/ has blacklist.lucid.conf and blacklist.maverick.conf. Default is derived from config/settings distro_codename field. -b argument still allows you to use specified file.

Revision history for this message
David Planella (dpm) wrote :

Thanks for the great work on this Kyle. My comments:

• I'd strongly suggest that the README file stays. I can assure I'll need it when in two weeks time I no longer remember what the script does :)
• Why add new files for each custom template type instead of simply adding new variables containing the templates in html_report_template.py?
• In ubuntu-translations-stats.py the --template-blacklist option is now missing a default
• In ubuntu-translations-stats.py, do we need the --no-file option at all? Can we just not specify a blacklist if we don't want to use one?
• In the get_src_pkgs_from_binary_pkgs() you could consider using the apt_pkg Python library instead of calling an external process. You could try something like:

>>> pkgs = map(lambda a: a.strip(), open("bla").readlines())
>>> import apt_pkg
>>> apt_pkg.init()
>>> sources = apt_pkg.GetPkgSrcRecords()
>>> sources.Restart()
>>> for pkg in pkgs:
... while sources.Lookup(pkg):
... print sources.Package

(Credit to dholbach for showing me this some time ago)

• I'd suggest using the format() method instead of things such as 'print "text (" + variable + ")"' - e.g. "text ({1})".format(variable)
• I'd also suggest using the logging methods to display info or debugging text on the terminal
• In ul10n_stats/ul10n_stats_calc.py variations of the block below are executed 4 times. I'd suggest writing a function containing that code, where the type of report can be passed as an argument. Rather than having separate python modules containing different reports, it might be wort exploring having them all in one module and provide a function in that file to select them.
  f_ = codecs.open(os.path.join('reports', 'custom-excluded.html'), 'w', 'utf-8')
  f_.write(excluded.ubuntu_template % variables)
  f_.close()
• When merging, please take into account the changes in trunk that should stay: mainly the html + css cleanup and adaptation of the table to the Light theme, the logging mechanism, the new classes for language operations, and the bugfix for the language ordering in the report.
• As the original script is growing to be a full-fledged project, I think we should look into adopting some minimal coding conventions. I would suggest https://dev.launchpad.net/PythonStyleGuide

Thanks!

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :
Download full text (3.3 KiB)

On 10/06/2010 12:01 PM, David Planella wrote:
> Thanks for the great work on this Kyle. My comments:
>
> • I'd strongly suggest that the README file stays. I can assure I'll need it when in two weeks time I no longer remember what the script does :)
>
this was an error. add it back please.
> • Why add new files for each custom template type instead of simply adding new variables containing the templates in html_report_template.py?
>
to keep ubuntu stuff and custom stuff separated. and to keep these files
shortish and easier to edit.
> • In ubuntu-translations-stats.py the --template-blacklist option is now missing a default
>
that's intentional and relates by the new support for release-specific
blacklist. that is, the default is determined by the config/settings
distro_codename field. you only use this option if you want to use a
different file that you specify.
> • In ubuntu-translations-stats.py, do we need the --no-file option at all? Can we just not specify a blacklist if we don't want to use one?
>
as per the above comment, by default the blacklist for the release in
settings.conf is used. I am agnostic as to the best way to specify using
no 'file' blacklist.
> • In the get_src_pkgs_from_binary_pkgs() you could consider using the apt_pkg Python library instead of calling an external process. You could try something like:
>
I'll take a look at this point further - seems right.
>
>>>> pkgs = map(lambda a: a.strip(), open("bla").readlines())
>>>> import apt_pkg
>>>> apt_pkg.init()
>>>> sources = apt_pkg.GetPkgSrcRecords()
>>>> sources.Restart()
>>>> for pkg in pkgs:
>>>>
> ... while sources.Lookup(pkg):
> ... print sources.Package
>
> (Credit to dholbach for showing me this some time ago)
>
> • I'd suggest using the format() method instead of things such as 'print "text (" + variable + ")"' - e.g. "text ({1})".format(variable)
>
why? it is less intuitive to read (and code) with format.
> • I'd also suggest using the logging methods to display info or debugging text on the terminal
>
sounds good, example please
> • In ul10n_stats/ul10n_stats_calc.py variations of the block below are executed 4 times. I'd suggest writing a function containing that code, where the type of report can be passed as an argument. Rather than having separate python modules containing different reports, it might be wort exploring having them all in one module and provide a function in that file to select them.
> f_ = codecs.open(os.path.join('reports', 'custom-excluded.html'), 'w', 'utf-8')
> f_.write(excluded.ubuntu_template % variables)
> f_.close()
>
yes, i was going to do that, just didn't get to it.
> • When merging, please take into account the changes in trunk that should stay: mainly the html + css cleanup and adaptation of the table to the Light theme, the logging mechanism, the new classes for language operations, and the bugfix for the language ordering in the report.
>
I am not sure how to do that. you said push a branch and make it a merge
proposal, which is what I did. open to suggestions for how we can both
actively develop the same branch.
> • As the original script is gr...

Read more...

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

So I/we need to work out the conflicts.

Since we don't yet have a working style for that, I am continuing on with development. (I will do whatever is necessary to make this right!)

With the latest commits to my merge proposal branch, I fix a bug and add the following: now all files generated in reports/ start with <basename>, where <basename> is returned by utils.get_basename() function and where it is derived from defaults + config/settings.conf + arguments. see bzr log

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

I should perhaps add that the point of this is that I'd like to be able to run the whole shebang multiple times and have all generated files (and links in html to them) be named according to that execution's target, so that one targeted execution does not overwrite the files of a differently targeted execution.

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

ok, forget those two last comments (for the moment), divergence issue prevented push success. I've gotta get this branch proliferation under control. ;)

Revision history for this message
David Planella (dpm) wrote :
Download full text (5.0 KiB)

El dc 06 de 10 de 2010 a les 16:37 +0000, en/na Kyle Nitzsche va
escriure:
> On 10/06/2010 12:01 PM, David Planella wrote:
> > Thanks for the great work on this Kyle. My comments:
> >
> > • I'd strongly suggest that the README file stays. I can assure I'll need it when in two weeks time I no longer remember what the script does :)
> >
> this was an error. add it back please.
> > • Why add new files for each custom template type instead of simply adding new variables containing the templates in html_report_template.py?
> >
> to keep ubuntu stuff and custom stuff separated. and to keep these files
> shortish and easier to edit.
> > • In ubuntu-translations-stats.py the --template-blacklist option is now missing a default
> >
> that's intentional and relates by the new support for release-specific
> blacklist. that is, the default is determined by the config/settings
> distro_codename field. you only use this option if you want to use a
> different file that you specify.
> > • In ubuntu-translations-stats.py, do we need the --no-file option at all? Can we just not specify a blacklist if we don't want to use one?
> >
> as per the above comment, by default the blacklist for the release in
> settings.conf is used. I am agnostic as to the best way to specify using
> no 'file' blacklist.

I think it is probably redundant. We've already got -b to specify the
blacklist file. If we don't want one, we simply don't specify it neither
on the command line (-b) nor in the config file. So my suggestion would
be to remove it and go for fewer options and saner defaults.

> > • In the get_src_pkgs_from_binary_pkgs() you could consider using the apt_pkg Python library instead of calling an external process. You could try something like:
> >
> I'll take a look at this point further - seems right.
> >
> >>>> pkgs = map(lambda a: a.strip(), open("bla").readlines())
> >>>> import apt_pkg
> >>>> apt_pkg.init()
> >>>> sources = apt_pkg.GetPkgSrcRecords()
> >>>> sources.Restart()
> >>>> for pkg in pkgs:
> >>>>
> > ... while sources.Lookup(pkg):
> > ... print sources.Package
> >
> > (Credit to dholbach for showing me this some time ago)
> >
> > • I'd suggest using the format() method instead of things such as 'print "text (" + variable + ")"' - e.g. "text ({1})".format(variable)
> >
> why? it is less intuitive to read (and code) with format.

I guess it's a matter of style or personal preference. I personally find
it easier to read
'Coordinates: {0}, {1}'.format(latitude, longitude) than
'Coordinates: ' + latitude + ', ' + longitude

In the first form the text is one single unbroken string (where {0} and
{1} could also be replaced by variable names), and it has also the
benefit to provide a translator-friendly string (i.e. not split) in case
it ever needed to be made translatable. Not that it applies in this
script, I just find it good practice.

> > • I'd also suggest using the logging methods to display info or debugging text on the terminal
> >
> sounds good, example please

You can see it in the trunk branch, all files have got logging
statements. E.g.

  logger.info('Getting language list...')

Document...

Read more...

24. By Kyle Nitzsche <knitzsche@chroma>

the merge between trunk and my custom branch with conlicts resolved

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

some of the items David and I discussed as potential changes have not yet been done. These can wait until we get back to a common merged trunk.

I noticed there is a bug (unicode error) in trunk before this merge that causes crash when not obtaining languages from a local file with the -l <file> option.

I handled the merge imperfectly and so my bzr log comments after 24 (there were about 10 more) in my branch are lost. Chock that up to experience. Among the key points are:
 * by default (with no args) file blacklisting is enabled AND there are release-specific blacklist files in config/, for example: config/blacklist.lucid.conf. To disable file blacklisting, use the -f argument.
 * -n <name> causes all generated files (html and data files) in reports/ to start with that as basename. in general,
  > no args: "<distro_id>-<release>" (for example: ubuntu-10.10")
  > -c (for custom) and -n <name>: "<name>" (for example: "thisproject">
  > -c (and no -n): "custom-<distro_id>-<release>" (for example: "custom-ubuntu-10.04")

 * -m <file> starts from manifest (and requires -c)
 * -d <file> starts from file of gettext domains, one per line
 * reports/ includes generated files for a) conversion to html as needed, b) debugging/data analysis, where all files start we basename, as described above

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'common/css/light.css'
--- common/css/light.css 2010-10-01 17:14:00 +0000
+++ common/css/light.css 2010-10-07 20:22:40 +0000
@@ -2,3 +2,324 @@
2@import url(layout.css);2@import url(layout.css);
3@import url(color.css);3@import url(color.css);
4@import url(typography.css);4@import url(typography.css);
5/*
6* Original version created for the Ubuntu documentation team
7 by Jeff Schering on Sept 2, 2005
8* Hacked on by Matthew East for the Ubuntu documentation team.
9* Subsequently hacked by David Planella for the translations team.
10 Adapted it to the new Ubuntu 'light' theme, taking bits and pieces
11 from other Ubuntu sister sites, mainly the new wiki theme and the
12 Ubuntu and QA sites.
13
14This file is in the Public Domain.
15
16*/
17
18/* @import url(screen.css); */
19
20body {
21 background:url('../img/bg_dotted.png') repeat scroll 0 0 transparent;
22 color:#333333;
23 margin:0;
24 font-family:'UbuntuBeta','Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;
25 font-size:12px;
26 line-height:16px;
27}
28
29#ubuntu-header {
30 background-image:url("../img/header_logo.png");
31 background-repeat:no-repeat;
32 height:32px;
33 left:724px;
34 margin:0;
35 overflow:hidden;
36 padding:0;
37 position:absolute;
38 text-indent:-9999px;
39 top:16px;
40 width:236px;
41}
42
43/*
44#navbar {
45 -moz-border-radius:0 0 5px 5px;
46 -moz-box-shadow:0 0 5px #555555;
47 background:url("images/light_stripes.png") no-repeat scroll 0 0 #DD4814;
48 font-size:14px;
49 height:64px;
50 line-height:16px;
51 list-style-type:none;
52 margin:0;
53 padding:0 0 0 16px;
54 position:relative;
55 z-index:2;
56}
57*/
58
59#intro-message {
60 font-size:16px;
61 line-height: 1.2em;
62}
63
64#navbar {
65 background:url("../img/topnav_divider.png") no-repeat scroll left top transparent !important;
66 height:100%;
67 list-style:none outside none;
68 margin:0 0 0 16px;
69 padding:0;
70}
71
72#navbar a {
73 color:#FFFFFF;
74 display:block;
75 float:left;
76 margin:0;
77 padding:24px 8px;
78 text-decoration:none;
79 text-shadow:0 1px #000000;
80}
81
82#navbar a:hover, #main-menu a.active {
83 background:url("../img/topnav_active_bg.png") no-repeat scroll right top transparent !important;
84}
85
86#navbar li {
87 background:url("../img/topnav_divider.png") no-repeat scroll right top transparent !important;
88 float:left;
89 font-size:14px;
90 height:64px;
91 line-height:16px;
92 margin:0;
93 padding:0;
94}
95
96#container {
97 background-color:#FFFFFF;
98 width: 976px;
99 margin: auto;
100 margin-bottom: 50px;
101 position: relative;
102}
103
104#container .sb-inner {
105 background-color: #fff;
106}
107
108#page {
109 clear: both;
110 margin: 0;
111 padding: 10px 30px;
112}
113
114#content {
115 padding: 12px;
116}
117
118img.ubuntulogo {
119 margin: 20px;
120}
121
122img.rounded {
123 padding: 0;
124 margin: 0;
125}
126
127#topcap {
128 position: absolute;
129 top: 0;
130 left: 0;
131}
132
133#bottomcap {
134 position: absolute;
135 bottom: 0;
136 left: 0;
137}
138
139#header, #container-inner {
140 -moz-border-radius:0 0 5px 5px;
141 /*-moz-box-shadow:0 0 5px #BBBBBB;*/
142 -moz-box-shadow:0 0 5px #555555;
143}
144
145#header {
146 background: url("../img/header_bg.png") repeat-x scroll left top #DD4814;
147 height: 64px;
148 margin: 0;
149 padding: 0;
150 position: relative;
151}
152
153
154#header h1 {
155 display: inline;
156}
157
158#header h1 span {
159 display: none;
160}
161
162#logo-floater {
163 width: 225px;
164 float: left;
165 padding: 10px;
166}
167
168#logo-floater h1 {
169 border: none;
170}
171
172#sitename a {
173 position: relative;
174 top: 35px;
175 float: right;
176 font-size: 1.5em;
177 padding-right: 20px;
178 text-decoration: none;
179 color: black;
180}
181
182#sitename span {
183 padding-left: 5px;
184}
185
186#cse-search-box {
187 position: absolute;
188 right: 3px;
189 top: 3px;
190 /* float: right; */
191 margin: 5px 10px;
192 padding: 0;
193 white-space: nowrap;
194 font-size: 13px;
195}
196
197#cse-search-box form div {
198 display: inline;
199}
200
201.breadcrumbs {
202 padding-bottom: 15px;
203}
204
205ul {
206 margin-left: 5px;
207}
208
209.orderedlist {
210 margin-left: 10px;
211}
212
213.titlepage {
214 padding-right: 1em;
215}
216
217div.toc dt {
218 margin-top: 2px;
219}
220
221div.toc {
222 padding-left: 1em;
223 padding-right: 1em;
224}
225
226/* Links */
227
228a {
229 color:#DD4814;
230 text-decoration:none;
231}
232
233a:hover {
234 color:#DD4814;
235 text-decoration:underline;
236}
237
238/* Headings */
239/*
240h2 {
241 -moz-border-radius-topleft:4px;
242 -moz-border-radius-topright:4px;
243 background:none repeat scroll 0 0 #DAD7D3;
244 margin:0;
245 padding:8px 534px 8px 8px;
246 width:401px;
247}
248*/
249
250h1
251{
252 margin: 0;
253 padding: 2px 0;
254 font-weight: normal;
255 color: #f37836;
256 line-height: 1.2em;
257}
258
259h2
260{
261 color: #f37836;
262 font-size: 24px;
263 line-height: 1.2em;
264 font-weight: normal;
265}
266
267h3 {
268 color: #f37836;
269 font-size: 1.3em;
270}
271h4 {font-size: 1.1em;}
272h4, h5, h6 {font-size: 1em;}
273
274a img{
275 border: none;
276}
277
278dl {
279 margin-top: 0em;
280 margin-bottom: 0.5em;
281}
282
283dt {
284 margin-top: 1em;
285}
286
287div.qandaset {
288 margin-left: 1em;
289}
290
291.guimenu, .guimenuitem, .guisubmenu {
292 font-style: italic;
293 color: #6d4c07; /* dark brown */
294}
295
296.guilabel, .guibutton {
297}
298
299.question {
300 font-weight: bold;
301}
302
303/* accelerator keys in menus */
304.accel {
305 text-decoration: underline;
306}
307
308.screen, .programlisting {
309 background-color: #f0eee6; /* light salmon */
310 border: 1pt solid #C1B496; /* dark tan */
311 padding: 5px;
312}
313
314#footer {
315 margin: 0;
316 color: #444;
317}
318
319.revhistory { font-size: 0.9em; }
320
321#ubuntulinks {
322 text-align: center;
323}
324
325>>>>>>> MERGE-SOURCE
5326
=== added file 'common/templates/custom_blacklisted_file.py'
--- common/templates/custom_blacklisted_file.py 1970-01-01 00:00:00 +0000
+++ common/templates/custom_blacklisted_file.py 2010-10-07 20:22:40 +0000
@@ -0,0 +1,119 @@
1#!/usr/bin/env python
2
3# html_report_template - Provides a template to render an HTML page after
4# Python variable substitution
5#
6# Author: David Planella <david.planella@ubuntu.com>, with mods by
7# Kyle Nitzsche <kyle.nitzsche@canonical.com>
8#
9# Copyright (c) 2009, 2010 Canonical Ltd.
10#
11# This program is free software: you can redistribute it and/or modify it
12# under the terms of the GNU General Public License version 3, as published
13# by the Free Software Foundation.
14#
15# This program is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranties of
17# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18# PURPOSE. See the GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License along
21# with this program. If not, see <http://www.gnu.org/licenses/>.
22
23ubuntu_template = """
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
28 <head>
29 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
30 <title>Ubuntu %(distro_release)s Languages</title>
31 <link rel="stylesheet" href="css/light.css" type="text/css" />
32
33 <script src="http://www.google.com/jsapi" type="text/javascript"></script>
34 <script type="text/javascript">
35
36 google.load("visualization", "1", {packages:["table"]});
37 google.setOnLoadCallback(drawTable);
38
39 function drawTable() {
40 var table_data = new google.visualization.DataTable(%(blacklisted_file_json)s, 0.6);
41
42 var table = new google.visualization.Table(
43 document.getElementById('table'));
44
45 var formatter = new google.visualization.BarFormat({
46 min: 0,
47 max: 100,
48 width: 100,
49 colorPositive: 'green'});
50 formatter.format(table_data, 0); // Apply formatter to second column
51
52 table.draw(table_data, {
53 allowHtml: true,
54 showRowNumber: true,
55 page: 'enable',
56 pageSize: 100});
57
58 // google.visualization.events.addListener(table, 'select', function() {
59 // var row = table.getSelection()[0].row;
60 // alert('You selected ' + table_data.getValue(row, 0));
61
62 google.visualization.events.addListener(table, 'select', selectHandler);
63 }
64
65 function selectHandler(e) {
66 var row = table.getSelection()[0].row;
67 //alert('A table row was selected');
68 alert('A table row was selected' + table_data.getValue(row, 0));
69 }
70 </script>
71
72 <style type="text/css">
73 #report-meta {
74 text-align: right;
75 font-size: small;
76 color: #999;
77 float: right;
78 }
79
80 #report-meta p {
81 margin: 0;
82 }
83
84 table {margin-left:auto; margin-right:auto;}
85 </style>
86 </head>
87
88 <body>
89 <div id="container">
90 <div id="container-inner" class="container clear-block">
91 <div id="header">
92
93 <h1 id="ubuntu-header">
94 <a href="https://wiki.ubuntu.com/Translations" title="Canonical OEM Translation Statistics"></a>
95 </h1>
96 </div>
97
98 <div id="page">
99 <div id="content">
100 <div class="titlepage">
101 <h2 class="title"><a id="id2820777"></a>Custom Project: %(project)s</h2>
102 <h3>Blacklisted through File</h3>
103 <p>The table lists src packages/gettext domains that are excluded from the translation statistics because they were listed in the blacklist file.</p>
104 </div>
105
106 <div id="table"></div>
107
108 <div id="footer">
109 <div id="ubuntulinks">
110 Last update on %(gen_date)s
111 </div>
112 </div>
113 </div>
114 </div>
115 </div>
116 </body>
117
118</html>
119"""
0120
=== added file 'common/templates/custom_blacklisted_file.pyc'
1Binary files common/templates/custom_blacklisted_file.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_blacklisted_file.pyc 2010-10-07 20:22:40 +0000 differ121Binary files common/templates/custom_blacklisted_file.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_blacklisted_file.pyc 2010-10-07 20:22:40 +0000 differ
=== added file 'common/templates/custom_blacklisted_priority.py'
--- common/templates/custom_blacklisted_priority.py 1970-01-01 00:00:00 +0000
+++ common/templates/custom_blacklisted_priority.py 2010-10-07 20:22:40 +0000
@@ -0,0 +1,119 @@
1#!/usr/bin/env python
2
3# html_report_template - Provides a template to render an HTML page after
4# Python variable substitution
5#
6# Author: David Planella <david.planella@ubuntu.com>, with mods by
7# Kyle Nitzsche <kyle.nitzsche@canonical.com>
8#
9# Copyright (c) 2009, 2010 Canonical Ltd.
10#
11# This program is free software: you can redistribute it and/or modify it
12# under the terms of the GNU General Public License version 3, as published
13# by the Free Software Foundation.
14#
15# This program is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranties of
17# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18# PURPOSE. See the GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License along
21# with this program. If not, see <http://www.gnu.org/licenses/>.
22
23ubuntu_template = """
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
28 <head>
29 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
30 <title>Ubuntu %(distro_release)s Languages</title>
31 <link rel="stylesheet" href="css/light.css" type="text/css" />
32
33 <script src="http://www.google.com/jsapi" type="text/javascript"></script>
34 <script type="text/javascript">
35
36 google.load("visualization", "1", {packages:["table"]});
37 google.setOnLoadCallback(drawTable);
38
39 function drawTable() {
40 var table_data = new google.visualization.DataTable(%(blacklisted_priority_json)s, 0.6);
41
42 var table = new google.visualization.Table(
43 document.getElementById('table'));
44
45 var formatter = new google.visualization.BarFormat({
46 min: 0,
47 max: 100,
48 width: 100,
49 colorPositive: 'green'});
50 formatter.format(table_data, 0); // Apply formatter to second column
51
52 table.draw(table_data, {
53 allowHtml: true,
54 showRowNumber: true,
55 page: 'enable',
56 pageSize: 100});
57
58 // google.visualization.events.addListener(table, 'select', function() {
59 // var row = table.getSelection()[0].row;
60 // alert('You selected ' + table_data.getValue(row, 0));
61
62 google.visualization.events.addListener(table, 'select', selectHandler);
63 }
64
65 function selectHandler(e) {
66 var row = table.getSelection()[0].row;
67 //alert('A table row was selected');
68 alert('A table row was selected' + table_data.getValue(row, 0));
69 }
70 </script>
71
72 <style type="text/css">
73 #report-meta {
74 text-align: right;
75 font-size: small;
76 color: #999;
77 float: right;
78 }
79
80 #report-meta p {
81 margin: 0;
82 }
83
84 table {margin-left:auto; margin-right:auto;}
85 </style>
86 </head>
87
88 <body>
89 <div id="container">
90 <div id="container-inner" class="container clear-block">
91 <div id="header">
92
93 <h1 id="ubuntu-header">
94 <a href="https://wiki.ubuntu.com/Translations" title="Canonical OEM Translation Statistics"></a>
95 </h1>
96 </div>
97
98 <div id="page">
99 <div id="content">
100 <div class="titlepage">
101 <h2 class="title"><a id="id2820777"></a>Custom Project: %(project)s</h2>
102 <h3>Blacklisted through Priority</h3>
103 <p>The table lists src packages/gettext domains that are excluded from the translation statistics because their LP template has priority that is lower that the blacklist priority cut-off value.</p>
104 </div>
105
106 <div id="table"></div>
107
108 <div id="footer">
109 <div id="ubuntulinks">
110 Last update on %(gen_date)s
111 </div>
112 </div>
113 </div>
114 </div>
115 </div>
116 </body>
117
118</html>
119"""
0120
=== added file 'common/templates/custom_blacklisted_priority.pyc'
1Binary files common/templates/custom_blacklisted_priority.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_blacklisted_priority.pyc 2010-10-07 20:22:40 +0000 differ121Binary files common/templates/custom_blacklisted_priority.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_blacklisted_priority.pyc 2010-10-07 20:22:40 +0000 differ
=== added file 'common/templates/custom_report.py'
--- common/templates/custom_report.py 1970-01-01 00:00:00 +0000
+++ common/templates/custom_report.py 2010-10-07 20:22:40 +0000
@@ -0,0 +1,128 @@
1#!/usr/bin/env python
2
3# html_report_template - Provides a template to render an HTML page after
4# Python variable substitution
5#
6# Author: David Planella <david.planella@ubuntu.com>, with mods by
7# Kyle Nitzsche <kyle.nitzsche@canonical.com>
8#
9# Copyright (c) 2009, 2010 Canonical Ltd.
10#
11# This program is free software: you can redistribute it and/or modify it
12# under the terms of the GNU General Public License version 3, as published
13# by the Free Software Foundation.
14#
15# This program is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranties of
17# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18# PURPOSE. See the GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License along
21# with this program. If not, see <http://www.gnu.org/licenses/>.
22
23ubuntu_template = """
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
28 <head>
29 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
30 <title>Ubuntu %(distro_release)s Languages</title>
31 <link rel="stylesheet" href="css/light.css" type="text/css" />
32 <script src="http://www.google.com/jsapi" type="text/javascript"></script>
33 <script type="text/javascript">
34
35 google.load("visualization", "1", {packages:["table"]});
36 google.setOnLoadCallback(drawTable);
37
38 function drawTable() {
39 var table_data = new google.visualization.DataTable(%(data_json)s, 0.6);
40
41 var table = new google.visualization.Table(
42 document.getElementById('table_div_langpack'));
43
44 /* Format the data column containing the translation percentage
45 value: show no decimal digits */
46 var nr_formatter = new google.visualization.NumberFormat({
47 fractionDigits: 0});
48 nr_formatter.format(table_data, 1);
49
50 /* Format the data column containing the translation percentage
51 value: show a green bar indicating the level of coverage */
52 var bar_formatter = new google.visualization.BarFormat({
53 min: 0,
54 max: 100,
55 width: 100,
56 colorPositive: 'green'
57 });
58 bar_formatter.format(table_data, 1);
59
60 table.draw(table_data, {
61 allowHtml: true,
62 showRowNumber: true,
63 page: 'enable',
64 pageSize: 100
65 });
66 }
67
68 </script>
69
70 <style type="text/css">
71 #report-meta {
72 text-align: right;
73 font-size: small;
74 color: #999;
75 float: right;
76 }
77
78 #report-meta p {
79 margin: 0;
80 }
81
82 table {margin-left:auto; margin-right:auto;}
83 </style>
84 </head>
85
86 <body>
87 <div id="container">
88 <div id="container-inner" class="container clear-block">
89 <div id="header">
90
91 <h1 id="ubuntu-header">
92 <a href="https://wiki.ubuntu.com/Translations" title="Canonical OEM Translation Statistics"></a>
93 </h1>
94 </div>
95
96 <div id="page">
97 <div id="content">
98 <div class="titlepage">
99 <h2 class="title"><a id="id2820777"></a>Custom Project: %(project)s</h2>
100 <h3>Based on Ubuntu %(distro_release)s Translations</h3>
101 <ul>
102 <li><a href="%(basename)s-included.html">Included Src Pkgs</a> that are in the custom project AND in lang packs. This is what the data below is for.</li>
103
104 <li><a href="%(basename)s-excluded.html">Excluded Src
105Pkgs</a> that are in the custom project but NOT in lang packs or are excluded
106through blacklists: <a href="%(basename)s-blacklisted-file.html">file</a> and
107<a href="%(basename)s-blacklisted-priority.html">LP priority</a> The data below does not include these src pkgs.</li>
108 </ul>
109 </div>
110
111 <div id="table_div_langpack"></div>
112
113 <div id="footer">
114 <div id="ubuntulinks">
115 <a href="https://wiki.ubuntu.com/Translations/Stats#UbuntuTranslationStatistics">More information on these statistics</a>
116 &nbsp;&bull;&nbsp;
117 Found a bug? <a href="https://bugs.launchpad.net/ubuntu-translations">Report it</a>
118 &nbsp;&bull;&nbsp;
119 Last update on %(gen_date)s
120 </div>
121 </div>
122 </div>
123 </div>
124 </div>
125 </body>
126
127</html>
128"""
0129
=== added file 'common/templates/custom_report.pyc'
1Binary files common/templates/custom_report.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_report.pyc 2010-10-07 20:22:40 +0000 differ130Binary files common/templates/custom_report.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_report.pyc 2010-10-07 20:22:40 +0000 differ
=== added file 'common/templates/custom_src_excluded.py'
--- common/templates/custom_src_excluded.py 1970-01-01 00:00:00 +0000
+++ common/templates/custom_src_excluded.py 2010-10-07 20:22:40 +0000
@@ -0,0 +1,123 @@
1#!/usr/bin/env python
2
3# html_report_template - Provides a template to render an HTML page after
4# Python variable substitution
5#
6# Author: David Planella <david.planella@ubuntu.com>, with mods by
7# Kyle Nitzsche <kyle.nitzsche@canonical.com>
8#
9# Copyright (c) 2009, 2010 Canonical Ltd.
10#
11# This program is free software: you can redistribute it and/or modify it
12# under the terms of the GNU General Public License version 3, as published
13# by the Free Software Foundation.
14#
15# This program is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranties of
17# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18# PURPOSE. See the GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License along
21# with this program. If not, see <http://www.gnu.org/licenses/>.
22
23ubuntu_template = """
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
28 <head>
29 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
30 <title>Ubuntu %(distro_release)s Languages</title>
31 <link rel="stylesheet" href="css/light.css" type="text/css" />
32
33 <script src="http://www.google.com/jsapi" type="text/javascript"></script>
34 <script type="text/javascript">
35
36 google.load("visualization", "1", {packages:["table"]});
37 google.setOnLoadCallback(drawTable);
38
39 function drawTable() {
40 var table_data = new google.visualization.DataTable(%(excluded_json)s, 0.6);
41
42 var table = new google.visualization.Table(
43 document.getElementById('table_excluded'));
44
45 var formatter = new google.visualization.BarFormat({
46 min: 0,
47 max: 100,
48 width: 100,
49 colorPositive: 'green'});
50 formatter.format(table_data, 0); // Apply formatter to second column
51
52 table.draw(table_data, {
53 allowHtml: true,
54 showRowNumber: true,
55 page: 'enable',
56 pageSize: 100});
57
58 // google.visualization.events.addListener(table, 'select', function() {
59 // var row = table.getSelection()[0].row;
60 // alert('You selected ' + table_data.getValue(row, 0));
61
62 google.visualization.events.addListener(table, 'select', selectHandler);
63 }
64
65 function selectHandler(e) {
66 var row = table.getSelection()[0].row;
67 //alert('A table row was selected');
68 alert('A table row was selected' + table_data.getValue(row, 0));
69 }
70 </script>
71
72 <style type="text/css">
73 #report-meta {
74 text-align: right;
75 font-size: small;
76 color: #999;
77 float: right;
78 }
79
80 #report-meta p {
81 margin: 0;
82 }
83
84 table {margin-left:auto; margin-right:auto;}
85 </style>
86 </head>
87
88 <body>
89 <div id="container">
90 <div id="container-inner" class="container clear-block">
91 <div id="header">
92
93 <h1 id="ubuntu-header">
94 <a href="https://wiki.ubuntu.com/Translations" title="Canonical OEM Translation Statistics"></a>
95 </h1>
96 </div>
97
98 <div id="page">
99 <div id="content">
100 <div class="titlepage">
101 <h2 class="title"><a id="id2820777"></a>Custom Project: %(project)s</h2>
102 <h3>Src Pkgs in Project but not included in Translation Statistics</h3>
103
104 </div>
105
106 <div id="table_excluded"></div>
107
108 <div id="footer">
109 <div id="ubuntulinks">
110 <a href="https://wiki.ubuntu.com/Translations/Stats#UbuntuTranslationStatistics">More information on these statistics</a>
111 &nbsp;&bull;&nbsp;
112 Found a bug? <a href="https://bugs.launchpad.net/ubuntu-translations">Report it</a>
113 &nbsp;&bull;&nbsp;
114 Last update on %(gen_date)s
115 </div>
116 </div>
117 </div>
118 </div>
119 </div>
120 </body>
121
122</html>
123"""
0124
=== added file 'common/templates/custom_src_excluded.pyc'
1Binary files common/templates/custom_src_excluded.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_src_excluded.pyc 2010-10-07 20:22:40 +0000 differ125Binary files common/templates/custom_src_excluded.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_src_excluded.pyc 2010-10-07 20:22:40 +0000 differ
=== added file 'common/templates/custom_src_included.py'
--- common/templates/custom_src_included.py 1970-01-01 00:00:00 +0000
+++ common/templates/custom_src_included.py 2010-10-07 20:22:40 +0000
@@ -0,0 +1,119 @@
1#!/usr/bin/env python
2
3# html_report_template - Provides a template to render an HTML page after
4# Python variable substitution
5#
6# Author: David Planella <david.planella@ubuntu.com>, with mods by
7# Kyle Nitzsche <kyle.nitzsche@canonical.com>
8#
9# Copyright (c) 2009, 2010 Canonical Ltd.
10#
11# This program is free software: you can redistribute it and/or modify it
12# under the terms of the GNU General Public License version 3, as published
13# by the Free Software Foundation.
14#
15# This program is distributed in the hope that it will be useful, but
16# WITHOUT ANY WARRANTY; without even the implied warranties of
17# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
18# PURPOSE. See the GNU General Public License for more details.
19#
20# You should have received a copy of the GNU General Public License along
21# with this program. If not, see <http://www.gnu.org/licenses/>.
22
23ubuntu_template = """
24<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
25 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
26
27<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
28 <head>
29 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
30 <title>Ubuntu %(distro_release)s Languages</title>
31 <link rel="stylesheet" href="css/light.css" type="text/css" />
32
33 <script src="http://www.google.com/jsapi" type="text/javascript"></script>
34 <script type="text/javascript">
35
36 google.load("visualization", "1", {packages:["table"]});
37 google.setOnLoadCallback(drawTable);
38
39 function drawTable() {
40 var table_data = new google.visualization.DataTable(%(included_json)s, 0.6);
41
42 var table = new google.visualization.Table(
43 document.getElementById('table'));
44
45 var formatter = new google.visualization.BarFormat({
46 min: 0,
47 max: 100,
48 width: 100,
49 colorPositive: 'green'});
50 formatter.format(table_data, 0); // Apply formatter to second column
51
52 table.draw(table_data, {
53 allowHtml: true,
54 showRowNumber: true,
55 page: 'enable',
56 pageSize: 100});
57
58 // google.visualization.events.addListener(table, 'select', function() {
59 // var row = table.getSelection()[0].row;
60 // alert('You selected ' + table_data.getValue(row, 0));
61
62 google.visualization.events.addListener(table, 'select', selectHandler);
63 }
64
65 function selectHandler(e) {
66 var row = table.getSelection()[0].row;
67 //alert('A table row was selected');
68 alert('A table row was selected' + table_data.getValue(row, 0));
69 }
70 </script>
71
72 <style type="text/css">
73 #report-meta {
74 text-align: right;
75 font-size: small;
76 color: #999;
77 float: right;
78 }
79
80 #report-meta p {
81 margin: 0;
82 }
83
84 table {margin-left:auto; margin-right:auto;}
85 </style>
86 </head>
87
88 <body>
89 <div id="container">
90 <div id="container-inner" class="container clear-block">
91 <div id="header">
92
93 <h1 id="ubuntu-header">
94 <a href="https://wiki.ubuntu.com/Translations" title="Canonical OEM Translation Statistics"></a>
95 </h1>
96 </div>
97
98 <div id="page">
99 <div id="content">
100 <div class="titlepage">
101 <h2 class="title"><a id="id2820777"></a>Custom Project: %(project)s</h2>
102 <p>The table lists src packages in the project AND in Ubunutu Language packs. The translation statistics
103 are for these src packages only.</p>
104 </div>
105
106 <div id="table"></div>
107
108 <div id="footer">
109 <div id="ubuntulinks">
110 Last update on %(gen_date)s
111 </div>
112 </div>
113 </div>
114 </div>
115 </div>
116 </body>
117
118</html>
119"""
0120
=== added file 'common/templates/custom_src_included.pyc'
1Binary files common/templates/custom_src_included.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_src_included.pyc 2010-10-07 20:22:40 +0000 differ121Binary files common/templates/custom_src_included.pyc 1970-01-01 00:00:00 +0000 and common/templates/custom_src_included.pyc 2010-10-07 20:22:40 +0000 differ
=== modified file 'common/templates/html_report_template.py'
--- common/templates/html_report_template.py 2010-10-01 17:14:00 +0000
+++ common/templates/html_report_template.py 2010-10-07 20:22:40 +0000
@@ -35,18 +35,16 @@
35 google.setOnLoadCallback(drawTable);35 google.setOnLoadCallback(drawTable);
3636
37 function drawTable() {37 function drawTable() {
38 var language_table_data = new google.visualization.DataTable(38 var table_data = new google.visualization.DataTable(%(data_json)s, 0.6);
39 %(languages_json)s, 0.6);
4039
41 var language_table = new google.visualization.Table(40 var table = new google.visualization.Table(
42 document.getElementById('stats_table'));41 document.getElementById('stats_table'));
4342
44 /* Format the data column containing the translation percentage43 /* Format the data column containing the translation percentage
45 value: show no decimal digits */44 value: show no decimal digits */
46 var nr_formatter = new google.visualization.NumberFormat({45 var nr_formatter = new google.visualization.NumberFormat({
47 fractionDigits: 0});46 fractionDigits: 0});
4847 nr_formatter.format(table_data, 1);
49 nr_formatter.format(language_table_data, 1);
5048
51 /* Format the data column containing the translation percentage49 /* Format the data column containing the translation percentage
52 value: show a green bar indicating the level of coverage */50 value: show a green bar indicating the level of coverage */
@@ -54,16 +52,18 @@
54 min: 0,52 min: 0,
55 max: 100,53 max: 100,
56 width: 100,54 width: 100,
57 colorPositive: 'green'});55 colorPositive: 'green'
5856 });
59 bar_formatter.format(language_table_data, 1);57 bar_formatter.format(table_data, 1);
6058
61 /* Draw the statistics table */59 /* Draw the statistics table */
62 language_table.draw(language_table_data, {60
61 table.draw(table_data, {
63 allowHtml: true,62 allowHtml: true,
64 showRowNumber: true,63 showRowNumber: true,
65 page: 'enable',64 page: 'enable',
66 pageSize: %(languages_supported)s});65 pageSize: %(languages_supported)s});
66
67 }67 }
6868
69 </script>69 </script>
@@ -78,7 +78,7 @@
78 <h1 id="ubuntu-header">78 <h1 id="ubuntu-header">
79 <a href="https://wiki.ubuntu.com/Translations" title="Ubuntu Translations"></a>79 <a href="https://wiki.ubuntu.com/Translations" title="Ubuntu Translations"></a>
80 </h1>80 </h1>
81 81
82 <ul id="navbar">82 <ul id="navbar">
83 <li><a href="https://wiki.ubuntu.com/Translations/">Home</a></li>83 <li><a href="https://wiki.ubuntu.com/Translations/">Home</a></li>
84 <li><a href="https://wiki.ubuntu.com/Translations/QuickStartGuide">Quickstart</a></li>84 <li><a href="https://wiki.ubuntu.com/Translations/QuickStartGuide">Quickstart</a></li>
@@ -88,9 +88,9 @@
88 <li><a href="https://answers.launchpad.net/ubuntu-translations">Support</a></li>88 <li><a href="https://answers.launchpad.net/ubuntu-translations">Support</a></li>
89 </ul>89 </ul>
90 </div>90 </div>
91 91
92 <!-- 2. Main content -->92 <!-- 2. Main content -->
93 <div id="content"> 93 <div id="content">
94 <h2>Ubuntu %(distro_release)s Translations</h2>94 <h2>Ubuntu %(distro_release)s Translations</h2>
95 <p id="intro-message">95 <p id="intro-message">
96 <!--96 <!--
9797
=== modified file 'common/utils.py'
--- common/utils.py 2010-09-28 09:17:47 +0000
+++ common/utils.py 2010-10-07 20:22:40 +0000
@@ -55,6 +55,17 @@
5555
56 return settings56 return settings
5757
58def get_basename(options, settings):
59 if options.custom:
60 if options.custom_name is None:
61 basename = 'custom-{0}-{1}'.format(settings['distro_id'],settings['distro_release'])
62 else:
63 basename = '{0}'.format(options.custom_name)
64 else:
65 basename = '{0}-{1}'.format(settings['distro_id'],settings['distro_release'])
66
67 return basename
68
58def get_working_pot_templates(settings):69def get_working_pot_templates(settings):
59 templates = os.path.join(os.getcwd(), 'data', settings['distro_codename'] + "-templates.txt")70 templates = os.path.join(os.getcwd(), 'data', settings['distro_codename'] + "-templates.txt")
60 if not os.path.exists(templates):71 if not os.path.exists(templates):
@@ -147,7 +158,7 @@
147 statusRegexp = r'[0-9]+ {0}'.format(statusStr)158 statusRegexp = r'[0-9]+ {0}'.format(statusStr)
148 if (re.findall(statusRegexp, item)):159 if (re.findall(statusRegexp, item)):
149 statusDict[statusStr] = re.findall(r'[0-9]+', item)[0]160 statusDict[statusStr] = re.findall(r'[0-9]+', item)[0]
150 161
151 # msgfmt gives us only status if the count is non-zero. Fill the missing statuses.162 # msgfmt gives us only status if the count is non-zero. Fill the missing statuses.
152 for statusStr in statusStrings:163 for statusStr in statusStrings:
153 if not statusStr in statusDict:164 if not statusStr in statusDict:
@@ -177,4 +188,4 @@
177 # https://launchpadlibrarian.net/56015550/openoffice.org_3.2.1-6ubuntu2_i386_translations.tar.gz188 # https://launchpadlibrarian.net/56015550/openoffice.org_3.2.1-6ubuntu2_i386_translations.tar.gz
178 ooo_pot_mapping = get_ooo_pot_mapping('../data/oo-o-pots-mapping.txt')189 ooo_pot_mapping = get_ooo_pot_mapping('../data/oo-o-pots-mapping.txt')
179 get_ooo_raw_data('../data/source/debian/l10n/po', ooo_pot_mapping)190 get_ooo_raw_data('../data/source/debian/l10n/po', ooo_pot_mapping)
180 sys.exit(0)
181\ No newline at end of file191\ No newline at end of file
192 sys.exit(0)
182193
=== removed file 'config/blacklist.conf'
--- config/blacklist.conf 2010-09-27 16:41:27 +0000
+++ config/blacklist.conf 1970-01-01 00:00:00 +0000
@@ -1,423 +0,0 @@
1acl | acl
2adduser | adduser
3alsa-utils | alsa-utils
4apparmor | subdomain-parser
5aptitude | aptitude
6aspell | aspell
7aspell | filter
8attr | attr
9base-passwd | base-passwd
10bash | bash
11binutils | bfd
12binutils | binutils
13binutils | gas
14binutils | gold
15binutils | gprof
16binutils | ld
17binutils | opcodes
18byobu | byobu
19clutter-1.0 | clutter-1.0
20command-not-found | command-not-found
21coreutils | coreutils
22cpio | cpio
23cryptsetup | cryptsetup
24cryptsetup | cryptsetup-luks
25cups | cups
26debconf | debconf
27debianutils | debianutils
28devmapper | device-mapper
29diffutils | diffutils
30dnsmasq | dnsmasq
31dpkg | dpkg
32dpkg | dpkg-dev
33dpkg | dselect
34e2fsprogs | e2fsprogs
35eglibc | libc
36eject | eject
37elfutils | elfutils
38findutils | findutils
39gawk | gawk
40gcc-4.4 | cpplib
41gcc-4.4 | gcc
42gcc-4.4 | libstdc++
43gcc-4.4 | libstdcpp
44gconf | gconf2
45gconf-editor | gconf-editor
46gdb | gdb
47gdb | bfd
48gettext | gettext-runtime
49gettext | gettext-tools
50gksu | gksu
51gnupg | gnupg
52gnutls26 | gnutls
53gnutls26 | libgnutls
54grep | grep
55gst-plugins-base0.10 | gst-plugins-base-0.10
56gst-plugins-good0.10 | gst-plugins-good-0.10
57gstreamer0.10 | gstreamer-0.10
58gvfs | gvfs
59hal | hal
60hunspell | hunspell
61iso-codes | iso-15924
62iso-codes | iso-3166
63iso-codes | iso-3166-2
64iso-codes | iso-4217
65iso-codes | iso-639
66iso-codes | iso-639-3
67kbd | kbd
68kerneloops | kerneloops
69lftp | lftp
70libgpg-error | libgpg-error
71libidn | libidn
72libparse-debianchangelog-perl | parse-debianchangelog
73libparse-debianchangelog-perl | parse-debianchangelog-pod
74libvisual | libvisual-0.4
75libvisual-plugins | libvisual-plugins
76m17n-db | m17n-db
77make-dfsg | make
78man-db | man-db
79man-db | man-db-gnulib
80mlocate | mlocate
81mono | mcs
82neon27 | neon
83net-tools | net-tools
84pam | linux-pam
85parted | parted
86popt | popt
87postgresql-8.4 | ecpg-8.4
88postgresql-8.4 | ecpglib-8.4
89postgresql-8.4 | initdb-8.4
90postgresql-8.4 | libpq5-8.4
91postgresql-8.4 | pg-config-8.4
92postgresql-8.4 | pg-controldata-8.4
93postgresql-8.4 | pg-ctl-8.4
94postgresql-8.4 | pg-dump-8.4
95postgresql-8.4 | pg-resetxlog-8.4
96postgresql-8.4 | pgscripts-8.4
97postgresql-8.4 | plperl-8.4
98postgresql-8.4 | plpgsql-8.4
99postgresql-8.4 | plpython-8.4
100postgresql-8.4 | pltcl-8.4
101postgresql-8.4 | postgres-8.4
102postgresql-8.4 | psql-8.4
103pppconfig | pppconfig
104pppoeconf | pppoeconf
105psmisc | psmisc
106sane-backends | sane-backends
107sed | sed
108shadow | shadow
109tar | tar
110tasksel | debian-tasks
111tasksel | tasksel
112texinfo | texinfo
113texlive-bin | freetype
114texlive-bin | texinfo
115ubiquity-slideshow-ubuntu | slideshow-xubuntu
116ubuntu-docs | ubuntu-docs-serverguide
117udisks | udisks
118ufw | ufw
119unattended-upgrades | unattended-upgrades
120upower | UPower
121ureadahead | ureadahead
122util-linux | util-linux-ng
123vim | vim
124vte | vte
125w3m | w3m
126wget | wget
127whois | whois
128xfsprogs | xfsprogs
129xkeyboard-config | xkeyboard-config
130xz-utils | xz
131zope3 | zope
132compiz | compiz
133compiz-fusion-plugins-main | compiz-fusion-plugins-main
134exiv2 | exiv2
135gnome-user-docs | gnome-user-docs-accessibility-guide
136gnome-user-docs | gnome-user-docs-user-guide
137gutenprint | gutenprint
138libgphoto2 | libgphoto2-2
139libgphoto2 | libgphoto2-port-0
140software-center | software-center-doc
141xscreensaver | xscreensaver
142openoffice.org | accessibility-helper
143openoffice.org | avmedia-framework
144openoffice.org | avmedia-viewer
145openoffice.org | basctl-basicide
146openoffice.org | basctl-dlged
147openoffice.org | basic-app
148openoffice.org | basic-classes
149openoffice.org | basic-sbx
150openoffice.org | binfilter-src
151openoffice.org | chart2-dialogs
152openoffice.org | connectivity-adabas
153openoffice.org | connectivity-flat
154openoffice.org | connectivity-odbc
155openoffice.org | connectivity-postgresql
156openoffice.org | connectivity-resource
157openoffice.org | crashrep-all
158openoffice.org | dbaccess-adabas
159openoffice.org | dbaccess-app
160openoffice.org | dbaccess-browser
161openoffice.org | dbaccess-control
162openoffice.org | dbaccess-core
163openoffice.org | dbaccess-dlg
164openoffice.org | dbaccess-inc
165openoffice.org | dbaccess-macromigration
166openoffice.org | dbaccess-misc
167openoffice.org | dbaccess-querydesign
168openoffice.org | dbaccess-relationdesign
169openoffice.org | dbaccess-sdbtools
170openoffice.org | dbaccess-tabledesign
171openoffice.org | dbaccess-uno
172openoffice.org | desktop-app
173openoffice.org | desktop-component
174openoffice.org | desktop-configuration
175openoffice.org | desktop-deployment-help
176openoffice.org | desktop-gui
177openoffice.org | desktop-manager
178openoffice.org | desktop-migration
179openoffice.org | desktop-misc
180openoffice.org | desktop-package
181openoffice.org | desktop-registry
182openoffice.org | desktop-script
183openoffice.org | desktop-setup
184openoffice.org | desktop-sfwk
185openoffice.org | desktop-unopkg
186openoffice.org | extensions-abpilot
187openoffice.org | extensions-bibliography
188openoffice.org | extensions-check
189openoffice.org | extensions-dbpilots
190openoffice.org | extensions-preload
191openoffice.org | extensions-propctrlr
192openoffice.org | extensions-scanner
193openoffice.org | filter-filters
194openoffice.org | filter-flash
195openoffice.org | filter-internalgraphicfilters
196openoffice.org | filter-pdf
197openoffice.org | filter-t602
198openoffice.org | filter-types
199openoffice.org | filter-xsltdialog
200openoffice.org | forms-resource
201openoffice.org | formula-dlg
202openoffice.org | formula-resource
203openoffice.org | fpicker-office
204openoffice.org | framework-classes
205openoffice.org | framework-services
206openoffice.org | goodies-egif
207openoffice.org | goodies-eos2met
208openoffice.org | goodies-epbm
209openoffice.org | goodies-epgm
210openoffice.org | goodies-epict
211openoffice.org | goodies-eppm
212openoffice.org | goodies-eps
213openoffice.org | helpcontent2-autokorr-shared
214openoffice.org | helpcontent2-autopi-shared
215openoffice.org | helpcontent2-database
216openoffice.org | helpcontent2-guide-sbasic
217openoffice.org | helpcontent2-guide-scalc
218openoffice.org | helpcontent2-guide-sdraw
219openoffice.org | helpcontent2-guide-shared
220openoffice.org | helpcontent2-guide-simpress
221openoffice.org | helpcontent2-guide-smath
222openoffice.org | helpcontent2-guide-swriter
223openoffice.org | helpcontent2-optionen-shared
224openoffice.org | helpcontent2-sbasic-01
225openoffice.org | helpcontent2-sbasic-02
226openoffice.org | helpcontent2-sbasic-shared
227openoffice.org | helpcontent2-scalc
228openoffice.org | helpcontent2-scalc-00
229openoffice.org | helpcontent2-scalc-01
230openoffice.org | helpcontent2-scalc-02
231openoffice.org | helpcontent2-scalc-04
232openoffice.org | helpcontent2-scalc-05
233openoffice.org | helpcontent2-schart
234openoffice.org | helpcontent2-schart-00
235openoffice.org | helpcontent2-schart-01
236openoffice.org | helpcontent2-schart-02
237openoffice.org | helpcontent2-schart-04
238openoffice.org | helpcontent2-sdraw
239openoffice.org | helpcontent2-sdraw-00
240openoffice.org | helpcontent2-sdraw-01
241openoffice.org | helpcontent2-sdraw-04
242openoffice.org | helpcontent2-shared
243openoffice.org | helpcontent2-shared-00
244openoffice.org | helpcontent2-shared-01
245openoffice.org | helpcontent2-shared-02
246openoffice.org | helpcontent2-shared-04
247openoffice.org | helpcontent2-shared-05
248openoffice.org | helpcontent2-shared-07
249openoffice.org | helpcontent2-simpress
250openoffice.org | helpcontent2-simpress-00
251openoffice.org | helpcontent2-simpress-01
252openoffice.org | helpcontent2-simpress-02
253openoffice.org | helpcontent2-simpress-04
254openoffice.org | helpcontent2-smath
255openoffice.org | helpcontent2-smath-00
256openoffice.org | helpcontent2-smath-01
257openoffice.org | helpcontent2-smath-02
258openoffice.org | helpcontent2-smath-04
259openoffice.org | helpcontent2-swriter
260openoffice.org | helpcontent2-swriter-00
261openoffice.org | helpcontent2-swriter-01
262openoffice.org | helpcontent2-swriter-02
263openoffice.org | helpcontent2-swriter-04
264openoffice.org | instsetoonative-msilanguages
265openoffice.org | instsetoonative-office
266openoffice.org | javainstaller2-localization
267openoffice.org | mysqlc-dataaccess
268openoffice.org | odk-complextoolbarcontrols
269openoffice.org | odk-examples-asciifilter
270openoffice.org | odk-examples-developersguide-dialogwithhelp
271openoffice.org | odk-examples-embeddedobject
272openoffice.org | odk-examples-flatxmlfilterdetection
273openoffice.org | odk-examples-protocolhandleraddon-cpp
274openoffice.org | odk-examples-protocolhandleraddon-java
275openoffice.org | odk-inspector
276openoffice.org | officecfg-office
277openoffice.org | officecfg-openoffice
278openoffice.org | officecfg-ui
279openoffice.org | ooo-build
280openoffice.org | padmin-source
281openoffice.org | readlicense-oo-readme
282openoffice.org | reportbuilder-office
283openoffice.org | reportbuilder-openoffice
284openoffice.org | reportbuilder-typedetection
285openoffice.org | reportbuilder-ui
286openoffice.org | reportdesign-dlg
287openoffice.org | reportdesign-inspection
288openoffice.org | reportdesign-registry-office
289openoffice.org | reportdesign-report
290openoffice.org | reportdesign-resource
291openoffice.org | sc-core
292openoffice.org | sc-dbgui
293openoffice.org | sc-docshell
294openoffice.org | sc-drawfunc
295openoffice.org | sc-formdlg
296openoffice.org | sc-miscdlgs
297openoffice.org | sc-navipi
298openoffice.org | sc-pagedlg
299openoffice.org | sc-styleui
300openoffice.org | sc-ui
301openoffice.org | sc-ui-cctrl
302openoffice.org | scaddins-analysis
303openoffice.org | scaddins-datefunc
304openoffice.org | sccomp-solver
305openoffice.org | scp2-activex
306openoffice.org | scp2-base
307openoffice.org | scp2-binfilter
308openoffice.org | scp2-calc
309openoffice.org | scp2-draw
310openoffice.org | scp2-gnome
311openoffice.org | scp2-graphicfilter
312openoffice.org | scp2-impress
313openoffice.org | scp2-javafilter
314openoffice.org | scp2-kde
315openoffice.org | scp2-lingu
316openoffice.org | scp2-math
317openoffice.org | scp2-onlineupdate
318openoffice.org | scp2-ooo
319openoffice.org | scp2-python
320openoffice.org | scp2-quickstart
321openoffice.org | scp2-sdkoo
322openoffice.org | scp2-testtool
323openoffice.org | scp2-winexplorerext
324openoffice.org | scp2-writer
325openoffice.org | scp2-xsltfilter
326openoffice.org | scsolver-ext
327openoffice.org | scsolver-ui
328openoffice.org | sd-accessibility
329openoffice.org | sd-animations
330openoffice.org | sd-app
331openoffice.org | sd-core
332openoffice.org | sd-dlg
333openoffice.org | sd-html
334openoffice.org | sd-notes
335openoffice.org | sd-slideshow
336openoffice.org | sd-table
337openoffice.org | sdext-extension
338openoffice.org | sdext-minimizer-extension
339openoffice.org | sdext-minimizer-office
340openoffice.org | sdext-minimizer-ui
341openoffice.org | sfx2-appl
342openoffice.org | sfx2-bastyp
343openoffice.org | sfx2-config
344openoffice.org | sfx2-dialog
345openoffice.org | sfx2-doc
346openoffice.org | sfx2-menu
347openoffice.org | sfx2-view
348openoffice.org | shell-res
349openoffice.org | starmath-source
350openoffice.org | svtools-contnr
351openoffice.org | svtools-control
352openoffice.org | svtools-dialogs
353openoffice.org | svtools-filter
354openoffice.org | svtools-items1
355openoffice.org | svtools-java
356openoffice.org | svtools-misc
357openoffice.org | svtools-misc1
358openoffice.org | svtools-plugapp
359openoffice.org | svtools-productregistration
360openoffice.org | svtools-uno
361openoffice.org | svtools-unodialog
362openoffice.org | svx-accessibility
363openoffice.org | svx-dialog
364openoffice.org | svx-editeng
365openoffice.org | svx-engine3d
366openoffice.org | svx-fmcomp
367openoffice.org | svx-form
368openoffice.org | svx-gallery2
369openoffice.org | svx-inc
370openoffice.org | svx-intro
371openoffice.org | svx-items
372openoffice.org | svx-options
373openoffice.org | svx-outliner
374openoffice.org | svx-src
375openoffice.org | svx-stbctrls
376openoffice.org | svx-svdraw
377openoffice.org | svx-svxlink
378openoffice.org | svx-table
379openoffice.org | svx-tbxctrls
380openoffice.org | svx-textconversiondlgs
381openoffice.org | svx-toolbars
382openoffice.org | sw-app
383openoffice.org | sw-chrdlg
384openoffice.org | sw-config
385openoffice.org | sw-dbui
386openoffice.org | sw-dialog
387openoffice.org | sw-dochdl
388openoffice.org | sw-docvw
389openoffice.org | sw-envelp
390openoffice.org | sw-fldui
391openoffice.org | sw-fmtui
392openoffice.org | sw-frmdlg
393openoffice.org | sw-globdoc
394openoffice.org | sw-inc
395openoffice.org | sw-index
396openoffice.org | sw-lingu
397openoffice.org | sw-misc
398openoffice.org | sw-ribbar
399openoffice.org | sw-sdi
400openoffice.org | sw-shells
401openoffice.org | sw-smartmenu
402openoffice.org | sw-table
403openoffice.org | sw-uiview
404openoffice.org | sw-undo
405openoffice.org | sw-unocore
406openoffice.org | sw-utlui
407openoffice.org | sw-web
408openoffice.org | sw-wrtsh
409openoffice.org | swext-custom
410openoffice.org | swext-help
411openoffice.org | swext-office
412openoffice.org | sysui-share
413openoffice.org | toolkit-workben-layout
414openoffice.org | ucbhelper-ucb-explorer
415openoffice.org | uui-source
416openoffice.org | vcl-src
417openoffice.org | wizards-euro
418openoffice.org | wizards-formwizard
419openoffice.org | wizards-importwizard
420openoffice.org | wizards-schedule
421openoffice.org | wizards-template
422openoffice.org | xmlsecurity-component
423openoffice.org | xmlsecurity-dialogs
4240
=== added file 'config/blacklist.lucid.conf'
--- config/blacklist.lucid.conf 1970-01-01 00:00:00 +0000
+++ config/blacklist.lucid.conf 2010-10-07 20:22:40 +0000
@@ -0,0 +1,141 @@
1acl | acl
2adduser | adduser
3alsa-utils | alsa-utils
4apparmor | subdomain-parser
5aptitude | aptitude
6aspell | aspell
7aspell | filter
8attr | attr
9base-passwd | base-passwd
10bash | bash
11binutils | bfd
12binutils | binutils
13binutils | gas
14binutils | gold
15binutils | gprof
16binutils | ld
17binutils | opcodes
18byobu | byobu
19clutter-1.0 | clutter-1.0
20command-not-found | command-not-found
21coreutils | coreutils
22cpio | cpio
23cryptsetup | cryptsetup
24cryptsetup | cryptsetup-luks
25cups | cups
26debconf | debconf
27debianutils | debianutils
28devmapper | device-mapper
29diffutils | diffutils
30dnsmasq | dnsmasq
31dpkg | dpkg
32dpkg | dpkg-dev
33dpkg | dselect
34e2fsprogs | e2fsprogs
35eglibc | libc
36eject | eject
37elfutils | elfutils
38findutils | findutils
39gawk | gawk
40gcc-4.4 | cpplib
41gcc-4.4 | gcc
42gcc-4.4 | libstdc++
43gcc-4.4 | libstdcpp
44gconf | gconf2
45gconf-editor | gconf-editor
46gdb | gdb
47gdb | bfd
48gettext | gettext-runtime
49gettext | gettext-tools
50gksu | gksu
51gnupg | gnupg
52gnutls26 | gnutls
53gnutls26 | libgnutls
54grep | grep
55gst-plugins-base0.10 | gst-plugins-base-0.10
56gst-plugins-good0.10 | gst-plugins-good-0.10
57gstreamer0.10 | gstreamer-0.10
58gvfs | gvfs
59hal | hal
60hunspell | hunspell
61iso-codes | iso-15924
62iso-codes | iso-3166
63iso-codes | iso-3166-2
64iso-codes | iso-4217
65iso-codes | iso-639
66iso-codes | iso-639-3
67kbd | kbd
68kerneloops | kerneloops
69lftp | lftp
70libgpg-error | libgpg-error
71libidn | libidn
72libparse-debianchangelog-perl | parse-debianchangelog
73libparse-debianchangelog-perl | parse-debianchangelog-pod
74libvisual | libvisual-0.4
75libvisual-plugins | libvisual-plugins
76m17n-db | m17n-db
77make-dfsg | make
78man-db | man-db
79man-db | man-db-gnulib
80mlocate | mlocate
81mono | mcs
82neon27 | neon
83net-tools | net-tools
84pam | linux-pam
85parted | parted
86popt | popt
87postgresql-8.4 | ecpg-8.4
88postgresql-8.4 | ecpglib-8.4
89postgresql-8.4 | initdb-8.4
90postgresql-8.4 | libpq5-8.4
91postgresql-8.4 | pg-config-8.4
92postgresql-8.4 | pg-controldata-8.4
93postgresql-8.4 | pg-ctl-8.4
94postgresql-8.4 | pg-dump-8.4
95postgresql-8.4 | pg-resetxlog-8.4
96postgresql-8.4 | pgscripts-8.4
97postgresql-8.4 | plperl-8.4
98postgresql-8.4 | plpgsql-8.4
99postgresql-8.4 | plpython-8.4
100postgresql-8.4 | pltcl-8.4
101postgresql-8.4 | postgres-8.4
102postgresql-8.4 | psql-8.4
103pppconfig | pppconfig
104pppoeconf | pppoeconf
105psmisc | psmisc
106sane-backends | sane-backends
107sed | sed
108shadow | shadow
109tar | tar
110tasksel | debian-tasks
111tasksel | tasksel
112texinfo | texinfo
113texlive-bin | freetype
114texlive-bin | texinfo
115ubiquity-slideshow-ubuntu | slideshow-xubuntu
116ubuntu-docs | ubuntu-docs-serverguide
117udisks | udisks
118ufw | ufw
119unattended-upgrades | unattended-upgrades
120upower | UPower
121ureadahead | ureadahead
122util-linux | util-linux-ng
123vim | vim
124vte | vte
125w3m | w3m
126wget | wget
127whois | whois
128xfsprogs | xfsprogs
129xkeyboard-config | xkeyboard-config
130xz-utils | xz
131zope3 | zope
132compiz | compiz
133compiz-fusion-plugins-main | compiz-fusion-plugins-main
134exiv2 | exiv2
135gnome-user-docs | gnome-user-docs-accessibility-guide
136gnome-user-docs | gnome-user-docs-user-guide
137gutenprint | gutenprint
138libgphoto2 | libgphoto2-2
139libgphoto2 | libgphoto2-port-0
140software-center | software-center-doc
141xscreensaver | xscreensaver
0142
=== added file 'config/blacklist.maverick.conf'
--- config/blacklist.maverick.conf 1970-01-01 00:00:00 +0000
+++ config/blacklist.maverick.conf 2010-10-07 20:22:40 +0000
@@ -0,0 +1,423 @@
1acl | acl
2adduser | adduser
3alsa-utils | alsa-utils
4apparmor | subdomain-parser
5aptitude | aptitude
6aspell | aspell
7aspell | filter
8attr | attr
9base-passwd | base-passwd
10bash | bash
11binutils | bfd
12binutils | binutils
13binutils | gas
14binutils | gold
15binutils | gprof
16binutils | ld
17binutils | opcodes
18byobu | byobu
19clutter-1.0 | clutter-1.0
20command-not-found | command-not-found
21coreutils | coreutils
22cpio | cpio
23cryptsetup | cryptsetup
24cryptsetup | cryptsetup-luks
25cups | cups
26debconf | debconf
27debianutils | debianutils
28devmapper | device-mapper
29diffutils | diffutils
30dnsmasq | dnsmasq
31dpkg | dpkg
32dpkg | dpkg-dev
33dpkg | dselect
34e2fsprogs | e2fsprogs
35eglibc | libc
36eject | eject
37elfutils | elfutils
38findutils | findutils
39gawk | gawk
40gcc-4.4 | cpplib
41gcc-4.4 | gcc
42gcc-4.4 | libstdc++
43gcc-4.4 | libstdcpp
44gconf | gconf2
45gconf-editor | gconf-editor
46gdb | gdb
47gdb | bfd
48gettext | gettext-runtime
49gettext | gettext-tools
50gksu | gksu
51gnupg | gnupg
52gnutls26 | gnutls
53gnutls26 | libgnutls
54grep | grep
55gst-plugins-base0.10 | gst-plugins-base-0.10
56gst-plugins-good0.10 | gst-plugins-good-0.10
57gstreamer0.10 | gstreamer-0.10
58gvfs | gvfs
59hal | hal
60hunspell | hunspell
61iso-codes | iso-15924
62iso-codes | iso-3166
63iso-codes | iso-3166-2
64iso-codes | iso-4217
65iso-codes | iso-639
66iso-codes | iso-639-3
67kbd | kbd
68kerneloops | kerneloops
69lftp | lftp
70libgpg-error | libgpg-error
71libidn | libidn
72libparse-debianchangelog-perl | parse-debianchangelog
73libparse-debianchangelog-perl | parse-debianchangelog-pod
74libvisual | libvisual-0.4
75libvisual-plugins | libvisual-plugins
76m17n-db | m17n-db
77make-dfsg | make
78man-db | man-db
79man-db | man-db-gnulib
80mlocate | mlocate
81mono | mcs
82neon27 | neon
83net-tools | net-tools
84pam | linux-pam
85parted | parted
86popt | popt
87postgresql-8.4 | ecpg-8.4
88postgresql-8.4 | ecpglib-8.4
89postgresql-8.4 | initdb-8.4
90postgresql-8.4 | libpq5-8.4
91postgresql-8.4 | pg-config-8.4
92postgresql-8.4 | pg-controldata-8.4
93postgresql-8.4 | pg-ctl-8.4
94postgresql-8.4 | pg-dump-8.4
95postgresql-8.4 | pg-resetxlog-8.4
96postgresql-8.4 | pgscripts-8.4
97postgresql-8.4 | plperl-8.4
98postgresql-8.4 | plpgsql-8.4
99postgresql-8.4 | plpython-8.4
100postgresql-8.4 | pltcl-8.4
101postgresql-8.4 | postgres-8.4
102postgresql-8.4 | psql-8.4
103pppconfig | pppconfig
104pppoeconf | pppoeconf
105psmisc | psmisc
106sane-backends | sane-backends
107sed | sed
108shadow | shadow
109tar | tar
110tasksel | debian-tasks
111tasksel | tasksel
112texinfo | texinfo
113texlive-bin | freetype
114texlive-bin | texinfo
115ubiquity-slideshow-ubuntu | slideshow-xubuntu
116ubuntu-docs | ubuntu-docs-serverguide
117udisks | udisks
118ufw | ufw
119unattended-upgrades | unattended-upgrades
120upower | UPower
121ureadahead | ureadahead
122util-linux | util-linux-ng
123vim | vim
124vte | vte
125w3m | w3m
126wget | wget
127whois | whois
128xfsprogs | xfsprogs
129xkeyboard-config | xkeyboard-config
130xz-utils | xz
131zope3 | zope
132compiz | compiz
133compiz-fusion-plugins-main | compiz-fusion-plugins-main
134exiv2 | exiv2
135gnome-user-docs | gnome-user-docs-accessibility-guide
136gnome-user-docs | gnome-user-docs-user-guide
137gutenprint | gutenprint
138libgphoto2 | libgphoto2-2
139libgphoto2 | libgphoto2-port-0
140software-center | software-center-doc
141xscreensaver | xscreensaver
142openoffice.org | accessibility-helper
143openoffice.org | avmedia-framework
144openoffice.org | avmedia-viewer
145openoffice.org | basctl-basicide
146openoffice.org | basctl-dlged
147openoffice.org | basic-app
148openoffice.org | basic-classes
149openoffice.org | basic-sbx
150openoffice.org | binfilter-src
151openoffice.org | chart2-dialogs
152openoffice.org | connectivity-adabas
153openoffice.org | connectivity-flat
154openoffice.org | connectivity-odbc
155openoffice.org | connectivity-postgresql
156openoffice.org | connectivity-resource
157openoffice.org | crashrep-all
158openoffice.org | dbaccess-adabas
159openoffice.org | dbaccess-app
160openoffice.org | dbaccess-browser
161openoffice.org | dbaccess-control
162openoffice.org | dbaccess-core
163openoffice.org | dbaccess-dlg
164openoffice.org | dbaccess-inc
165openoffice.org | dbaccess-macromigration
166openoffice.org | dbaccess-misc
167openoffice.org | dbaccess-querydesign
168openoffice.org | dbaccess-relationdesign
169openoffice.org | dbaccess-sdbtools
170openoffice.org | dbaccess-tabledesign
171openoffice.org | dbaccess-uno
172openoffice.org | desktop-app
173openoffice.org | desktop-component
174openoffice.org | desktop-configuration
175openoffice.org | desktop-deployment-help
176openoffice.org | desktop-gui
177openoffice.org | desktop-manager
178openoffice.org | desktop-migration
179openoffice.org | desktop-misc
180openoffice.org | desktop-package
181openoffice.org | desktop-registry
182openoffice.org | desktop-script
183openoffice.org | desktop-setup
184openoffice.org | desktop-sfwk
185openoffice.org | desktop-unopkg
186openoffice.org | extensions-abpilot
187openoffice.org | extensions-bibliography
188openoffice.org | extensions-check
189openoffice.org | extensions-dbpilots
190openoffice.org | extensions-preload
191openoffice.org | extensions-propctrlr
192openoffice.org | extensions-scanner
193openoffice.org | filter-filters
194openoffice.org | filter-flash
195openoffice.org | filter-internalgraphicfilters
196openoffice.org | filter-pdf
197openoffice.org | filter-t602
198openoffice.org | filter-types
199openoffice.org | filter-xsltdialog
200openoffice.org | forms-resource
201openoffice.org | formula-dlg
202openoffice.org | formula-resource
203openoffice.org | fpicker-office
204openoffice.org | framework-classes
205openoffice.org | framework-services
206openoffice.org | goodies-egif
207openoffice.org | goodies-eos2met
208openoffice.org | goodies-epbm
209openoffice.org | goodies-epgm
210openoffice.org | goodies-epict
211openoffice.org | goodies-eppm
212openoffice.org | goodies-eps
213openoffice.org | helpcontent2-autokorr-shared
214openoffice.org | helpcontent2-autopi-shared
215openoffice.org | helpcontent2-database
216openoffice.org | helpcontent2-guide-sbasic
217openoffice.org | helpcontent2-guide-scalc
218openoffice.org | helpcontent2-guide-sdraw
219openoffice.org | helpcontent2-guide-shared
220openoffice.org | helpcontent2-guide-simpress
221openoffice.org | helpcontent2-guide-smath
222openoffice.org | helpcontent2-guide-swriter
223openoffice.org | helpcontent2-optionen-shared
224openoffice.org | helpcontent2-sbasic-01
225openoffice.org | helpcontent2-sbasic-02
226openoffice.org | helpcontent2-sbasic-shared
227openoffice.org | helpcontent2-scalc
228openoffice.org | helpcontent2-scalc-00
229openoffice.org | helpcontent2-scalc-01
230openoffice.org | helpcontent2-scalc-02
231openoffice.org | helpcontent2-scalc-04
232openoffice.org | helpcontent2-scalc-05
233openoffice.org | helpcontent2-schart
234openoffice.org | helpcontent2-schart-00
235openoffice.org | helpcontent2-schart-01
236openoffice.org | helpcontent2-schart-02
237openoffice.org | helpcontent2-schart-04
238openoffice.org | helpcontent2-sdraw
239openoffice.org | helpcontent2-sdraw-00
240openoffice.org | helpcontent2-sdraw-01
241openoffice.org | helpcontent2-sdraw-04
242openoffice.org | helpcontent2-shared
243openoffice.org | helpcontent2-shared-00
244openoffice.org | helpcontent2-shared-01
245openoffice.org | helpcontent2-shared-02
246openoffice.org | helpcontent2-shared-04
247openoffice.org | helpcontent2-shared-05
248openoffice.org | helpcontent2-shared-07
249openoffice.org | helpcontent2-simpress
250openoffice.org | helpcontent2-simpress-00
251openoffice.org | helpcontent2-simpress-01
252openoffice.org | helpcontent2-simpress-02
253openoffice.org | helpcontent2-simpress-04
254openoffice.org | helpcontent2-smath
255openoffice.org | helpcontent2-smath-00
256openoffice.org | helpcontent2-smath-01
257openoffice.org | helpcontent2-smath-02
258openoffice.org | helpcontent2-smath-04
259openoffice.org | helpcontent2-swriter
260openoffice.org | helpcontent2-swriter-00
261openoffice.org | helpcontent2-swriter-01
262openoffice.org | helpcontent2-swriter-02
263openoffice.org | helpcontent2-swriter-04
264openoffice.org | instsetoonative-msilanguages
265openoffice.org | instsetoonative-office
266openoffice.org | javainstaller2-localization
267openoffice.org | mysqlc-dataaccess
268openoffice.org | odk-complextoolbarcontrols
269openoffice.org | odk-examples-asciifilter
270openoffice.org | odk-examples-developersguide-dialogwithhelp
271openoffice.org | odk-examples-embeddedobject
272openoffice.org | odk-examples-flatxmlfilterdetection
273openoffice.org | odk-examples-protocolhandleraddon-cpp
274openoffice.org | odk-examples-protocolhandleraddon-java
275openoffice.org | odk-inspector
276openoffice.org | officecfg-office
277openoffice.org | officecfg-openoffice
278openoffice.org | officecfg-ui
279openoffice.org | ooo-build
280openoffice.org | padmin-source
281openoffice.org | readlicense-oo-readme
282openoffice.org | reportbuilder-office
283openoffice.org | reportbuilder-openoffice
284openoffice.org | reportbuilder-typedetection
285openoffice.org | reportbuilder-ui
286openoffice.org | reportdesign-dlg
287openoffice.org | reportdesign-inspection
288openoffice.org | reportdesign-registry-office
289openoffice.org | reportdesign-report
290openoffice.org | reportdesign-resource
291openoffice.org | sc-core
292openoffice.org | sc-dbgui
293openoffice.org | sc-docshell
294openoffice.org | sc-drawfunc
295openoffice.org | sc-formdlg
296openoffice.org | sc-miscdlgs
297openoffice.org | sc-navipi
298openoffice.org | sc-pagedlg
299openoffice.org | sc-styleui
300openoffice.org | sc-ui
301openoffice.org | sc-ui-cctrl
302openoffice.org | scaddins-analysis
303openoffice.org | scaddins-datefunc
304openoffice.org | sccomp-solver
305openoffice.org | scp2-activex
306openoffice.org | scp2-base
307openoffice.org | scp2-binfilter
308openoffice.org | scp2-calc
309openoffice.org | scp2-draw
310openoffice.org | scp2-gnome
311openoffice.org | scp2-graphicfilter
312openoffice.org | scp2-impress
313openoffice.org | scp2-javafilter
314openoffice.org | scp2-kde
315openoffice.org | scp2-lingu
316openoffice.org | scp2-math
317openoffice.org | scp2-onlineupdate
318openoffice.org | scp2-ooo
319openoffice.org | scp2-python
320openoffice.org | scp2-quickstart
321openoffice.org | scp2-sdkoo
322openoffice.org | scp2-testtool
323openoffice.org | scp2-winexplorerext
324openoffice.org | scp2-writer
325openoffice.org | scp2-xsltfilter
326openoffice.org | scsolver-ext
327openoffice.org | scsolver-ui
328openoffice.org | sd-accessibility
329openoffice.org | sd-animations
330openoffice.org | sd-app
331openoffice.org | sd-core
332openoffice.org | sd-dlg
333openoffice.org | sd-html
334openoffice.org | sd-notes
335openoffice.org | sd-slideshow
336openoffice.org | sd-table
337openoffice.org | sdext-extension
338openoffice.org | sdext-minimizer-extension
339openoffice.org | sdext-minimizer-office
340openoffice.org | sdext-minimizer-ui
341openoffice.org | sfx2-appl
342openoffice.org | sfx2-bastyp
343openoffice.org | sfx2-config
344openoffice.org | sfx2-dialog
345openoffice.org | sfx2-doc
346openoffice.org | sfx2-menu
347openoffice.org | sfx2-view
348openoffice.org | shell-res
349openoffice.org | starmath-source
350openoffice.org | svtools-contnr
351openoffice.org | svtools-control
352openoffice.org | svtools-dialogs
353openoffice.org | svtools-filter
354openoffice.org | svtools-items1
355openoffice.org | svtools-java
356openoffice.org | svtools-misc
357openoffice.org | svtools-misc1
358openoffice.org | svtools-plugapp
359openoffice.org | svtools-productregistration
360openoffice.org | svtools-uno
361openoffice.org | svtools-unodialog
362openoffice.org | svx-accessibility
363openoffice.org | svx-dialog
364openoffice.org | svx-editeng
365openoffice.org | svx-engine3d
366openoffice.org | svx-fmcomp
367openoffice.org | svx-form
368openoffice.org | svx-gallery2
369openoffice.org | svx-inc
370openoffice.org | svx-intro
371openoffice.org | svx-items
372openoffice.org | svx-options
373openoffice.org | svx-outliner
374openoffice.org | svx-src
375openoffice.org | svx-stbctrls
376openoffice.org | svx-svdraw
377openoffice.org | svx-svxlink
378openoffice.org | svx-table
379openoffice.org | svx-tbxctrls
380openoffice.org | svx-textconversiondlgs
381openoffice.org | svx-toolbars
382openoffice.org | sw-app
383openoffice.org | sw-chrdlg
384openoffice.org | sw-config
385openoffice.org | sw-dbui
386openoffice.org | sw-dialog
387openoffice.org | sw-dochdl
388openoffice.org | sw-docvw
389openoffice.org | sw-envelp
390openoffice.org | sw-fldui
391openoffice.org | sw-fmtui
392openoffice.org | sw-frmdlg
393openoffice.org | sw-globdoc
394openoffice.org | sw-inc
395openoffice.org | sw-index
396openoffice.org | sw-lingu
397openoffice.org | sw-misc
398openoffice.org | sw-ribbar
399openoffice.org | sw-sdi
400openoffice.org | sw-shells
401openoffice.org | sw-smartmenu
402openoffice.org | sw-table
403openoffice.org | sw-uiview
404openoffice.org | sw-undo
405openoffice.org | sw-unocore
406openoffice.org | sw-utlui
407openoffice.org | sw-web
408openoffice.org | sw-wrtsh
409openoffice.org | swext-custom
410openoffice.org | swext-help
411openoffice.org | swext-office
412openoffice.org | sysui-share
413openoffice.org | toolkit-workben-layout
414openoffice.org | ucbhelper-ucb-explorer
415openoffice.org | uui-source
416openoffice.org | vcl-src
417openoffice.org | wizards-euro
418openoffice.org | wizards-formwizard
419openoffice.org | wizards-importwizard
420openoffice.org | wizards-schedule
421openoffice.org | wizards-template
422openoffice.org | xmlsecurity-component
423openoffice.org | xmlsecurity-dialogs
0424
=== modified file 'config/settings.conf'
--- config/settings.conf 2010-09-28 14:23:29 +0000
+++ config/settings.conf 2010-10-07 20:22:40 +0000
@@ -9,7 +9,7 @@
99
10[defaults]10[defaults]
11distro_id: ubuntu11distro_id: ubuntu
12distro_codename: maverick 12distro_codename: lucid
13devel_milestone:13devel_milestone:
14product: desktop14product: desktop
15blacklist_priority: 349915blacklist_priority: 3499
1616
=== modified file 'ubuntu-translations-stats.py'
--- ubuntu-translations-stats.py 2010-09-28 10:04:10 +0000
+++ ubuntu-translations-stats.py 2010-10-07 20:22:40 +0000
@@ -23,6 +23,8 @@
23import sys23import sys
24import urllib24import urllib
25import os25import os
26import apt_pkg
27import subprocess
26from optparse import OptionParser28from optparse import OptionParser
27from common import utils29from common import utils
28from ul10n_stats import ul10n_iso_pots_get30from ul10n_stats import ul10n_iso_pots_get
@@ -47,33 +49,6 @@
47 given distro version."""49 given distro version."""
4850
49 parser = OptionParser(usage = USAGE, description = DESCRIPTION)51 parser = OptionParser(usage = USAGE, description = DESCRIPTION)
50
51 parser.add_option("-l",
52 "--languages-file",
53 dest="languages_file",
54 default=None,
55 help="File with read languages for report.")
56
57 parser.add_option("-d",
58 "--domains-file",
59 dest="domains_file",
60 default=None,
61 help="File to read domains from and on which stats are based. Requires -c argument.")
62
63 parser.add_option("-c",
64 "--custom",
65 dest="custom",
66 action="store_true",
67 default=False,
68 help="Turn on custom (non-Ubuntu) mode")
69
70 parser.add_option("-f",
71 "--no-file",
72 dest="no_file",
73 action="store_true",
74 default=False,
75 help="Disables using conf file blacklist.")
76
77 parser.add_option("-p",52 parser.add_option("-p",
78 "--no-priorities",53 "--no-priorities",
79 dest="no_priorities",54 dest="no_priorities",
@@ -90,14 +65,56 @@
90 parser.add_option("-b",65 parser.add_option("-b",
91 "--template-blacklist",66 "--template-blacklist",
92 dest="blacklist",67 dest="blacklist",
93 default='config/blacklist.conf',68 default='',
94 help="Specify the file containing the templates to blacklist during the calculation of statistics")69 help="Specify the file containing the templates to blacklist during the calculation of statistics")
70# from here down are args for custom options. they all required -c.
71 parser.add_option("-c",
72 "--custom",
73 dest="custom",
74 action="store_true",
75 default=False,
76 help="Turn on custom (non-Ubuntu) mode")
77
78 parser.add_option("-l",
79 "--languages-file",
80 dest="languages_file",
81 default=None,
82 help="File with languages for report.")
83
84 parser.add_option("-n",
85 "--custom-name",
86 dest="custom_name",
87 default=None,
88 help="Name of custom project. Requires -c argument.")
89
90 parser.add_option("-m",
91 "--manifest-file",
92 dest="manifest_file",
93 default=None,
94 help="Manifest file to read bin pkgs from and on which stats are based. Requires -c argument.")
95
96 parser.add_option("-d",
97 "--domains-file",
98 dest="domains_file",
99 default=None,
100 help="File to read domains from and on which stats are based. Requires -c argument.")
101
102 parser.add_option("-r",
103 "--root-dir",
104 dest="root_dir",
105 default=None,
106 help="Path to root dir of custom system from which to get domains. Requires -c argument.")
107 parser.add_option("-f",
108 "--disable-file-blacklist",
109 dest="disable_file_blacklist",
110 action="store_true",
111 default=False,
112 help="Disables using conf file blacklist.")
95113
96 (options, args) = parser.parse_args()114 (options, args) = parser.parse_args()
97115
98 return options, settings116 return options, settings
99117
100
101def get_raw_data(distro_codename):118def get_raw_data(distro_codename):
102119
103 logger.info("Fetching stats data...")120 logger.info("Fetching stats data...")
@@ -107,7 +124,7 @@
107 urllib.urlretrieve(url, path)124 urllib.urlretrieve(url, path)
108125
109126
110def get_working_templates(options, settings):127def get_superset_templates(options, settings):
111128
112 distro_codename = settings['distro_codename']129 distro_codename = settings['distro_codename']
113 distro_id = settings['distro_id']130 distro_id = settings['distro_id']
@@ -116,7 +133,9 @@
116133
117 logger.info("Fetching working templates set...")134 logger.info("Fetching working templates set...")
118135
119 # if normal ubuntu mode, get src pkg list form seeds, else from custom136 src_pkgs_not_found = list()
137
138 # if normal ubuntu mode, get src pkg list from seeds, else from custom
120 if not options.custom:139 if not options.custom:
121 # Get the source packages from the given distro's seeds.140 # Get the source packages from the given distro's seeds.
122 # This will give us only the list of source packages we're interested141 # This will give us only the list of source packages we're interested
@@ -130,14 +149,22 @@
130149
131 # create list ('valid') of lines from lp_stats_pots file that only includes150 # create list ('valid') of lines from lp_stats_pots file that only includes
132 # src pkgs that are: in the seed, enabled, or in extra (for live cd)151 # src pkgs that are: in the seed, enabled, or in extra (for live cd)
133 valid = ul10n_iso_pots_get.apply_valid_pots_filter(TEMPLATES_FILE,152 superset = ul10n_iso_pots_get.apply_valid_pots_filter(TEMPLATES_FILE,
134 distro_seeds.sourcepackages)153 distro_seeds.sourcepackages)
135
136 working_pots = ul10n_iso_pots_get.apply_blacklist_filter(options, settings, valid)
137
138 else:154 else:
139 domain_src, domain_linenum, domain_template, lines = ul10n_iso_pots_get.get_dictionaries(TEMPLATES_FILE)155 domain_src, domain_linenum, domain_template, src_domains, lines = ul10n_iso_pots_get.get_dictionaries(TEMPLATES_FILE)
140 if options.domains_file:156 if options.manifest_file:
157 binary_pkgs = get_bin_pkgs_from_manifest(options.manifest_file)
158 src_pkgs, not_found = get_src_pkgs_from_binary_pkgs(binary_pkgs)
159 domains = list()
160 for src_pkg in src_pkgs:
161 if src_pkg in src_domains.keys():
162 for domain in src_domains[src_pkg]:
163 domains.append(domain)
164 else:
165 src_pkgs_not_found.append(src_pkg)
166 #TODO save src pkgs not found. this shows what the trans stats DON'T include
167 elif options.domains_file:
141 if not os.path.exists(options.domains_file):168 if not os.path.exists(options.domains_file):
142 logger.critical("Error: domains_file not found. Stopping.")169 logger.critical("Error: domains_file not found. Stopping.")
143 sys.exit(1)170 sys.exit(1)
@@ -145,28 +172,117 @@
145 domains = f.read().split('\n')172 domains = f.read().split('\n')
146 f.close()173 f.close()
147 else:174 else:
148 domains = ul10n_custom.get_domains()175 if options.root_dir:
149 #for domain in domains: logger.debug(domain)176 r_dir = options.root_dir
150 working_pots = list()177 else:
178 r_dir = '/'
179 domains = ul10n_custom.get_domains(r_dir)
180 #for domain in domains: print >> sys.stderr, domain
181 superset = list()
151 invalid = list()182 invalid = list()
152 for domain in domains:183 for domain in domains:
153 if domain in domain_src.keys():184 if domain in domain_src.keys():
154 line = lines[domain_linenum[domain]].rstrip()185 line = lines[domain_linenum[domain]].rstrip().lstrip()
155 working_pots.append(line)186 superset.append(line)
156 # write 187 superset.sort()
157 f_domains = open(os.path.join(os.getcwd(), "reports", "report_domains"), 'w')188
158 f_domains.write("- Src Pkg | Gettext Domain | LP Template -\n")189 return superset, src_pkgs_not_found
159 f_domains.write("------------------------------------------\n")190
160 for line in working_pots:191def get_src_pkgs_from_binary_pkgs(binaries):
161 items = line.split('|')192 not_found = list()
162 f_domains.write(items[0].strip() + ' | ' + items[1].strip() + ' | ' + items[2].strip() + '\n')193 src_pkgs = list()
163 f_domains.flush()194
164 f_domains.close()195
165196 for items in binaries:
166 return working_pots197 cmd = ['apt-cache', 'showsrc', items[0]]
198 try:
199 res = subprocess.Popen(cmd, cwd="./", stdout=subprocess.PIPE
200).communicate()
201 except:
202 print >>sys.stderr, "Error: subprocess exception. stopping."
203 sys.exit(1)
204 continue
205 src_pkg = res[0][res[0].find(" ") + 1:res[0].find("\n")]
206 if len(src_pkg) == 0:
207 not_found.append(items[0])
208 continue
209 if src_pkg not in src_pkgs:
210 src_pkgs.append(src_pkg)
211
212# apt_pkg.init()
213# srcs = apt_pkg.GetPkgSrcRecords()
214# srcs.Restart()
215# for tup in binaries:
216# if srcs.Lookup(tup[0]):
217# src_pkgs.append(srcs.Package)
218# else:
219# not_found.append(tup[0])
220
221 src_pkgs.sort()
222
223 return src_pkgs, not_found
224
225def get_bin_pkgs_from_manifest(path):
226 if not os.path.exists(path):
227 print >> sys.stderr, "Error: " + path + "does not exist. Stoppping."
228 sys.exit(1)
229 f = open(path, 'r')
230 lines = f.readlines()
231 f.close()
232
233 binaries = list(tuple())
234 for line in lines:
235 items = line.split()
236 binaries.append([items[0],items[1]])
237
238 return binaries
239
240def log_template(the_set, name, options, settings):
241 basename = utils.get_basename(options,settings)
242 f_name = basename + "-" + name
243 f = open(os.path.join(os.getcwd(), "reports", f_name), 'w')
244 the_list_ = list(the_set)
245 the_list_.sort()
246 for line in the_list_:
247 f.write(line + '\n')
248 f.flush()
249 f.close()
250
251 return
252
253def log_blacklist(the_list, name, options, settings):
254
255 basename = utils.get_basename(options,settings)
256 f_name = basename + "-blacklist-" + name
257
258 # write used blacklist to file in data dir
259 f = open(os.path.join("reports", f_name), 'w')
260 l = list(the_list)
261 l.sort()
262 for item in l:
263 f.write(item[0] + ' | ' + item[1] + '\n')
264 f.flush()
265 f.close()
266
267 return
268
269def log(blacklisted, blacklisted_priority, blacklisted_file, superset, working,
270 src_pkgs_not_found, options, settings):
271 # write blaclisted files
272 log_blacklist(blacklisted_file, "file", options, settings)
273 log_blacklist(blacklisted_priority, "priority", options, settings)
274 log_blacklist(blacklisted, "all", options, settings)
275
276 log_template(superset, "superset", options, settings)
277 log_template(working, "working", options, settings)
278 if options.manifest_file:
279 log_template(src_pkgs_not_found, "src-pkgs-not-found", options, settings)
280
281 return
167282
168def main():283def main():
169284 import codecs
285 sys.stdout = codecs.open("/dev/stdout", "w", 'utf-8')
170 # Get the command line options and settings from the config file286 # Get the command line options and settings from the config file
171 options, settings = options_parse()287 options, settings = options_parse()
172288
@@ -175,12 +291,21 @@
175 get_raw_data(settings['distro_codename'])291 get_raw_data(settings['distro_codename'])
176292
177 # Compile a list of working templates to be considered for the calculation.293 # Compile a list of working templates to be considered for the calculation.
178 # Apply any blacklisting if necessary.294 # Also, if its a custom execution and the manifest file option is used, return
179 working_pots = get_working_templates(options, settings)295 # the list of src packages that are derived from the manifest but that are
296 # not found in the LP export. These are removed from the superset of pkgs
297 # and thus the statistics do not include them.
298 superset, src_pkgs_not_found = get_superset_templates(options, settings)
299
300 # Apply blacklists
301 working, blacklisted, blacklisted_priority, blacklisted_file = ul10n_iso_pots_get.apply_blacklist_filter(options, settings, superset)
302
303 # write log files
304 log(blacklisted, blacklisted_priority, blacklisted_file, superset, working, src_pkgs_not_found, options, settings)
180305
181 # Calculate the unified, per language translation statistics from the306 # Calculate the unified, per language translation statistics from the
182 # working templates set and output them in a report307 # working templates set and output them in a report
183 ul10n_stats_calc.calculate_stats(options, settings, working_pots)308 ul10n_stats_calc.calculate_stats(options, settings, working)
184309
185if __name__ == "__main__":310if __name__ == "__main__":
186 main()311 main()
187312
=== modified file 'ul10n_stats/ul10n_custom.py' (properties changed: -x to +x)
--- ul10n_stats/ul10n_custom.py 2010-09-25 12:56:20 +0000
+++ ul10n_stats/ul10n_custom.py 2010-10-07 20:22:40 +0000
@@ -2,10 +2,11 @@
22
3import os, sys, subprocess3import os, sys, subprocess
44
5def get_domains():5def get_domains(root_path):
6 domains = list()6 domains = list()
7 not_found = list()7 not_found = list()
8 cmd = 'find /usr/share/locale-langpack -name "*.mo"'8 path = os.path.join(root_path, 'usr/share/locale-langpack')
9 cmd = 'find ' + path + ' -name "*.mo"'
9 res = None 10 res = None
10 try:11 try:
11 res = subprocess.Popen(cmd, shell=True, cwd="./", stdout=subprocess.PIPE ).communicate()12 res = subprocess.Popen(cmd, shell=True, cwd="./", stdout=subprocess.PIPE ).communicate()
@@ -20,6 +21,7 @@
20 if len(domain) > 0:21 if len(domain) > 0:
21 if domain not in domains:22 if domain not in domains:
22 domains.append(domain)23 domains.append(domain)
24 domains.sort()
23 return domains25 return domains
2426
25def get_src_pkgs(domains):27def get_src_pkgs(domains):
2628
=== modified file 'ul10n_stats/ul10n_iso_pots_get.py'
--- ul10n_stats/ul10n_iso_pots_get.py 2010-09-28 18:55:37 +0000
+++ ul10n_stats/ul10n_iso_pots_get.py 2010-10-07 20:22:40 +0000
@@ -110,50 +110,49 @@
110 valid.append(line.strip())110 valid.append(line.strip())
111 return valid111 return valid
112112
113def apply_blacklist_filter(options, settings, pot_set):113def apply_blacklist_filter(options, settings, superset):
114114
115 blacklist = options.blacklist115 if len(options.blacklist) != 0:
116116 blacklist = options.blacklist
117 else:
118 blacklist = 'config/blacklist.' + settings['distro_codename'] + '.conf'
119
120 blacklisted = set()
117 # create or get blacklist121 # create or get blacklist
118 priority_blacklist = list(tuple())122 priority_blacklist = list(tuple())
119123
120 if not options.no_priorities:124 if not options.no_priorities:
121 # Set up blacklist from priorities125 # Set up blacklist from priorities
122 type_msg = "Generated from Priorities"
123 cutoff_priority = settings['blacklist_priority']126 cutoff_priority = settings['blacklist_priority']
124127
125 for line in pot_set:128 for line in superset:
126 items = line.split('|')129 items = line.split('|')
127 priority = items[6].strip()130 priority = items[6].strip()
128 if priority < cutoff_priority:131 if priority <= cutoff_priority:
129 src = items[0].strip()132 src = items[0].strip()
130 template = items[1].strip()133 domain = items[1].strip()
131 priority_blacklist.append((src, template))134 priority_blacklist.append((src, domain))
132 print >>sys.stderr, "BLACKLISTED through Priority: " + str(len(priority_blacklist))135 print >>sys.stderr, "BLACKLISTED through Priority: " + str(len(priority_blacklist))
133136
134 write_blacklist(priority_blacklist, "priority", settings)
135
136 file_blacklist = list(tuple())137 file_blacklist = list(tuple())
137138
138 if not options.no_file:139 if not options.disable_file_blacklist:
139 # Set up blacklist from config/blacklist.conf140 # Set up blacklist from config/blacklist.conf
140 type_msg = "Read from Conf File"
141
142 for line in open(blacklist):141 for line in open(blacklist):
143 blk_pkg, blk_pot = line.split('|')142 src, domain= line.split('|')
144 blk_pkg = blk_pkg.strip()143 src = src.strip()
145 blk_pot = blk_pot.strip()144 domain = domain.strip()
146 file_blacklist.append((blk_pkg, blk_pot))145 file_blacklist.append((src, domain))
147 print >>sys.stderr, "BLACKLISTED through File: " + str(len(file_blacklist))146 print >>sys.stderr, "BLACKLISTED through File: " + str(len(file_blacklist))
148147
149 write_blacklist(file_blacklist, "file", settings)148 for item in file_blacklist: blacklisted.add(item)
149 for item in priority_blacklist: blacklisted.add(item)
150
151 print >>sys.stderr, "BLACKLISTED: " + str(len(blacklisted))
150152
151 valid = list()153 valid = list()
152 started = 1154 started = 1
153 for line in pot_set:155 for line in superset:
154 if started > 0:
155 started -= 1
156 continue
157156
158 if '|' in line:157 if '|' in line:
159 (pkg, domain, pot, total, enabled, langpack, priority, date) = line.split('|')158 (pkg, domain, pot, total, enabled, langpack, priority, date) = line.split('|')
@@ -161,7 +160,8 @@
161 pot = pot.strip()160 pot = pot.strip()
162 if ((pkg, pot) not in file_blacklist) and ((pkg, pot) not in priority_blacklist):161 if ((pkg, pot) not in file_blacklist) and ((pkg, pot) not in priority_blacklist):
163 valid.append(line.strip())162 valid.append(line.strip())
164 return valid163
164 return valid, blacklisted, priority_blacklist, file_blacklist
165165
166def get_dictionaries(f):166def get_dictionaries(f):
167167
@@ -170,6 +170,7 @@
170 domain_src = dict()170 domain_src = dict()
171 domain_template = dict()171 domain_template = dict()
172 domain_linenum = dict()172 domain_linenum = dict()
173 src_domains = dict()
173174
174 line_num = -1175 line_num = -1
175 started = 1176 started = 1
@@ -191,15 +192,10 @@
191 domain_template[domain] = template192 domain_template[domain] = template
192 if (domain,line_num) not in domain_linenum.keys():193 if (domain,line_num) not in domain_linenum.keys():
193 domain_linenum[domain] = line_num194 domain_linenum[domain] = line_num
194 return domain_src, domain_linenum, domain_template, lines195 if src_pkg not in src_domains.keys():
196 src_domains[src_pkg] = [domain]
197 else:
198 if domain not in src_domains[src_pkg]:
199 src_domains[src_pkg].append(domain)
200 return domain_src, domain_linenum, domain_template, src_domains, lines
195201
196def write_blacklist(bl, msg, settings):
197 # write used blacklist to file in data dir
198 black_list_f = open(os.path.join("data", settings['distro_codename'] + "-black_listed-" + msg), 'w')
199 black_list_f.write("- " + msg + " -\n- Source Package | Template -\n-----------------------------\n")
200 bl_l = list(bl)
201 bl_l.sort()
202 for item in bl_l:
203 black_list_f.write(item[0] + ' | ' + item[1] + '\n')
204 black_list_f.flush()
205 black_list_f.close()
206202
=== modified file 'ul10n_stats/ul10n_stats_calc.py'
--- ul10n_stats/ul10n_stats_calc.py 2010-09-28 14:23:29 +0000
+++ ul10n_stats/ul10n_stats_calc.py 2010-10-07 20:22:40 +0000
@@ -27,7 +27,7 @@
27import urllib227import urllib2
28import datetime28import datetime
29import gzip29import gzip
30from common.utils import init_logging, do_lp_login30from common.utils import init_logging, do_lp_login, get_basename
31from common.templates import html_report_template31from common.templates import html_report_template
32sys.path.append(os.path.join(os.getcwd(), 'lib/python2.6/site-packages'))32sys.path.append(os.path.join(os.getcwd(), 'lib/python2.6/site-packages'))
33from gviz_api import gviz_api33from gviz_api import gviz_api
@@ -102,7 +102,7 @@
102102
103 length = property(_get_languages_len)103 length = property(_get_languages_len)
104104
105 def get_all_languages(self, config=None):105 def get_all_languages(self, options, config=None):
106 """Fetch all available languages either known to Launchpad or listed106 """Fetch all available languages either known to Launchpad or listed
107 in a configuration file.107 in a configuration file.
108 """108 """
@@ -145,17 +145,11 @@
145 if started > 0:145 if started > 0:
146 started -= 1146 started -= 1
147 elif '|' in line:147 elif '|' in line:
148 try:148 if options.custom and options.languages_file:
149 code, english_name, visible = line.split('|')
150 except ValueError, e:
151 code, english_name = line.split('|')149 code, english_name = line.split('|')
152 visible = "t"150 visible = "t"
153 logger.warning(151 else:
154 "Language {0} [{1}]:".format(152 code, english_name, visible = line.split('|')
155 english_name.strip(), code.strip()) \
156 + " missing 'visible' column " \
157 + "in the languages file. Assuming " \
158 + "it is visible.")
159 language = Language(code.strip(),153 language = Language(code.strip(),
160 english_name.strip(),154 english_name.strip(),
161 visible.strip() == "t")155 visible.strip() == "t")
@@ -212,6 +206,7 @@
212206
213207
214def addToLanguage(stats, language, translated, total):208def addToLanguage(stats, language, translated, total):
209
215 if language in stats:210 if language in stats:
216 stats[language]['translated'] += translated211 stats[language]['translated'] += translated
217 stats[language]['total'] += total212 stats[language]['total'] += total
@@ -221,10 +216,100 @@
221 'total': total,216 'total': total,
222 }217 }
223218
224219def do_lp_login():
225def print_report(variables, settings, custom):220
226 basename = '{0}-{1}-translation-stats.html'.format(settings['distro_id'], settings['distro_release'])221 from launchpadlib.launchpad import Launchpad
227 report_filename = os.path.join('reports', basename)222 import tempfile
223 import atexit
224 import shutil
225 cachedir = tempfile.mkdtemp()
226 atexit.register(shutil.rmtree, cachedir)
227
228 print >> sys.stderr, "Logging in to Launchpad... "
229
230 # TODO: error checking, especially if we're working offline
231 launchpad = Launchpad.login_anonymously('Ubuntu Translation stats',
232 'production', cachedir)
233
234 return launchpad
235
236
237def get_lang_names(options):
238
239 # Set only to False to speed up debugging
240 lp_api = False
241
242 lang_names = {}
243
244 print >>sys.stderr, 'Getting language list...'
245
246 if lp_api:
247 max_tries = 2
248 tries = 0
249
250 launchpad = do_lp_login()
251
252 try:
253 langs = launchpad.languages
254 except urllib2.URLError, e:
255 tries += 1
256 if tries >= max_tries or (e.code != 502 and e.code != 504):
257 print >>sys.stderr, "Failed (%d): %s" % (e.code, url)
258 raise
259
260 print >>sys.stderr, "Retrying (%d): %s" % (e.code, url)
261 time.sleep(3)
262
263 for lang in langs:
264 if lang.visible:
265 lang_names[lang.code] = lang.english_name
266
267 langs_len = len(langs)
268
269 else:
270 if options.languages_file:
271 languages_file = options.languages_file
272 else:
273 languages_file = os.path.join('data', 'langs.log')
274
275 if not os.path.exists(languages_file):
276 print >> sys.stderr, 'Error: Langauges file does not exist. Stopping'
277 sys.exit(1)
278 f = open(languages_file, 'r')
279 lines = f.readlines()
280 f.close()
281
282 print >> sys.stderr, 'file:' + languages_file
283 started = 2
284 for line in lines:
285 if started > 0 and not options.languages_file:
286 started -= 1
287 continue
288
289 if '|' in line:
290 items = line.split('|')
291 code = items[0].strip()
292 englishname = items[1].strip()
293 visible = True
294 if len(items) > 2:
295 vis = items[2].strip()
296 if vis.strip() != "t":
297 visible = False
298 if visible:
299 lang_names[code] = englishname
300
301
302 langs_len = len(lang_names)
303
304 print >>sys.stderr, '{0} languages obtained'.format(str(langs_len))
305
306 return lang_names
307
308
309def print_reports(variables, settings, options):
310 basename = get_basename(options,settings)
311 #basename += ".html"
312 report_filename = os.path.join('reports', basename + '.html')
228313
229 # Log the date of creation for the report314 # Log the date of creation for the report
230 gen_date = str(datetime.datetime.utcnow())315 gen_date = str(datetime.datetime.utcnow())
@@ -232,14 +317,31 @@
232 # Add necessary variables for the report317 # Add necessary variables for the report
233 variables['gen_date'] = gen_date318 variables['gen_date'] = gen_date
234 variables['distro_release'] = settings['distro_release']319 variables['distro_release'] = settings['distro_release']
235320 variables['project'] = options.custom_name
236 # This is clearly not optimal, but as long as the file is hosted321 variables['basename'] = basename
237 # on people.ubuntu.com there is no other way to make the statistics
238 # link work.
239 variables['basename'] = '/~dpm/' + basename
240
241 f = codecs.open(report_filename, 'w', 'utf-8')322 f = codecs.open(report_filename, 'w', 'utf-8')
242 f.write(html_report_template.ubuntu_template % variables)323 if options.custom:
324 from common.templates import custom_report as template
325 from common.templates import custom_src_excluded as excluded
326 f_ = codecs.open(os.path.join('reports', basename + '-excluded.html'), 'w', 'utf-8')
327 f_.write(excluded.ubuntu_template % variables)
328 f_.close()
329 from common.templates import custom_src_included as included
330 f_ = codecs.open(os.path.join('reports', basename + '-included.html'), 'w', 'utf-8')
331 f_.write(included.ubuntu_template % variables)
332 f_.close()
333 from common.templates import custom_blacklisted_file as blacklisted_file
334 f_ = codecs.open(os.path.join('reports', basename + '-blacklisted-file.html'), 'w', 'utf-8')
335 f_.write(blacklisted_file.ubuntu_template % variables)
336 f_.close()
337 from common.templates import custom_blacklisted_priority as blacklisted_priority
338 f_ = codecs.open(os.path.join('reports', basename + '-blacklisted-priority.html'), 'w', 'utf-8')
339 f_.write(blacklisted_priority.ubuntu_template % variables)
340 f_.close()
341 #print "variables: " + str(variables)
342 else:
343 from common.templates import html_report_template as template
344 f.write(template.ubuntu_template % variables)
243 f.close()345 f.close()
244346
245 logger.info('Report generated at {0}'.format(report_filename))347 logger.info('Report generated at {0}'.format(report_filename))
@@ -271,7 +373,7 @@
271 print >> sys.stderr, "TOTAL MESSAGES: " + str(TOTAL)373 print >> sys.stderr, "TOTAL MESSAGES: " + str(TOTAL)
272374
273 languages = LanguageSet()375 languages = LanguageSet()
274 languages.get_all_languages(options.languages_file)376 languages.get_all_languages(options, options.languages_file)
275377
276 # Skip 2 lines from the package stats file378 # Skip 2 lines from the package stats file
277 started = 2379 started = 2
@@ -304,11 +406,13 @@
304 languages_available.sort(cmp=lambda a, b:406 languages_available.sort(cmp=lambda a, b:
305 cmp(stats[b]['translated'], stats[a]['translated']))407 cmp(stats[b]['translated'], stats[a]['translated']))
306408
409 #for l in languages_available:
410 # print >> sys.stderr, l
411
307 # This list will contain the language statistics data in the format412 # This list will contain the language statistics data in the format
308 # the gviz_api.DataTable expects413 # the gviz_api.DataTable expects
309 language_stats = []414 language_stats = []
310 languages_supported = 0415 languages_supported = 0
311
312 for lang in languages_available:416 for lang in languages_available:
313 if lang in languages:417 if lang in languages:
314 translated_percent = 100.00 * stats[lang]['translated'] / TOTAL418 translated_percent = 100.00 * stats[lang]['translated'] / TOTAL
@@ -324,16 +428,152 @@
324428
325 languages_total = len(languages_available)429 languages_total = len(languages_available)
326430
327 keys = ("language", "translated")431 description = {
328 description = {"language": ("string", "Language"),432 "language": ("string", "Language"),
329 "translated": ("number", "Translated")}433 "translated": ("number", "Translated")
434 }
330435
331 # Load the data into a gviz_api.DataTable436 # Load the data into a gviz_api.DataTable
332 data_table = gviz_api.DataTable(description)437 data_table = gviz_api.DataTable(description)
333 data_table.LoadData(language_stats)438 data_table.LoadData(language_stats)
334439
335 languages_json = data_table.ToJSon(440 # FIXME: If we do rounding of the percentages before here, languages with
336 columns_order=("language", "translated"),441 # the same percentage after rounding will be simply ordered alphabetically.
337 order_by=[("translated", "desc")])442 # When losing the figures after the decimal point, we lose the order of
338443 # languages in a given percentage range
339 print_report(locals(), settings, options.custom)444 data_json = data_table.ToJSon(
445 columns_order=("language", "translated"),
446 order_by=[("translated", "desc"), ("language", "asc")]
447 )
448
449 if options.custom:
450 included_data_table, included_json, \
451 excluded_data_table, excluded_json, \
452 blacklisted_file_data, blacklisted_file_json, \
453 blacklisted_priority_data, blacklisted_priority_json = make_custom_html(options, settings)
454
455 print_reports(locals(), settings, options)
456
457def make_custom_html(options, settings):
458 basename = get_basename(options,settings)
459
460 #create data for blacklisted-priority
461 l = list()
462 f = open(os.path.join('reports', basename + '-blacklist-priority'), 'r')
463 lines = f.readlines()
464 f.close()
465 for line in lines:
466 items = line.split('|')
467 src = items[0].strip()
468 domain = items[1].strip()
469 found = False
470 for d in l:
471 if domain == d['domain']:
472 found = True
473 if not found:
474 l.append({'src_pkg':src, 'domain':domain})
475 description = {
476 "src_pkg": ("string", "Source Package"),
477 'domain': ('string', 'Gettext Domain')
478 }
479 blacklisted_priority_data = gviz_api.DataTable(description)
480 blacklisted_priority_data.LoadData(l)
481 blacklisted_priority_json = blacklisted_priority_data.ToJSon(
482 columns_order=("src_pkg", "domain"),
483 order_by=[('src_pkg', 'asc'), ('domain', 'asc')]
484 )
485
486 #create data for blacklisted-file
487 blacklist_file = list()
488 f = open(os.path.join('reports', basename + '-blacklist-file'), 'r')
489 lines = f.readlines()
490 f.close()
491 for line in lines:
492 items = line.split('|')
493 src = items[0].strip()
494 domain = items[1].strip()
495 found = False
496 for d in blacklist_file:
497 if domain == d['domain']:
498 found = True
499 if not found:
500 blacklist_file.append({'src_pkg':src, 'domain':domain})
501 description = {
502 "src_pkg": ("string", "Source Package"),
503 'domain': ('string', 'Gettext Domain')
504 }
505 blacklisted_file_data = gviz_api.DataTable(description)
506 blacklisted_file_data.LoadData(blacklist_file)
507 blacklisted_file_json = blacklisted_file_data.ToJSon(
508 columns_order=("src_pkg", "domain"),
509 order_by=[('src_pkg', 'asc'), ('domain', 'asc')]
510 )
511
512 #create data for included src pckgs
513 included = list()
514 f = open(os.path.join('reports', basename + '-working'), 'r')
515 lines = f.readlines()
516 f.close()
517 for line in lines:
518 items = line.split('|')
519 src = items[0].strip()
520 domain = items[1].strip()
521 template = items[2].strip()
522 found = False
523 for d in included:
524 if domain in d.values():
525 found = True
526 if not found:
527 included.append({'src_pkg':src, 'domain':domain, 'template':template})
528 description = {
529 "src_pkg": ("string", "Source Package"),
530 'domain': ('string', 'Gettext Domain'),
531 'template': ('string', 'LP Template')
532 }
533 included_data_table = gviz_api.DataTable(description)
534 included_data_table.LoadData(included)
535 included_json = included_data_table.ToJSon(
536 columns_order=("src_pkg", "domain", 'template'),
537
538 order_by=[('src_pkg', 'asc'), ('domain', 'asc'), ('template', 'asc')]
539 )
540
541 #create data for excluded src pckgs
542 src_not_included = list()
543 f = open(os.path.join('reports', basename + '-blacklist-all'), 'r')
544 lines = f.readlines()
545 f.close()
546 for line in lines:
547 items = line.split()
548 src = items[0].strip()
549 found = False
550 for d in src_not_included:
551 if src in d.values():
552 found = True
553 if not found:
554 src_not_included.append({'src_pkg':src})
555 # if using build manifest, also include pkgs in manifest and not found
556 # in LP exports
557 if options.manifest_file:
558 f = open(os.path.join('reports', basename + '-src-pkgs-not-found'), 'r')
559 lines = f.readlines()
560 f.close()
561 found = False
562 for d in src_not_included:
563 if src in d.values():
564 found = True
565 if not found:
566 src_not_included.append({'src_pkg':src})
567
568 description = {
569 "src_pkg": ("string", "Source Package")
570 }
571 excluded_data_table = gviz_api.DataTable(description)
572 excluded_data_table.LoadData(src_not_included)
573 excluded_json = excluded_data_table.ToJSon(
574 order_by=[('src_pkg', 'asc')]
575 )
576 return included_data_table, included_json,\
577 excluded_data_table, excluded_json,\
578 blacklisted_file_data, blacklisted_file_json, \
579 blacklisted_priority_data, blacklisted_priority_json

Subscribers

People subscribed via source and target branches