wicd: [HACK] fix various gtk issues

* hack around s.translate situation
* fix KeyError exception in error dialog
* fix Russian translation

+48
+1
pkgs/tools/networking/wicd/default.nix
··· 25 ./dhclient.patch 26 ./no-ast-transl.patch 27 ./fix-app-icon.patch 28 ]; 29 30 # Should I be using pygtk's propogated build inputs?
··· 25 ./dhclient.patch 26 ./no-ast-transl.patch 27 ./fix-app-icon.patch 28 + ./fix-gtk-issues.patch 29 ]; 30 31 # Should I be using pygtk's propogated build inputs?
+47
pkgs/tools/networking/wicd/fix-gtk-issues.patch
···
··· 1 + diff -ruN wicd-1.7.2.4.orig/gtk/gui.py wicd-1.7.2.4/gtk/gui.py 2 + --- wicd-1.7.2.4.orig/gtk/gui.py 2013-03-31 17:01:29.367001288 +0000 3 + +++ wicd-1.7.2.4/gtk/gui.py 2013-03-31 17:55:20.826028396 +0000 4 + @@ -35,7 +35,7 @@ 5 + from wicd import misc 6 + from wicd import wpath 7 + from wicd import dbusmanager 8 + -from wicd.misc import noneToString 9 + +from wicd.misc import noneToString, _status_dict 10 + from wicd.translations import _, language 11 + import prefs 12 + from prefs import PreferencesDialog 13 + @@ -250,7 +250,7 @@ 14 + 15 + def handle_connection_results(self, results): 16 + if results not in ['success', 'aborted'] and self.is_visible: 17 + - error(self.window, language[results], block=False) 18 + + error(self.window, misc._status_dict[results], block=False) 19 + 20 + def create_adhoc_network(self, widget=None): 21 + """ Shows a dialog that creates a new adhoc network. """ 22 + diff -ruN wicd-1.7.2.4.orig/po/ru.po wicd-1.7.2.4/po/ru.po 23 + --- wicd-1.7.2.4.orig/po/ru.po 2013-03-31 17:01:29.362001288 +0000 24 + +++ wicd-1.7.2.4/po/ru.po 2013-03-31 17:43:37.909022515 +0000 25 + @@ -173,7 +173,7 @@ 26 + 27 + #: wicd/misc.py:79 28 + msgid "Connection Failed: Bad password" 29 + -msgstr "Ошибка соединения: Неверный пароль:" 30 + +msgstr "Ошибка соединения: Неверный пароль" 31 + 32 + #: wicd/misc.py:89 33 + msgid "Connection Failed: No DHCP offers received." 34 + diff -ruN wicd-1.7.2.4.orig/wicd/misc.py wicd-1.7.2.4/wicd/misc.py 35 + --- wicd-1.7.2.4.orig/wicd/misc.py 2013-03-31 17:01:29.369001288 +0000 36 + +++ wicd-1.7.2.4/wicd/misc.py 2013-03-31 17:23:56.822012593 +0000 37 + @@ -430,7 +430,9 @@ 38 + """ Sanitize property names to be used in config-files. """ 39 + allowed = string.ascii_letters + '_' + string.digits 40 + table = string.maketrans(allowed, ' ' * len(allowed)) 41 + - return s.translate(None, table) 42 + + #return s.translate(None, table) 43 + + #return s.translate(table) 44 + + return s 45 + 46 + def sanitize_escaped(s): 47 + """ Sanitize double-escaped unicode strings. """