Revision: 44 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=44&view=rev Author: frlan Date: 2008-05-20 12:09:52 -0700 (Tue, 20 May 2008)
Log Message: ----------- Activating of i18n support and adding a first German translation
Modified Paths: -------------- trunk/geanysendmail/ChangeLog trunk/geanysendmail/po/de.po trunk/geanysendmail/src/geanysendmail.c
Modified: trunk/geanysendmail/ChangeLog =================================================================== --- trunk/geanysendmail/ChangeLog 2008-05-20 18:45:50 UTC (rev 43) +++ trunk/geanysendmail/ChangeLog 2008-05-20 19:09:52 UTC (rev 44) @@ -1,9 +1,10 @@ 2008-05-20 Frank Lanitz frank@frank.uvena.de
* Ported build system from spellcheck plugin. Thanks for it. - * Updated Geany plugin API + * Updated Geany plugin API. + * Activating of i18n support and adding a first German translation.
- + 2008-05-13 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Restart using ChangeLog.
Modified: trunk/geanysendmail/po/de.po =================================================================== --- trunk/geanysendmail/po/de.po 2008-05-20 18:45:50 UTC (rev 43) +++ trunk/geanysendmail/po/de.po 2008-05-20 19:09:52 UTC (rev 44) @@ -1,69 +1,82 @@ +msgid "" +msgstr "" +"Project-Id-Version: geanysendmail\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-05-20 14:55+0200\n" +"PO-Revision-Date: 2008-05-20 20:56+0100\n" +"Last-Translator: Frank Lanitz frank@frank.uvena.de\n" +"Language-Team: frank@frank.uvena.de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" + #: src/geanysendmail.c:40 msgid "GeanySendMail" -msgstr "" +msgstr "GeanySendMail"
#: src/geanysendmail.c:40 -msgid "" -"A little plugin to send the current file as attachment by user's favorite " -"mailer" -msgstr "" +msgid "A little plugin to send the current file as attachment by user's favorite mailer" +msgstr "Ein Plugin zum Senden einer Datei als Anhang unter Verwendung eines Mailprogrammes."
#: src/geanysendmail.c:91 msgid "Filename placeholder not found. The executed command might have failed." -msgstr "" +msgstr "Konnte den Platzhalter für den Dateinamen (\%s) nicht finden. Das angegebene Kommando könnte nicht korrekt ausgeführt worden sein."
#: src/geanysendmail.c:97 msgid "Could not execute mailer. Please check your configuration." -msgstr "" +msgstr "Konnte das Mailprogramm nicht aufrufen. Ist die Konfiguration korrekt?"
#: src/geanysendmail.c:106 msgid "Please define a mailing tool first." -msgstr "" +msgstr "Bitte ein Mailprogramm angeben!"
#: src/geanysendmail.c:111 msgid "File have to be saved before sending." -msgstr "" +msgstr "Due Datei muss vor dem Senden gespeichert werden."
#: src/geanysendmail.c:173 msgid "Mail Configuration" -msgstr "" +msgstr "Maileinstellungen"
#. add a label and a text entry to the dialog #: src/geanysendmail.c:181 msgid "Path and options for the mail programm:" -msgstr "" +msgstr "Pfad und Optionen für das Mailprogramm:"
#: src/geanysendmail.c:189 #, c-format msgid "Note: \%f will be replaced by your filename." -msgstr "" +msgstr "Anmerkung: \%f wird durch den Dateinamen ersetzt."
#: src/geanysendmail.c:193 msgid "Showing icon in toolbar (EXPERIMENTAL)" -msgstr "" +msgstr "Symbol in der Werkzeugliste anzeigen (Experimental)"
#: src/geanysendmail.c:196 msgid "Shows a icon in the toolbar to send file more easy." -msgstr "" +msgstr "Zeigt ein Symbol in der Werkzeugliste an, so dass eine Datei einfacher versendet werden kann."
#: src/geanysendmail.c:238 msgid "Plugin configuration directory could not be created." -msgstr "" +msgstr "Konfigurationsdatei konnte nicht erstellt werden."
#: src/geanysendmail.c:261 msgid "Send file by mail" -msgstr "" +msgstr "Per Mail senden"
#. Build up menu #: src/geanysendmail.c:289 msgid "_Mail" -msgstr "" +msgstr "_Mail"
#: src/geanysendmail.c:295 msgid "_Mail document" -msgstr "" +msgstr "_Dokument versenden"
#: src/geanysendmail.c:298 -msgid "" -"Sends the opened file as unzipped attachment by any mailer from your $PATH" -msgstr "" +msgid "Sends the opened file as unzipped attachment by any mailer from your $PATH" +msgstr "Sendet ein geöffnete Dokument als ungepackter Anhang unter Verwendung eines Mailprogrammes." +
Modified: trunk/geanysendmail/src/geanysendmail.c =================================================================== --- trunk/geanysendmail/src/geanysendmail.c 2008-05-20 18:45:50 UTC (rev 43) +++ trunk/geanysendmail/src/geanysendmail.c 2008-05-20 19:09:52 UTC (rev 44) @@ -32,6 +32,10 @@ #include "keybindings.h" #include "icon.h"
+#if HAVE_LOCALE_H +# include <locale.h> +#endif + PluginFields *plugin_fields; GeanyData *geany_data; GeanyFunctions *geany_functions; @@ -59,6 +63,33 @@ GtkWidget *separator = NULL; GtkWidget *separator2 = NULL;
+ +static void locale_init(void) +{ +#ifdef ENABLE_NLS + gchar *locale_dir = NULL; + +#if 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, "\lib\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 +} + + /* Callback for sending file as attachment */ static void send_as_attachment(G_GNUC_UNUSED GtkMenuItem *menuitem, G_GNUC_UNUSED gpointer gdata) @@ -266,6 +297,8 @@ GtkWidget *menu_mail_attachment = NULL;
+ locale_init(); + config_file = g_strconcat(app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, "geanysendmail", G_DIR_SEPARATOR_S, "mail.conf", NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org