Translation support

This commit is contained in:
Marco Pesenti Gritti 2006-07-05 17:00:11 +02:00
parent 47524d177a
commit 1eba377add
4 changed files with 30 additions and 3 deletions

12
.gitignore vendored
View File

@ -19,4 +19,16 @@ missing
py-compile
stamp-h1
intltool-extract
intltool-extract.in
intltool-merge
intltool-merge.in
intltool-update
intltool-update.in
mkinstalldirs
po/Makefile.in.in
po/POTFILES
po/stamp-it
po/sugar.pot
sugar/__installed__.py

View File

@ -11,6 +11,16 @@ AM_MAINTAINER_MODE
AM_PATH_PYTHON
#
# Setup GETTEXT
#
ALL_LINGUAS="it"
GETTEXT_PACKAGE=sugar
AC_PROG_INTLTOOL([0.33])
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
activities/Makefile
@ -27,4 +37,5 @@ sugar/chat/sketchpad/Makefile
sugar/p2p/Makefile
sugar/p2p/model/Makefile
sugar/presence/Makefile
po/Makefile.in
])

View File

@ -8,6 +8,8 @@ from sugar.presence.PresenceService import PresenceService
from sugar.presence.Service import Service
from sugar.chat.BuddyChat import BuddyChat
from gettext import gettext as _
class PresenceWindow(gtk.Window):
_MODEL_COL_NICK = 0
_MODEL_COL_ICON = 1
@ -57,7 +59,7 @@ class PresenceWindow(gtk.Window):
vbox = gtk.VBox(False, 6)
vbox.set_border_width(12)
label = gtk.Label("Who's around:")
label = gtk.Label(_("Who's around:"))
label.set_alignment(0.0, 0.5)
vbox.pack_start(label, False)
label.show()
@ -99,7 +101,7 @@ class PresenceWindow(gtk.Window):
button_box = gtk.HButtonBox()
self._share_button = gtk.Button('Share')
self._share_button = gtk.Button(_('Share'))
self._share_button.connect('clicked', self._share_button_clicked_cb)
button_box.pack_start(self._share_button)
self._share_button.show()

View File

@ -11,6 +11,8 @@ import socket
from google import google
from sugar.presence.PresenceService import PresenceService
from gettext import gettext as _
_BROWSER_ACTIVITY_TYPE = "_web_olpc._udp"
_COLUMN_TITLE = 0
@ -196,7 +198,7 @@ class StartPage(gtk.HBox):
search_box.pack_start(self._search_entry)
self._search_entry.show()
search_button = gtk.Button("Search")
search_button = gtk.Button(_("Search"))
search_button.connect('clicked', self._search_button_clicked_cb)
search_box.pack_start(search_button, False)
search_button.show()