Mark more user-visible strings as translatable

Fixes https://github.com/fwupd/fwupd/issues/2616
This commit is contained in:
Richard Hughes 2020-11-25 14:33:46 +00:00
parent 512685fcb8
commit c1e5f94e5c
7 changed files with 117 additions and 60 deletions

View File

@ -979,9 +979,9 @@ main (int argc, char *argv[])
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
_("Print verbose debug statements"), NULL },
{ "device", 'd', 0, G_OPTION_ARG_STRING, &priv->device_vid_pid,
_("Specify Vendor/Product ID(s) of DFU device"), "VID:PID" },
_("Specify Vendor/Product ID(s) of DFU device"), _("VID:PID") },
{ "transfer-size", 't', 0, G_OPTION_ARG_STRING, &priv->transfer_size,
_("Specify the number of bytes per USB transfer"), "BYTES" },
_("Specify the number of bytes per USB transfer"), _("BYTES") },
{ "force", '\0', 0, G_OPTION_ARG_NONE, &priv->force,
_("Force the action ignoring all warnings"), NULL },
{ NULL}
@ -997,13 +997,15 @@ main (int argc, char *argv[])
priv->cmd_array = g_ptr_array_new_with_free_func ((GDestroyNotify) dfu_tool_item_free);
dfu_tool_add (priv->cmd_array,
"read",
"FILENAME",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME"),
/* TRANSLATORS: command description */
_("Read firmware from device into a file"),
dfu_tool_read);
dfu_tool_add (priv->cmd_array,
"read-alt",
"FILENAME DEVICE-ALT-NAME|DEVICE-ALT-ID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME DEVICE-ALT-NAME|DEVICE-ALT-ID"),
/* TRANSLATORS: command description */
_("Read firmware from one partition into a file"),
dfu_tool_read_alt);
@ -1015,7 +1017,8 @@ main (int argc, char *argv[])
dfu_tool_write);
dfu_tool_add (priv->cmd_array,
"write-alt",
"FILENAME DEVICE-ALT-NAME|DEVICE-ALT-ID [IMAGE-ALT-NAME|IMAGE-ALT-ID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME DEVICE-ALT-NAME|DEVICE-ALT-ID [IMAGE-ALT-NAME|IMAGE-ALT-ID]"),
/* TRANSLATORS: command description */
_("Write firmware from file into one partition"),
dfu_tool_write_alt);

View File

@ -120,8 +120,9 @@ main (int argc, char *argv[])
g_set_application_name (_("fwupd TPM event log utility"));
g_option_context_add_main_entries (context, options, NULL);
g_option_context_set_description (context,
"This tool will read and parse the TPM event log "
"from the system firmware.");
/* TRANSLATORS: CLI description */
_("This tool will read and parse the TPM event log "
"from the system firmware."));
if (!g_option_context_parse (context, &argc, &argv, &error)) {
/* TRANSLATORS: the user didn't read the man page */
g_print ("%s: %s\n", _("Failed to parse arguments"),

View File

@ -81,7 +81,9 @@ main (int argc, char *argv[])
_("Apply update files"), NULL },
{ "dbx", 'd', 0, G_OPTION_ARG_STRING, &dbxfile,
/* TRANSLATORS: command line option */
_("Specify the dbx database file"), "FILENAME" },
_("Specify the dbx database file"),
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME") },
{ "force", 'f', 0, G_OPTION_ARG_NONE, &force,
/* TRANSLATORS: command line option */
_("Apply update even when not advised"), NULL },

View File

@ -91,7 +91,9 @@ main (int argc, char *argv[])
_("Enable firmware update support on supported systems"), NULL },
{ "esp-path", 'p', 0, G_OPTION_ARG_STRING, &esp_path,
/* TRANSLATORS: command line option */
_("Override the default ESP path"), "PATH" },
_("Override the default ESP path"),
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("PATH") },
{ "set-debug", 'd', 0, G_OPTION_ARG_NONE, &action_set_debug,
/* TRANSLATORS: command line option */
_("Set the debugging flag during update"), NULL },
@ -100,7 +102,9 @@ main (int argc, char *argv[])
_("Unset the debugging flag during update"), NULL },
{ "apply", 'a', 0, G_OPTION_ARG_STRING, &apply,
/* TRANSLATORS: command line option */
_("Apply firmware updates"), "GUID" },
_("Apply firmware updates"),
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("GUID") },
{ "flags", 'f', 0, G_OPTION_ARG_STRING, &flags,
/* TRANSLATORS: command line option */
_("Use quirk flags when installing firmware"), NULL },
@ -123,7 +127,8 @@ main (int argc, char *argv[])
/* get a action_list of the commands */
priv->context = g_option_context_new (NULL);
g_option_context_set_description (priv->context,
"This tool allows an administrator to debug UpdateCapsule operation.");
/* TRANSLATORS: CLI description */
_("This tool allows an administrator to debug UpdateCapsule operation."));
/* TRANSLATORS: program name */
g_set_application_name (_("UEFI Firmware Utility"));

View File

@ -373,7 +373,8 @@ main (int argc, char *argv[])
cmd_descriptions = fu_util_cmd_array_to_string (cmd_array);
g_option_context_set_summary (priv->context, cmd_descriptions);
g_option_context_set_description (priv->context,
"This tool can be used from other tools and from shell scripts.");
/* TRANSLATORS: CLI description */
_("This tool can be used from other tools and from shell scripts."));
/* TRANSLATORS: program name */
g_set_application_name (_("Firmware Agent"));

View File

@ -2700,13 +2700,15 @@ main (int argc, char *argv[])
/* add commands */
fu_util_cmd_array_add (cmd_array,
"build-firmware",
"FILE-IN FILE-OUT [SCRIPT] [OUTPUT]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILE-IN FILE-OUT [SCRIPT] [OUTPUT]"),
/* TRANSLATORS: command description */
_("Build firmware using a sandbox"),
fu_util_firmware_builder);
fu_util_cmd_array_add (cmd_array,
"smbios-dump",
"FILE",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILE"),
/* TRANSLATORS: command description */
_("Dump SMBIOS data from a file"),
fu_util_smbios_dump);
@ -2730,7 +2732,8 @@ main (int argc, char *argv[])
fu_util_get_history);
fu_util_cmd_array_add (cmd_array,
"get-updates,get-upgrades",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Gets the list of updates for connected hardware"),
fu_util_get_updates);
@ -2754,55 +2757,64 @@ main (int argc, char *argv[])
fu_util_watch);
fu_util_cmd_array_add (cmd_array,
"install-blob",
"FILENAME DEVICE-ID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME DEVICE-ID"),
/* TRANSLATORS: command description */
_("Install a firmware blob on a device"),
fu_util_install_blob);
fu_util_cmd_array_add (cmd_array,
"install",
"FILE [DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILE [DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Install a firmware file on this hardware"),
fu_util_install);
fu_util_cmd_array_add (cmd_array,
"reinstall",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Reinstall firmware on a device"),
fu_util_reinstall);
fu_util_cmd_array_add (cmd_array,
"attach",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Attach to firmware mode"),
fu_util_attach);
fu_util_cmd_array_add (cmd_array,
"detach",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Detach to bootloader mode"),
fu_util_detach);
fu_util_cmd_array_add (cmd_array,
"unbind-driver",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Unbind current driver"),
fu_util_unbind_driver);
fu_util_cmd_array_add (cmd_array,
"bind-driver",
"subsystem driver [DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("SUBSYSTEM DRIVER [DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Bind new kernel driver"),
fu_util_bind_driver);
fu_util_cmd_array_add (cmd_array,
"activate",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Activate pending devices"),
fu_util_activate);
fu_util_cmd_array_add (cmd_array,
"hwids",
"[FILE]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[FILE]"),
/* TRANSLATORS: command description */
_("Return all the hardware IDs for the machine"),
fu_util_hwids);
@ -2814,50 +2826,58 @@ main (int argc, char *argv[])
fu_util_monitor);
fu_util_cmd_array_add (cmd_array,
"update,upgrade",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Update all devices that match local metadata"),
fu_util_update);
fu_util_cmd_array_add (cmd_array,
"self-sign",
"TEXT",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("TEXT"),
/* TRANSLATORS: command description */
C_("command-description",
"Sign data using the client certificate"),
fu_util_self_sign);
fu_util_cmd_array_add (cmd_array,
"verify-update",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Update the stored metadata with current contents"),
fu_util_verify_update);
fu_util_cmd_array_add (cmd_array,
"firmware-dump",
"FILENAME [DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME [DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Read a firmware blob from a device"),
fu_util_firmware_dump);
fu_util_cmd_array_add (cmd_array,
"firmware-convert",
"FILENAME-SRC FILENAME-DST [FIRMWARE-TYPE-SRC] [FIRMWARE-TYPE-DST]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME-SRC FILENAME-DST [FIRMWARE-TYPE-SRC] [FIRMWARE-TYPE-DST]"),
/* TRANSLATORS: command description */
_("Convert a firmware file"),
fu_util_firmware_convert);
fu_util_cmd_array_add (cmd_array,
"firmware-build",
"BUILDER-XML FILENAME-DST",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("BUILDER-XML FILENAME-DST"),
/* TRANSLATORS: command description */
_("Build a firmware file"),
fu_util_firmware_build);
fu_util_cmd_array_add (cmd_array,
"firmware-parse",
"FILENAME [FIRMWARE-TYPE]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME [FIRMWARE-TYPE]"),
/* TRANSLATORS: command description */
_("Parse and show details about a firmware file"),
fu_util_firmware_parse);
fu_util_cmd_array_add (cmd_array,
"firmware-extract",
"FILENAME [FIRMWARE-TYPE]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILENAME [FIRMWARE-TYPE]"),
/* TRANSLATORS: command description */
_("Extract a firmware blob to images"),
fu_util_firmware_extract);
@ -2905,7 +2925,8 @@ main (int argc, char *argv[])
fu_util_esp_list);
fu_util_cmd_array_add (cmd_array,
"switch-branch",
"[DEVICE-ID|GUID] [BRANCH]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID] [BRANCH]"),
/* TRANSLATORS: command description */
_("Switch the firmware branch on the device"),
fu_util_switch_branch);
@ -2941,8 +2962,9 @@ main (int argc, char *argv[])
cmd_descriptions = fu_util_cmd_array_to_string (cmd_array);
g_option_context_set_summary (priv->context, cmd_descriptions);
g_option_context_set_description (priv->context,
"This tool allows an administrator to use the fwupd plugins "
"without being installed on the host system.");
/* TRANSLATORS: CLI description */
_("This tool allows an administrator to use the fwupd plugins "
"without being installed on the host system."));
/* TRANSLATORS: program name */
g_set_application_name (_("Firmware Utility"));

View File

@ -2807,43 +2807,50 @@ main (int argc, char *argv[])
fu_util_report_history);
fu_util_cmd_array_add (cmd_array,
"install",
"FILE [DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILE [DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Install a firmware file on this hardware"),
fu_util_install);
fu_util_cmd_array_add (cmd_array,
"get-details",
"FILE",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("FILE"),
/* TRANSLATORS: command description */
_("Gets details about a firmware file"),
fu_util_get_details);
fu_util_cmd_array_add (cmd_array,
"get-updates,get-upgrades",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Gets the list of updates for connected hardware"),
fu_util_get_updates);
fu_util_cmd_array_add (cmd_array,
"update,upgrade",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Updates all firmware to latest versions available"),
fu_util_update);
fu_util_cmd_array_add (cmd_array,
"verify",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Checks cryptographic hash matches firmware"),
fu_util_verify);
fu_util_cmd_array_add (cmd_array,
"unlock",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Unlocks the device for firmware access"),
fu_util_unlock);
fu_util_cmd_array_add (cmd_array,
"clear-results",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Clears the results from the last update"),
fu_util_clear_results);
@ -2855,13 +2862,15 @@ main (int argc, char *argv[])
fu_util_clear_offline);
fu_util_cmd_array_add (cmd_array,
"get-results",
"DEVICE-ID|GUID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("DEVICE-ID|GUID"),
/* TRANSLATORS: command description */
_("Gets the results from the last update"),
fu_util_get_results);
fu_util_cmd_array_add (cmd_array,
"get-releases",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Gets the releases for a device"),
fu_util_get_releases);
@ -2873,43 +2882,50 @@ main (int argc, char *argv[])
fu_util_get_remotes);
fu_util_cmd_array_add (cmd_array,
"downgrade",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Downgrades the firmware on a device"),
fu_util_downgrade);
fu_util_cmd_array_add (cmd_array,
"refresh",
"[FILE FILE_SIG REMOTE-ID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[FILE FILE_SIG REMOTE-ID]"),
/* TRANSLATORS: command description */
_("Refresh metadata from remote server"),
fu_util_refresh);
fu_util_cmd_array_add (cmd_array,
"verify-update",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Update the stored cryptographic hash with current ROM contents"),
fu_util_verify_update);
fu_util_cmd_array_add (cmd_array,
"modify-remote",
"REMOTE-ID KEY VALUE",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("REMOTE-ID KEY VALUE"),
/* TRANSLATORS: command description */
_("Modifies a given remote"),
fu_util_remote_modify);
fu_util_cmd_array_add (cmd_array,
"enable-remote",
"REMOTE-ID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("REMOTE-ID"),
/* TRANSLATORS: command description */
_("Enables a given remote"),
fu_util_remote_enable);
fu_util_cmd_array_add (cmd_array,
"disable-remote",
"REMOTE-ID",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("REMOTE-ID"),
/* TRANSLATORS: command description */
_("Disables a given remote"),
fu_util_remote_disable);
fu_util_cmd_array_add (cmd_array,
"activate",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Activate devices"),
fu_util_activate);
@ -2921,25 +2937,29 @@ main (int argc, char *argv[])
fu_util_get_approved_firmware);
fu_util_cmd_array_add (cmd_array,
"set-approved-firmware",
"CHECKSUM1[,CHECKSUM2][,CHECKSUM3]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("CHECKSUM1[,CHECKSUM2][,CHECKSUM3]"),
/* TRANSLATORS: firmware approved by the admin */
_("Sets the list of approved firmware"),
fu_util_set_approved_firmware);
fu_util_cmd_array_add (cmd_array,
"modify-config",
"KEY,VALUE",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("KEY,VALUE"),
/* TRANSLATORS: sets something in daemon.conf */
_("Modifies a daemon configuration value"),
fu_util_modify_config);
fu_util_cmd_array_add (cmd_array,
"reinstall",
"[DEVICE-ID|GUID]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID]"),
/* TRANSLATORS: command description */
_("Reinstall current firmware on the device"),
fu_util_reinstall);
fu_util_cmd_array_add (cmd_array,
"switch-branch",
"[DEVICE-ID|GUID] [BRANCH]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[DEVICE-ID|GUID] [BRANCH]"),
/* TRANSLATORS: command description */
_("Switch the firmware branch on the device"),
fu_util_switch_branch);
@ -2951,13 +2971,15 @@ main (int argc, char *argv[])
fu_util_security);
fu_util_cmd_array_add (cmd_array,
"block-firmware",
"[CHECKSUM]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[CHECKSUM]"),
/* TRANSLATORS: command description */
_("Blocks a specific firmware from being installed"),
fu_util_block_firmware);
fu_util_cmd_array_add (cmd_array,
"unblock-firmware",
"[CHECKSUM]",
/* TRANSLATORS: command argument: uppercase, spaces->dashes */
_("[CHECKSUM]"),
/* TRANSLATORS: command description */
_("Unblocks a specific firmware from being installed"),
fu_util_unblock_firmware);
@ -2990,9 +3012,10 @@ main (int argc, char *argv[])
cmd_descriptions = fu_util_cmd_array_to_string (cmd_array);
g_option_context_set_summary (priv->context, cmd_descriptions);
g_option_context_set_description (priv->context,
"This tool allows an administrator to query and control the "
"fwupd daemon, allowing them to perform actions such as "
"installing or downgrading firmware.");
/* TRANSLATORS: CLI description */
_("This tool allows an administrator to query and control the "
"fwupd daemon, allowing them to perform actions such as "
"installing or downgrading firmware."));
/* TRANSLATORS: program name */
g_set_application_name (_("Firmware Utility"));