All pastes #393305 Raw Edit

Mine

public text v1 · immutable
·published 2007-03-13 13:18 UTC
rendered paste body
#! /usr/bin/env python

import sys
import gtk
import gnomeapplet
import locale
import gettext
locale.setlocale(locale.LC_ALL, '')
gettext.bindtextdomain("test", "./locale")
gettext.bind_textdomain_codeset("test","UTF-8")
gettext.textdomain("test")

_ = gettext.gettext

def sample_factory(applet, iid):
    eventbox = gtk.EventBox()
    applet.add(eventbox)
    label = gtk.Label(_("Test"))
    eventbox.add(label)
    applet.setup_menu_from_file(".",
        "Test.xml",
        "Test",
        [("About", on_about)])

    applet.show_all()
    return True

def on_about(a,b):
    pass

main_window = gtk.Window(gtk.WINDOW_TOPLEVEL)
main_window.set_title("Python Applet")
main_window.connect("destroy", gtk.main_quit)
app = gnomeapplet.Applet()
sample_factory(app, None)
app.reparent(main_window)
main_window.show_all()
gtk.main()
sys.exit()











# German translations for PACKAGE package.
# Copyright (C) 2007 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# gber <gber@hal>, 2007.
#
msgid ""
msgstr ""
"Project-Id-Version: test 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-03-13 13:36+0100\n"
"PO-Revision-Date: 2007-03-13 13:36+0100\n"
"Last-Translator: gber <gber@hal>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: ../Test.xml.h:1
msgid "_About"
msgstr "_Info"

#: ../test.py:19
msgid "Test"
msgstr "Test Deutsch"


<Root>
  <popups>
    <popup name="button3">
      <menuitem name="About" verb="About" _label="_About" pixtype="stock" pixname="gnome-stock-about"/>
    </popup>
  </popups>
</Root>