Mercurial > libervia-backend
diff frontends/sortilege/sortilege @ 70:8f2ed279784b
i18n
- gettext support added in frontends
- first draft of frontends french translation
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 05 Mar 2010 20:33:10 +1100 |
parents | 0e50dd3a234a |
children | 6c927140ba82 |
line wrap: on
line diff
--- a/frontends/sortilege/sortilege Wed Mar 03 17:12:23 2010 +1100 +++ b/frontends/sortilege/sortilege Fri Mar 05 20:33:10 2010 +1100 @@ -20,6 +20,10 @@ """ +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 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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()