passepartout r1533 - in trunk: . po src/pptout
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: passepartout r1533 - in trunk: . po src/pptout
- Date: Wed, 8 Apr 2009 19:25:05 +0000 (UTC)
Author: herzi
Date: Wed Apr 8 19:25:04 2009
New Revision: 1533
URL: http://svn.gnome.org/viewvc/passepartout?rev=1533&view=rev
Log:
started translatability
* autogen.sh: fixed support for srcdir!=builddir invocations
* configure.ac: added intltool and glib-gettext dependencies; depend on glibmm
2.16 for Glib::ustring::compose()
* Makefile.am: added passepartout.desktop to the installed files
* passepartout.desktop -> passepartout.desktop.in: renamed and changed for
translatability
* po/LINGUAS: added a list of German and Swedish
* po/POTFILES.in: added some files to be translated
* po/de.po: initial German translation
* po/sv.po: initial Swedish translation (with the one message from the .desktop
file)
* src/pptout/main.cc: made the help messages translatable
Added:
trunk/passepartout.desktop.in
- copied, changed from r1532, /trunk/passepartout.desktop
trunk/po/
trunk/po/LINGUAS
trunk/po/POTFILES.in
trunk/po/de.po
trunk/po/sv.po
Removed:
trunk/passepartout.desktop
Modified:
trunk/Makefile.am
trunk/autogen.sh
trunk/configure.ac
trunk/src/pptout/main.cc
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Wed Apr 8 19:25:04 2009
@@ -1,3 +1,13 @@
-SUBDIRS = src doc logotype
+SUBDIRS=\
+ src \
+ doc \
+ logotype \
+ po \
+ $(NULL)
-EXTRA_DIST = BUGS Doxyfile
+dist_applications_in_files=passepartout.desktop.in
+applications_DATA=$(dist_applications_in_files:.in=)
+applicationsdir=$(datarootdir)/applications
+ INTLTOOL_DESKTOP_RULE@
+
+EXTRA_DIST = Doxyfile
Modified: trunk/autogen.sh
==============================================================================
--- trunk/autogen.sh (original)
+++ trunk/autogen.sh Wed Apr 8 19:25:04 2009
@@ -35,4 +35,4 @@
NOCONFIGURE="yes" GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 . $gnome_autogen
-$srcdir/configure --enable-maintainer-mode `/bin/grep ^DISTCHECK configure.ac | sed 's/^DISTCHECK_CONFIGURE_FLAGS="\(.*\)"$/\1/'` $@
+$srcdir/configure --enable-maintainer-mode `/bin/grep ^DISTCHECK "$srcdir/configure.ac" | sed 's/^DISTCHECK_CONFIGURE_FLAGS="\(.*\)"$/\1/'` $@
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Apr 8 19:25:04 2009
@@ -35,7 +35,7 @@
AC_SUBST([GTKMM_LIBS])
AC_SUBST([GTKMM_CFLAGS])
-PKG_CHECK_MODULES(GTKMM, gtkmm-2.4)
+PKG_CHECK_MODULES(GTKMM,[glibmm-2.4 >= 2.16 gtkmm-2.4])
AC_APPLY_RPATH([GTKMM_LIBS])
AC_SUBST([GNOMECANVAS_LIBS])
@@ -87,6 +87,31 @@
AC_FUNC_STAT
AC_CHECK_FUNCS([realpath strdup mkdtemp])
+dnl ------
+dnl | i18n |
+dnl ------
+
+IT_PROG_INTLTOOL
+AM_GLIB_GNU_GETTEXT
+
+GETTEXT_PACKAGE="passepartout"
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"${GETTEXT_PACKAGE}",[the package name for gettext])
+AC_SUBST(GETTEXT_PACKAGE)
+
+if test "x${prefix}" = "xNONE"; then
+ PACKAGE_LOCALE_DIR="${ac_default_prefix}"
+else
+ PACKAGE_LOCALE_DIR="${prefix}"
+fi
+PACKAGE_LOCALE_DIR="${PACKAGE_LOCALE_DIR}/${DATADIRNAME}/locale"
+AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"${PACKAGE_LOCALE_DIR}",[the package's locale path for gettext])
+
+AC_CONFIG_FILES([po/Makefile.in po/POTFILES])
+
+dnl --------
+dnl | output |
+dnl --------
+
AC_CONFIG_FILES([Makefile
src/Makefile
src/ps/Makefile
Copied: trunk/passepartout.desktop.in (from r1532, /trunk/passepartout.desktop)
==============================================================================
--- /trunk/passepartout.desktop (original)
+++ trunk/passepartout.desktop.in Wed Apr 8 19:25:04 2009
@@ -1,7 +1,7 @@
[Desktop Entry]
-Name=Passepartout
-Comment=Desktop publishing application
-Comment[sv]=Layoutprogram
+_Name=Passepartout
+_GenericName=Desktop publishing application
+_Comment=Desktop publishing application
Icon=pptout-icon.png
Exec=passepartout
Terminal=false
Added: trunk/po/LINGUAS
==============================================================================
--- (empty file)
+++ trunk/po/LINGUAS Wed Apr 8 19:25:04 2009
@@ -0,0 +1,3 @@
+# keep the alphabetically sorted, please
+de
+sv
Added: trunk/po/POTFILES.in
==============================================================================
--- (empty file)
+++ trunk/po/POTFILES.in Wed Apr 8 19:25:04 2009
@@ -0,0 +1,2 @@
+passepartout.desktop.in
+src/pptout/main.cc
Modified: trunk/src/pptout/main.cc
==============================================================================
--- trunk/src/pptout/main.cc (original)
+++ trunk/src/pptout/main.cc Wed Apr 8 19:25:04 2009
@@ -15,6 +15,8 @@
#include "icons/icon_48.h"
#include "stockitems.h"
+#include <glib/gi18n.h>
+
int main(int argc, char *argv[]) {
try {
init_exception_handler();
@@ -23,6 +25,13 @@
// set prefix for temp files
Tempfile::set_prefix("pptout");
+#ifdef ENABLE_NLS
+ /* initialize i18n */
+ bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+#endif
+
// initialize threads
Glib::thread_init();
@@ -46,17 +55,17 @@
const int o_version =
cmdline.add_option(CmdLine::Option('v', "version",
CmdLine::Option::NO_PARAM,
- "Show version number"));
+ _("Show version number")));
const int o_verbose =
cmdline.add_option(CmdLine::Option('V', "", CmdLine::Option::NO_PARAM,
- "Be verbose"));
+ _("Be verbose")));
const int o_debug =
cmdline.add_option(CmdLine::Option('d', "", CmdLine::Option::NO_PARAM,
- "Show debugging messages"));
+ _("Show debugging messages")));
const int o_help =
cmdline.add_option(CmdLine::Option('h', "help",
CmdLine::Option::NO_PARAM,
- "Show this help message"));
+ _("Show this help message")));
CmdLine::ParsedOptions opts = cmdline.parse();
for(CmdLine::ParsedOptions::const_iterator
arg = opts.begin(); arg != opts.end(); arg++) {
@@ -81,7 +90,7 @@
debug.active = true;
debug << "Debug mode active" << std::endl; // Why wait?
} else if(option == o_help) {
- std::cout << "Usage: passepartout [options] [files...]" << std::endl;
+ std::cout << _("Usage: passepartout [options] [files...]") << std::endl;
cmdline.print_usage(std::cout);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]