~ubuntu-branches/ubuntu/saucy/wicd/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/xx-get_translations.patch

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2010-03-04 10:59:30 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100304105930-jihcz2fn8e77uqbb
Tags: 1.7.0+ds1-1
* New repacked tarball, contains translations .po files
  (Closes: #572352)
* debian/bug-control added, let's add more info to the bugreports!
* debian/control:
  - debhelper dependency bumped to >= 7.2.3~, to use dh_bugfiles
  - added dependency on python-iniparse to wicd-daemon
* debian/rules:
  - make dh_bugfiles act on all packages
  - add get-orig-source target, to build a package containing the
    .po files
* debian/patches/:
  - 20-use_iniparse.patch added, uses python-iniparse instead of
    standard library's ConfigParser (Closes: #568326)
  - 21-fix_ESSID_setting.patch added, use correct command to set
    ESSID's (useful when a network is named "off" or "any")
    (Closes: #571100)
  - 22-fix_deprecation.patch added, fixes some deprecated usage of
    gtk.Statusbar (Closes: #571314)
* debian/watch updated to mangle Debian version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: David Paleino <dapal@debian.org>
 
2
Subject: fix release scripts, also include .po files in the tarball
 
3
Forwarded: no
 
4
 
 
5
---
 
6
 setup.py |    8 +++++---
 
7
 1 file changed, 5 insertions(+), 3 deletions(-)
 
8
 
 
9
--- wicd.orig/setup.py
 
10
+++ wicd/setup.py
 
11
@@ -436,7 +436,10 @@ class get_translations(Command):
 
12
         import urllib, shutil
 
13
         if os.path.exists('translations'):
 
14
             shutil.rmtree('translations/')
 
15
+        if os.path.exists('po'):
 
16
+            shutil.rmtree('po/')
 
17
         os.makedirs('translations')
 
18
+        os.makedirs('po')
 
19
         filename, headers = urllib.urlretrieve('http://wicd.sourceforge.net/translator/idlist/')
 
20
         id_file = open(filename, 'r')
 
21
         lines = id_file.readlines()
 
22
@@ -452,11 +455,10 @@ class get_translations(Command):
 
23
             except:
 
24
                 print >> sys.stderr, 'error downloading language %s' % id
 
25
             else:
 
26
-                shutil.move(pofile, lang_identifier+'.po')
 
27
+                shutil.move(pofile, 'po/'+lang_identifier+'.po')
 
28
                 os.makedirs('translations/'+lang_identifier+'/LC_MESSAGES')
 
29
                 os.system('msgfmt --output-file=translations/' + lang_identifier +
 
30
-                          '/LC_MESSAGES/wicd.mo ' + lang_identifier + '.po')
 
31
-                os.remove(lang_identifier+'.po')
 
32
+                          '/LC_MESSAGES/wicd.mo po/' + lang_identifier + '.po')
 
33
 
 
34
 
 
35
 class uninstall(Command):