From: Christophe CURIS <christophe.cu...@free.fr>

As a previous patch modified some instances of the error message to include
more information to the user, it is a good idea to update also the other
uses of the message, so that:
 - people helping on translation will have less messages to translate
 - this mean we provide more information to the user in these places too,
which can help him solve the problem

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 po/be.po       |  4 ++--
 po/bg.po       |  4 ++--
 po/bs.po       |  4 ++--
 po/ca.po       |  4 ++--
 po/cs.po       |  4 ++--
 po/da.po       |  4 ++--
 po/de.po       |  4 ++--
 po/es.po       |  4 ++--
 po/et.po       |  4 ++--
 po/fi.po       |  4 ++--
 po/fr.po       |  4 ++--
 po/gl.po       |  4 ++--
 po/hr.po       |  4 ++--
 po/hu.po       |  4 ++--
 po/it.po       |  5 ++---
 po/ja.po       |  4 ++--
 po/ko.po       |  4 ++--
 po/ms.po       |  4 ++--
 po/nl.po       |  4 ++--
 po/no.po       |  4 ++--
 po/pl.po       |  4 ++--
 po/pt.po       |  4 ++--
 po/ru.po       |  4 ++--
 po/sk.po       |  4 ++--
 po/tr.po       |  4 ++--
 po/zh_CN.po    |  4 ++--
 po/zh_TW.po    |  4 ++--
 src/rootmenu.c | 10 ++++++++--
 28 files changed, 62 insertions(+), 57 deletions(-)

diff --git a/po/be.po b/po/be.po
index ea74e56..846452a 100644
--- a/po/be.po
+++ b/po/be.po
@@ -1263,8 +1263,8 @@ msgstr "%s: немагчыма адкрыць ці апрацаваць файл
 
 #: ../src/rootmenu.c:1212 ../src/rootmenu.c:1315
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: немагчыма адкрыць файл меню"
+msgid "could not open menu file \"%s\": %s"
+msgstr "немагчыма адкрыць файл меню \"%s\": %s"
 
 #: ../src/rootmenu.c:1239
 #, c-format
diff --git a/po/bg.po b/po/bg.po
index dd01bc3..5a8d396 100644
--- a/po/bg.po
+++ b/po/bg.po
@@ -1557,8 +1557,8 @@ msgstr "%s: не може да се отвори/обработи от пред
 # ../src/rootmenu.c:1123 ../src/rootmenu.c:1224
 #: ../src/rootmenu.c:1212 ../src/rootmenu.c:1315
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: не може да се отвори файлът меню"
+msgid "could not open menu file \"%s\": %s"
+msgstr "не може да се отвори файлът меню \"%s\": %s"
 
 # ../src/rootmenu.c:1150
 #: ../src/rootmenu.c:1239
diff --git a/po/bs.po b/po/bs.po
index d8a386c..76b99a3 100644
--- a/po/bs.po
+++ b/po/bs.po
@@ -745,8 +745,8 @@ msgid "%s:could not open/preprocess menu file"
 msgstr "%s:ne mogu otvoriti/preprocesirati datoteku izbornika"
 
 #: ../src/rootmenu.c:1079 ../src/rootmenu.c:1180
-msgid "%s:could not open menu file"
-msgstr "%s: ne mogu otvoriti datoteku izbornika"
+msgid "could not open menu file \"%s\": %s"
+msgstr "ne mogu otvoriti datoteku izbornika \"%s\": %s"
 
 #: ../src/rootmenu.c:1106
 msgid "%s:invalid menu file. MENU command is missing"
diff --git a/po/ca.po b/po/ca.po
index 71e0cfd..96eec2b 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -1299,8 +1299,8 @@ msgstr "%s: no s'ha pogut obrir/preprocessar el fitxer de 
menú"
 
 #: ../src/rootmenu.c:1217 ../src/rootmenu.c:1321
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: no s'ha pogut obrir el fitxer de menú"
+msgid "could not open menu file \"%s\": %s"
+msgstr "no s'ha pogut obrir el fitxer de menú \"%s\": %s"
 
 #: ../src/rootmenu.c:1244
 #, c-format
diff --git a/po/cs.po b/po/cs.po
index 0e41b97..8a7d0e8 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -1221,8 +1221,8 @@ msgstr "%s: nelze otevřít nebo předzpracovat soubor s 
menu"
 
 #: ../src/rootmenu.c:1175 ../src/rootmenu.c:1277
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:nelze otevřít soubor s menu"
+msgid "could not open menu file \"%s\": %s"
+msgstr "nelze otevřít soubor s menu \"%s\": %s"
 
 #: ../src/rootmenu.c:1202
 #, c-format
diff --git a/po/da.po b/po/da.po
index 154d674..6d6242e 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1483,8 +1483,8 @@ msgstr "%s:kunne ikke åbne/forbehandle menufil"
 # ../src/rootmenu.c:1126 ../src/rootmenu.c:1227
 #: ../src/rootmenu.c:1212 ../src/rootmenu.c:1314
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:kunne ikke åbne menufil"
+msgid "could not open menu file \"%s\": %s"
+msgstr "kunne ikke åbne menufil \"%s\": %s"
 
 # ../src/rootmenu.c:1153
 #: ../src/rootmenu.c:1239
diff --git a/po/de.po b/po/de.po
index 669f661..5273b27 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1164,8 +1164,8 @@ msgstr "%s: Menüdatei konnte nicht geöffnet/bearbeitet 
werden"
 
 #: ../src/rootmenu.c:1106 ../src/rootmenu.c:1203
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: Menüdatei konnte nicht geöffnet werden"
+msgid "could not open menu file \"%s\": %s"
+msgstr "Menüdatei \"%s\" konnte nicht geöffnet werden: %s"
 
 #: ../src/rootmenu.c:1132
 #, c-format
diff --git a/po/es.po b/po/es.po
index 7e087e2..066f544 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1161,8 +1161,8 @@ msgstr "%s:no se pudo abrir/preprocesar el fichero de 
menú"
 
 #: ../src/rootmenu.c:1105 ../src/rootmenu.c:1199
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:no se pudo abrir el fichero del menú"
+msgid "could not open menu file \"%s\": %s"
+msgstr "no se pudo abrir el fichero del menú \"%s\": %s"
 
 #: ../src/rootmenu.c:1131
 #, c-format
diff --git a/po/et.po b/po/et.po
index 0208f0e..dc7f4ee 100644
--- a/po/et.po
+++ b/po/et.po
@@ -1147,8 +1147,8 @@ msgstr "%s:menüüfaili pole võimalik avada või eeltöödelda"
 
 #: ../src/rootmenu.c:1064 ../src/rootmenu.c:1149
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:menüüfaili pole võimalik avada"
+msgid "could not open menu file \"%s\": %s"
+msgstr "menüüfaili \"%s\" pole võimalik avada: %s"
 
 #: ../src/rootmenu.c:1084
 #, c-format
diff --git a/po/fi.po b/po/fi.po
index 88e2f80..8f599ed 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -1210,8 +1210,8 @@ msgstr "%s: valikkotiedostoa ei voitu avata/esikäsitellä"
 
 #: ../src/rootmenu.c:1174 ../src/rootmenu.c:1276
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: valikkotiedoston avaus ei onnistunut"
+msgid "could not open menu file \"%s\": %s"
+msgstr "valikkotiedoston \"%s\" avaus ei onnistunut: %s"
 
 #: ../src/rootmenu.c:1201
 #, c-format
diff --git a/po/fr.po b/po/fr.po
index 8e4cd84..0bc3439 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1283,8 +1283,8 @@ msgstr "%s : échec à l'ouverture ou au traitement du 
fichier de menu."
 
 #: ../src/rootmenu.c:1217 ../src/rootmenu.c:1320
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s : l'ouverture du fichier de menu a échoué."
+msgid "could not open menu file \"%s\": %s"
+msgstr "l'ouverture du fichier de menu \"%s\" a échoué: %s"
 
 #: ../src/rootmenu.c:1244
 #, c-format
diff --git a/po/gl.po b/po/gl.po
index 575fb66..79157ed 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -1061,8 +1061,8 @@ msgstr "%s:non foi posible abrir/preprocesar ficheiro de 
menú"
 
 #: ../src/rootmenu.c:1123 ../src/rootmenu.c:1224
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:non foi posible abri-lo ficheiro de menú"
+msgid "could not open menu file \"%s\": %s"
+msgstr "non foi posible abri-lo ficheiro de menú \"%s\": %s"
 
 #: ../src/rootmenu.c:1150
 #, c-format
diff --git a/po/hr.po b/po/hr.po
index 2372acf..6c99246 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -744,8 +744,8 @@ msgid "%s:could not open/preprocess menu file"
 msgstr "%s:ne mogu otvoriti/preprocesirati datoteku izbornika"
 
 #: ../src/rootmenu.c:1079 ../src/rootmenu.c:1180
-msgid "%s:could not open menu file"
-msgstr "%s: ne mogu otvoriti datoteku izbornika"
+msgid "could not open menu file \"%s\": %s"
+msgstr "ne mogu otvoriti datoteku izbornika \"%s\": %s"
 
 #: ../src/rootmenu.c:1106
 msgid "%s:invalid menu file. MENU command is missing"
diff --git a/po/hu.po b/po/hu.po
index 43418fe..10d1428 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1179,8 +1179,8 @@ msgstr "szintaktikai hiba a menü fájlban: hiányzó END 
kulcsszó"
 
 #: ../../wmaker-crm/src/rootmenu.c:1049 ../../wmaker-crm/src/rootmenu.c:1138
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: nem tudom megnyitni a menü fájlt"
+msgid "could not open menu file \"%s\": %s"
+msgstr "nem tudom megnyitni a menü fájlt \"%s\": %s"
 
 #: ../../wmaker-crm/src/rootmenu.c:1072
 msgid "invalid menu file, MENU command is missing"
diff --git a/po/it.po b/po/it.po
index 6f01593..53bbc8a 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1234,11 +1234,10 @@ msgstr "impossibile generare gli argomenti per il 
preprocessore del file di men
 msgid "%s:could not open/preprocess menu file"
 msgstr "%s: impossibile aprire/preelaborare il file di menù"
 
-# FIXME UPSTREAM<
 #: ../src/rootmenu.c:1217 ../src/rootmenu.c:1321
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: impossibile aprire il file di menù"
+msgid "could not open menu file \"%s\": %s"
+msgstr "impossibile aprire il file di menù \"%s\": %s"
 
 # FIXME UPSTREAM<
 #: ../src/rootmenu.c:1244
diff --git a/po/ja.po b/po/ja.po
index f0db60a..93b5189 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1137,8 +1137,8 @@ msgstr "%s:メニューファイルのオープン/プリプロセスができ
 
 #: ../src/rootmenu.c:1105 ../src/rootmenu.c:1199
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:メニューファイルを開けません"
+msgid "could not open menu file \"%s\": %s"
+msgstr "メニューファイルを開けません \"%s\": %s"
 
 #: ../src/rootmenu.c:1131
 #, c-format
diff --git a/po/ko.po b/po/ko.po
index d2455f7..831b018 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -1121,8 +1121,8 @@ msgstr "메뉴 파일에서 문법 오류: END 선언 없음"
 
 #: ../src/rootmenu.c:1025 ../src/rootmenu.c:1114
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:메뉴 파일을 열 수 없음"
+msgid "could not open menu file \"%s\": %s"
+msgstr "메뉴 파일을 열 수 없음 \"%s\": %s"
 
 #: ../src/rootmenu.c:1048
 msgid "invalid menu file, MENU command is missing"
diff --git a/po/ms.po b/po/ms.po
index 8a465be..04ddec6 100644
--- a/po/ms.po
+++ b/po/ms.po
@@ -1244,8 +1244,8 @@ msgstr "%s:tak dapat membuka/mempraproses fail menu)"
 
 #: ../src/rootmenu.c:1209 ../src/rootmenu.c:1311
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: tak dapat membuka fail menu"
+msgid "could not open menu file \"%s\": %s"
+msgstr "tak dapat membuka fail menu \"%s\": %s"
 
 #: ../src/rootmenu.c:1236
 #, c-format
diff --git a/po/nl.po b/po/nl.po
index a54c555..88c7232 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1204,8 +1204,8 @@ msgstr "ongeldig menu, geen menutitel opgegeven"
 
 #: ../src/rootmenu.c:1096 ../src/rootmenu.c:1156
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:kon menubestand niet openen"
+msgid "could not open menu file \"%s\": %s"
+msgstr "kon menubestand \"%s\" niet openen: %s"
 
 #: ../src/rootmenu.c:1264 ../src/rootmenu.c:1336 ../src/rootmenu.c:1375
 #, c-format
diff --git a/po/no.po b/po/no.po
index eb58dd1..0a908b2 100644
--- a/po/no.po
+++ b/po/no.po
@@ -484,8 +484,8 @@ msgstr "%s:kunne ikke åpne/behandle meny filen"
 
 #: ../src/rootmenu.c:685 ../src/rootmenu.c:767
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:kunne ikke åpne meny filen"
+msgid "could not open menu file \"%s\": %s"
+msgstr "kunne ikke åpne meny filen \"%s\": %s"
 
 #: ../src/rootmenu.c:698
 #, c-format
diff --git a/po/pl.po b/po/pl.po
index adfd1cb..af59432 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -842,8 +842,8 @@ msgstr "%s:nie można otworzyć/przetworzyć pliku menu"
 
 #: ../src/rootmenu.c:1096 ../src/rootmenu.c:1197
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:nie można otworzyć pliku menu"
+msgid "could not open menu file \"%s\": %s"
+msgstr "nie można otworzyć pliku menu \"%s\": %s"
 
 #: ../src/rootmenu.c:1123
 #, c-format
diff --git a/po/pt.po b/po/pt.po
index 7be4458..0f1fc39 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -1050,8 +1050,8 @@ msgstr "%s:não foi possível abrir/preprocessar arquivo de 
menu"
 
 #: ../src/rootmenu.c:1123 ../src/rootmenu.c:1224
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:não foi possível abrir arquivo de menu"
+msgid "could not open menu file \"%s\": %s"
+msgstr "não foi possível abrir arquivo de menu \"%s\": %s"
 
 #: ../src/rootmenu.c:1150
 #, c-format
diff --git a/po/ru.po b/po/ru.po
index cd88c86..cbcc1c9 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1260,8 +1260,8 @@ msgstr "%s:не удалось открыть/предобработать фа
 
 #: ../src/rootmenu.c:1212 ../src/rootmenu.c:1315
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:не удалось открыть файл меню"
+msgid "could not open menu file \"%s\": %s"
+msgstr "не удалось открыть файл меню \"%s\": %s"
 
 #: ../src/rootmenu.c:1239
 #, c-format
diff --git a/po/sk.po b/po/sk.po
index 53d25d4..ca9db10 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -1308,8 +1308,8 @@ msgstr "%s:nemožno otvoriť alebo predspracovať súbor s 
menu"
 
 #: ../src/rootmenu.c:1217 ../src/rootmenu.c:1321
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:nemožno otvoriť súbor s menu"
+msgid "could not open menu file \"%s\": %s"
+msgstr "nemožno otvoriť súbor s menu \"%s\": %s"
 
 #: ../src/rootmenu.c:1244
 #, c-format
diff --git a/po/tr.po b/po/tr.po
index 2adb923..57bbc61 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -650,8 +650,8 @@ msgid "%s:could not open/preprocess menu file"
 msgstr "%s:menü dosyası açılamadı/işlenemedi"
 
 #: ../src/rootmenu.c:1033 ../src/rootmenu.c:1131
-msgid "%s:could not open menu file"
-msgstr "%s: menü dosyası açılamadı"
+msgid "could not open menu file \"%s\": %s"
+msgstr "menü dosyası \"%s\" açılamadı: %s"
 
 #: ../src/rootmenu.c:1060
 msgid "%s:invalid menu file"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 9743664..5af76c3 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -990,8 +990,8 @@ msgstr "%s:不能打开或预处理菜单文件"
 
 #: ../src/rootmenu.c:1126 ../src/rootmenu.c:1227
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s:不能打开菜单文件"
+msgid "could not open menu file \"%s\": %s"
+msgstr "不能打开菜单文件 \"%s\": %s"
 
 #: ../src/rootmenu.c:1153
 #, c-format
diff --git a/po/zh_TW.po b/po/zh_TW.po
index e2ad8db..6bac9ac 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -1205,8 +1205,8 @@ msgstr "%s: 無法開啟/預先處理選單檔"
 
 #: ../src/rootmenu.c:1217 ../src/rootmenu.c:1321
 #, c-format
-msgid "%s:could not open menu file"
-msgstr "%s: 無法開啟選單檔"
+msgid "could not open menu file \"%s\": %s"
+msgstr "無法開啟選單檔 \"%s\": %s"
 
 #: ../src/rootmenu.c:1244
 #, c-format
diff --git a/src/rootmenu.c b/src/rootmenu.c
index aff00c1..8c0f0c6 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -1094,7 +1094,7 @@ static WMenu *readMenuFile(WScreen *scr, const char 
*file_name)
 
        file = fopen(file_name, "rb");
        if (!file) {
-               werror(_("%s:could not open menu file"), file_name);
+               werror(_("could not open menu file \"%s\": %s"), file_name, 
strerror(errno));
                return NULL;
        }
        menu = readMenu(scr, file_name, file);
@@ -1172,9 +1172,15 @@ static WMenu *readMenuPipe(WScreen * scr, char 
**file_name)
        }
        filename = flat_file + (flat_file[1] == '|' ? 2 : 1);
 
+       /*
+        * In case of memory problem, 'popen' will not set the errno, so we 
initialise it
+        * to be able to display a meaningful message. For other problems, 
'popen' will
+        * properly set errno, so we'll still get a good message
+        */
+       errno = ENOMEM;
        file = popen(filename, "r");
        if (!file) {
-               werror(_("%s:could not open menu file"), filename);
+               werror(_("could not open menu file \"%s\": %s"), filename, 
strerror(errno));
                return NULL;
        }
        menu = readMenu(scr, flat_file, file);
-- 
2.1.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to