[vlc-devel] commit: vlc_config_set: use dgettext() explicitly ( Rémi Denis-Courmont )

git version control git at videolan.org
Wed May 21 17:53:56 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed May 21 18:55:16 2008 +0300| [76774f676dbb8cebd0dc65bfc35eac4986fee104]

vlc_config_set: use dgettext() explicitly

This is a cosmetic change at this point as _() invokes dgettext(). This
is just a small step toward supporting out-of-tree plugins. These will
need to use their own text domain.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=76774f676dbb8cebd0dc65bfc35eac4986fee104
---

 src/modules/entry.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modules/entry.c b/src/modules/entry.c
index 1fee615..4bc4b8f 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -221,8 +221,9 @@ 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 ( _(text)) : NULL;
-            item->psz_longtext = longtext ? strdup ( _(longtext)) : NULL;
+            item->psz_text = text ? strdup (dgettext (PACKAGE, text)) : NULL;
+            item->psz_longtext =
+                longtext ? strdup (dgettext (PACKAGE, longtext)) : NULL;
             ret = 0;
             break;
         }
@@ -373,7 +374,8 @@ 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 ( _(text[i])) : NULL;
+                    dtext[i] =
+                        text[i] ? strdup (dgettext (PACKAGE, text[i])) : NULL;
 
                 dtext[len] = NULL;
                 item->ppsz_list_text = dtext;
@@ -411,7 +413,7 @@ int vlc_config_set (module_config_t *restrict item, int id, ...)
             item->ppsz_action_text = tabtext;
 
             if (name)
-                tabtext[item->i_action] = strdup ( _(name));
+                tabtext[item->i_action] = strdup (dgettext (PACKAGE, name));
             else
                 tabtext[item->i_action] = NULL;
             tabtext[item->i_action + 1] = NULL;




More information about the vlc-devel mailing list