mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
wmaker: update error message to have only one string to be translated
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.curis@free.fr> Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
65e5f452ec
commit
285a926539
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user