From cbc51338246924b5b2fbc24633dcdf38860925c1 Mon Sep 17 00:00:00 2001 From: Stas Shtin Date: Sun, 11 Apr 2010 14:54:59 +0400 Subject: [PATCH] Translations ready for pootle --- ipypbx.pro | 2 +- src/ipypbx/locale/ipypbx_fi.qm | Bin 23 -> 16 bytes src/ipypbx/locale/ipypbx_fi.ts | 151 +++++++++++++++------------------------- src/ipypbx/locale/ipypbx_ru.qm | Bin 34 -> 2762 bytes src/ipypbx/locale/ipypbx_ru.ts | 95 +++++++++++++++---------- src/ipypbx/main.py | 13 ++-- 6 files changed, 125 insertions(+), 136 deletions(-) diff --git a/ipypbx.pro b/ipypbx.pro index f529326..1c5883d 100644 --- a/ipypbx.pro +++ b/ipypbx.pro @@ -1,3 +1,3 @@ -SOURCES = ui/layout.ui +SOURCES = src/ipypbx/ui.py TRANSLATIONS = src/ipypbx/locale/ipypbx_ru.ts src/ipypbx/locale/ipypbx_fi.ts diff --git a/src/ipypbx/locale/ipypbx_fi.qm b/src/ipypbx/locale/ipypbx_fi.qm index 9dad8dffceb9623e88f8b96d9cd0caf25574c6fa..be651eede2edc9cb0da5c140b31664afee169fa8 100644 GIT binary patch literal 16 YcmcE7ks@*G{hX<16=n7(EZln+07b?KzW@LL literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ diff --git a/src/ipypbx/locale/ipypbx_fi.ts b/src/ipypbx/locale/ipypbx_fi.ts index 2ee1791..35c37a5 100644 --- a/src/ipypbx/locale/ipypbx_fi.ts +++ b/src/ipypbx/locale/ipypbx_fi.ts @@ -1,219 +1,184 @@ - - + MainWindow - + IPyPBX - - Connections - - - - - - + Name - - Port + + Local Port - - IP address + + Freeswitch Port - - Freeswitch Port + + Local IP address - + Freeswitch IP Address - - - - - + Add - - - - - + Save - - Clone - - - - - Connect - - - - - SIP Profiles + + Connections - + External RTP IP - + External SIP IP - + RTP IP - + SIP IP - + SIP Port - + Accept Blind Registration - - + Authenticate Calls - - - - - + Is Active - - XML Dialplan - - - - - Destination Match - - - - - Endpoint - - - - - Domains + + SIP Profiles - + Host Name - - + SIP Profile - - Gateways + + Domains - + Username - - + Password - + Realm - + From Domain - + Expire In Seconds - + Retry In Seconds - + Caller ID In "From" Field - - - PushButton + + Gateways + + + + + User ID - + + Domain + + + + Endpoints - - User ID + + XML Dialplan - - - Domain + + Destination Match + + + + + Endpoint - + Extensions diff --git a/src/ipypbx/locale/ipypbx_ru.qm b/src/ipypbx/locale/ipypbx_ru.qm index 7431612d305d32f7404f1d82edd26b5eedc232b5..bf6a6440ab8c1e845b08ff9e27f259bf2a0fa9f9 100644 GIT binary patch literal 2762 zcmb_eO-K|`9RII7U%RuqngtpiUQ&_tb+Qlevg`V>rM2xQ2^BQVzH(~z%`!8#E`mgK z=oB3?I(RWUg@>|GBdUXVFz8f=A`D5vprA+sJDB}vr4J}U-o!9G-n`%M_x|tw-v9rm zaXee|?9<@D^Ua%{o*sHU9R~;yfY#dpkOr}>0YHj_cykg!>4VVw41in@2Tx!tj>6H8 z-H5lKYkU{tJ_IghW&z3`m052d00`TJJ{UlpD~#^@j<|=y*vacSzF(N1>&5R4!na!$ zh+|@L%M9{|#eT1qZEkQ* zs_84nw-~0OPV6s)M{c|Y2pv%Mi`6*qqUx$IQRlVVGqr&87uA^|@B5C(sYBQgijl#@ zW#o^SZ!dp>IH;(bzmNUB6{Xqn7gfNhQKZ++L;aeNi zb((ic+%#C0r0H41ac#{tEGFYoWi!rKud&3=7Rf0OM!AcuUIy6`B=3SqZuySY) zFI`@tb1y_`X4$-DFqb!g&`$yG5UQGc^M*}5doxtGSe9EU+}!I@=J+u->Pgs4GfDbb ziX>CK+wxl{lk}srp~a@uDHwRdFdBk6X;X)LgQ9<^r7WA>ez64O*ObG)Wirm1Te|3k5n{3W*H(O2_pEjPYe60of^hRJ>Y zB7bOb=b@0%_%lH6bV`>yubqm=XFh5`q^qNyBn-{Wo7!Ku@D==bDz6GG)vL?v%Y>z! G;p!j8bG(QE literal 34 qcmcE7ks@*G{hX<16=n7(EZlpygMop8SCH|qCij04CYHZCT*3edkqq_# diff --git a/src/ipypbx/locale/ipypbx_ru.ts b/src/ipypbx/locale/ipypbx_ru.ts index 4c049b8..35c37a5 100644 --- a/src/ipypbx/locale/ipypbx_ru.ts +++ b/src/ipypbx/locale/ipypbx_ru.ts @@ -1,163 +1,186 @@ - - + MainWindow - Connections + + IPyPBX + Name - Port + + Local Port - IP address + + Freeswitch Port - Freeswitch Port + + Local IP address + Freeswitch IP Address + Add + Save - SIP Profiles - - - - Domains - - - - PushButton - - - - Endpoints - - - - Extensions - - - - IPyPBX - - - - Clone - - - - Connect + + Connections + External RTP IP + External SIP IP + RTP IP + SIP IP + SIP Port + Accept Blind Registration + Authenticate Calls + Is Active + + SIP Profiles + + + + Host Name + SIP Profile - Gateways + + Domains + Username + Password + Realm + From Domain + Expire In Seconds + Retry In Seconds + Caller ID In "From" Field + + Gateways + + + + User ID + Domain + + Endpoints + + + + XML Dialplan + Destination Match + Endpoint + + + Extensions + + diff --git a/src/ipypbx/main.py b/src/ipypbx/main.py index 2453783..aeb2478 100644 --- a/src/ipypbx/main.py +++ b/src/ipypbx/main.py @@ -22,7 +22,6 @@ from PyQt4 import QtCore, QtGui, QtSql # Working directory path. -# NOTE: ~/.ipypbx gives an error - for some reason QT doesn't like the dot? PREFIX = os.path.expanduser('~/.ipypbx') # Database file name. @@ -65,21 +64,23 @@ def setupDb(prefix=PREFIX, dbname=DB_NAME): sys.exit(1) -def localize(): +if __name__ == '__main__': + app = QtGui.QApplication(sys.argv) + locale = QtCore.QLocale.system().name() translator = QtCore.QTranslator() +# if translator.load("/home/antisvin/dev/git/ipypbx/src/ipypbx/locale/ipypbx_ru.qm"): if translator.load("ipypbx_%s" % locale.toLower(), "ipypbx/locale"): QtGui.QApplication.installTranslator(translator) + else: + print locale + print translator.translate('MainWindow', 'Name').toUtf8() - -if __name__ == '__main__': - app = QtGui.QApplication(sys.argv) setupDb() main = QtGui.QMainWindow() views = ui.Ui_MainWindow() views.setupUi(main) - localize() main.show() for controllerClass in ( -- 1.7.9.5