SF.net SVN: geany-plugins:[462] trunk/geany-mini-script

prublot at users.sourceforge.net prublot at xxxxx
Sun Feb 8 14:24:34 UTC 2009


Revision: 462
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=462&view=rev
Author:   prublot
Date:     2009-02-08 14:24:34 +0000 (Sun, 08 Feb 2009)

Log Message:
-----------
 patch of Enrico Tr?\195?\182ger about the localization, the German translation, ....

Modified Paths:
--------------
    trunk/geany-mini-script/configure.in
    trunk/geany-mini-script/po/de.po
    trunk/geany-mini-script/po/en.po
    trunk/geany-mini-script/po/fr.po
    trunk/geany-mini-script/src/Makefile.am
    trunk/geany-mini-script/src/gms.c
    trunk/geany-mini-script/src/gms_gui.c

Modified: trunk/geany-mini-script/configure.in
===================================================================
--- trunk/geany-mini-script/configure.in	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/configure.in	2009-02-08 14:24:34 UTC (rev 462)
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([gms], [0.3], [burlot.p ascal at wanadoo.fr])
-dnl AC_CONFIG_SRCDIR([src/gms.c  srcgms_gui.c])
+AC_INIT([geany-mini-script], [0.3], [burlot.p ascal at wanadoo.fr])
+dnl AC_CONFIG_SRCDIR([src/gms.c  src/gms_gui.c])
 
 AM_INIT_AUTOMAKE([1.9 foreign])
 
@@ -27,7 +27,7 @@
 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
 
 # i18n
-GETTEXT_PACKAGE=gms
+GETTEXT_PACKAGE=geany-mini-script
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
 

Modified: trunk/geany-mini-script/po/de.po
===================================================================
--- trunk/geany-mini-script/po/de.po	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/po/de.po	2009-02-08 14:24:34 UTC (rev 462)
@@ -1,27 +1,29 @@
-# 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.
+# German translation of the geany-mini-script package.
+# Copyright (C) 2009 Pascal BURLOT
+# This file is distributed under the same license as the geany-mini-script package.
+# Enrico Tröger <enrico.troeger at uvena.de>, 2009.
 #
+
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: geany-mini-script 0.3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-02-07 18:59+0100\n"
 "PO-Revision-Date: 2009-02-07 19:01+0100\n"
-"Last-Translator: Burlot Pascal <prublot(at)users(dot)sourceforge(dot)net>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Last-Translator: Enrico Tröger <enrico.troeger at uvena.de>\n"
+"Language-Team: German <geany-i18n at uvena.de>\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"
 
 #: ../src/gms_gui.c:259
 msgid "Load Mini-Script File"
-msgstr "Laden des mini Skriptes"
+msgstr "Mini-Skript laden"
 
 #: ../src/gms_gui.c:317
 msgid "Save Mini-Script File"
-msgstr "Schutz des mini Skriptes "
+msgstr "Mini-Skript speichern"
 
 #: ../src/gms_gui.c:362
 msgid ""
@@ -48,23 +50,23 @@
 "Software Foundation; either version 2 of the License,\n"
 "or (at your option) any later version."
 msgstr ""
-"<b>GMS: Geany Minihandschrift-Filter Steck<b>\n"
-"Dies Steck  ist Werkzeuge, um einen Handschrift-Filter auf anzuwenden:\n"
+"<b>GMS: Geany Mini-Skript Filter Plugin</b>\n"
+"Mit diesem Plugin können Sie Filter auf:\n"
 "   o die Text-Auswahl, \n"
 "   o das gegenwärtige Dokument, \n"
-"   o alle Dokumente der gegenwärtigen Sitzung.\n"
-"\n"
-"Der Filtertyp kann sein:\n"
-"   o Unix schält Handschrift, \n"
-"   o perl Handschrift, \n"
-"   o Python-Handschrift, \n"
+"   o alle Dokumente der gegenwärtigen Sitzung\n"
+"anwenden.\n\n"
+"Der Filtertyp kann ein:\n"
+"   o Unix Shell-Skript, \n"
+"   o Perl Skript, \n"
+"   o Python Skript, \n"
 "   o sed Befehle, \n"
-"   o awk Handschrift.\n"
+"   o awk Skript\n"
+"sein.\n\n"
+"<b>AUTHOR </b>\n"
+"          Geschrieben von Pascal BURLOT (Dezember 2008)\n"
 "\n"
-"<b>AUTOR <b>\n"
-"          Geschrieben durch Pascal BURLOT (Dezember 2008)\n"
-"\n"
-"<b>LIZENZ:<b>\n"
+"<b>LIZENZ:</b>\n"
 "This program is free software; you can redistribute \n"
 "it and/or modify it under the terms of the GNU  \n"
 "General Public License as published by the Free \n"
@@ -73,37 +75,37 @@
 
 #: ../src/gms_gui.c:452
 msgid "Mini-Script Filter"
-msgstr "Filter mini Skript"
+msgstr "Mini-Skript Filter"
 
 #: ../src/gms_gui.c:480
 msgid "Clear the mini-script window"
-msgstr "Klären Sie das Minihandschrift-Fenster"
+msgstr "Leert das Skript-Fenster"
 
 #: ../src/gms_gui.c:485
 msgid "Load a mini-script into this window"
-msgstr "Laden Sie eine Minihandschrift in dieses Fenster"
+msgstr "Lädt eine Datei in das Skript-Fenster"
 
 #: ../src/gms_gui.c:490
 msgid "Save the mini-script into a file"
-msgstr "Sparen(Retten) Sie die Minihandschrift in eine Datei"
+msgstr "Speichert das Skript ab"
 
 #: ../src/gms_gui.c:495
 msgid "Display a information about the mini-script plugin"
-msgstr "Zeigen Sie eine Information über die Steck- Minihandschrift"
+msgstr "Zeigt Informationen über das Plugin"
 
 #: ../src/gms_gui.c:503
 msgid "select the mini-script type"
-msgstr "wählen Sie den Minihandschrift-Typ aus"
+msgstr "Wählen Sie den Skript-Typ aus"
 
 #. Hbox : Radio bouttons for choosing the input:
 #. selection/current document/all documents of the current session
 #: ../src/gms_gui.c:534
 msgid "filter input"
-msgstr "Eingangsfilter "
+msgstr "Eingabedaten für den Filter"
 
 #: ../src/gms_gui.c:536
 msgid "select the input of mini-script filter"
-msgstr "wählen Sie den Eingang des Minihandschrift-Filters aus"
+msgstr "Wählen Sie die Eingabedaten des Filters aus"
 
 #: ../src/gms_gui.c:542
 msgid "selection"
@@ -111,49 +113,49 @@
 
 #: ../src/gms_gui.c:543
 msgid "document"
-msgstr "dokument"
+msgstr "Dokument"
 
 #: ../src/gms_gui.c:544
 msgid "session"
-msgstr "session"
+msgstr "Sitzung"
 
 #. Hbox : Radio bouttons for choosing the output:
 #. current document/ or new document
 #: ../src/gms_gui.c:553
 msgid "filter output"
-msgstr " filtrede herausgenommen"
+msgstr "Filterausgabe"
 
 #: ../src/gms_gui.c:555
 msgid "select the output of mini-script filter"
-msgstr "wählen Sie die Produktion(Output) des Minihandschrift-Filters aus"
+msgstr "Wählen Sie die Ausgabe des Filters aus"
 
 #: ../src/gms_gui.c:561
 msgid "Current Doc."
-msgstr " übliche Dok."
+msgstr "Aktuelles Dokument"
 
 #: ../src/gms_gui.c:562
 msgid "New Doc."
-msgstr "neues Dok."
+msgstr "Neues Dokument"
 
 #: ../src/gms_gui.c:788
 msgid "script configuration"
-msgstr "Gestalt des Skriptes "
+msgstr "Skriptkonfiguration"
 
 #. All plugins must set name, description, version and author.
 #: ../src/gms.c:73
 msgid "geany mini-script"
-msgstr "Ein kleines Skript für geany "
+msgstr "Geany Mini-Skript"
 
 #: ../src/gms.c:73
 msgid "GMS (Geany Mini-Script filter plugin)"
-msgstr "GMS (Geany Steck- Minihandschrift-Filter )"
+msgstr "GMS (Geany Mini-Skript-Filter)"
 
 #: ../src/gms.c:74
 msgid "Pascal BURLOT, a Geany user"
-msgstr "Pascal BURLOT, der Benutzer von Geany "
+msgstr "Pascal BURLOT, ein Geany-Benutzer"
 
 #. Add an item to the Tools menu
 #: ../src/gms.c:261
 msgid "_Mini-Script"
-msgstr "_Mini-Script"
+msgstr "_Mini-Skript"
 

Modified: trunk/geany-mini-script/po/en.po
===================================================================
--- trunk/geany-mini-script/po/en.po	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/po/en.po	2009-02-08 14:24:34 UTC (rev 462)
@@ -1,16 +1,17 @@
-# 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.
+# English translation of the geany-mini-script package.
+# Copyright (C) 2009 Pascal BURLOT
+# This file is distributed under the same license as the geany-mini-script package.
+# Burlot Pascal <prublot(at)users(dot)sourceforge(dot)net>, 2009.
 #
+
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: geany-mini-script 0.3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-02-07 18:59+0100\n"
 "PO-Revision-Date: 2009-02-07 18:59+0100\n"
 "Last-Translator: Burlot Pascal <prublot(at)users(dot)sourceforge(dot)net>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language-Team: English <prublot(at)users(dot)sourceforge(dot)net>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"

Modified: trunk/geany-mini-script/po/fr.po
===================================================================
--- trunk/geany-mini-script/po/fr.po	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/po/fr.po	2009-02-08 14:24:34 UTC (rev 462)
@@ -1,16 +1,17 @@
-# 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.
+# French translation of the geany-mini-script package.
+# Copyright (C) 2009 Pascal BURLOT
+# This file is distributed under the same license as the geany-mini-script package.
+# Burlot Pascal <prublot(at)users(dot)sourceforge(dot)net>, 2009.
 #
+
 msgid ""
 msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
+"Project-Id-Version: geany-mini-script 0.3\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2009-02-07 18:59+0100\n"
 "PO-Revision-Date: 2009-02-07 19:00+0100\n"
 "Last-Translator: Burlot Pascal <prublot(at)users(dot)sourceforge(dot)net>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language-Team: French <prublot(at)users(dot)sourceforge(dot)net>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -58,7 +59,7 @@
 "   o tous les documents de la session courante.\n"
 "\n"
 "Le type du script peut être : \n"
-"   o un script d'un shell UNIX, \n"
+"   o un script shell UNIX, \n"
 "   o un script PERL, \n"
 "   o un script PYTHON, \n"
 "   o une liste de commandes SED,\n"

Modified: trunk/geany-mini-script/src/Makefile.am
===================================================================
--- trunk/geany-mini-script/src/Makefile.am	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/src/Makefile.am	2009-02-08 14:24:34 UTC (rev 462)
@@ -1,7 +1,7 @@
 ## Makefile.am -- Process this file with automake to produce Makefile.in
-lib_LTLIBRARIES = gms.la
-gms_la_SOURCES  = gms.c  gms_gui.c
-gms_la_LDFLAGS  = -module -avoid-version
-gms_la_LIBADD   = @GEANY_LIBS@
+lib_LTLIBRARIES = geany-mini-script.la
+geany_mini_script_la_SOURCES  = gms.c  gms_gui.c
+geany_mini_script_la_LDFLAGS  = -module -avoid-version
+geany_mini_script_la_LIBADD   = @GEANY_LIBS@
 
-AM_CPPFLAGS     = -Wshadow @GEANY_CFLAGS@ -DLOCALEDIR=\""$(localedir)"\"
+AM_CPPFLAGS     = @GEANY_CFLAGS@ -DLOCALEDIR=\""$(localedir)"\"

Modified: trunk/geany-mini-script/src/gms.c
===================================================================
--- trunk/geany-mini-script/src/gms.c	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/src/gms.c	2009-02-08 14:24:34 UTC (rev 462)
@@ -38,15 +38,19 @@
  * - it will be loaded at next startup.
  */
 
+#include    "geany.h"
+
 /* headers */
 #include    <stdlib.h>
 #include    <glib.h>
 #include    <glib/gstdio.h>
-#include 	<libintl.h>
-#include 	<locale.h>
 
+#ifdef HAVE_LOCALE_H
+#include    <locale.h>
+#endif
+
+
 /* geany headers */
-#include    "geany.h"
 #include    "support.h"
 #include    "plugindata.h"
 #include    "editor.h"
@@ -61,10 +65,12 @@
 #include    "gms_gui.h"
 #include    "gms_debug.h"
 
+
 GeanyPlugin     *geany_plugin;
 GeanyData       *geany_data;
 GeanyFunctions  *geany_functions;
 
+
 /* Check that the running Geany supports the plugin API used below, and check
  * for binary compatibility. */
 PLUGIN_VERSION_CHECK(100)
@@ -246,12 +252,43 @@
 
 }
 
+ /**
+ * \brief the function initializes the localization for the gms plugin
+ */
+static void locale_init(void)
+{
+#ifdef ENABLE_NLS
+	gchar *locale_dir = NULL;
+
+#ifdef HAVE_LOCALE_H
+	setlocale(LC_ALL, "");
+#endif
+
+#ifdef G_OS_WIN32
+	gchar *install_dir = g_win32_get_package_installation_directory("geany", NULL);
+	/* e.g. C:\Program Files\geany\lib\locale */
+	locale_dir = g_strconcat(install_dir, "\\share\\locale", NULL);
+	g_free(install_dir);
+#else
+	locale_dir = g_strdup(LOCALEDIR);
+#endif
+
+	bindtextdomain(GETTEXT_PACKAGE, locale_dir);
+	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
+	textdomain(GETTEXT_PACKAGE);
+	g_free(locale_dir);
+#endif
+}
+
+
 /**
  * \brief Called by Geany to initialize the plugin.
  * \note data is the same as geany_data.
  */
 void plugin_init(GeanyData *data)
 {
+    locale_init();
+
     gms_hnd = gms_new(geany->main_widgets->window,
                     data->interface_prefs->editor_font ,
                     data->editor_prefs->indentation->width

Modified: trunk/geany-mini-script/src/gms_gui.c
===================================================================
--- trunk/geany-mini-script/src/gms_gui.c	2009-02-07 22:29:50 UTC (rev 461)
+++ trunk/geany-mini-script/src/gms_gui.c	2009-02-08 14:24:34 UTC (rev 462)
@@ -25,8 +25,8 @@
  * \file  gms_gui.c
  * \brief it is the graphical user interface of the geany miniscript plugin
  */
+#include    "geany.h"
 
-#include    <glib.h>
 #include    <glib/gstdio.h>
 #include    <glib/gprintf.h>
 
@@ -36,13 +36,13 @@
 #include    <sys/types.h>
 #include    <unistd.h>
 
-#include 	<libintl.h>
-#include 	<locale.h>
- 
 #include    <pango/pango.h>
 
+#ifdef HAVE_LOCALE_H
+#include    <locale.h>
+#endif
+
 /* geany headers */
-#include    "geany.h"
 #include    "support.h"
 #include    "plugindata.h"
 #include    "editor.h"
@@ -126,43 +126,36 @@
 const gchar *label_script_cmd[GMS_NB_TYPE_SCRIPT] = {
     "Shell", "Perl", "Python", "Sed", "Awk", "User" };
 
+///< \brief It's the information message about geany mini script
+const char *geany_info = "<b>GMS : Geany Mini-Script filter Plugin</b>\n"
+"This plugin is a tools to apply a script filter on :\n"
+"   o the text selection,\n"
+"   o the current document,\n"
+"   o all documents of the current session.\n"
+"\n"
+"The filter type can be : \n"
+"   o Unix shell script, \n"
+"   o perl script, \n"
+"   o python script, \n"
+"   o sed commands,\n"
+"   o awk script.\n"
+"\n"
+"<b>AUTHOR</b>\n"
+"   Written by Pascal BURLOT (December,2008)\n"
+"\n"
+"<b>LICENSE:</b>\n"
+"This program is free software; you can redistribute\n"
+"it and/or modify it under the terms of the GNU \n"
+"General Public License as published by the Free\n"
+"Software Foundation; either version 2 of the License,\n"
+"or (at your option) any later version." ;
+
 /*
  * *****************************************************************************
  *  Local functions
  */
 
 /**
- * \brief the function initializes the localization for the gms plugin
- */
-
-static void locale_init(void)
-{
-#ifdef ENABLE_NLS
-	gchar *locale_dir = NULL;
-
-#ifdef HAVE_LOCALE_H
-	setlocale(LC_ALL, "");
-#endif
-
-#ifdef G_OS_WIN32
-	gchar *install_dir = g_win32_get_package_installation_directory("geany", NULL);
-	/* e.g. C:\Program Files\geany\lib\locale */
-	locale_dir = g_strconcat(install_dir, "\\share\\locale", NULL);
-	g_free(install_dir);
-#else
-	locale_dir = g_strdup(LOCALEDIR);
-#endif
-
-	//g_print( "%s %s\n",GETTEXT_PACKAGE,locale_dir ) ;
-	
-	bindtextdomain(GETTEXT_PACKAGE, locale_dir);
-	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-	textdomain(GETTEXT_PACKAGE);
-	g_free(locale_dir);
-#endif
-}
-
-/**
  * \brief the function loads the preferences file
  */
 static void load_prefs_file(
@@ -255,7 +248,6 @@
     gms_private_t *this = GMS_PRIVATE(data) ;
     GtkWidget    *p_dialog ;
 	
-	locale_init();
 	p_dialog = gtk_file_chooser_dialog_new (_("Load Mini-Script File"),
                                     GTK_WINDOW(this->mw) ,
                                     GTK_FILE_CHOOSER_ACTION_OPEN,
@@ -313,7 +305,6 @@
     gms_private_t *this = GMS_PRIVATE(data) ;
     GtkWidget    *p_dialog ;
 	
-	locale_init();
 	p_dialog = gtk_file_chooser_dialog_new (_("Save Mini-Script File"),
                                     GTK_WINDOW(this->mw) ,
                                     GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -354,39 +345,12 @@
     )
 {
     gms_private_t *this = GMS_PRIVATE(data) ;
-	gchar *info_msg ;
-	
-	locale_init();
 
-    info_msg = _(
-"<b>GMS : Geany Mini-Script filter Plugin</b>\n"
-"This plugin is a tools to apply a script filter on :\n"
-"   o the text selection,\n"
-"   o the current document,\n"
-"   o all documents of the current session.\n"
-"\n"
-"The filter type can be : \n"
-"   o Unix shell script, \n"
-"   o perl script, \n"
-"   o python script, \n"
-"   o sed commands,\n"
-"   o awk script.\n"
-"\n"
-"<b>AUTHOR</b>\n"
-"   Written by Pascal BURLOT (December,2008)\n"
-"\n"
-"<b>LICENSE:</b>\n"
-"This program is free software; you can redistribute\n"
-"it and/or modify it under the terms of the GNU \n"
-"General Public License as published by the Free\n"
-"Software Foundation; either version 2 of the License,\n"
-"or (at your option) any later version." ) ;
-
     GtkWidget *dlg = gtk_message_dialog_new_with_markup( GTK_WINDOW(this->mw),
                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                 GTK_MESSAGE_INFO,
                                 GTK_BUTTONS_CLOSE,
-                                _(info_msg),NULL );
+                                _(geany_info),NULL );
 								
     gtk_dialog_run(GTK_DIALOG(dlg));
     GMS_FREE_WIDGET(dlg);
@@ -421,8 +385,6 @@
 {
     gms_private_t *this = GMS_G_MALLOC0(gms_private_t,1);
 
-	locale_init() ;
-
     if ( this != NULL )
     {
         GtkBox     *vb_dlg        ; //!< vbox of dialog box
@@ -620,10 +582,6 @@
 
         for ( i=0;i<GMS_NB_TYPE_SCRIPT ; i++ )
             g_string_free(this->script_cmd[i] ,flag) ;
-
-
-		gtk_object_unref( GTK_OBJECT(this->w.tips) );
-		this->w.tips = NULL ;
 		
         GMS_G_FREE( this )  ;
     }
@@ -783,7 +741,6 @@
     GtkWidget  *t_script      ; //!< table for configuration script
     GtkWidget  *w ;
 
-	locale_init() ;
     vb_pref= gtk_vbox_new(FALSE, 6);
     f_script = gtk_frame_new (_("script configuration") );
     gtk_box_pack_start( GTK_BOX (vb_pref), f_script, FALSE, FALSE, 0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list