Commit a6673708 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Always use (get)text domain from primary module

parent c5b49937
...@@ -252,7 +252,6 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r ) ...@@ -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_STRING(submodule->psz_capability);
LOAD_IMMEDIATE(submodule->i_score); LOAD_IMMEDIATE(submodule->i_score);
LOAD_IMMEDIATE(submodule->b_unloadable); LOAD_IMMEDIATE(submodule->b_unloadable);
LOAD_STRING(submodule->domain);
} }
char *path; char *path;
...@@ -541,7 +540,6 @@ static int CacheSaveSubmodule( FILE *file, const module_t *p_module ) ...@@ -541,7 +540,6 @@ static int CacheSaveSubmodule( FILE *file, const module_t *p_module )
SAVE_STRING( p_module->psz_capability ); SAVE_STRING( p_module->psz_capability );
SAVE_IMMEDIATE( p_module->i_score ); SAVE_IMMEDIATE( p_module->i_score );
SAVE_IMMEDIATE( p_module->b_unloadable ); SAVE_IMMEDIATE( p_module->b_unloadable );
SAVE_STRING( p_module->domain );
return 0; return 0;
error: error:
......
...@@ -122,8 +122,8 @@ module_t *vlc_submodule_create (module_t *module) ...@@ -122,8 +122,8 @@ module_t *vlc_submodule_create (module_t *module)
submodule->i_config_items = 0; submodule->i_config_items = 0;
submodule->i_bool_items = 0; submodule->i_bool_items = 0;
/*submodule->handle = unused*/ /*submodule->handle = unused*/
submodule->psz_filename = NULL; /*submodule->psz_filename unused */
submodule->domain = module->domain; submodule->domain = NULL;
return submodule; return submodule;
} }
......
...@@ -267,11 +267,13 @@ int module_get_score( const module_t *m ) ...@@ -267,11 +267,13 @@ int module_get_score( const module_t *m )
*/ */
const char *module_gettext (const module_t *m, const char *str) const char *module_gettext (const module_t *m, const char *str)
{ {
#ifdef ENABLE_NLS if (m->parent != NULL)
const char *domain = m->domain ? m->domain : PACKAGE_NAME; m = m->parent;
if (unlikely(str == NULL || *str == '\0')) if (unlikely(str == NULL || *str == '\0'))
return ""; return "";
return dgettext (domain, str); #ifdef ENABLE_NLS
const char *domain = m->domain;
return dgettext ((domain != NULL) ? domain : PACKAGE_NAME, str);
#else #else
(void)m; (void)m;
return str; return str;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment