Merge lp://staging/~pascal-devuyst/apt-ddtp-tools/DebianSync into lp://staging/apt-ddtp-tools

Proposed by Pascal De Vuyst
Status: Needs review
Proposed branch: lp://staging/~pascal-devuyst/apt-ddtp-tools/DebianSync
Merge into: lp://staging/apt-ddtp-tools
Diff against target: 407 lines (+228/-29)
10 files modified
DebianSync (+30/-0)
cmp-translations.py (+4/-4)
po2translation.py (+5/-5)
series.sh (+12/-4)
ubuntu/debian-ddtp-import/ddtp-get.py (+48/-0)
ubuntu/debian-ddtp-import/gen-sync.sh (+6/-6)
ubuntu/debian-ddtp-import/mail-new-ddtp.py (+73/-0)
ubuntu/debian-ddtp-import/nl.avoid (+3/-0)
ubuntu/debian-ddtp-import/sync-missing.py (+36/-0)
ubuntu/debian-ddtp-import/update-from-debian.sh (+11/-10)
To merge this branch: bzr merge lp://staging/~pascal-devuyst/apt-ddtp-tools/DebianSync
Reviewer Review Type Date Requested Status
Michael Vogt Pending
Review via email: mp+162643@code.staging.launchpad.net

Description of the change

Hi Michael,

I have modified your update-from-debian.sh, gen-sync.sh,
po2translation.py and cmp-translations.py scripts in apt-ddtp-tools to
give a list of descriptions missing in debian:
* Translation-en instead of Packages
* Fixed typo's

* update-from-debian.sh: variables for debian and ubuntu mirrors and
  only get Translation for specific language in series.sh
* gen-sync.sh: remove-duplicates.py is missing so commented it out
* po2translation.py: mark missing translation chunks as <trans> like
  ddtp.debian.net <http://ddtp.debian.net> does, fixed error of extra
  trailing \n with enumerations, Description-en instead of _Description
* cmp-translations.py: make it work with Translation-main-$lang files in
  missing-in-debian and output alphabetically

I created ddtp-get.py to fetch a package description from
ddtp.debian.net <http://ddtp.debian.net>, mail-new-ddtp.py to send a
package description to debian using email interface and sync-missing to
send descriptions missing in debian back to debian (as suggested on
<email address hidden> <mailto:debian-i18n%40lists.debian.org>).
Please read DebianSync.

Please consider including these changes into apt-ddtp-tools and feel
free to improve where necessary.

Thanks in advance,
Pascal

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Hello Pascal,

thanks a lot for this branch and sorry for my slow reply.

This looks good, but I do have some questions:

=== modified file 'po2translation.py'
--- po2translation.py 2010-12-20 13:22:27 +0000
+++ po2translation.py 2013-05-30 07:21:40 +0000
@@ -41,7 +41,7 @@
                # we have no translation for this chunk
                if only_do_full_translations:
                        return ""
- short_descr_trans = short_descr
+ short_descr_trans = "<trans>"
        else:
                have_translation = True

Why is this needed? Will this <trans> get filtered out later?
@@ -91,7 +91,7 @@
                        for line in chunk.split("\n"):
                                if line:
                                        new_chunk += " %s\n" % line
- chunk = new_chunk
+ chunk = new_chunk[:-1] # get rid of trailing \n
                # make sure here that chunks are seperated with "\n .\n"
                if long_descr_str == "":
                        long_descr_str = "%s" % chunk

Its probably best to use chunk = new_chunk.rstrip("\n") here to be robust against chunks that do not end with \n.

For the sending of mails, I wonder if it wouldn't be easier to just call the sendmail binary (maybe as a optional way) for people who already have a installed and configured sendmail.

It would be nice if the return codes (253, 252 etc) also have symbolic names somewhere.

I hope the above makes sense, please let me know if you have any questions. Its a nice touch that you also fix the hardcoded ubuntu mirror and make that configurable instead, its only a small part of the large patch but still a nice touch :)

Out of curiosity, when we send new translations to the email interface, do we have to be careful about not sending too much? Will it enter some sort of queue/review process in debian? Should we notify them before we send the stuff back or did you already started the sending back ?

Thanks!
 Michael

Revision history for this message
Pierre Slamich (pierre-slamich) wrote :

Was also wondering about throttling to ensure we don't crash upstream's servers

Unmerged revisions

90. By Pascal De Vuyst

update-from-debian.sh, gen-sync.sh, po2translation.py and cmp-translations.py:
* Translation-en instead of Packages
* Fixed typo's

* update-from-debian.sh: variables for debian and ubuntu mirrors and only get
  Translation for specific language in series.sh
* gen-sync.sh: remove-duplicates.py is missing so commented it out
* po2translation.py: mark missing translation chunks as <trans> like
  ddtp.debian.net does, fixed error of extra trailing \n with enumerations,
  Description-en instead of _Description
* cmp-translations.py: make it work with Translation-main-$lang files in
  missing-in-debian and output alphabetically

I created ddtp-get.py to fetch a package description from ddtp.debian.net,
mail-new-ddtp.py to send a package description to debian using email interface
and sync-missing to send descriptions missing in debian back to debian (as
suggested on <email address hidden>). Please read DebianSync.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: