[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 1/2] mark a few diagnostics for translation



Here are two warning-avoidance changes I'm about to commit:

>From 588ecf78ffd6f284aa7872c13d946b9b5a146ef0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 23 Dec 2008 16:49:26 +0100
Subject: [PATCH 1/2] mark a few diagnostics for translation

* src/xen_inotify.c (xenInotifyXendDomainsDirLookup): Mark a diagnostic.
(xenInotifyXendDomainsDirRemoveEntry, xenInotifyOpen): Likewise.
---
 src/xen_inotify.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xen_inotify.c b/src/xen_inotify.c
index fe1bc76..f6a7992 100644
--- a/src/xen_inotify.c
+++ b/src/xen_inotify.c
@@ -128,7 +128,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,

     if (virUUIDParse(uuid_str, rawuuid) < 0) {
         virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
-                           "parsing uuid %s", uuid_str);
+                           _("parsing uuid %s"), uuid_str);
         return -1;
     }
     /* call directly into xend here, as driver may not yet
@@ -145,7 +145,7 @@ xenInotifyXendDomainsDirLookup(virConnectPtr conn, const char *filename,
                 *name = strdup(configInfoList->doms[i]->name);
                 if (!*name) {
                     virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
-                                       "finding dom for %s", uuid_str);
+                                       _("finding dom for %s"), uuid_str);
                     return -1;
                 }
                 memcpy(uuid, configInfoList->doms[i]->uuid, VIR_UUID_BUFLEN);
@@ -201,7 +201,7 @@ xenInotifyXendDomainsDirRemoveEntry(virConnectPtr conn ATTRIBUTE_UNUSED,

     if (virUUIDParse(uuidstr, uuid) < 0) {
         virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
-                           "parsing uuid %s", uuidstr);
+                           _("parsing uuid %s"), uuidstr);
         return -1;
     }

@@ -428,7 +428,7 @@ xenInotifyOpen(virConnectPtr conn ATTRIBUTE_UNUSED,
                           IN_CLOSE_WRITE | IN_DELETE |
                           IN_MOVED_TO | IN_MOVED_FROM) < 0) {
         virXenInotifyError(NULL, VIR_ERR_INTERNAL_ERROR,
-                           "adding watch on %s", _(configDir));
+                           _("adding watch on %s"), _(configDir));
         return -1;
     }

--
1.6.1.302.gccd4d


>From 527665ea39b24b46c9f276b879dbcf12049787c4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Tue, 23 Dec 2008 16:54:05 +0100
Subject: [PATCH 2/2] * Makefile.maint (msg_gen_function): Add to the list.

---
 Makefile.maint |   64 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 47 insertions(+), 17 deletions(-)

diff --git a/Makefile.maint b/Makefile.maint
index 0f43b1c..2f65bcf 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -361,36 +361,66 @@ sc_two_space_separator_in_usage:
 	    echo "$(ME): an option and its description"; \
 		1>&2; exit 1; } || :

+# Many of the function names below came from this filter:
+# git grep -B2 '\<_('|grep -E '\.c- *[[:alpha:]_][[:alnum:]_]* ?\(.*[,;]$' \
+# |sed 's/.*\.c-  *//'|perl -pe 's/ ?\(.*//'|sort -u \
+# |grep -vE '^(qsort|if|close|assert|fputc|free|N_|vir.*GetName|.*Unlock|virNodeListDevices|virHashRemoveEntry|freeaddrinfo|.*[fF]ree|xdrmem_create|xmlXPathFreeObject|virUUIDFormat|openvzSetProgramSentinal|polkit_action_unref)$'
+
 msg_gen_function =
+msg_gen_function += DEBUG0
 msg_gen_function += DISABLE_fprintf
-msg_gen_function += virXendError
-msg_gen_function += virXMLError
-msg_gen_function += virHashError
+msg_gen_function += ERROR
+msg_gen_function += ERROR0
+msg_gen_function += REMOTE_DEBUG
+msg_gen_function += ReportError
+msg_gen_function += VIR_FREE
+msg_gen_function += VIR_USE_CPU
+msg_gen_function += errorf
+msg_gen_function += lxcError
+msg_gen_function += networkLog
+msg_gen_function += networkReportError
+msg_gen_function += openvzError
+msg_gen_function += openvzLog
+msg_gen_function += qemudDispatchClientFailure
+msg_gen_function += qemudLog
+msg_gen_function += qemudReportError
+msg_gen_function += regerror
+msg_gen_function += remoteDispatchError
+msg_gen_function += remoteDispatchFormatError
+msg_gen_function += umlError
+msg_gen_function += umlLog
+msg_gen_function += umlReportError
 msg_gen_function += virConfError
-msg_gen_function += virTestError
+msg_gen_function += virDomainReportError
+msg_gen_function += virHashError
 msg_gen_function += virLibConnError
-msg_gen_function += virStorageReportError
-msg_gen_function += virxmlRpcError
+msg_gen_function += virLibDomainError
 msg_gen_function += virLog
-msg_gen_function += qemudLog
-msg_gen_function += remoteDispatchError
+msg_gen_function += virNetworkReportError
+msg_gen_function += virNodeDeviceReportError
+msg_gen_function += virRaiseError
+msg_gen_function += virReportErrorHelper
+msg_gen_function += virSexprError
 msg_gen_function += virStorageLog
+msg_gen_function += virStorageReportError
+msg_gen_function += virTestError
+msg_gen_function += virXMLError
+msg_gen_function += virXenInotifyError
+msg_gen_function += virXenStoreError
+msg_gen_function += virXendError
+msg_gen_function += virxmlRpcError
+msg_gen_function += vshCloseLogFile
 msg_gen_function += xenXMError
-msg_gen_function += ReportError
-msg_gen_function += qemudReportError
-msg_gen_function += openvzLog
-msg_gen_function += openvzError
-msg_gen_function += virDomainReportError
-msg_gen_function += virReportErrorHelper
-msg_gen_function += lxcError
-msg_gen_function += umlError

 # Uncomment the following and run "make syntax-check" to see diagnostics
 # that are not yet marked for translation, but that need to be rewritten
 # so that they are translatable.
 # msg_gen_function += error
-# msg_gen_function += virXenError
+# msg_gen_function += fprintf
 # msg_gen_function += testError
+# msg_gen_function += virXenError
+# msg_gen_function += vshPrint
+# msg_gen_function += vshError

 func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|')
 func_re := ($(func_or))
--
1.6.1.302.gccd4d


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]