mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
girepository: Provide placeholders for positional parameters
Otherwise, correct invocation isn't clear from the --help output. This does not introduce new translated strings: FILE was already translated. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
9541b43eef
commit
1a8e2228f6
@ -164,7 +164,8 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
setlocale (LC_ALL, "");
|
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_add_main_entries (context, options, NULL);
|
||||||
g_option_context_parse (context, &argc, &argv, &error);
|
g_option_context_parse (context, &argc, &argv, &error);
|
||||||
g_option_context_free (context);
|
g_option_context_free (context);
|
||||||
|
@ -37,6 +37,7 @@ int
|
|||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
GIRepository *repository = NULL;
|
GIRepository *repository = NULL;
|
||||||
|
gchar *param;
|
||||||
gchar *output = NULL;
|
gchar *output = NULL;
|
||||||
gchar **includedirs = NULL;
|
gchar **includedirs = NULL;
|
||||||
gboolean show_all = FALSE;
|
gboolean show_all = FALSE;
|
||||||
@ -60,7 +61,10 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
setlocale (LC_ALL, "");
|
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);
|
g_option_context_add_main_entries (context, options, NULL);
|
||||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user