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 )
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:
......
......@@ -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;
}
......
......@@ -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;
......
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