[vlc-commits] Always use (get)text domain from primary module
Rémi Denis-Courmont
git at videolan.org
Mon Aug 15 19:45:25 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 15 19:36:00 2011 +0300| [a6673708a0abf45edb5dc27d59853e57c4d69770] | committer: Rémi Denis-Courmont
Always use (get)text domain from primary module
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6673708a0abf45edb5dc27d59853e57c4d69770
---
src/modules/cache.c | 2 --
src/modules/entry.c | 4 ++--
src/modules/modules.c | 8 +++++---
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 781923c..db2ed69 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -252,7 +252,6 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r )
LOAD_STRING(submodule->psz_capability);
LOAD_IMMEDIATE(submodule->i_score);
LOAD_IMMEDIATE(submodule->b_unloadable);
- LOAD_STRING(submodule->domain);
}
char *path;
@@ -541,7 +540,6 @@ static int CacheSaveSubmodule( FILE *file, const module_t *p_module )
SAVE_STRING( p_module->psz_capability );
SAVE_IMMEDIATE( p_module->i_score );
SAVE_IMMEDIATE( p_module->b_unloadable );
- SAVE_STRING( p_module->domain );
return 0;
error:
diff --git a/src/modules/entry.c b/src/modules/entry.c
index afc7159..c673620 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -122,8 +122,8 @@ module_t *vlc_submodule_create (module_t *module)
submodule->i_config_items = 0;
submodule->i_bool_items = 0;
/*submodule->handle = unused*/
- submodule->psz_filename = NULL;
- submodule->domain = module->domain;
+ /*submodule->psz_filename unused */
+ submodule->domain = NULL;
return submodule;
}
diff --git a/src/modules/modules.c b/src/modules/modules.c
index cf7bad02..28b6f52 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -267,11 +267,13 @@ int module_get_score( const module_t *m )
*/
const char *module_gettext (const module_t *m, const char *str)
{
-#ifdef ENABLE_NLS
- const char *domain = m->domain ? m->domain : PACKAGE_NAME;
+ if (m->parent != NULL)
+ m = m->parent;
if (unlikely(str == NULL || *str == '\0'))
return "";
- return dgettext (domain, str);
+#ifdef ENABLE_NLS
+ const char *domain = m->domain;
+ return dgettext ((domain != NULL) ? domain : PACKAGE_NAME, str);
#else
(void)m;
return str;
More information about the vlc-commits
mailing list