Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
64ae2cbf
Commit
64ae2cbf
authored
Jun 05, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for custom text domain in module strings
parent
129717e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
16 deletions
+56
-16
include/vlc_plugin.h
include/vlc_plugin.h
+12
-8
src/modules/entry.c
src/modules/entry.c
+44
-8
No files found.
include/vlc_plugin.h
View file @
64ae2cbf
...
@@ -122,17 +122,18 @@ E_(vlc_entry) ( module_t *p_module );
...
@@ -122,17 +122,18 @@ E_(vlc_entry) ( module_t *p_module );
goto error;
goto error;
#define set_shortname( shortname ) \
#define set_shortname( shortname ) \
if (vlc_module_set (p_submodule, VLC_MODULE_SHORTNAME, \
if (vlc_module_set (p_submodule, VLC_MODULE_SHORTNAME,
domain,
\
(const char *)(shortname))) \
(const char *)(shortname))) \
goto error;
goto error;
#define set_description( desc ) \
#define set_description( desc ) \
if (vlc_module_set (p_submodule, VLC_MODULE_DESCRIPTION, \
if (vlc_module_set (p_submodule, VLC_MODULE_DESCRIPTION,
domain,
\
(const char *)(desc))) \
(const char *)(desc))) \
goto error;
goto error;
#define set_help( help ) \
#define set_help( help ) \
if (vlc_module_set (p_submodule, VLC_MODULE_HELP, (const char *)(help))) \
if (vlc_module_set (p_submodule, VLC_MODULE_HELP, domain, \
(const char *)(help))) \
goto error;
goto error;
#define set_capability( cap, score ) \
#define set_capability( cap, score ) \
...
@@ -162,16 +163,19 @@ enum vlc_module_properties
...
@@ -162,16 +163,19 @@ enum vlc_module_properties
* Append new items at the end ONLY. */
* Append new items at the end ONLY. */
VLC_MODULE_CPU_REQUIREMENT
,
VLC_MODULE_CPU_REQUIREMENT
,
VLC_MODULE_SHORTCUT
,
VLC_MODULE_SHORTCUT
,
VLC_MODULE_SHORTNAME
,
VLC_MODULE_SHORTNAME
_NODOMAIN
,
VLC_MODULE_DESCRIPTION
,
VLC_MODULE_DESCRIPTION
_NODOMAIN
,
VLC_MODULE_HELP
,
VLC_MODULE_HELP
_NODOMAIN
,
VLC_MODULE_CAPABILITY
,
VLC_MODULE_CAPABILITY
,
VLC_MODULE_SCORE
,
VLC_MODULE_SCORE
,
VLC_MODULE_PROGRAM
,
VLC_MODULE_PROGRAM
,
/* obsoleted */
VLC_MODULE_CB_OPEN
,
VLC_MODULE_CB_OPEN
,
VLC_MODULE_CB_CLOSE
,
VLC_MODULE_CB_CLOSE
,
VLC_MODULE_NO_UNLOAD
,
VLC_MODULE_NO_UNLOAD
,
VLC_MODULE_NAME
,
VLC_MODULE_NAME
,
VLC_MODULE_SHORTNAME
,
VLC_MODULE_DESCRIPTION
,
VLC_MODULE_HELP
,
};
};
enum
vlc_config_properties
enum
vlc_config_properties
...
...
src/modules/entry.c
View file @
64ae2cbf
...
@@ -108,17 +108,26 @@ int vlc_module_set (module_t *module, int propid, ...)
...
@@ -108,17 +108,26 @@ int vlc_module_set (module_t *module, int propid, ...)
break
;
break
;
}
}
case
VLC_MODULE_SHORTNAME
:
case
VLC_MODULE_SHORTNAME_NODOMAIN
:
module
->
psz_shortname
=
dgettext
(
PACKAGE
,
va_arg
(
ap
,
char
*
));
{
const
char
*
name
=
va_arg
(
ap
,
char
*
);
ret
=
vlc_module_set
(
module
,
VLC_MODULE_SHORTNAME
,
NULL
,
name
);
break
;
break
;
}
case
VLC_MODULE_DESCRIPTION
:
case
VLC_MODULE_DESCRIPTION_NODOMAIN
:
module
->
psz_longname
=
dgettext
(
PACKAGE
,
va_arg
(
ap
,
char
*
));
{
const
char
*
desc
=
va_arg
(
ap
,
char
*
);
ret
=
vlc_module_set
(
module
,
VLC_MODULE_DESCRIPTION
,
NULL
,
desc
);
break
;
break
;
}
case
VLC_MODULE_HELP
:
case
VLC_MODULE_HELP_NODOMAIN
:
module
->
psz_help
=
dgettext
(
PACKAGE
,
va_arg
(
ap
,
char
*
));
{
const
char
*
help
=
va_arg
(
ap
,
char
*
);
ret
=
vlc_module_set
(
module
,
VLC_MODULE_HELP
,
NULL
,
help
);
break
;
break
;
}
case
VLC_MODULE_CAPABILITY
:
case
VLC_MODULE_CAPABILITY
:
module
->
psz_capability
=
va_arg
(
ap
,
char
*
);
module
->
psz_capability
=
va_arg
(
ap
,
char
*
);
...
@@ -128,6 +137,10 @@ int vlc_module_set (module_t *module, int propid, ...)
...
@@ -128,6 +137,10 @@ int vlc_module_set (module_t *module, int propid, ...)
module
->
i_score
=
va_arg
(
ap
,
int
);
module
->
i_score
=
va_arg
(
ap
,
int
);
break
;
break
;
case
VLC_MODULE_PROGRAM
:
msg_Warn
(
module
,
"deprecated module property %d"
,
propid
);
break
;
case
VLC_MODULE_CB_OPEN
:
case
VLC_MODULE_CB_OPEN
:
module
->
pf_activate
=
va_arg
(
ap
,
int
(
*
)
(
vlc_object_t
*
));
module
->
pf_activate
=
va_arg
(
ap
,
int
(
*
)
(
vlc_object_t
*
));
break
;
break
;
...
@@ -151,9 +164,32 @@ int vlc_module_set (module_t *module, int propid, ...)
...
@@ -151,9 +164,32 @@ int vlc_module_set (module_t *module, int propid, ...)
break
;
break
;
}
}
case
VLC_MODULE_PROGRAM
:
case
VLC_MODULE_SHORTNAME
:
msg_Warn
(
module
,
"deprecated module property %d"
,
propid
);
{
const
char
*
domain
=
va_arg
(
ap
,
const
char
*
);
if
(
domain
==
NULL
)
domain
=
PACKAGE
;
module
->
psz_shortname
=
dgettext
(
domain
,
va_arg
(
ap
,
char
*
));
break
;
}
case
VLC_MODULE_DESCRIPTION
:
{
const
char
*
domain
=
va_arg
(
ap
,
const
char
*
);
if
(
domain
==
NULL
)
domain
=
PACKAGE
;
module
->
psz_longname
=
dgettext
(
domain
,
va_arg
(
ap
,
char
*
));
break
;
break
;
}
case
VLC_MODULE_HELP
:
{
const
char
*
domain
=
va_arg
(
ap
,
const
char
*
);
if
(
domain
==
NULL
)
domain
=
PACKAGE
;
module
->
psz_help
=
dgettext
(
domain
,
va_arg
(
ap
,
char
*
));
break
;
}
default:
default:
msg_Err
(
module
,
"unknown module property %d"
,
propid
);
msg_Err
(
module
,
"unknown module property %d"
,
propid
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment