mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Merge branch 'wip/smcv/cli-placeholders' into 'main'
Add missing argument placeholders to several command-line tools See merge request GNOME/glib!3946
This commit is contained in:
commit
8618f50d16
@ -404,7 +404,7 @@ static const GOptionEntry connection_entries[] =
|
||||
{
|
||||
{ "system", 'y', 0, G_OPTION_ARG_NONE, &opt_connection_system, N_("Connect to the system bus"), NULL},
|
||||
{ "session", 'e', 0, G_OPTION_ARG_NONE, &opt_connection_session, N_("Connect to the session bus"), NULL},
|
||||
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_connection_address, N_("Connect to given D-Bus address"), NULL},
|
||||
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_connection_address, N_("Connect to given D-Bus address"), N_("ADDRESS") },
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
|
@ -830,8 +830,8 @@ main (int argc, char **argv)
|
||||
{ "manual-register", 0, 0, G_OPTION_ARG_NONE, &manual_register, N_("Don’t automatically create and register resource"), NULL },
|
||||
{ "internal", 0, 0, G_OPTION_ARG_NONE, &internal, N_("Don’t export functions; declare them G_GNUC_INTERNAL"), NULL },
|
||||
{ "external-data", 0, 0, G_OPTION_ARG_NONE, &external_data, N_("Don’t embed resource data in the C file; assume it's linked externally instead"), NULL },
|
||||
{ "c-name", 0, 0, G_OPTION_ARG_STRING, &c_name, N_("C identifier name used for the generated source code"), NULL },
|
||||
{ "compiler", 'C', 0, G_OPTION_ARG_STRING, &compiler, N_("The target C compiler (default: the CC environment variable)"), NULL },
|
||||
{ "c-name", 0, 0, G_OPTION_ARG_STRING, &c_name, N_("C identifier name used for the generated source code"), N_("IDENTIFIER") },
|
||||
{ "compiler", 'C', 0, G_OPTION_ARG_STRING, &compiler, N_("The target C compiler (default: the CC environment variable)"), N_("COMMAND") },
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
|
@ -144,7 +144,7 @@ log_handler (const gchar *log_domain,
|
||||
}
|
||||
|
||||
static GOptionEntry options[] = {
|
||||
{ "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, N_("Include directories in GIR search path"), NULL },
|
||||
{ "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, N_("Include directories in GIR search path"), N_("DIRECTORY") },
|
||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, N_("Output file"), N_("FILE") },
|
||||
{ "shared-library", 'l', 0, G_OPTION_ARG_FILENAME_ARRAY, &shlibs, N_("Shared library"), N_("FILE") },
|
||||
{ "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Show debug messages"), NULL },
|
||||
@ -164,7 +164,8 @@ main (int argc, char **argv)
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
context = g_option_context_new ("");
|
||||
/* Translators: commandline placeholder */
|
||||
context = g_option_context_new (_("FILE"));
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
g_option_context_parse (context, &argc, &argv, &error);
|
||||
g_option_context_free (context);
|
||||
|
@ -37,6 +37,7 @@ int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GIRepository *repository = NULL;
|
||||
gchar *param;
|
||||
gchar *output = NULL;
|
||||
gchar **includedirs = NULL;
|
||||
gboolean show_all = FALSE;
|
||||
@ -49,7 +50,7 @@ main (int argc, char *argv[])
|
||||
GOptionEntry options[] =
|
||||
{
|
||||
{ "output", 'o', 0, G_OPTION_ARG_FILENAME, &output, N_("Output file"), N_("FILE") },
|
||||
{ "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, N_("Include directories in GIR search path"), NULL },
|
||||
{ "includedir", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &includedirs, N_("Include directories in GIR search path"), N_("DIRECTORY") },
|
||||
{ "all", 0, 0, G_OPTION_ARG_NONE, &show_all, N_("Show all available information"), NULL, },
|
||||
{ "version", 0, 0, G_OPTION_ARG_NONE, &show_version, N_("Show program’s version number and exit"), NULL },
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &input, NULL, NULL },
|
||||
@ -60,7 +61,10 @@ main (int argc, char *argv[])
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
context = g_option_context_new ("");
|
||||
/* Translators: commandline placeholder */
|
||||
param = g_strdup_printf ("%s…", _("FILE"));
|
||||
context = g_option_context_new (param);
|
||||
g_free (param);
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user