[Lemon-commits] [lemon_svn] ladanyi: r2395 - in hugo/branches/i18n: . config gui m4 po

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:52:20 CET 2006


Author: ladanyi
Date: Thu Dec  1 07:54:38 2005
New Revision: 2395

Added:
   hugo/branches/i18n/m4/
   hugo/branches/i18n/m4/lx_check_cplex.m4
      - copied unchanged from r2390, /hugo/branches/i18n/config/lx_check_cplex.m4
   hugo/branches/i18n/m4/lx_check_glpk.m4
      - copied unchanged from r2390, /hugo/branches/i18n/config/lx_check_glpk.m4
   hugo/branches/i18n/m4/lx_enable_doc.m4
      - copied unchanged from r2390, /hugo/branches/i18n/config/lx_enable_doc.m4
   hugo/branches/i18n/m4/lx_enable_gui.m4
      - copied unchanged from r2390, /hugo/branches/i18n/config/lx_enable_gui.m4
   hugo/branches/i18n/po/
   hugo/branches/i18n/po/ChangeLog
   hugo/branches/i18n/po/LEMON.pot
   hugo/branches/i18n/po/LINGUAS
   hugo/branches/i18n/po/POTFILES.in
   hugo/branches/i18n/po/de.po
   hugo/branches/i18n/po/hu.po
Removed:
   hugo/branches/i18n/config/
Modified:
   hugo/branches/i18n/Makefile.am
   hugo/branches/i18n/bootstrap
   hugo/branches/i18n/configure.ac
   hugo/branches/i18n/gui/Makefile.am
   hugo/branches/i18n/gui/graph-displayer.cc
   hugo/branches/i18n/gui/main_win.cc

Log:
Added i18n support using intltool. Unfortunately it does not work yet.

Modified: hugo/branches/i18n/Makefile.am
==============================================================================
--- hugo/branches/i18n/Makefile.am	(original)
+++ hugo/branches/i18n/Makefile.am	Thu Dec  1 07:54:38 2005
@@ -1,13 +1,16 @@
-ACLOCAL_AMFLAGS = -I config
+ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = \
+	intltool-extract.in \
+	intltool-merge.in \
+	intltool-update.in \
 	LICENSE \
 	lemon.spec \
 	autopackage/default.apspec.in \
-	config/lx_check_cplex.m4 \
-	config/lx_check_glpk.m4 \
-	config/lx_enable_doc.m4 \
-	config/lx_enable_gui.m4
+	m4/lx_check_cplex.m4 \
+	m4/lx_check_glpk.m4 \
+	m4/lx_enable_doc.m4 \
+	m4/lx_enable_gui.m4
 
 if WANT_DOC
   MAYBE_DOC = doc
@@ -16,7 +19,7 @@
   MAYBE_GUI = gui
 endif
 
-SUBDIRS = lemon benchmark demo $(MAYBE_GUI) $(MAYBE_DOC) test
+SUBDIRS = lemon benchmark demo $(MAYBE_GUI) $(MAYBE_DOC) test po
 
 MRPROPERFILES = \
 	aclocal.m4 \
@@ -24,13 +27,19 @@
 	config.h.in~ \
 	configure \
 	Makefile.in \
-	config/depcomp \
-	config/install-sh \
-	config/config.guess \
-	config/config.sub \
-	config/ltmain.sh \
-	config/missing \
-	config/mkinstalldirs \
+	depcomp \
+	install-sh \
+	config.guess \
+	config.sub \
+	ltmain.sh \
+	missing \
+	mkinstalldirs \
+	intltool-extract \
+	intltool-extract.in \
+	intltool-merge \
+	intltool-merge.in \
+	intltool-update \
+	intltool-update.in \
 	doc/Makefile.in \
 	doc/doxygen.log \
 	Makefile.in \

Modified: hugo/branches/i18n/bootstrap
==============================================================================
--- hugo/branches/i18n/bootstrap	(original)
+++ hugo/branches/i18n/bootstrap	Thu Dec  1 07:54:38 2005
@@ -68,8 +68,10 @@
 fi
 
 set -x
-$aclocal -I config \
-&& libtoolize --force --copy \
+libtoolize --force --copy \
+&& glib-gettextize --force --copy \
+&& intltoolize --force --copy --automake \
+&& $aclocal -I m4 \
+&& $autoconf \
 && $autoheader \
-&& $automake --add-missing --copy --gnu \
-&& $autoconf
+&& $automake --add-missing --copy --gnu

Modified: hugo/branches/i18n/configure.ac
==============================================================================
--- hugo/branches/i18n/configure.ac	(original)
+++ hugo/branches/i18n/configure.ac	Thu Dec  1 07:54:38 2005
@@ -1,6 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT([LEMON], [0.5], [etik-ol at cs.elte.hu], [lemon])
-AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([1.7])
 AC_CONFIG_SRCDIR([lemon/invalid.h])
 AC_CONFIG_HEADERS([config.h lemon/config.h])
@@ -19,6 +18,14 @@
 
 AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
 
+dnl i18n
+GETTEXT_PACKAGE=$PACKAGE
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",GETTEXT_PACKAGE)
+AC_SUBST(GETTEXT_PACKAGE)
+ALL_LINGUAS="de hu"
+AM_GLIB_GNU_GETTEXT
+AC_PROG_INTLTOOL
+
 dnl Checks for libraries.
 LX_CHECK_GLPK
 LX_CHECK_CPLEX
@@ -53,6 +60,7 @@
 test/Makefile
 gui/Makefile
 gui/icons/Makefile
+po/Makefile.in
 ])
 
 AC_OUTPUT

Modified: hugo/branches/i18n/gui/Makefile.am
==============================================================================
--- hugo/branches/i18n/gui/Makefile.am	(original)
+++ hugo/branches/i18n/gui/Makefile.am	Thu Dec  1 07:54:38 2005
@@ -1,6 +1,6 @@
 SUBDIRS = icons
 
-AM_CPPFLAGS = -I$(top_srcdir)
+AM_CPPFLAGS = -I$(top_srcdir) -DLOCALEDIR=\""$(datadir)/locale"\"
 LDADD = $(top_builddir)/lemon/libemon.la
 
 

Modified: hugo/branches/i18n/gui/graph-displayer.cc
==============================================================================
--- hugo/branches/i18n/gui/graph-displayer.cc	(original)
+++ hugo/branches/i18n/gui/graph-displayer.cc	Thu Dec  1 07:54:38 2005
@@ -1,8 +1,13 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include "all_include.h"
 #include "mapstorage.h"
 #include "main_win.h"
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
+#include <locale.h>
 
 #define MAIN_PART
 
@@ -14,6 +19,9 @@
 
 int main(int argc, char *argv[])
 {
+//  setlocale (LC_ALL, "");
+  bindtextdomain (PACKAGE, LOCALEDIR);
+  textdomain (PACKAGE);
 
   //initializing
 

Modified: hugo/branches/i18n/gui/main_win.cc
==============================================================================
--- hugo/branches/i18n/gui/main_win.cc	(original)
+++ hugo/branches/i18n/gui/main_win.cc	Thu Dec  1 07:54:38 2005
@@ -1,12 +1,13 @@
 #include "main_win.h"
 #include "icons/guipixbufs.h"
+#include <glibmm/i18n.h>
 
 MainWin::MainWin()
 {
-  mapwin=new MapWin("Map Setup", mapstorage.getEdgeMapList(), mapstorage.getNodeMapList(), *this);
+  mapwin=new MapWin(_("Map Setup"), mapstorage.getEdgeMapList(), mapstorage.getNodeMapList(), *this);
   gd_canvas=new GraphDisplayerCanvas(*this);
 
-  set_title ("unsaved file - " + prog_name);
+  set_title (_("unsaved file - ") + prog_name);
   set_default_size(WIN_WIDTH,WIN_HEIGHT);
   add(vbox);
 
@@ -79,7 +80,7 @@
 
   ag=Gtk::ActionGroup::create();
 
-  ag->add( Gtk::Action::create("FileMenu", "_File") );
+  ag->add( Gtk::Action::create("FileMenu", _("_File")) );
   ag->add( Gtk::Action::create("FileNew", Gtk::Stock::NEW),
       sigc::mem_fun(*this, &MainWin::newFile));
   ag->add( Gtk::Action::create("FileOpen", Gtk::Stock::OPEN),
@@ -93,7 +94,7 @@
   ag->add( Gtk::Action::create("Quit", Gtk::Stock::QUIT),
       sigc::mem_fun(*this, &MainWin::hide));
 
-  ag->add( Gtk::Action::create("ViewMenu", "_View") );
+  ag->add( Gtk::Action::create("ViewMenu", _("_View")) );
   ag->add( Gtk::Action::create("ViewZoomIn", Gtk::Stock::ZOOM_IN),
       sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoomIn));
   ag->add( Gtk::Action::create("ViewZoomOut", Gtk::Stock::ZOOM_OUT),
@@ -103,7 +104,7 @@
   ag->add( Gtk::Action::create("ViewZoom100", Gtk::Stock::ZOOM_100),
       sigc::mem_fun(*(this->gd_canvas), &GraphDisplayerCanvas::zoom100));
   
-  ag->add( Gtk::Action::create("ShowMenu", "_Show") );
+  ag->add( Gtk::Action::create("ShowMenu", _("_Show")) );
   ag->add( Gtk::Action::create("ShowMaps", "_Maps"),
       sigc::mem_fun(*(this->mapwin), &MapWin::show));
 
@@ -220,9 +221,9 @@
 {
   if (mapstorage.modified)
   {
-    Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true,
+    Gtk::MessageDialog mdialog(_("<b>Save changes before closing?</b>"), true,
         Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
-    mdialog.add_button("Close _without Saving", Gtk::RESPONSE_REJECT);
+    mdialog.add_button(_("Close _without Saving"), Gtk::RESPONSE_REJECT);
     mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
     switch (mdialog.run())
@@ -239,16 +240,16 @@
   gd_canvas->clear();
   mapstorage.clear();
   mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
-  set_title("unsaved file - " + prog_name);
+  set_title(_("unsaved file - ") + prog_name);
 }
 
 void MainWin::openFile()
 {
   if (mapstorage.modified)
   {
-    Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true, 
+    Gtk::MessageDialog mdialog(_("<b>Save changes before closing?</b>"), true, 
         Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
-    mdialog.add_button("Close _without Saving", Gtk::RESPONSE_REJECT);
+    mdialog.add_button(_("Close _without Saving"), Gtk::RESPONSE_REJECT);
     mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
     switch (mdialog.run())
@@ -262,7 +263,7 @@
         break;
     }
   }
-  Gtk::FileChooserDialog fcdialog("Open File");
+  Gtk::FileChooserDialog fcdialog(_("Open File"));
   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   fcdialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_ACCEPT);
   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
@@ -297,7 +298,7 @@
 
 void MainWin::saveFileAs()
 {
-  Gtk::FileChooserDialog fcdialog("Save File", Gtk::FILE_CHOOSER_ACTION_SAVE);
+  Gtk::FileChooserDialog fcdialog(_("Save File"), Gtk::FILE_CHOOSER_ACTION_SAVE);
   fcdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
   fcdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
   if (fcdialog.run() == Gtk::RESPONSE_ACCEPT)
@@ -314,9 +315,9 @@
 {
   if (mapstorage.modified)
   {
-    Gtk::MessageDialog mdialog("<b>Save changes before closing?</b>", true,
+    Gtk::MessageDialog mdialog(_("<b>Save changes before closing?</b>"), true,
         Gtk::MESSAGE_WARNING, Gtk::BUTTONS_NONE);
-    mdialog.add_button("Close _without Saving", Gtk::RESPONSE_REJECT);
+    mdialog.add_button(_("Close _without Saving"), Gtk::RESPONSE_REJECT);
     mdialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
     mdialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
     switch (mdialog.run())
@@ -333,7 +334,7 @@
   gd_canvas->clear();
   mapstorage.clear();
   mapwin->update(mapstorage.getEdgeMapList(), mapstorage.getNodeMapList());
-  set_title("unsaved file - " + prog_name);
+  set_title(_("unsaved file - ") + prog_name);
 }
 
 void MainWin::propertyChange(bool itisedge, int prop, std::string mapname)

Added: hugo/branches/i18n/po/ChangeLog
==============================================================================

Added: hugo/branches/i18n/po/LEMON.pot
==============================================================================
--- (empty file)
+++ hugo/branches/i18n/po/LEMON.pot	Thu Dec  1 07:54:38 2005
@@ -0,0 +1,53 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-11-30 23:31+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../gui/main_win.cc:7
+msgid "Map Setup"
+msgstr ""
+
+#: ../gui/main_win.cc:10 ../gui/main_win.cc:243 ../gui/main_win.cc:337
+msgid "unsaved file - "
+msgstr ""
+
+#: ../gui/main_win.cc:83
+msgid "_File"
+msgstr ""
+
+#: ../gui/main_win.cc:97
+msgid "_View"
+msgstr ""
+
+#: ../gui/main_win.cc:107
+msgid "_Show"
+msgstr ""
+
+#: ../gui/main_win.cc:224 ../gui/main_win.cc:250 ../gui/main_win.cc:318
+msgid "<b>Save changes before closing?</b>"
+msgstr ""
+
+#: ../gui/main_win.cc:226 ../gui/main_win.cc:252 ../gui/main_win.cc:320
+msgid "Close _without Saving"
+msgstr ""
+
+#: ../gui/main_win.cc:266
+msgid "Open File"
+msgstr ""
+
+#: ../gui/main_win.cc:301
+msgid "Save File"
+msgstr ""

Added: hugo/branches/i18n/po/LINGUAS
==============================================================================
--- (empty file)
+++ hugo/branches/i18n/po/LINGUAS	Thu Dec  1 07:54:38 2005
@@ -0,0 +1 @@
+de hu

Added: hugo/branches/i18n/po/POTFILES.in
==============================================================================
--- (empty file)
+++ hugo/branches/i18n/po/POTFILES.in	Thu Dec  1 07:54:38 2005
@@ -0,0 +1,20 @@
+gui/gdc-broken_edge.cc
+gui/graph_displayer_canvas.cc
+gui/graph_displayer_canvas-edge.cc
+gui/graph_displayer_canvas-event.cc
+gui/graph_displayer_canvas-node.cc
+gui/graph_displayer_canvas-zoom.cc
+gui/graph-displayer.cc
+gui/main_win.cc
+gui/mapstorage.cc
+gui/map_win.cc
+gui/mw-mapselector.cc
+gui/new_map_win.cc
+gui/all_include.h
+gui/graph_displayer_canvas.h
+gui/main_win.h
+gui/mapstorage.h
+gui/map_win.h
+gui/new_map_win.h
+gui/xml.h
+gui/xymap.h

Added: hugo/branches/i18n/po/de.po
==============================================================================
--- (empty file)
+++ hugo/branches/i18n/po/de.po	Thu Dec  1 07:54:38 2005
@@ -0,0 +1,53 @@
+# German translations for LEMON package.
+# Copyright (C) 2005 THE LEMON'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the LEMON package.
+# Ladanyi Akos <ladanyi at tmit.bme.hu>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: LEMON 0.5\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-11-30 23:31+0100\n"
+"PO-Revision-Date: 2005-11-30 14:26+0100\n"
+"Last-Translator: Ladanyi Akos <ladanyi at tmit.bme.hu>\n"
+"Language-Team: German <translation-team-de at lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ASCII\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../gui/main_win.cc:7
+msgid "Map Setup"
+msgstr ""
+
+#: ../gui/main_win.cc:10 ../gui/main_win.cc:243 ../gui/main_win.cc:337
+msgid "unsaved file - "
+msgstr ""
+
+#: ../gui/main_win.cc:83
+msgid "_File"
+msgstr ""
+
+#: ../gui/main_win.cc:97
+msgid "_View"
+msgstr ""
+
+#: ../gui/main_win.cc:107
+msgid "_Show"
+msgstr ""
+
+#: ../gui/main_win.cc:224 ../gui/main_win.cc:250 ../gui/main_win.cc:318
+msgid "<b>Save changes before closing?</b>"
+msgstr ""
+
+#: ../gui/main_win.cc:226 ../gui/main_win.cc:252 ../gui/main_win.cc:320
+msgid "Close _without Saving"
+msgstr ""
+
+#: ../gui/main_win.cc:266
+msgid "Open File"
+msgstr ""
+
+#: ../gui/main_win.cc:301
+msgid "Save File"
+msgstr ""

Added: hugo/branches/i18n/po/hu.po
==============================================================================
--- (empty file)
+++ hugo/branches/i18n/po/hu.po	Thu Dec  1 07:54:38 2005
@@ -0,0 +1,53 @@
+# Hungarian translations for LEMON package.
+# Copyright (C) 2005 THE LEMON'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the LEMON package.
+# Ladanyi Akos <ladanyi at tmit.bme.hu>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: LEMON 0.5\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-11-30 23:31+0100\n"
+"PO-Revision-Date: 2005-11-30 11:31+0100\n"
+"Last-Translator: Ladanyi Akos <ladanyi at tmit.bme.hu>\n"
+"Language-Team: Hungarian <translation-team-hu at 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=1; plural=0;\n"
+
+#: ../gui/main_win.cc:7
+msgid "Map Setup"
+msgstr "Map beállítások"
+
+#: ../gui/main_win.cc:10 ../gui/main_win.cc:243 ../gui/main_win.cc:337
+msgid "unsaved file - "
+msgstr "nem mentett fájl"
+
+#: ../gui/main_win.cc:83
+msgid "_File"
+msgstr "_Fájl"
+
+#: ../gui/main_win.cc:97
+msgid "_View"
+msgstr "_Nézet"
+
+#: ../gui/main_win.cc:107
+msgid "_Show"
+msgstr ""
+
+#: ../gui/main_win.cc:224 ../gui/main_win.cc:250 ../gui/main_win.cc:318
+msgid "<b>Save changes before closing?</b>"
+msgstr "<b>Menti a változásokat mielőtt bezárja?</b>"
+
+#: ../gui/main_win.cc:226 ../gui/main_win.cc:252 ../gui/main_win.cc:320
+msgid "Close _without Saving"
+msgstr "Bezárás mentés _nékül"
+
+#: ../gui/main_win.cc:266
+msgid "Open File"
+msgstr "Fájl megnyitása"
+
+#: ../gui/main_win.cc:301
+msgid "Save File"
+msgstr "Fájl mentése"



More information about the Lemon-commits mailing list