diff --git a/app/Makefile.am.inc b/app/Makefile.am.inc index bc326014..9fa790c7 100644 --- a/app/Makefile.am.inc +++ b/app/Makefile.am.inc @@ -34,4 +34,5 @@ flatpak_SOURCES = \ $(NULL) flatpak_LDADD = $(BASE_LIBS) $(OSTREE_LIBS) $(SOUP_LIBS) $(LIBARCHIVE_LIBS) libglnx.la libflatpak-common.la -flatpak_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(LIBARCHIVE_CFLAGS) +flatpak_CFLAGS = $(BASE_CFLAGS) $(OSTREE_CFLAGS) $(SOUP_CFLAGS) $(LIBARCHIVE_CFLAGS) \ + -DLOCALEDIR=\"$(localedir)\" diff --git a/app/flatpak-builtins-add-remote.c b/app/flatpak-builtins-add-remote.c index c4781129..431080c9 100644 --- a/app/flatpak-builtins-add-remote.c +++ b/app/flatpak-builtins-add-remote.c @@ -25,6 +25,8 @@ #include #include +#include + #include #include "libgsystem.h" @@ -54,26 +56,26 @@ static char **opt_gpg_import; static GOptionEntry add_options[] = { - { "if-not-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_not_exists, "Do nothing if the provided remote exists", NULL }, - { "from", 0, 0, G_OPTION_ARG_FILENAME, &opt_from, "Load options from file", "FILE" }, + { "if-not-exists", 0, 0, G_OPTION_ARG_NONE, &opt_if_not_exists, N_("Do nothing if the provided remote exists"), NULL }, + { "from", 0, 0, G_OPTION_ARG_FILENAME, &opt_from, N_("Load options from file"), N_("FILE") }, { NULL } }; static GOptionEntry modify_options[] = { - { "gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_do_gpg_verify, "Enable GPG verification", NULL }, - { "enumerate", 0, 0, G_OPTION_ARG_NONE, &opt_do_enumerate, "Mark the remote as enumerate", NULL }, - { "url", 0, 0, G_OPTION_ARG_STRING, &opt_url, "Set a new url", NULL }, - { "enable", 0, 0, G_OPTION_ARG_NONE, &opt_enable, "Enable the remote", }, + { "gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_do_gpg_verify, N_("Enable GPG verification"), NULL }, + { "enumerate", 0, 0, G_OPTION_ARG_NONE, &opt_do_enumerate, N_("Mark the remote as enumerate"), NULL }, + { "url", 0, 0, G_OPTION_ARG_STRING, &opt_url, N_("Set a new url"), N_("URL") }, + { "enable", 0, 0, G_OPTION_ARG_NONE, &opt_enable, N_("Enable the remote"), NULL }, { NULL } }; static GOptionEntry common_options[] = { - { "no-gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_no_gpg_verify, "Disable GPG verification", NULL }, - { "no-enumerate", 0, 0, G_OPTION_ARG_NONE, &opt_no_enumerate, "Mark the remote as don't enumerate", NULL }, - { "prio", 0, 0, G_OPTION_ARG_INT, &opt_prio, "Set priority (default 1, higher is more prioritized)", NULL }, - { "title", 0, 0, G_OPTION_ARG_STRING, &opt_title, "A nice name to use for this remote", "TITLE" }, - { "gpg-import", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_import, "Import GPG key from FILE (- for stdin)", "FILE" }, - { "disable", 0, 0, G_OPTION_ARG_NONE, &opt_disable, "Disable the remote", }, + { "no-gpg-verify", 0, 0, G_OPTION_ARG_NONE, &opt_no_gpg_verify, N_("Disable GPG verification"), NULL }, + { "no-enumerate", 0, 0, G_OPTION_ARG_NONE, &opt_no_enumerate, N_("Mark the remote as don't enumerate"), NULL }, + { "prio", 0, 0, G_OPTION_ARG_INT, &opt_prio, N_("Set priority (default 1, higher is more prioritized)"), N_("PRIORITY") }, + { "title", 0, 0, G_OPTION_ARG_STRING, &opt_title, N_("A nice name to use for this remote"), N_("TITLE") }, + { "gpg-import", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_import, N_("Import GPG key from FILE (- for stdin)"), N_("FILE") }, + { "disable", 0, 0, G_OPTION_ARG_NONE, &opt_disable, N_("Disable the remote"), NULL }, { NULL } }; @@ -262,7 +264,8 @@ flatpak_builtin_add_remote (int argc, char **argv, g_autoptr(GKeyFile) config = NULL; g_autoptr(GBytes) gpg_data = NULL; - context = g_option_context_new ("NAME [LOCATION] - Add a remote repository"); + context = g_option_context_new (_("NAME [LOCATION] - Add a remote repository")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, common_options, NULL); @@ -365,7 +368,8 @@ flatpak_builtin_modify_remote (int argc, char **argv, GCancellable *cancellable, g_autoptr(GBytes) gpg_data = NULL; const char *remote_name; - context = g_option_context_new ("NAME - Modify a remote repository"); + context = g_option_context_new (_("NAME - Modify a remote repository")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, common_options, NULL); diff --git a/app/flatpak-builtins-build-bundle.c b/app/flatpak-builtins-build-bundle.c index 8fd8ef0c..e396e361 100644 --- a/app/flatpak-builtins-build-bundle.c +++ b/app/flatpak-builtins-build-bundle.c @@ -25,6 +25,8 @@ #include #include +#include + #include #include "libgsystem.h" @@ -46,11 +48,11 @@ static char **opt_gpg_file; static gboolean opt_oci = FALSE; static GOptionEntry options[] = { - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Export runtime instead of app"}, - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to bundle for", "ARCH" }, - { "repo-url", 0, 0, G_OPTION_ARG_STRING, &opt_repo_url, "Url for repo", "URL" }, - { "gpg-keys", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_file, "Add GPG key from FILE (- for stdin)", "FILE" }, - { "oci", 0, 0, G_OPTION_ARG_NONE, &opt_oci, "Export oci image instead of flatpak bundle"}, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Export runtime instead of app"), NULL }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to bundle for"), N_("ARCH") }, + { "repo-url", 0, 0, G_OPTION_ARG_STRING, &opt_repo_url, N_("Url for repo"), N_("URL") }, + { "gpg-keys", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_file, N_("Add GPG key from FILE (- for stdin)"), N_("FILE") }, + { "oci", 0, 0, G_OPTION_ARG_NONE, &opt_oci, N_("Export oci image instead of flatpak bundle"), NULL }, { NULL } }; @@ -893,7 +895,8 @@ flatpak_builtin_build_bundle (int argc, char **argv, GCancellable *cancellable, const char *branch; g_autofree char *full_branch = NULL; - context = g_option_context_new ("LOCATION FILENAME NAME [BRANCH] - Create a single file bundle from a local repository"); + context = g_option_context_new (_("LOCATION FILENAME NAME [BRANCH] - Create a single file bundle from a local repository")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c index 3f3093d2..96f02819 100644 --- a/app/flatpak-builtins-build-export.c +++ b/app/flatpak-builtins-build-export.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -44,17 +46,17 @@ static char *opt_files; static char *opt_metadata; static GOptionEntry options[] = { - { "subject", 's', 0, G_OPTION_ARG_STRING, &opt_subject, "One line subject", "SUBJECT" }, - { "body", 'b', 0, G_OPTION_ARG_STRING, &opt_body, "Full description", "BODY" }, - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Architecture to export for (must be host compatible)", "ARCH" }, - { "runtime", 'r', 0, G_OPTION_ARG_NONE, &opt_runtime, "Commit runtime (/usr), not /app" }, - { "update-appstream", 0, 0, G_OPTION_ARG_NONE, &opt_update_appstream, "Update the appstream branch" }, - { "files", 0, 0, G_OPTION_ARG_STRING, &opt_files, "Use alternative directory for the files", "SUBDIR"}, - { "metadata", 0, 0, G_OPTION_ARG_STRING, &opt_metadata, "Use alternative file for the metadata", "FILE"}, - { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"}, - { "exclude", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_exclude, "Files to exclude", "PATTERN"}, - { "include", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_include, "Excluded files to include", "PATTERN"}, - { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, + { "subject", 's', 0, G_OPTION_ARG_STRING, &opt_subject, N_("One line subject"), N_("SUBJECT") }, + { "body", 'b', 0, G_OPTION_ARG_STRING, &opt_body, N_("Full description"), N_("BODY") }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Architecture to export for (must be host compatible)"), N_("ARCH") }, + { "runtime", 'r', 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Commit runtime (/usr), not /app"), NULL }, + { "update-appstream", 0, 0, G_OPTION_ARG_NONE, &opt_update_appstream, N_("Update the appstream branch"), NULL }, + { "files", 0, 0, G_OPTION_ARG_STRING, &opt_files, N_("Use alternative directory for the files"), N_("SUBDIR") }, + { "metadata", 0, 0, G_OPTION_ARG_STRING, &opt_metadata, N_("Use alternative file for the metadata"), N_("FILE") }, + { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, N_("GPG Key ID to sign the commit with"), N_("KEY-ID") }, + { "exclude", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_exclude, N_("Files to exclude"), N_("PATTERN") }, + { "include", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_include, N_("Excluded files to include"), N_("PATTERN") }, + { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, N_("GPG Homedir to use when looking for keyrings"), N_("HOMEDIR") }, { NULL } }; @@ -251,7 +253,8 @@ flatpak_builtin_build_export (int argc, char **argv, GCancellable *cancellable, g_autoptr(OstreeRepoCommitModifier) modifier = NULL; CommitData commit_data = {0}; - context = g_option_context_new ("LOCATION DIRECTORY [BRANCH] - Create a repository from a build directory"); + context = g_option_context_new (_("LOCATION DIRECTORY [BRANCH] - Create a repository from a build directory")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) goto out; diff --git a/app/flatpak-builtins-build-finish.c b/app/flatpak-builtins-build-finish.c index 0ea40fa0..fcbfe074 100644 --- a/app/flatpak-builtins-build-finish.c +++ b/app/flatpak-builtins-build-finish.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -37,8 +39,8 @@ static char *opt_command; static gboolean opt_no_exports; static GOptionEntry options[] = { - { "command", 0, 0, G_OPTION_ARG_STRING, &opt_command, "Command to set", "COMMAND" }, - { "no-exports", 0, 0, G_OPTION_ARG_NONE, &opt_no_exports, "Don't process exports" }, + { "command", 0, 0, G_OPTION_ARG_STRING, &opt_command, N_("Command to set"), N_("COMMAND") }, + { "no-exports", 0, 0, G_OPTION_ARG_NONE, &opt_no_exports, N_("Don't process exports"), NULL }, { NULL } }; @@ -349,7 +351,8 @@ flatpak_builtin_build_finish (int argc, char **argv, GCancellable *cancellable, g_autoptr(GKeyFile) metakey = NULL; g_autoptr(FlatpakContext) arg_context = NULL; - context = g_option_context_new ("DIRECTORY - Convert a directory to a bundle"); + context = g_option_context_new (_("DIRECTORY - Convert a directory to a bundle")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); arg_context = flatpak_context_new (); g_option_context_add_group (context, flatpak_context_get_options (arg_context)); diff --git a/app/flatpak-builtins-build-import-bundle.c b/app/flatpak-builtins-build-import-bundle.c index e682841e..7603179a 100644 --- a/app/flatpak-builtins-build-import-bundle.c +++ b/app/flatpak-builtins-build-import-bundle.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -35,8 +37,8 @@ static char *opt_ref; static gboolean opt_oci = FALSE; static GOptionEntry options[] = { - { "ref", 0, 0, G_OPTION_ARG_STRING, &opt_ref, "Override the ref used for the imported bundle", "REF" }, - { "oci", 0, 0, G_OPTION_ARG_NONE, &opt_oci, "Import oci image instead of flatpak bundle"}, + { "ref", 0, 0, G_OPTION_ARG_STRING, &opt_ref, N_("Override the ref used for the imported bundle"), N_("REF") }, + { "oci", 0, 0, G_OPTION_ARG_NONE, &opt_oci, N_("Import oci image instead of flatpak bundle"), NULL }, { NULL } }; @@ -279,7 +281,8 @@ flatpak_builtin_build_import (int argc, char **argv, GCancellable *cancellable, const char *location; const char *filename; - context = g_option_context_new ("LOCATION FILENAME - Import a file bundle into a local repository"); + context = g_option_context_new (_("LOCATION FILENAME - Import a file bundle into a local repository")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-build-init.c b/app/flatpak-builtins-build-init.c index b5bfdf0f..e830ccde 100644 --- a/app/flatpak-builtins-build-init.c +++ b/app/flatpak-builtins-build-init.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -40,13 +42,13 @@ static gboolean opt_writable_sdk; static gboolean opt_update; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to use", "ARCH" }, - { "var", 'v', 0, G_OPTION_ARG_STRING, &opt_var, "Initialize var from named runtime", "RUNTIME" }, - { "writable-sdk", 'w', 0, G_OPTION_ARG_NONE, &opt_writable_sdk, "Initialize /usr with a writable copy of the sdk", }, - { "tag", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_tags, "Add a tag", }, - { "sdk-extension", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_sdk_extensions, "include this sdk extension in /usr", "EXTENSION"}, - { "sdk-dir", 0, 0, G_OPTION_ARG_STRING, &opt_sdk_dir, "Where to store sdk (defaults to 'usr')", "DIR" }, - { "update", 0, 0, G_OPTION_ARG_NONE, &opt_update, "Re-initialize the sdk/var", }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to use"), N_("ARCH") }, + { "var", 'v', 0, G_OPTION_ARG_STRING, &opt_var, N_("Initialize var from named runtime"), N_("RUNTIME") }, + { "writable-sdk", 'w', 0, G_OPTION_ARG_NONE, &opt_writable_sdk, N_("Initialize /usr with a writable copy of the sdk"), NULL }, + { "tag", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_tags, N_("Add a tag"), N_("TAG") }, + { "sdk-extension", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_sdk_extensions, N_("Include this sdk extension in /usr"), N_("EXTENSION") }, + { "sdk-dir", 0, 0, G_OPTION_ARG_STRING, &opt_sdk_dir, N_("Where to store sdk (defaults to 'usr')"), N_("DIR") }, + { "update", 0, 0, G_OPTION_ARG_NONE, &opt_update, N_("Re-initialize the sdk/var"), NULL }, { NULL } }; @@ -73,7 +75,8 @@ flatpak_builtin_build_init (int argc, char **argv, GCancellable *cancellable, GE g_autofree char *sdk_ref = NULL; int i; - context = g_option_context_new ("DIRECTORY APPNAME SDK RUNTIME [BRANCH] - Initialize a directory for building"); + context = g_option_context_new (_("DIRECTORY APPNAME SDK RUNTIME [BRANCH] - Initialize a directory for building")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-build-sign.c b/app/flatpak-builtins-build-sign.c index caf08cf4..0ce206a4 100644 --- a/app/flatpak-builtins-build-sign.c +++ b/app/flatpak-builtins-build-sign.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -37,10 +39,10 @@ static char **opt_gpg_key_ids; static char *opt_gpg_homedir; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to install for", "ARCH" }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Look for runtime with the specified name", }, - { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"}, - { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to install for"), N_("ARCH") }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Look for runtime with the specified name"), NULL }, + { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, N_("GPG Key ID to sign the commit with"), N_("KEY-ID") }, + { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, N_("GPG Homedir to use when looking for keyrings"), N_("HOMEDIR") }, { NULL } }; @@ -58,7 +60,8 @@ flatpak_builtin_build_sign (int argc, char **argv, GCancellable *cancellable, GE g_autofree char *ref = NULL; char **iter; - context = g_option_context_new ("LOCATION ID [BRANCH] - Create a repository from a build directory"); + context = g_option_context_new (_("LOCATION ID [BRANCH] - Create a repository from a build directory")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-build.c b/app/flatpak-builtins-build.c index bec98aef..1a7bdee1 100644 --- a/app/flatpak-builtins-build.c +++ b/app/flatpak-builtins-build.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -38,9 +40,9 @@ static char *opt_build_dir; static char **opt_bind_mounts; static GOptionEntry options[] = { - { "runtime", 'r', 0, G_OPTION_ARG_NONE, &opt_runtime, "Use non-devel runtime", NULL }, - { "bind-mount", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_bind_mounts, "Add bind mount", "DEST=SRC" }, - { "build-dir", 0, 0, G_OPTION_ARG_STRING, &opt_build_dir, "Start build in this directory", "DIR" }, + { "runtime", 'r', 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Use non-devel runtime"), NULL }, + { "bind-mount", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_bind_mounts, N_("Add bind mount"), N_("DEST=SRC") }, + { "build-dir", 0, 0, G_OPTION_ARG_STRING, &opt_build_dir, N_("Start build in this directory"), N_("DIR") }, { NULL } }; @@ -85,7 +87,8 @@ flatpak_builtin_build (int argc, char **argv, GCancellable *cancellable, GError gboolean custom_usr; g_auto(GStrv) runtime_ref_parts = NULL; - context = g_option_context_new ("DIRECTORY [COMMAND [args...]] - Build in directory"); + context = g_option_context_new (_("DIRECTORY [COMMAND [args...]] - Build in directory")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); rest_argc = 0; for (i = 1; i < argc; i++) diff --git a/app/flatpak-builtins-delete-remote.c b/app/flatpak-builtins-delete-remote.c index 78dc34c8..29984b15 100644 --- a/app/flatpak-builtins-delete-remote.c +++ b/app/flatpak-builtins-delete-remote.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -33,7 +35,7 @@ static gboolean opt_force; static GOptionEntry delete_options[] = { - { "force", 0, 0, G_OPTION_ARG_NONE, &opt_force, "Remove remote even if in use", }, + { "force", 0, 0, G_OPTION_ARG_NONE, &opt_force, N_("Remove remote even if in use"), NULL }, { NULL } }; @@ -45,7 +47,8 @@ flatpak_builtin_delete_remote (int argc, char **argv, GCancellable *cancellable, g_autoptr(FlatpakDir) dir = NULL; const char *remote_name; - context = g_option_context_new ("NAME - Delete a remote repository"); + context = g_option_context_new (_("NAME - Delete a remote repository")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); g_option_context_add_main_entries (context, delete_options, NULL); diff --git a/app/flatpak-builtins-document-export.c b/app/flatpak-builtins-document-export.c index ecac5d56..3d50fe0a 100644 --- a/app/flatpak-builtins-document-export.c +++ b/app/flatpak-builtins-document-export.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" #include "document-portal/xdp-dbus.h" @@ -50,18 +52,18 @@ static gboolean opt_forbid_grant_permissions = FALSE; static char **opt_apps = NULL; static GOptionEntry options[] = { - { "unique", 'u', 0, G_OPTION_ARG_NONE, &opt_unique, "Create a unique document reference", NULL }, - { "transient", 't', 0, G_OPTION_ARG_NONE, &opt_transient, "Make the document transient for the current session", NULL }, - { "noexist", 'n', 0, G_OPTION_ARG_NONE, &opt_noexist, "Don't require the file to exist already", NULL }, - { "allow-read", 'r', 0, G_OPTION_ARG_NONE, &opt_allow_read, "Give the app read permissions", NULL }, - { "allow-write", 'w', 0, G_OPTION_ARG_NONE, &opt_allow_write, "Give the app write permissions", NULL }, - { "allow-delete", 'd', 0, G_OPTION_ARG_NONE, &opt_allow_delete, "Give the app delete permissions", NULL }, - { "allow-grant-permission", 'g', 0, G_OPTION_ARG_NONE, &opt_allow_grant_permissions, "Give the app permissions to grant further permissions", NULL }, - { "forbid-read", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_read, "Revoke read permissions of the app", NULL }, - { "forbid-write", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_write, "Revoke write permissions of the app", NULL }, - { "forbid-delete", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_delete, "Revoke delete permissions of the app", NULL }, - { "forbid-grant-permission", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_grant_permissions, "Revoke the permission to grant further permissions", NULL }, - { "app", 'a', 0, G_OPTION_ARG_STRING_ARRAY, &opt_apps, "Add permissions for this app", "APPID" }, + { "unique", 'u', 0, G_OPTION_ARG_NONE, &opt_unique, N_("Create a unique document reference"), NULL }, + { "transient", 't', 0, G_OPTION_ARG_NONE, &opt_transient, N_("Make the document transient for the current session"), NULL }, + { "noexist", 'n', 0, G_OPTION_ARG_NONE, &opt_noexist, N_("Don't require the file to exist already"), NULL }, + { "allow-read", 'r', 0, G_OPTION_ARG_NONE, &opt_allow_read, N_("Give the app read permissions"), NULL }, + { "allow-write", 'w', 0, G_OPTION_ARG_NONE, &opt_allow_write, N_("Give the app write permissions"), NULL }, + { "allow-delete", 'd', 0, G_OPTION_ARG_NONE, &opt_allow_delete, N_("Give the app delete permissions"), NULL }, + { "allow-grant-permission", 'g', 0, G_OPTION_ARG_NONE, &opt_allow_grant_permissions, N_("Give the app permissions to grant further permissions"), NULL }, + { "forbid-read", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_read, N_("Revoke read permissions of the app"), NULL }, + { "forbid-write", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_write, N_("Revoke write permissions of the app"), NULL }, + { "forbid-delete", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_delete, N_("Revoke delete permissions of the app"), NULL }, + { "forbid-grant-permission", 0, 0, G_OPTION_ARG_NONE, &opt_forbid_grant_permissions, N_("Revoke the permission to grant further permissions"), NULL }, + { "app", 'a', 0, G_OPTION_ARG_STRING_ARRAY, &opt_apps, N_("Add permissions for this app"), N_("APPID") }, { NULL } }; @@ -86,7 +88,8 @@ flatpak_builtin_document_export (int argc, char **argv, GUnixFDList *fd_list = NULL; const char *doc_id; - context = g_option_context_new ("FILE - Export a file to apps"); + context = g_option_context_new (_("FILE - Export a file to apps")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, diff --git a/app/flatpak-builtins-document-info.c b/app/flatpak-builtins-document-info.c index 1985ae5a..c043a4bb 100644 --- a/app/flatpak-builtins-document-info.c +++ b/app/flatpak-builtins-document-info.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" #include "document-portal/xdp-dbus.h" @@ -59,7 +61,8 @@ flatpak_builtin_document_info (int argc, char **argv, g_autoptr(GVariant) apps = NULL; g_autoptr(GVariantIter) iter = NULL; - context = g_option_context_new ("FILE - Get information about an exported file"); + context = g_option_context_new (_("FILE - Get information about an exported file")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, diff --git a/app/flatpak-builtins-document-list.c b/app/flatpak-builtins-document-list.c index dfdfc439..49c573f9 100644 --- a/app/flatpak-builtins-document-list.c +++ b/app/flatpak-builtins-document-list.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" #include "document-portal/xdp-dbus.h" @@ -52,7 +54,8 @@ flatpak_builtin_document_list (int argc, char **argv, const char *id; const char *path; - context = g_option_context_new ("[APPID] - List exported files"); + context = g_option_context_new (_("[APPID] - List exported files")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, diff --git a/app/flatpak-builtins-document-unexport.c b/app/flatpak-builtins-document-unexport.c index 0851db80..10e1e6cb 100644 --- a/app/flatpak-builtins-document-unexport.c +++ b/app/flatpak-builtins-document-unexport.c @@ -26,6 +26,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" #include "document-portal/xdp-dbus.h" @@ -51,7 +53,8 @@ flatpak_builtin_document_unexport (int argc, char **argv, const char *file; g_autofree char *doc_id = NULL; - context = g_option_context_new ("FILE - Unexport a file to apps"); + context = g_option_context_new (_("FILE - Unexport a file to apps")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, diff --git a/app/flatpak-builtins-enter.c b/app/flatpak-builtins-enter.c index d6834e83..325428f8 100644 --- a/app/flatpak-builtins-enter.c +++ b/app/flatpak-builtins-enter.c @@ -27,6 +27,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -146,7 +148,8 @@ flatpak_builtin_enter (int argc, uid = getuid (); gid = getgid (); - context = g_option_context_new ("MONITORPID [COMMAND [args...]] - Run a command inside a running sandbox"); + context = g_option_context_new (_("MONITORPID [COMMAND [args...]] - Run a command inside a running sandbox")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); rest_argc = 0; for (i = 1; i < argc; i++) diff --git a/app/flatpak-builtins-info.c b/app/flatpak-builtins-info.c index 2889aa9a..10a92d66 100644 --- a/app/flatpak-builtins-info.c +++ b/app/flatpak-builtins-info.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -41,14 +43,14 @@ static gboolean opt_show_origin; static char *opt_arch; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to use", "ARCH" }, - { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, "Show user installations", NULL }, - { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, "Show system-wide installations", NULL }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "List installed runtimes", }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "List installed applications", }, - { "show-ref", 'r', 0, G_OPTION_ARG_NONE, &opt_show_ref, "Show ref", }, - { "show-commit", 'c', 0, G_OPTION_ARG_NONE, &opt_show_commit, "Show commit", }, - { "show-origin", 'o', 0, G_OPTION_ARG_NONE, &opt_show_origin, "Show origin", }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to use"), N_("ARCH") }, + { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, N_("Show user installations"), NULL }, + { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, N_("Show system-wide installations"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("List installed runtimes"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("List installed applications"), NULL }, + { "show-ref", 'r', 0, G_OPTION_ARG_NONE, &opt_show_ref, N_("Show ref"), NULL }, + { "show-commit", 'c', 0, G_OPTION_ARG_NONE, &opt_show_commit, N_("Show commit"), NULL }, + { "show-origin", 'o', 0, G_OPTION_ARG_NONE, &opt_show_origin, N_("Show origin"), NULL }, { NULL } }; @@ -69,7 +71,8 @@ flatpak_builtin_info (int argc, char **argv, GCancellable *cancellable, GError * gboolean is_app = FALSE; gboolean first = TRUE; - context = g_option_context_new ("NAME [BRANCH] - Get info about installed app and/or runtime"); + context = g_option_context_new (_("NAME [BRANCH] - Get info about installed app and/or runtime")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-install.c b/app/flatpak-builtins-install.c index 6d3b42f2..d3b37b84 100644 --- a/app/flatpak-builtins-install.c +++ b/app/flatpak-builtins-install.c @@ -25,6 +25,8 @@ #include #include +#include + #include #include "libgsystem.h" @@ -46,15 +48,15 @@ static gboolean opt_app; static gboolean opt_bundle; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to install for", "ARCH" }, - { "no-pull", 0, 0, G_OPTION_ARG_NONE, &opt_no_pull, "Don't pull, only install from local cache", }, - { "no-deploy", 0, 0, G_OPTION_ARG_NONE, &opt_no_deploy, "Don't deploy, only download to local cache", }, - { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, "Don't install related refs", }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Look for runtime with the specified name", }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "Look for app with the specified name", }, - { "bundle", 0, 0, G_OPTION_ARG_NONE, &opt_bundle, "Install from local bundle file", }, - { "gpg-file", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_file, "Check bundle signatures with GPG key from FILE (- for stdin)", "FILE" }, - { "subpath", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_subpaths, "Only install this subpath", "PATH" }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to install for"), N_("ARCH") }, + { "no-pull", 0, 0, G_OPTION_ARG_NONE, &opt_no_pull, N_("Don't pull, only install from local cache"), NULL }, + { "no-deploy", 0, 0, G_OPTION_ARG_NONE, &opt_no_deploy, N_("Don't deploy, only download to local cache"), NULL }, + { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, N_("Don't install related refs"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Look for runtime with the specified name"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("Look for app with the specified name"), NULL }, + { "bundle", 0, 0, G_OPTION_ARG_NONE, &opt_bundle, N_("Install from local bundle file"), NULL }, + { "gpg-file", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_gpg_file, N_("Check bundle signatures with GPG key from FILE (- for stdin)"), N_("FILE") }, + { "subpath", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_subpaths, N_("Only install this subpath"), N_("PATH") }, { NULL } }; @@ -148,7 +150,8 @@ flatpak_builtin_install (int argc, char **argv, GCancellable *cancellable, GErro g_autoptr(GPtrArray) related = NULL; int i; - context = g_option_context_new ("REPOSITORY NAME [BRANCH] - Install an application or runtime"); + context = g_option_context_new (_("REPOSITORY NAME [BRANCH] - Install an application or runtime")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, 0, &dir, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-list-remotes.c b/app/flatpak-builtins-list-remotes.c index c1cfeb50..5f0c09b4 100644 --- a/app/flatpak-builtins-list-remotes.c +++ b/app/flatpak-builtins-list-remotes.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -37,10 +39,10 @@ static gboolean opt_system; static gboolean opt_show_disabled; static GOptionEntry options[] = { - { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, "Show user installations", NULL }, - { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, "Show system-wide installations", NULL }, - { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, "Show remote details", NULL }, - { "show-disabled", 0, 0, G_OPTION_ARG_NONE, &opt_show_disabled, "Show disabled remotes", NULL }, + { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, N_("Show user installations"), NULL }, + { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, N_("Show system-wide installations"), NULL }, + { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, N_("Show remote details"), NULL }, + { "show-disabled", 0, 0, G_OPTION_ARG_NONE, &opt_show_disabled, N_("Show disabled remotes"), NULL }, { NULL } }; @@ -54,7 +56,8 @@ flatpak_builtin_list_remotes (int argc, char **argv, GCancellable *cancellable, guint i = 0, n_dirs = 0, j; FlatpakTablePrinter *printer; - context = g_option_context_new (" - List remote repositories"); + context = g_option_context_new (_(" - List remote repositories")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-list.c b/app/flatpak-builtins-list.c index 2922f46d..b44159cf 100644 --- a/app/flatpak-builtins-list.c +++ b/app/flatpak-builtins-list.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -38,11 +40,11 @@ static gboolean opt_runtime; static gboolean opt_app; static GOptionEntry options[] = { - { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, "Show user installations", NULL }, - { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, "Show system-wide installations", NULL }, - { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, "Show arches and branches", NULL }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "List installed runtimes", }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "List installed applications", }, + { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, N_("Show user installations"), NULL }, + { "system", 0, 0, G_OPTION_ARG_NONE, &opt_system, N_("Show system-wide installations"), NULL }, + { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, N_("Show arches and branches"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("List installed runtimes"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("List installed applications"), NULL }, { NULL } }; @@ -246,7 +248,8 @@ flatpak_builtin_list (int argc, char **argv, GCancellable *cancellable, GError * { g_autoptr(GOptionContext) context = NULL; - context = g_option_context_new (" - List installed apps and/or runtimes"); + context = g_option_context_new (_(" - List installed apps and/or runtimes")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-ls-remote.c b/app/flatpak-builtins-ls-remote.c index a333f1f8..41dff1cc 100644 --- a/app/flatpak-builtins-ls-remote.c +++ b/app/flatpak-builtins-ls-remote.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -38,11 +40,11 @@ static gboolean opt_only_updates; static char *opt_arch; static GOptionEntry options[] = { - { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, "Show arches and branches", NULL }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Show only runtimes", NULL }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "Show only apps", NULL }, - { "updates", 0, 0, G_OPTION_ARG_NONE, &opt_only_updates, "Show only those where updates are available", NULL }, - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Limit to this arch (* for all)", "ARCH" }, + { "show-details", 'd', 0, G_OPTION_ARG_NONE, &opt_show_details, N_("Show arches and branches"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Show only runtimes"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("Show only apps"), NULL }, + { "updates", 0, 0, G_OPTION_ARG_NONE, &opt_only_updates, N_("Show only those where updates are available"), NULL }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Limit to this arch (* for all)"), N_("ARCH") }, { NULL } }; @@ -63,7 +65,8 @@ flatpak_builtin_ls_remote (int argc, char **argv, GCancellable *cancellable, GEr const char **arches = flatpak_get_arches (); const char *opt_arches[] = {NULL, NULL}; - context = g_option_context_new (" REMOTE - Show available runtimes and applications"); + context = g_option_context_new (_(" REMOTE - Show available runtimes and applications")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, 0, &dir, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-make-current.c b/app/flatpak-builtins-make-current.c index 76e82fee..43c2aa85 100644 --- a/app/flatpak-builtins-make-current.c +++ b/app/flatpak-builtins-make-current.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -34,7 +36,7 @@ static char *opt_arch; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to make current for", "ARCH" }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to make current for"), N_("ARCH") }, { NULL } }; @@ -49,7 +51,8 @@ flatpak_builtin_make_current_app (int argc, char **argv, GCancellable *cancellab g_autofree char *ref = NULL; g_auto(GLnxLockFile) lock = GLNX_LOCK_FILE_INIT; - context = g_option_context_new ("APP BRANCH - Make branch of application current"); + context = g_option_context_new (_("APP BRANCH - Make branch of application current")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, 0, &dir, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-override.c b/app/flatpak-builtins-override.c index 9a5ceaa3..47e23a51 100644 --- a/app/flatpak-builtins-override.c +++ b/app/flatpak-builtins-override.c @@ -27,6 +27,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -49,7 +51,8 @@ flatpak_builtin_override (int argc, char **argv, GCancellable *cancellable, GErr g_autoptr(FlatpakContext) overrides = NULL; g_autoptr(GError) my_error = NULL; - context = g_option_context_new ("APP - Override settings for application"); + context = g_option_context_new (_("APP - Override settings for application")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); arg_context = flatpak_context_new (); g_option_context_add_group (context, flatpak_context_get_options (arg_context)); diff --git a/app/flatpak-builtins-repo-update.c b/app/flatpak-builtins-repo-update.c index 0c170e56..8a7cf19b 100644 --- a/app/flatpak-builtins-repo-update.c +++ b/app/flatpak-builtins-repo-update.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -39,12 +41,12 @@ static gboolean opt_generate_deltas; static gint opt_prune_depth = -1; static GOptionEntry options[] = { - { "title", 0, 0, G_OPTION_ARG_STRING, &opt_title, "A nice name to use for this repository", "TITLE" }, - { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, "GPG Key ID to sign the summary with", "KEY-ID"}, - { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, - { "generate-static-deltas", 0, 0, G_OPTION_ARG_NONE, &opt_generate_deltas, "Generate delta files", NULL }, - { "prune", 0, 0, G_OPTION_ARG_NONE, &opt_prune, "Prune unused objects", NULL }, - { "prune-depth", 0, 0, G_OPTION_ARG_INT, &opt_prune_depth, "Only traverse DEPTH parents for each commit (default: -1=infinite)", "DEPTH" }, + { "title", 0, 0, G_OPTION_ARG_STRING, &opt_title, N_("A nice name to use for this repository"), N_("TITLE") }, + { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_gpg_key_ids, N_("GPG Key ID to sign the summary with"), N_("KEY-ID") }, + { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, N_("GPG Homedir to use when looking for keyrings"), N_("HOMEDIR") }, + { "generate-static-deltas", 0, 0, G_OPTION_ARG_NONE, &opt_generate_deltas, N_("Generate delta files"), NULL }, + { "prune", 0, 0, G_OPTION_ARG_NONE, &opt_prune, N_("Prune unused objects"), NULL }, + { "prune-depth", 0, 0, G_OPTION_ARG_INT, &opt_prune_depth, N_("Only traverse DEPTH parents for each commit (default: -1=infinite)"), N_("DEPTH") }, { NULL } }; @@ -58,7 +60,8 @@ flatpak_builtin_build_update_repo (int argc, char **argv, const char *location; g_autoptr(GError) my_error = NULL; - context = g_option_context_new ("LOCATION - Update repository metadata"); + context = g_option_context_new (_("LOCATION - Update repository metadata")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, FLATPAK_BUILTIN_FLAG_NO_DIR, NULL, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-run.c b/app/flatpak-builtins-run.c index de572e2b..f0ce6d0d 100644 --- a/app/flatpak-builtins-run.c +++ b/app/flatpak-builtins-run.c @@ -27,6 +27,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -45,14 +47,14 @@ static char *opt_runtime; static char *opt_runtime_version; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to use", "ARCH" }, - { "command", 0, 0, G_OPTION_ARG_STRING, &opt_command, "Command to run", "COMMAND" }, - { "branch", 0, 0, G_OPTION_ARG_STRING, &opt_branch, "Branch to use", "BRANCH" }, - { "devel", 'd', 0, G_OPTION_ARG_NONE, &opt_devel, "Use development runtime", NULL }, - { "runtime", 0, 0, G_OPTION_ARG_STRING, &opt_runtime, "Runtime to use", "RUNTIME" }, - { "runtime-version", 0, 0, G_OPTION_ARG_STRING, &opt_runtime_version, "Runtime version to use", "VERSION" }, - { "log-session-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_session_bus, "Log session bus calls", NULL }, - { "log-system-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_system_bus, "Log system bus calls", NULL }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to use"), N_("ARCH") }, + { "command", 0, 0, G_OPTION_ARG_STRING, &opt_command, N_("Command to run"), N_("COMMAND") }, + { "branch", 0, 0, G_OPTION_ARG_STRING, &opt_branch, N_("Branch to use"), N_("BRANCH") }, + { "devel", 'd', 0, G_OPTION_ARG_NONE, &opt_devel, N_("Use development runtime"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_STRING, &opt_runtime, N_("Runtime to use"), N_("RUNTIME") }, + { "runtime-version", 0, 0, G_OPTION_ARG_STRING, &opt_runtime_version, N_("Runtime version to use"), N_("VERSION") }, + { "log-session-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_session_bus, N_("Log session bus calls"), NULL }, + { "log-system-bus", 0, 0, G_OPTION_ARG_NONE, &opt_log_system_bus, N_("Log system bus calls"), NULL }, { NULL } }; @@ -68,7 +70,8 @@ flatpak_builtin_run (int argc, char **argv, GCancellable *cancellable, GError ** int rest_argv_start, rest_argc; g_autoptr(FlatpakContext) arg_context = NULL; - context = g_option_context_new ("APP [args...] - Run an app"); + context = g_option_context_new (_("APP [args...] - Run an app")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); rest_argc = 0; for (i = 1; i < argc; i++) diff --git a/app/flatpak-builtins-uninstall.c b/app/flatpak-builtins-uninstall.c index 79d7a104..376f1060 100644 --- a/app/flatpak-builtins-uninstall.c +++ b/app/flatpak-builtins-uninstall.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -39,12 +41,12 @@ static gboolean opt_runtime; static gboolean opt_app; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to uninstall", "ARCH" }, - { "keep-ref", 0, 0, G_OPTION_ARG_NONE, &opt_keep_ref, "Keep ref in local repository", NULL }, - { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, "Don't uninstall related refs", }, - { "force-remove", 0, 0, G_OPTION_ARG_NONE, &opt_force_remove, "Remove files even if running", NULL }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Look for runtime with the specified name", }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "Look for app with the specified name", }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to uninstall"), N_("ARCH") }, + { "keep-ref", 0, 0, G_OPTION_ARG_NONE, &opt_keep_ref, N_("Keep ref in local repository"), NULL }, + { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, N_("Don't uninstall related refs"), NULL }, + { "force-remove", 0, 0, G_OPTION_ARG_NONE, &opt_force_remove, N_("Remove files even if running"), NULL }, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Look for runtime with the specified name"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("Look for app with the specified name"), NULL }, { NULL } }; @@ -61,7 +63,8 @@ flatpak_builtin_uninstall (int argc, char **argv, GCancellable *cancellable, GEr g_autoptr(GPtrArray) related = NULL; int i; - context = g_option_context_new ("NAME [BRANCH] - Uninstall an application"); + context = g_option_context_new (_("NAME [BRANCH] - Uninstall an application")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, 0, &dir, cancellable, error)) return FALSE; diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index 300b5e70..16834109 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -25,6 +25,8 @@ #include #include +#include + #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -43,16 +45,16 @@ static gboolean opt_app; static gboolean opt_appstream; static GOptionEntry options[] = { - { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Arch to update for", "ARCH" }, - { "commit", 0, 0, G_OPTION_ARG_STRING, &opt_commit, "Commit to deploy", "COMMIT" }, - { "force-remove", 0, 0, G_OPTION_ARG_NONE, &opt_force_remove, "Remove old files even if running", NULL }, - { "no-pull", 0, 0, G_OPTION_ARG_NONE, &opt_no_pull, "Don't pull, only update from local cache", }, - { "no-deploy", 0, 0, G_OPTION_ARG_NONE, &opt_no_deploy, "Don't deploy, only download to local cache", }, - { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, "Don't update related refs", }, - { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, "Look for runtime with the specified name", }, - { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, "Look for app with the specified name", }, - { "appstream", 0, 0, G_OPTION_ARG_NONE, &opt_appstream, "Update appstream for remote", }, - { "subpath", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_subpaths, "Only update this subpath", "PATH" }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, N_("Arch to update for"), N_("ARCH") }, + { "commit", 0, 0, G_OPTION_ARG_STRING, &opt_commit, N_("Commit to deploy"), N_("COMMIT") }, + { "force-remove", 0, 0, G_OPTION_ARG_NONE, &opt_force_remove, N_("Remove old files even if running"), NULL }, + { "no-pull", 0, 0, G_OPTION_ARG_NONE, &opt_no_pull, N_("Don't pull, only update from local cache"), NULL }, + { "no-deploy", 0, 0, G_OPTION_ARG_NONE, &opt_no_deploy, N_("Don't deploy, only download to local cache"), NULL }, + { "no-related", 0, 0, G_OPTION_ARG_NONE, &opt_no_related, N_("Don't update related refs"), NULL}, + { "runtime", 0, 0, G_OPTION_ARG_NONE, &opt_runtime, N_("Look for runtime with the specified name"), NULL }, + { "app", 0, 0, G_OPTION_ARG_NONE, &opt_app, N_("Look for app with the specified name"), NULL }, + { "appstream", 0, 0, G_OPTION_ARG_NONE, &opt_appstream, N_("Update appstream for remote"), NULL }, + { "subpath", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &opt_subpaths, N_("Only update this subpath"), N_("PATH") }, { NULL } }; @@ -156,7 +158,8 @@ flatpak_builtin_update (int argc, gboolean failed = FALSE; int i; - context = g_option_context_new ("[NAME [BRANCH]] - Update an application or runtime"); + context = g_option_context_new (_("[NAME [BRANCH]] - Update an application or runtime")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); if (!flatpak_option_context_parse (context, options, &argc, &argv, 0, &dir, cancellable, error)) return FALSE; diff --git a/app/flatpak-main.c b/app/flatpak-main.c index 6a8ec7a9..92f04a01 100644 --- a/app/flatpak-main.c +++ b/app/flatpak-main.c @@ -26,6 +26,7 @@ #include #include +#include #include #include "libglnx/libglnx.h" #include "libgsystem.h" @@ -52,61 +53,66 @@ typedef struct } FlatpakCommand; static FlatpakCommand commands[] = { - { " Manage installed apps and runtimes" }, - { "install", "Install an application or runtime from a remote", flatpak_builtin_install, flatpak_complete_install }, - { "update", "Update an installed application or runtime", flatpak_builtin_update, flatpak_complete_update }, - { "uninstall", "Uninstall an installed application or runtime", flatpak_builtin_uninstall, flatpak_complete_uninstall }, - { "list", "List installed apps and/or runtimes", flatpak_builtin_list, flatpak_complete_list }, - { "info", "Show info for installed app or runtime", flatpak_builtin_info, flatpak_complete_info }, + /* translators: please keep the leading space */ + { N_(" Manage installed apps and runtimes") }, + { "install", N_("Install an application or runtime from a remote"), flatpak_builtin_install, flatpak_complete_install }, + { "update", N_("Update an installed application or runtime"), flatpak_builtin_update, flatpak_complete_update }, + { "uninstall", N_("Uninstall an installed application or runtime"), flatpak_builtin_uninstall, flatpak_complete_uninstall }, + { "list", N_("List installed apps and/or runtimes"), flatpak_builtin_list, flatpak_complete_list }, + { "info", N_("Show info for installed app or runtime"), flatpak_builtin_info, flatpak_complete_info }, - { "\n Running applications" }, - { "run", "Run an application", flatpak_builtin_run, flatpak_complete_run }, - { "override", "Override permissions for an application", flatpak_builtin_override, flatpak_complete_override }, - { "make-current", "Specify default version to run", flatpak_builtin_make_current_app, flatpak_complete_make_current_app }, - { "enter", "Enter the namespace of a running application", flatpak_builtin_enter, flatpak_complete_enter }, + /* translators: please keep the leading newline and space */ + { N_("\n Running applications") }, + { "run", N_("Run an application"), flatpak_builtin_run, flatpak_complete_run }, + { "override", N_("Override permissions for an application"), flatpak_builtin_override, flatpak_complete_override }, + { "make-current", N_("Specify default version to run"), flatpak_builtin_make_current_app, flatpak_complete_make_current_app }, + { "enter", N_("Enter the namespace of a running application"), flatpak_builtin_enter, flatpak_complete_enter }, - { "\n Manage file access" }, - { "document-export", "Grant an application access to a specific file", flatpak_builtin_document_export, flatpak_complete_document_export }, - { "document-unexport", "Revoke access to a specific file", flatpak_builtin_document_unexport, flatpak_complete_document_unexport }, - { "document-info", "Show information about a specific file", flatpak_builtin_document_info, flatpak_complete_document_info }, - { "document-list", "List exported files", flatpak_builtin_document_list, flatpak_complete_document_list }, + /* translators: please keep the leading newline and space */ + { N_("\n Manage file access") }, + { "document-export", N_("Grant an application access to a specific file"), flatpak_builtin_document_export, flatpak_complete_document_export }, + { "document-unexport", N_("Revoke access to a specific file"), flatpak_builtin_document_unexport, flatpak_complete_document_unexport }, + { "document-info", N_("Show information about a specific file"), flatpak_builtin_document_info, flatpak_complete_document_info }, + { "document-list", N_("List exported files"), flatpak_builtin_document_list, flatpak_complete_document_list }, - { "\n Manage remote repositories" }, - { "remote-add", "Add a new remote repository (by URL)", flatpak_builtin_add_remote, flatpak_complete_add_remote }, - { "remote-modify", "Modify properties of a configured remote", flatpak_builtin_modify_remote, flatpak_complete_modify_remote }, - { "remote-delete", "Delete a configured remote", flatpak_builtin_delete_remote, flatpak_complete_delete_remote }, - { "remote-list", "List all configured remotes", flatpak_builtin_list_remotes, flatpak_complete_list_remotes }, - { "remote-ls", "List contents of a configured remote", flatpak_builtin_ls_remote, flatpak_complete_ls_remote }, + /* translators: please keep the leading newline and space */ + { N_("\n Manage remote repositories") }, + { "remote-add", N_("Add a new remote repository (by URL)"), flatpak_builtin_add_remote, flatpak_complete_add_remote }, + { "remote-modify", N_("Modify properties of a configured remote"), flatpak_builtin_modify_remote, flatpak_complete_modify_remote }, + { "remote-delete", N_("Delete a configured remote"), flatpak_builtin_delete_remote, flatpak_complete_delete_remote }, + { "remote-list", N_("List all configured remotes"), flatpak_builtin_list_remotes, flatpak_complete_list_remotes }, + { "remote-ls", N_("List contents of a configured remote"), flatpak_builtin_ls_remote, flatpak_complete_ls_remote }, - { "\n Build applications" }, - { "build-init", "Initialize a directory for building", flatpak_builtin_build_init, flatpak_complete_build_init }, - { "build", "Run a build command inside the build dir", flatpak_builtin_build, flatpak_complete_build }, - { "build-finish", "Finish a build dir for export", flatpak_builtin_build_finish, flatpak_complete_build_finish }, - { "build-export", "Export a build dir to a repository", flatpak_builtin_build_export, flatpak_complete_build_export }, - { "build-bundle", "Create a bundle file from a build directory", flatpak_builtin_build_bundle, flatpak_complete_build_bundle }, - { "build-import-bundle", "Import a bundle file", flatpak_builtin_build_import, flatpak_complete_build_import }, - { "build-sign", "Sign an application or runtime", flatpak_builtin_build_sign, flatpak_complete_build_sign }, - { "build-update-repo", "Update the summary file in a repository", flatpak_builtin_build_update_repo, flatpak_complete_build_update_repo }, + /* translators: please keep the leading newline and space */ + { N_("\n Build applications") }, + { "build-init", N_("Initialize a directory for building"), flatpak_builtin_build_init, flatpak_complete_build_init }, + { "build", N_("Run a build command inside the build dir"), flatpak_builtin_build, flatpak_complete_build }, + { "build-finish", N_("Finish a build dir for export"), flatpak_builtin_build_finish, flatpak_complete_build_finish }, + { "build-export", N_("Export a build dir to a repository"), flatpak_builtin_build_export, flatpak_complete_build_export }, + { "build-bundle", N_("Create a bundle file from a build directory"), flatpak_builtin_build_bundle, flatpak_complete_build_bundle }, + { "build-import-bundle", N_("Import a bundle file"), flatpak_builtin_build_import, flatpak_complete_build_import }, + { "build-sign", N_("Sign an application or runtime"), flatpak_builtin_build_sign, flatpak_complete_build_sign }, + { "build-update-repo", N_("Update the summary file in a repository"), flatpak_builtin_build_update_repo, flatpak_complete_build_update_repo }, { NULL } }; GOptionEntry global_entries[] = { - { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL }, - { "help", '?', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, "Show help options", NULL, NULL }, + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, N_("Print debug information during command processing"), NULL }, + { "help", '?', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, N_("Show help options"), NULL, NULL }, { NULL } }; static GOptionEntry empty_entries[] = { - { "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, "Print version information and exit", NULL }, - { "default-arch", 0, 0, G_OPTION_ARG_NONE, &opt_default_arch, "Print default arch and exit", NULL }, - { "supported-arches", 0, 0, G_OPTION_ARG_NONE, &opt_supported_arches, "Print supported arches and exit", NULL }, + { "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL }, + { "default-arch", 0, 0, G_OPTION_ARG_NONE, &opt_default_arch, N_("Print default arch and exit"), NULL }, + { "supported-arches", 0, 0, G_OPTION_ARG_NONE, &opt_supported_arches, N_("Print supported arches and exit"), NULL }, { NULL } }; GOptionEntry user_entries[] = { - { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, "Work on user installations", NULL }, - { "system", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &opt_user, "Work on system-wide installations (default)", NULL }, + { "user", 0, 0, G_OPTION_ARG_NONE, &opt_user, N_("Work on user installations"), NULL }, + { "system", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &opt_user, N_("Work on system-wide installations (default)"), NULL }, { NULL } }; @@ -129,9 +135,10 @@ flatpak_option_context_new_with_commands (FlatpakCommand *commands) GOptionContext *context; GString *summary; - context = g_option_context_new ("COMMAND"); + context = g_option_context_new (_("COMMAND")); + g_option_context_set_translation_domain (context, GETTEXT_PACKAGE); - summary = g_string_new ("Builtin Commands:"); + summary = g_string_new (_("Builtin Commands:")); while (commands->name != NULL) { @@ -417,6 +424,9 @@ main (int argc, int ret; setlocale (LC_ALL, ""); + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, message_handler, NULL); diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 97abcd4a..2041bf74 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -36,6 +36,8 @@ #include #endif +#include + #include #include "libgsystem.h" #include "libglnx/libglnx.h" @@ -848,21 +850,21 @@ option_persist_cb (const gchar *option_name, static gboolean option_no_desktop; static GOptionEntry context_options[] = { - { "share", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_share_cb, "Share with host", "SHARE" }, - { "unshare", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_unshare_cb, "Unshare with host", "SHARE" }, - { "socket", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_socket_cb, "Expose socket to app", "SOCKET" }, - { "nosocket", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nosocket_cb, "Don't expose socket to app", "SOCKET" }, - { "device", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_device_cb, "Expose device to app", "DEVICE" }, - { "nodevice", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nodevice_cb, "Don't expose device to app", "DEVICE" }, - { "filesystem", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_filesystem_cb, "Expose filesystem to app (:ro for read-only)", "FILESYSTEM[:ro]" }, - { "nofilesystem", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nofilesystem_cb, "Don't expose filesystem to app", "FILESYSTEM" }, - { "env", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_env_cb, "Set environment variable", "VAR=VALUE" }, - { "own-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_own_name_cb, "Allow app to own name on the session bus", "DBUS_NAME" }, - { "talk-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_talk_name_cb, "Allow app to talk to name on the session bus", "DBUS_NAME" }, - { "system-own-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_system_own_name_cb, "Allow app to own name on the system bus", "DBUS_NAME" }, - { "system-talk-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_system_talk_name_cb, "Allow app to talk to name on the system bus", "DBUS_NAME" }, - { "persist", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_persist_cb, "Persist home directory directory", "FILENAME" }, - { "no-desktop", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &option_no_desktop, "Don't require a running session (no cgroups creation)", NULL }, + { "share", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_share_cb, N_("Share with host"), N_("SHARE") }, + { "unshare", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_unshare_cb, N_("Unshare with host"), N_("SHARE") }, + { "socket", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_socket_cb, N_("Expose socket to app"), N_("SOCKET") }, + { "nosocket", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nosocket_cb, N_("Don't expose socket to app"), N_("SOCKET") }, + { "device", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_device_cb, N_("Expose device to app"), N_("DEVICE") }, + { "nodevice", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nodevice_cb, N_("Don't expose device to app"), N_("DEVICE") }, + { "filesystem", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_filesystem_cb, N_("Expose filesystem to app (:ro for read-only)"), N_("FILESYSTEM[:ro]") }, + { "nofilesystem", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_nofilesystem_cb, N_("Don't expose filesystem to app"), N_("FILESYSTEM") }, + { "env", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_env_cb, N_("Set environment variable"), N_("VAR=VALUE") }, + { "own-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_own_name_cb, N_("Allow app to own name on the session bus"), N_("DBUS_NAME") }, + { "talk-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_talk_name_cb, N_("Allow app to talk to name on the session bus"), N_("DBUS_NAME") }, + { "system-own-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_system_own_name_cb, N_("Allow app to own name on the system bus"), N_("DBUS_NAME") }, + { "system-talk-name", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_system_talk_name_cb, N_("Allow app to talk to name on the system bus"), N_("DBUS_NAME") }, + { "persist", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_CALLBACK, &option_persist_cb, N_("Persist home directory"), N_("FILENAME") }, + { "no-desktop", 0, G_OPTION_FLAG_IN_MAIN, G_OPTION_ARG_NONE, &option_no_desktop, N_("Don't require a running session (no cgroups creation)"), NULL }, { NULL } }; @@ -882,6 +884,7 @@ flatpak_context_get_options (FlatpakContext *context) "Runtime Environment", context, NULL); + g_option_group_set_translation_domain (group, GETTEXT_PACKAGE); g_option_group_add_entries (group, context_options); diff --git a/po/POTFILES.in b/po/POTFILES.in index 1dc8d837..9aaf67e1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1 +1,28 @@ system-helper/org.freedesktop.Flatpak.policy.in +app/flatpak-builtins-add-remote.c +app/flatpak-builtins-build-bundle.c +app/flatpak-builtins-build-export.c +app/flatpak-builtins-build-finish.c +app/flatpak-builtins-build-import-bundle.c +app/flatpak-builtins-build-init.c +app/flatpak-builtins-build-sign.c +app/flatpak-builtins-build.c +app/flatpak-builtins-delete-remote.c +app/flatpak-builtins-document-export.c +app/flatpak-builtins-document-info.c +app/flatpak-builtins-document-list.c +app/flatpak-builtins-document-unexport.c +app/flatpak-builtins-enter.c +app/flatpak-builtins-info.c +app/flatpak-builtins-install.c +app/flatpak-builtins-list-remotes.c +app/flatpak-builtins-list.c +app/flatpak-builtins-ls-remote.c +app/flatpak-builtins-make-current.c +app/flatpak-builtins-override.c +app/flatpak-builtins-repo-update.c +app/flatpak-builtins-run.c +app/flatpak-builtins-uninstall.c +app/flatpak-builtins-update.c +app/flatpak-main.c +common/flatpak-run.c