From 6e8639c47dbceaf5722546da9fd271a12cefdda5 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 15 Nov 2014 19:40:55 +0100 Subject: [PATCH] wmaker: change message to have only one string to translate and to have more information The warning message was duplicated many times for each possible case, but it could have used the same message everywhere, which ease the work of translators. Took opportunity to include the complete command being processed so that the user will know more about the problem and may be able to fix it. Updated the French translation to show the gain, but not the other languages because it require more knowledge than what Google Translate can provide me. Signed-off-by: Christophe CURIS Signed-off-by: Carlos R. Mafra --- po/fr.po | 16 ++-------------- src/misc.c | 10 +++++----- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/po/fr.po b/po/fr.po index 0bc34393..d163709f 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1108,21 +1108,9 @@ msgid "out of memory during expansion of \"%s\"" msgstr "Plus assez de mémoire pendant l'interprétation de « %s »." #: ../src/misc.c:863 -msgid "out of memory during expansion of \"%w\"" -msgstr "Plus assez de mémoire pendant l'interprétation de « %w »." - -#: ../src/misc.c:881 -msgid "out of memory during expansion of \"%W\"" -msgstr "Plus assez de mémoire pendant l'interprétation de « %W »." - -#: ../src/misc.c:897 -msgid "out of memory during expansion of \"%a\"" -msgstr "Plus assez de mémoire pendant l'interprétation de « %a »." - -#: ../src/misc.c:928 #, c-format -msgid "out of memory during expansion of \"%d\"" -msgstr "Plus assez de mémoire pendant l'interprétation de « %d »." +msgid "out of memory during expansion of '%s' for command \"%s\"" +msgstr "Plus assez de mémoire pour l'interprétation du « %s » dans la commande « %s »" #: ../src/misc.c:942 msgid "selection not available" diff --git a/src/misc.c b/src/misc.c index fdaae743..51eb1ee6 100644 --- a/src/misc.c +++ b/src/misc.c @@ -575,7 +575,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline) olen += slen; nout = realloc(out, olen); if (!nout) { - wwarning(_("out of memory during expansion of \"%%w\"")); + wwarning(_("out of memory during expansion of '%s' for command \"%s\""), "%w", cmdline); goto error; } out = nout; @@ -592,7 +592,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline) olen += slen; nout = realloc(out, olen); if (!nout) { - wwarning(_("out of memory during expansion of \"%%W\"")); + wwarning(_("out of memory during expansion of '%s' for command \"%s\""), "%W", cmdline); goto error; } out = nout; @@ -609,7 +609,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline) olen += slen; nout = realloc(out, olen); if (!nout) { - wwarning(_("out of memory during expansion of \"%%a\"")); + wwarning(_("out of memory during expansion of '%s' for command \"%s\""), "%a", cmdline); goto error; } out = nout; @@ -632,7 +632,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline) olen += slen; nout = realloc(out, olen); if (!nout) { - wwarning(_("out of memory during expansion of \"%%d\"")); + wwarning(_("out of memory during expansion of '%s' for command \"%s\""), "%d", cmdline); goto error; } out = nout; @@ -653,7 +653,7 @@ char *ExpandOptions(WScreen *scr, const char *cmdline) olen += slen; nout = realloc(out, olen); if (!nout) { - wwarning(_("out of memory during expansion of \"%%s\"")); + wwarning(_("out of memory during expansion of '%s' for command \"%s\""), "%s", cmdline); goto error; } out = nout;