From: Christophe Mutricy Date: Sat, 22 Dec 2007 22:01:56 +0000 (+0000) Subject: Use dgettext() (aka _() ) rather than gettext(). X-Git-Tag: 0.9.0-test0~3918 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ed5205fe93f276d92c8571c43551d7e0a8c05bab;p=vlc Use dgettext() (aka _() ) rather than gettext(). --- diff --git a/include/vlc_common.h b/include/vlc_common.h index 121a062737..aaf9814bd4 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -1208,7 +1208,6 @@ VLC_EXPORT( unsigned, vlc_CPU, ( void ) ); #else # define _(String) (String) # define N_(String) (String) -# define gettext(String) (String) #endif /***************************************************************************** diff --git a/src/config/file.c b/src/config/file.c index 04f072b50a..137e1251b0 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -353,7 +353,7 @@ config_Write (FILE *file, const char *type, const char *desc, if (desc == NULL) desc = "?"; - if (fprintf (file, "# %s (%s)\n%s%s=", desc, gettext (type), + if (fprintf (file, "# %s (%s)\n%s%s=", desc, _(type), comment ? "#" : "", name) < 0) return -1; diff --git a/src/modules/entry.c b/src/modules/entry.c index 7cb0ebf116..6c6caa040c 100644 --- a/src/modules/entry.c +++ b/src/modules/entry.c @@ -200,8 +200,8 @@ int vlc_config_set (module_config_t *restrict item, int id, ...) const char *text = va_arg (ap, const char *); const char *longtext = va_arg (ap, const char *); - item->psz_text = text ? strdup (gettext (text)) : NULL; - item->psz_longtext = longtext ? strdup (gettext (text)) : NULL; + item->psz_text = text ? strdup ( _(text)) : NULL; + item->psz_longtext = longtext ? strdup ( _(text)) : NULL; ret = 0; break; } @@ -352,7 +352,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...) if (text != NULL) { for (size_t i = 0; i < len; i++) - dtext[i] = text[i] ? strdup (gettext (text[i])) : NULL; + dtext[i] = text[i] ? strdup ( _(text[i])) : NULL; dtext[len] = NULL; item->ppsz_list_text = dtext; @@ -389,7 +389,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...) item->ppsz_action_text = tabtext; if (name) - tabtext[item->i_action] = strdup (gettext (name)); + tabtext[item->i_action] = strdup ( _(name)); else tabtext[item->i_action] = NULL; tabtext[item->i_action + 1] = NULL;