From ebd4f15a91ee24f20463d6893652b31c4b0614da Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 24 Mar 2014 09:41:52 -0400 Subject: Bug 719417 - Remove em-filter-i18n.h Remove this old hack and translate the pre-defined filter/search/vfolder rules the same way any other XML file gets translated. --- mail/Makefile.am | 25 +- mail/em-filter-i18n.h | 80 ---- mail/filtertypes.xml | 1046 ---------------------------------------------- mail/filtertypes.xml.in | 1046 ++++++++++++++++++++++++++++++++++++++++++++++ mail/searchtypes.xml | 1016 -------------------------------------------- mail/searchtypes.xml.in | 1016 ++++++++++++++++++++++++++++++++++++++++++++ mail/vfoldertypes.xml | 945 ----------------------------------------- mail/vfoldertypes.xml.in | 945 +++++++++++++++++++++++++++++++++++++++++ po/POTFILES.in | 5 +- 9 files changed, 3021 insertions(+), 3103 deletions(-) delete mode 100644 mail/em-filter-i18n.h delete mode 100644 mail/filtertypes.xml create mode 100644 mail/filtertypes.xml.in delete mode 100644 mail/searchtypes.xml create mode 100644 mail/searchtypes.xml.in delete mode 100644 mail/vfoldertypes.xml create mode 100644 mail/vfoldertypes.xml.in diff --git a/mail/Makefile.am b/mail/Makefile.am index 8a011df8f1..edde57b0ac 100644 --- a/mail/Makefile.am +++ b/mail/Makefile.am @@ -228,8 +228,6 @@ libevolution_mail_la_LIBADD = \ libevolution_mail_la_LDFLAGS = -avoid-version $(NO_UNDEFINED) -libevolution_mail_la_DEPENDENCIES = em-filter-i18n.h - noinst_PROGRAMS = test-mail-autoconfig test_mail_autoconfig_CPPFLAGS = \ @@ -249,19 +247,20 @@ test_mail_autoconfig_LDADD = \ # Misc data to install filterdir = $(privdatadir) -filter_DATA = filtertypes.xml vfoldertypes.xml searchtypes.xml +filter_in_files = \ + filtertypes.xml.in \ + searchtypes.xml.in \ + vfoldertypes.xml.in \ + $(NULL) +filter_DATA = $(filter_in_files:.xml.in=.xml) + +@INTLTOOL_XML_RULE@ error_DATA = mail.error errordir = $(privdatadir)/errors # provides error rules too @EVO_PLUGIN_RULE@ -em-filter-i18n.h: filtertypes.xml vfoldertypes.xml searchtypes.xml - echo "/* Automatically generated. Do not edit. */" > $@; \ - cat $(srcdir)/filtertypes.xml $(srcdir)/vfoldertypes.xml $(srcdir)/searchtypes.xml | \ - sed -n -e 's:.*\(.*\):gchar *s = N_("\1");:p' | \ - sort -u >> $@ - ui_DATA = mail-config.ui mail-dialogs.ui etspec_DATA = message-list.etspec @@ -272,10 +271,8 @@ EXTRA_DIST = \ $(ui_DATA) \ $(server_in_files) \ $(etspec_DATA) \ - filtertypes.xml \ - vfoldertypes.xml \ - searchtypes.xml \ - em-filter-i18n.h + $(filter_in_files) \ + $(NULL) # Purify support @@ -295,7 +292,7 @@ endif dist-hook: cd $(distdir); rm -f $(BUILT_SOURCES) -BUILT_SOURCES = $(ENUM_GENERATED) $(error_DATA) +BUILT_SOURCES = $(ENUM_GENERATED) $(error_DATA) $(filter_DATA) CLEANFILES = $(BUILT_SOURCES) diff --git a/mail/em-filter-i18n.h b/mail/em-filter-i18n.h deleted file mode 100644 index 3ef519fba2..0000000000 --- a/mail/em-filter-i18n.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Automatically generated. Do not edit. */ -gchar *s = N_("Adjust Score"); -gchar *s = N_("Any header"); -gchar *s = N_("Assign Color"); -gchar *s = N_("Assign Score"); -gchar *s = N_("Attachments"); -gchar *s = N_("BCC"); -gchar *s = N_("Beep"); -gchar *s = N_("CC"); -gchar *s = N_("Completed On"); -gchar *s = N_("Copy to Folder"); -gchar *s = N_("Date received"); -gchar *s = N_("Date sent"); -gchar *s = N_("Delete"); -gchar *s = N_("Deleted"); -gchar *s = N_("Do Not Exist"); -gchar *s = N_("Draft"); -gchar *s = N_("Exist"); -gchar *s = N_("Expression"); -gchar *s = N_("Follow Up"); -gchar *s = N_("Forward to"); -gchar *s = N_("Important"); -gchar *s = N_("Junk Test"); -gchar *s = N_("Junk"); -gchar *s = N_("Label"); -gchar *s = N_("Mailing list"); -gchar *s = N_("Match All"); -gchar *s = N_("Message Body"); -gchar *s = N_("Message Header"); -gchar *s = N_("Message Location"); -gchar *s = N_("Message is Junk"); -gchar *s = N_("Message is not Junk"); -gchar *s = N_("Move to Folder"); -gchar *s = N_("Pipe to Program"); -gchar *s = N_("Play Sound"); -gchar *s = N_("Read"); -gchar *s = N_("Recipients"); -gchar *s = N_("Regex Match"); -gchar *s = N_("Replied to"); -gchar *s = N_("Run Program"); -gchar *s = N_("Score"); -gchar *s = N_("Sender or Recipients"); -gchar *s = N_("Sender"); -gchar *s = N_("Set Label"); -gchar *s = N_("Set Status"); -gchar *s = N_("Size (kB)"); -gchar *s = N_("Source Account"); -gchar *s = N_("Specific header"); -gchar *s = N_("Status"); -gchar *s = N_("Stop Processing"); -gchar *s = N_("Subject"); -gchar *s = N_("To"); -gchar *s = N_("Unset Color"); -gchar *s = N_("Unset Status"); -gchar *s = N_("contains"); -gchar *s = N_("does not contain"); -gchar *s = N_("does not end with"); -gchar *s = N_("does not exist"); -gchar *s = N_("does not have words"); -gchar *s = N_("does not return"); -gchar *s = N_("does not sound like"); -gchar *s = N_("does not start with"); -gchar *s = N_("ends with"); -gchar *s = N_("exists"); -gchar *s = N_("has words"); -gchar *s = N_("is Flagged"); -gchar *s = N_("is after"); -gchar *s = N_("is before"); -gchar *s = N_("is greater than"); -gchar *s = N_("is less than"); -gchar *s = N_("is not Flagged"); -gchar *s = N_("is not set"); -gchar *s = N_("is not"); -gchar *s = N_("is set"); -gchar *s = N_("is"); -gchar *s = N_("returns greater than"); -gchar *s = N_("returns less than"); -gchar *s = N_("returns"); -gchar *s = N_("sounds like"); -gchar *s = N_("starts with"); diff --git a/mail/filtertypes.xml b/mail/filtertypes.xml deleted file mode 100644 index f739b06b32..0000000000 --- a/mail/filtertypes.xml +++ /dev/null @@ -1,1046 +0,0 @@ - - - - - Sender - - - - - - - - - - - - - - - - - Recipients - - - - - - - - - - - - - - - - - CC - - - - - - - - - - - - - - - - - BCC - - - - - - - - - - - - - - - - - Sender or Recipients - - - - - - - - - - - - - - - - - Subject - - - - - - - - - - - - - - - - - - - Specific header - - - - - - - - - - - - - - - - - - - - - - Message Body - - - - - - - - - Expression - - - - - Date sent - - - - - - - - - - - Date received - - - - - - - - - - - Label - - - - - - - - - - - Score - - - - - - - - - - - Size (kB) - - - - - - - - - Status - - - - - - - - - - - - - - - Follow Up - - - - - - - - Completed On - - - - - - - - Attachments - - - - - - - - Mailing list - - - - - - - - - - - Regex Match - - - - - - - - - Source Account - - - - - - - - - Pipe to Program - - - - - - - - - - - - Junk Test - - - - - - - - Match All - - (match-all #t) - - - - - - - - - Move to Folder - (move-to ${folder}) - - - - Copy to Folder - (copy-to ${folder}) - - - - Delete - (delete) - - - Stop Processing - (stop) - - - Set Label - (set-label ${label}) - - - - - - Assign Color - (set-color ${colour}) - - - - Unset Color - (set-color "") - - - Assign Score - (set-score ${score}) - - - - Adjust Score - (adjust-score ${score}) - - - - Set Status - - (set-system-flag ${flag}) - - - - - - - - - - - - Unset Status - - (unset-system-flag ${flag}) - - - - - - - - - - - - Beep - (beep) - - - Play Sound - (play-sound ${sound}) - - - - Run Program - (shell "/bin/sh" "-c" ${command}) - - - - Pipe to Program - (pipe-message "/bin/sh" "-c" ${command}) - - - - - Forward to - (forward-to ${address}) - - - - diff --git a/mail/filtertypes.xml.in b/mail/filtertypes.xml.in new file mode 100644 index 0000000000..930db5768e --- /dev/null +++ b/mail/filtertypes.xml.in @@ -0,0 +1,1046 @@ + + + + + <_title>Sender + + + + + + + + + + + + + + + + + <_title>Recipients + + + + + + + + + + + + + + + + + <_title>CC + + + + + + + + + + + + + + + + + <_title>BCC + + + + + + + + + + + + + + + + + <_title>Sender or Recipients + + + + + + + + + + + + + + + + + <_title>Subject + + + + + + + + + + + + + + + + + + + <_title>Specific header + + + + + + + + + + + + + + + + + + + + + + <_title>Message Body + + + + + + + + + <_title>Expression + + + + + <_title>Date sent + + + + + + + + + + + <_title>Date received + + + + + + + + + + + <_title>Label + + + + + + + + + + + <_title>Score + + + + + + + + + + + <_title>Size (kB) + + + + + + + + + <_title>Status + + + + + + + + + + + + + + + <_title>Follow Up + + + + + + + + <_title>Completed On + + + + + + + + <_title>Attachments + + + + + + + + <_title>Mailing list + + + + + + + + + + + <_title>Regex Match + + + + + + + + + <_title>Source Account + + + + + + + + + <_title>Pipe to Program + + + + + + + + + + + + <_title>Junk Test + + + + + + + + <_title>Match All + + (match-all #t) + + + + + + + + + <_title>Move to Folder + (move-to ${folder}) + + + + <_title>Copy to Folder + (copy-to ${folder}) + + + + <_title>Delete + (delete) + + + <_title>Stop Processing + (stop) + + + <_title>Set Label + (set-label ${label}) + + + + + + <_title>Assign Color + (set-color ${colour}) + + + + <_title>Unset Color + (set-color "") + + + <_title>Assign Score + (set-score ${score}) + + + + <_title>Adjust Score + (adjust-score ${score}) + + + + <_title>Set Status + + (set-system-flag ${flag}) + + + + + + + + + + + + <_title>Unset Status + + (unset-system-flag ${flag}) + + + + + + + + + + + + <_title>Beep + (beep) + + + <_title>Play Sound + (play-sound ${sound}) + + + + <_title>Run Program + (shell "/bin/sh" "-c" ${command}) + + + + <_title>Pipe to Program + (pipe-message "/bin/sh" "-c" ${command}) + + + + + <_title>Forward to + (forward-to ${address}) + + + + diff --git a/mail/searchtypes.xml b/mail/searchtypes.xml deleted file mode 100644 index 02f84e40c0..0000000000 --- a/mail/searchtypes.xml +++ /dev/null @@ -1,1016 +0,0 @@ - - - - - Sender - - - - - - - - - - - - - - - - Recipients - - - - - - - - - - - - - - - To - - - - - - - - - - - - - - - - - CC - - - - - - - - - - - - - - - - - BCC - - - - - - - - - - - - - - - - - Sender or Recipients - - - - - - - - - - - - - - - Subject - - - - - - - - - - - - - - - - - Specific header - - - - - - - - - - - - - - - - - - - - - - Any header - - - - - - - - - - - - - - - - - - - Message Body - - - - - - - - Expression - - - - - Date sent - - - - - - - - - - - Date received - - - - - - - - - - - Label - - - - - - - - - - - Score - - - - - - - - - - - Size (kB) - - - - - - - - - Status - - - - - - - - - - - - - - - Follow Up - - - - - - - - Completed On - - - - - - - - Attachments - - - - - - - - Mailing list - - - - - - - - - - - Regex Match - - - - - - - - - Match All - - (match-all #t) - - - - - - - - <_title>Subject or Addresses contains - - - - - - - - - - - - - - - - - - - <_title>Recipients contain - - - - - - - - - - - <_title>Message contains - - - - - - - - - - - - - - - - - - - - - - - <_title>Subject contains - - - - - - - - - - - <_title>Sender contains - - - - - - - - - - - <_title>Body contains - - - - - - - - - - - diff --git a/mail/searchtypes.xml.in b/mail/searchtypes.xml.in new file mode 100644 index 0000000000..ef116f424d --- /dev/null +++ b/mail/searchtypes.xml.in @@ -0,0 +1,1016 @@ + + + + + <_title>Sender + + + + + + + + + + + + + + + + <_title>Recipients + + + + + + + + + + + + + + + <_title>To + + + + + + + + + + + + + + + + + <_title>CC + + + + + + + + + + + + + + + + + <_title>BCC + + + + + + + + + + + + + + + + + <_title>Sender or Recipients + + + + + + + + + + + + + + + <_title>Subject + + + + + + + + + + + + + + + + + <_title>Specific header + + + + + + + + + + + + + + + + + + + + + + <_title>Any header + + + + + + + + + + + + + + + + + + + <_title>Message Body + + + + + + + + <_title>Expression + + + + + <_title>Date sent + + + + + + + + + + + <_title>Date received + + + + + + + + + + + <_title>Label + + + + + + + + + + + <_title>Score + + + + + + + + + + + <_title>Size (kB) + + + + + + + + + <_title>Status + + + + + + + + + + + + + + + <_title>Follow Up + + + + + + + + <_title>Completed On + + + + + + + + <_title>Attachments + + + + + + + + <_title>Mailing list + + + + + + + + + + + <_title>Regex Match + + + + + + + + + <_title>Match All + + (match-all #t) + + + + + + + + <_title>Subject or Addresses contains + + + + + + + + + + + + + + + + + + + <_title>Recipients contain + + + + + + + + + + + <_title>Message contains + + + + + + + + + + + + + + + + + + + + + + + <_title>Subject contains + + + + + + + + + + + <_title>Sender contains + + + + + + + + + + + <_title>Body contains + + + + + + + + + + + diff --git a/mail/vfoldertypes.xml b/mail/vfoldertypes.xml deleted file mode 100644 index ed92cece62..0000000000 --- a/mail/vfoldertypes.xml +++ /dev/null @@ -1,945 +0,0 @@ - - - - - Sender - - - - - - - - - - - - - - - Recipients - - - - - - - - - - - - - - - To - - - - - - - - - - - - - - - - - CC - - - - - - - - - - - - - - - - - BCC - - - - - - - - - - - - - - - - - Sender or Recipients - - - - - - - - - - - - - - - Subject - - - - - - - - - - - - - - - - - Specific header - - - - - - - - - - - - - - - - - - - - - - Any header - - - - - - - - - - - - - - - - - - - Message Body - - - - - - - - Expression - - - - - Date sent - - - - - - - - - - - Date received - - - - - - - - - - - Label - - - - - - - - - - - Score - - - - - - - - - - - Size (kB) - - - - - - - - - Status - - - - - - - - - - - - - - - - Follow Up - - - - - - - - Completed On - - - - - - - - Attachments - - - - - - - - Mailing list - - - - - - - - - - - Regex Match - - - - - - - - - Message Location - - - - - - - - - Match All - - (match-all #t) - - - - - diff --git a/mail/vfoldertypes.xml.in b/mail/vfoldertypes.xml.in new file mode 100644 index 0000000000..51460c7a96 --- /dev/null +++ b/mail/vfoldertypes.xml.in @@ -0,0 +1,945 @@ + + + + + <_title>Sender + + + + + + + + + + + + + + + <_title>Recipients + + + + + + + + + + + + + + + <_title>To + + + + + + + + + + + + + + + + + <_title>CC + + + + + + + + + + + + + + + + + <_title>BCC + + + + + + + + + + + + + + + + + <_title>Sender or Recipients + + + + + + + + + + + + + + + <_title>Subject + + + + + + + + + + + + + + + + + <_title>Specific header + + + + + + + + + + + + + + + + + + + + + + <_title>Any header + + + + + + + + + + + + + + + + + + + <_title>Message Body + + + + + + + + <_title>Expression + + + + + <_title>Date sent + + + + + + + + + + + <_title>Date received + + + + + + + + + + + <_title>Label + + + + + + + + + + + <_title>Score + + + + + + + + + + + <_title>Size (kB) + + + + + + + + + <_title>Status + + + + + + + + + + + + + + + + <_title>Follow Up + + + + + + + + <_title>Completed On + + + + + + + + <_title>Attachments + + + + + + + + <_title>Mailing list + + + + + + + + + + + <_title>Regex Match + + + + + + + + + <_title>Message Location + + + + + + + + + <_title>Match All + + (match-all #t) + + + + + diff --git a/po/POTFILES.in b/po/POTFILES.in index 4ebaf4a311..87ec978c89 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -342,7 +342,6 @@ mail/e-mail-ui-session.c mail/em-composer-utils.c mail/em-filter-editor.c mail/em-filter-editor-folder-element.c -mail/em-filter-i18n.h mail/em-filter-rule.c mail/em-folder-properties.c mail/em-folder-selection-button.c @@ -354,6 +353,7 @@ mail/em-subscription-editor.c mail/em-utils.c mail/em-vfolder-editor.c mail/em-vfolder-editor-rule.c +mail/filtertypes.xml.in mail/importers/elm-importer.c mail/importers/evolution-mbox-importer.c mail/importers/mail-importer.c @@ -366,7 +366,8 @@ mail/mail-send-recv.c mail/mail-vfolder-ui.c mail/message-list.c mail/message-list.etspec -mail/searchtypes.xml +mail/searchtypes.xml.in +mail/vfoldertypes.xml.in modules/addressbook/autocompletion-config.c modules/addressbook/eab-composer-util.c modules/addressbook/e-book-shell-backend.c -- cgit v1.2.3