From 1a8e2228f66b93cb18af3127dbc16ace2bb9e6d3 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 28 Feb 2024 11:25:07 +0000 Subject: [PATCH] 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 --- girepository/compiler/compiler.c | 3 ++- girepository/decompiler/decompiler.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/girepository/compiler/compiler.c b/girepository/compiler/compiler.c index b0fc59d45..c786d4f5e 100644 --- a/girepository/compiler/compiler.c +++ b/girepository/compiler/compiler.c @@ -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); diff --git a/girepository/decompiler/decompiler.c b/girepository/decompiler/decompiler.c index 951e11d82..9e183374d 100644 --- a/girepository/decompiler/decompiler.c +++ b/girepository/decompiler/decompiler.c @@ -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; @@ -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)) {