[Commits] [SCM] claws branch, master, updated. 3.9.0-197-gbe58b45

mones at claws-mail.org mones at claws-mail.org
Thu Apr 25 01:17:49 CEST 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  be58b45969e0513906844777d5d75c7685b9fabe (commit)
      from  06e09c818f9455537e82e8395d658e0be336f873 (commit)


- Log -----------------------------------------------------------------
commit be58b45969e0513906844777d5d75c7685b9fabe
Author: Ricardo Mones <ricardo at mones.org>
Date:   Thu Apr 25 01:09:38 2013 +0200

    Fix untranslated description in archiver plugin
    
    gettext cannot evaluate preprocessor conditions affecting translatable
    strings and only generates one msgid for the po file. If later the build
    doesn't generate the same string as gettext, its msgid is never found
    and hence appears untranslated on the UI.

diff --git a/src/plugins/archive/archiver.c b/src/plugins/archive/archiver.c
index 15c1cac..e4dd351 100644
--- a/src/plugins/archive/archiver.c
+++ b/src/plugins/archive/archiver.c
@@ -55,6 +55,7 @@ static GtkActionEntry archiver_main_menu[] = {{
 }};
 
 static gint main_menu_id = 0;
+static char *plugin_description = NULL;
 
 gint plugin_init(gchar** error)
 {
@@ -87,6 +88,11 @@ gboolean plugin_done(void)
 	MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, "Tools/CreateArchive", main_menu_id);
 	main_menu_id = 0;
 
+	if (plugin_description != NULL) {
+		g_free(plugin_description);
+		plugin_description = NULL;
+	}
+
 	archiver_prefs_done();
 	debug_print("archive plugin unloaded\n");
 
@@ -109,8 +115,15 @@ const gchar* plugin_name(void) {
 	return PLUGIN_NAME;
 }
 
+#if NEW_ARCHIVE_API
+#define ARCHIVER_COMPRESS_FORMATS "\tGZIP/ZIP\n\tBZIP2\n\tCOMPRESS\n"
+#else
+#define ARCHIVER_COMPRESS_FORMATS "\tGZIP/ZIP\n\tBZIP2\n"
+#endif
+
 const gchar* plugin_desc(void) {
-	return _("This plugin adds archiving features to Claws Mail.\n"
+	if (plugin_description == NULL) {
+		plugin_description = g_strdup_printf(_("This plugin adds archiving features to Claws Mail.\n"
 			"\n"
 			"It enables you to select a mail folder that you want "
 			"to be archived, and then choose a name, format and "
@@ -121,11 +134,7 @@ const gchar* plugin_desc(void) {
 			"The archive can be stored as:\n"
 			"\tTAR\n\tPAX\n\tSHAR\n\tCPIO\n"
 			"\n"
-			"The archive can be compressed using:\n"
-			"\tGZIP/ZIP\n\tBZIP2\n"
-#if NEW_ARCHIVE_API
-                        "\tCOMPRESS\n"
-#endif
+			"The archive can be compressed using:\n%s"
 			"\n"
 			"The archives can be restored with any standard tool "
 			"that supports the chosen format and compression.\n"
@@ -137,7 +146,9 @@ const gchar* plugin_desc(void) {
 			"\n"
 			"Default options can be set in /Configuration/Preferences/Plugins"
 			"/Mail Archiver"
-			);
+			), ARCHIVER_COMPRESS_FORMATS);
+	}
+	return plugin_description;
 }
 
 struct PluginFeature* plugin_provides(void) {

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/archive/archiver.c |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list