mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 16:32:30 +01:00
wmaker: add missing source files for translation
As pointed by the new script, a number of source file were not included in the list of files to check for translations. Took opportunity to make translatable a few of the messages. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
6000af3828
commit
609b3c29a6
@@ -1053,7 +1053,8 @@ static WWindow *recursiveTransientFor(WWindow *wwin)
|
||||
i--;
|
||||
}
|
||||
if (i == 0 && wwin) {
|
||||
wwarning("%s has a severely broken WM_TRANSIENT_FOR hint.", wwin->frame->title);
|
||||
wwarning(_("window \"%s\" has a severely broken WM_TRANSIENT_FOR hint"),
|
||||
wwin->frame->title);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1151,7 +1152,16 @@ void wIconifyWindow(WWindow *wwin)
|
||||
set_icon_minipreview(wwin->icon, mini_preview);
|
||||
RReleaseImage(mini_preview);
|
||||
} else {
|
||||
wwarning(_("window mini-preview creation failed"));
|
||||
const char *title;
|
||||
char title_buf[32];
|
||||
|
||||
if (wwin->frame && wwin->frame->title) {
|
||||
title = wwin->frame->title;
|
||||
} else {
|
||||
snprintf(title_buf, sizeof(title_buf), "(id=0x%lx)", wwin->client_win);
|
||||
title = title_buf;
|
||||
}
|
||||
wwarning(_("creation of mini-preview failed for window \"%s\""), title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,11 +91,11 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
char rtext[300];
|
||||
|
||||
if (sscanf(slist[*index], "%i %i %n", &command, &code, &pos) < 2 || command != wmBeginMenu) {
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"), slist[*index], win);
|
||||
return NULL;
|
||||
}
|
||||
if (wstrlcpy(title, &slist[*index][pos], sizeof(title)) >= sizeof(title)) {
|
||||
wwarning("appmenu: menu command size exceeded in window %lx", win);
|
||||
wwarning(_("appmenu: menu command size exceeded in window %lx"), win);
|
||||
return NULL;
|
||||
}
|
||||
menu = wMenuCreateForApp(scr, title, *index == 1);
|
||||
@@ -107,7 +107,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
|
||||
if (sscanf(slist[*index], "%i", &command) != 1) {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"), slist[*index], win);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
if (sscanf(slist[*index], "%i %i %i %i %n",
|
||||
&command, &ecode, &etag, &enab, &pos) != 4 || ecode != code) {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"),
|
||||
slist[*index], win);
|
||||
return NULL;
|
||||
}
|
||||
@@ -133,14 +133,14 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
if (sscanf(slist[*index], "%i %i %i %i %s %n",
|
||||
&command, &ecode, &etag, &enab, rtext, &pos) != 5 || ecode != code) {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx",
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"),
|
||||
slist[*index], win);
|
||||
return NULL;
|
||||
}
|
||||
wstrlcpy(title, &slist[*index][pos], sizeof(title));
|
||||
}
|
||||
if (!(data = malloc(sizeof(WAppMenuData)))) {
|
||||
wwarning("appmenu: out of memory making menu for window %lx", win);
|
||||
wwarning(_("appmenu: out of memory making menu for window %lx"), win);
|
||||
wMenuDestroy(menu, True);
|
||||
return NULL;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
entry = wMenuAddCallback(menu, title, notifyClient, data);
|
||||
if (!entry) {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: out of memory creating menu for window %lx", win);
|
||||
wwarning(_("appmenu: out of memory creating menu for window %lx"), win);
|
||||
free(data);
|
||||
return NULL;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
if (sscanf(slist[*index], "%i %i %i %i %i %n",
|
||||
&command, &ecode, &etag, &enab, &ncode, &pos) != 5 || ecode != code) {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"), slist[*index], win);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -183,7 +183,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
if (!entry) {
|
||||
wMenuDestroy(menu, True);
|
||||
wMenuDestroy(submenu, True);
|
||||
wwarning("appmenu: out of memory creating menu for window %lx", win);
|
||||
wwarning(_("appmenu: out of memory creating menu for window %lx"), win);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
|
||||
|
||||
} else {
|
||||
wMenuDestroy(menu, True);
|
||||
wwarning("appmenu: bad menu entry \"%s\" in window %lx", slist[*index], win);
|
||||
wwarning(_("appmenu: bad menu entry \"%s\" in window %lx"), slist[*index], win);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ WMenu *wAppMenuGet(WScreen * scr, Window window)
|
||||
}
|
||||
XFree(text_prop.value);
|
||||
if (strcmp(slist[0], "WMMenu 0") != 0) {
|
||||
wwarning("appmenu: unknown version of WMMenu in window %lx: %s", window, slist[0]);
|
||||
wwarning(_("appmenu: unknown version of WMMenu in window %lx: %s"), window, slist[0]);
|
||||
XFreeStringList(slist);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -131,13 +131,13 @@ static void x_reset_modifier_mapping(Display * display)
|
||||
|
||||
inline void modwarn(const char *key_name, int old_mod, const char *other_key)
|
||||
{
|
||||
wwarning("key %s (0x%x) generates %s, which is generated by %s",
|
||||
wwarning(_("key %s (0x%x) generates %s, which is generated by %s"),
|
||||
key_name, code, index_to_name(old_mod), other_key);
|
||||
}
|
||||
|
||||
inline void modbarf(const char *key_name, const char *other_mod)
|
||||
{
|
||||
wwarning("key %s (0x%x) generates %s, which is nonsensical",
|
||||
wwarning(_("key %s (0x%x) generates %s, which is nonsensical"),
|
||||
key_name, code, other_mod);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ static void x_reset_modifier_mapping(Display * display)
|
||||
inline void store_modifier(const char *key_name, int *old_mod)
|
||||
{
|
||||
if (*old_mod && *old_mod != modifier_index)
|
||||
wwarning("key %s (0x%x) generates both %s and %s, which is nonsensical",
|
||||
wwarning(_("key %s (0x%x) generates both %s and %s, which is nonsensical"),
|
||||
key_name, code, index_to_name(*old_mod), index_to_name(modifier_index));
|
||||
if (modifier_index == ShiftMapIndex) {
|
||||
modbarf(key_name, "ModShift");
|
||||
@@ -298,7 +298,7 @@ const char *wXModifierToShortcutLabel(int mask)
|
||||
if (mask == MetaMask)
|
||||
return "M+";
|
||||
|
||||
wwarning("Can't convert keymask %d to shortcut label", mask);
|
||||
wwarning(_("Can't convert keymask 0x%04X to a shortcut label"), mask);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user