i18n
- gettext support added in frontends - first draft of frontends french translation
This commit is contained in:
parent
4a293cdaa1
commit
e3ebafd8f3
1 changed files with 1701 additions and 196 deletions
|
|
@ -20,6 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
"""
|
||||
|
||||
|
||||
from quick_frontend.quick_app import QuickApp
|
||||
from quick_frontend.quick_chat_list import QuickChatList
|
||||
from quick_frontend.quick_contact_list import QuickContactList
|
||||
from quick_frontend.quick_contact_management import QuickContactManagement
|
||||
import curses
|
||||
import pdb
|
||||
from window import Window
|
||||
|
|
@ -40,10 +44,6 @@ import fcntl
|
|||
import struct
|
||||
import termios
|
||||
from boxsizer import BoxSizer
|
||||
from quick_frontend.quick_chat_list import QuickChatList
|
||||
from quick_frontend.quick_contact_list import QuickContactList
|
||||
from quick_frontend.quick_app import QuickApp
|
||||
from quick_frontend.quick_contact_management import QuickContactManagement
|
||||
|
||||
|
||||
### logging configuration FIXME: put this elsewhere ###
|
||||
|
|
@ -86,7 +86,7 @@ class ContactList(Window, QuickContactList):
|
|||
self.host = host
|
||||
self.jid_list = []
|
||||
self.__index=0 #indicate which contact is selected (ie: where we are)
|
||||
Window.__init__(self, stdscr, stdscr.getmaxyx()[0]-2,const_CONTACT_WIDTH,0,0, True, "Contact List", code=code)
|
||||
Window.__init__(self, stdscr, stdscr.getmaxyx()[0]-2,const_CONTACT_WIDTH,0,0, True, _("Contact List"), code=code)
|
||||
|
||||
def resize(self, height, width, y, x):
|
||||
Window.resize(self, height, width, y, x)
|
||||
|
|
@ -238,22 +238,22 @@ class SortilegeApp(QuickApp):
|
|||
|
||||
def color(self, activate=True):
|
||||
if activate:
|
||||
debug ("Activation des couleurs")
|
||||
debug (_("Activating colors"))
|
||||
curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_BLACK)
|
||||
curses.init_pair(2, curses.COLOR_RED, curses.COLOR_BLACK)
|
||||
else:
|
||||
debug ("Desactivation des couleurs")
|
||||
debug (_("Deactivating colors"))
|
||||
curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK)
|
||||
curses.init_pair(2, curses.COLOR_WHITE, curses.COLOR_BLACK)
|
||||
|
||||
|
||||
def showChat(self, chat):
|
||||
debug ("show chat")
|
||||
debug (_("show chat"))
|
||||
if self.currentChat:
|
||||
debug ("hiding %s", self.currentChat)
|
||||
debug (_("hiding %s"), self.currentChat)
|
||||
self.chat_wins[self.currentChat].hide()
|
||||
self.currentChat=chat
|
||||
debug ("showing %s", self.currentChat)
|
||||
debug (_("showing %s"), self.currentChat)
|
||||
self.chat_wins[self.currentChat].show()
|
||||
self.chat_wins[self.currentChat].update()
|
||||
|
||||
|
|
@ -263,7 +263,7 @@ class SortilegeApp(QuickApp):
|
|||
def onContactChoosed(self, jid_txt):
|
||||
"""Called when a contact is selected in contact list."""
|
||||
jid=JID(jid_txt)
|
||||
debug ("contact choosed: %s", jid)
|
||||
debug (_("contact choosed: %s"), jid)
|
||||
self.showChat(jid.short)
|
||||
self.statusBar.remove_item(jid.short)
|
||||
if len(self.statusBar)==0:
|
||||
|
|
@ -288,11 +288,11 @@ class SortilegeApp(QuickApp):
|
|||
|
||||
def askConfirmation(self, type, id, data):
|
||||
#FIXME
|
||||
info ("FIXME: askConfirmation not implemented")
|
||||
info (_("FIXME: askConfirmation not implemented"))
|
||||
|
||||
def actionResult(self, type, id, data):
|
||||
#FIXME
|
||||
info ("FIXME: actionResult not implemented")
|
||||
info (_("FIXME: actionResult not implemented"))
|
||||
|
||||
def newMessage(self, from_jid, msg, type, to_jid, profile):
|
||||
QuickApp.newMessage(self, from_jid, msg, type, to_jid, profile)
|
||||
|
|
@ -367,7 +367,7 @@ class SortilegeApp(QuickApp):
|
|||
stdscr.erase()
|
||||
height, width = stdscr.getmaxyx()
|
||||
if height<5 and width<35:
|
||||
stdscr.addstr("Pleeeeasse, I can't even breathe !")
|
||||
stdscr.addstr(_("Pleeeeasse, I can't even breathe !"))
|
||||
else:
|
||||
for win in self.listWins:
|
||||
win.resizeAdapt()
|
||||
|
|
|
|||
Loading…
Reference in a new issue