Add missing translation markers

As mentioned in https://github.com/flatpak/flatpak/issues/1102 we
lack translations for some strings. This fixes the ones i found in
a quick check.

Closes: #1106
Approved by: mwleeds
This commit is contained in:
Alexander Larsson
2017-10-16 10:36:10 +02:00
committed by Atomic Bot
parent 3c5f3e6d2f
commit 87ed5378db
10 changed files with 50 additions and 49 deletions

View File

@@ -208,14 +208,14 @@ load_options (const char *filename,
if (bytes == NULL)
{
g_printerr ("Can't load uri %s: %s\n", filename, error->message);
g_printerr (_("Can't load uri %s: %s\n"), filename, error->message);
exit (1);
}
options_data = g_bytes_get_data (bytes, &options_size);
if (!g_key_file_load_from_data (keyfile, options_data, options_size, 0, &error))
{
g_printerr ("Can't load uri %s: %s\n", filename, error->message);
g_printerr (_("Can't load uri %s: %s\n"), filename, error->message);
exit (1);
}
}
@@ -223,7 +223,7 @@ load_options (const char *filename,
{
if (!g_key_file_load_from_file (keyfile, filename, 0, &error))
{
g_printerr ("Can't load file %s: %s\n", filename, error->message);
g_printerr (_("Can't load file %s: %s\n"), filename, error->message);
exit (1);
}
}
@@ -231,7 +231,7 @@ load_options (const char *filename,
if (!g_key_file_has_group (keyfile, FLATPAK_REPO_GROUP))
{
g_printerr ("Invalid file format");
g_printerr (_("Invalid file format"));
exit (1);
}
@@ -239,7 +239,7 @@ load_options (const char *filename,
FLATPAK_REPO_VERSION_KEY, NULL);
if (version != NULL && strcmp (version, "1") != 0)
{
g_printerr ("Invalid version %s, only 1 supported", version);
g_printerr (_("Invalid version %s, only 1 supported"), version);
exit (1);
}
@@ -283,7 +283,7 @@ load_options (const char *filename,
decoded = g_base64_decode (str, &decoded_len);
if (decoded_len < 10) /* Check some minimal size so we don't get crap */
{
g_printerr ("Invalid gpg key");
g_printerr (_("Invalid gpg key"));
exit (1);
}

View File

@@ -253,7 +253,7 @@ flatpak_builtin_build_commit_from (int argc, char **argv, GCancellable *cancella
/* Don't create a new commit if this is the same tree */
if (!opt_force && dst_parent_root != NULL && g_file_equal (dst_parent_root, src_ref_root))
{
g_print ("%s: no change\n", dst_ref);
g_print (_("%s: no change\n"), dst_ref);
continue;
}

View File

@@ -338,7 +338,7 @@ validate_desktop_file (GFile *desktop_file,
if (!subprocess)
{
if (!g_error_matches (local_error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
g_print ("WARNING: Error running desktop-file-validate: %s\n", local_error->message);
g_print (_("WARNING: Error running desktop-file-validate: %s\n"), local_error->message);
g_clear_error (&local_error);
goto check_refs;
@@ -346,13 +346,13 @@ validate_desktop_file (GFile *desktop_file,
if (!g_subprocess_communicate_utf8 (subprocess, NULL, NULL, &stdout_buf, &stderr_buf, &local_error))
{
g_print ("WARNING: Error reading from desktop-file-validate: %s\n", local_error->message);
g_print (_("WARNING: Error reading from desktop-file-validate: %s\n"), local_error->message);
g_clear_error (&local_error);
}
if (g_subprocess_get_if_exited (subprocess) &&
g_subprocess_get_exit_status (subprocess) != 0)
g_print ("WARNING: Failed to validate desktop file %s: %s\n", path, stdout_buf);
g_print (_("WARNING: Failed to validate desktop file %s: %s\n"), path, stdout_buf);
check_refs:
/* Test that references to other files are valid */
@@ -367,7 +367,7 @@ check_refs:
&local_error);
if (!command)
{
g_print ("WARNING: Can't find Exec key in %s: %s\n", path, local_error->message);
g_print (_("WARNING: Can't find Exec key in %s: %s\n"), path, local_error->message);
g_clear_error (&local_error);
}
@@ -375,14 +375,14 @@ check_refs:
bin_file = convert_app_absolute_path (argv[0], files);
if (!g_file_query_exists (bin_file, NULL))
g_print ("WARNING: Binary not found for Exec line in %s: %s\n", path, command);
g_print (_("WARNING: Binary not found for Exec line in %s: %s\n"), path, command);
*icon = g_key_file_get_string (key_file,
G_KEY_FILE_DESKTOP_GROUP,
G_KEY_FILE_DESKTOP_KEY_ICON,
NULL);
if (*icon && !g_str_has_prefix (*icon, app_id))
g_print ("WARNING: Icon not matching app id in %s: %s\n", path, *icon);
g_print (_("WARNING: Icon not matching app id in %s: %s\n"), path, *icon);
*activatable = g_key_file_get_boolean (key_file,
G_KEY_FILE_DESKTOP_GROUP,
@@ -410,7 +410,7 @@ validate_icon (const char *icon,
svg = g_strconcat (icon, ".svg", NULL);
if (!find_file_in_tree (icondir, png) &&
!find_file_in_tree (icondir, svg))
g_print ("WARNING: Icon referenced in desktop file but not exported: %s\n", icon);
g_print (_("WARNING: Icon referenced in desktop file but not exported: %s\n"), icon);
return TRUE;
}
@@ -472,7 +472,7 @@ validate_service_file (GFile *service_file,
bin_file = convert_app_absolute_path (argv[0], files);
if (!g_file_query_exists (bin_file, NULL))
g_print ("WARNING: Binary not found for Exec line in %s: %s\n", path, command);
g_print (_("WARNING: Binary not found for Exec line in %s: %s\n"), path, command);
return TRUE;
}
@@ -967,12 +967,13 @@ flatpak_builtin_build_export (int argc, char **argv, GCancellable *cancellable,
format_size = g_format_size (stats.content_bytes_written);
g_print ("Commit: %s\n", commit_checksum);
g_print ("Metadata Total: %u\n", stats.metadata_objects_total);
g_print ("Metadata Written: %u\n", stats.metadata_objects_written);
g_print ("Content Total: %u\n", stats.content_objects_total);
g_print ("Content Written: %u\n", stats.content_objects_written);
g_print ("Content Bytes Written: %" G_GUINT64_FORMAT " (%s)\n", stats.content_bytes_written, format_size);
g_print (_("Commit: %s\n"), commit_checksum);
g_print (_("Metadata Total: %u\n"), stats.metadata_objects_total);
g_print (_("Metadata Written: %u\n"), stats.metadata_objects_written);
g_print (_("Content Total: %u\n"), stats.content_objects_total);
g_print (_("Content Written: %u\n"), stats.content_objects_written);
g_print (_("Content Bytes Written:"));
g_print (" %" G_GUINT64_FORMAT " (%s)\n", stats.content_bytes_written, format_size);
ret = TRUE;

View File

@@ -136,11 +136,11 @@ export_dir (int source_parent_fd,
if (!flatpak_has_name_prefix (dent->d_name, required_prefix))
{
g_print ("Not exporting %s, wrong prefix\n", source_printable);
g_print (_("Not exporting %s, wrong prefix\n"), source_printable);
continue;
}
g_print ("Exporting %s\n", source_printable);
g_print (_("Exporting %s\n"), source_printable);
if (!glnx_file_copy_at (source_iter.fd, dent->d_name, &stbuf,
destination_dfd, dent->d_name,
@@ -381,7 +381,7 @@ update_metadata (GFile *base, FlatpakContext *arg_context, gboolean is_runtime,
{
if (command != NULL)
{
g_print ("More than one executable found\n");
g_print (_("More than one executable found\n"));
break;
}
command = g_strdup (g_file_info_get_name (child_info));
@@ -392,12 +392,12 @@ update_metadata (GFile *base, FlatpakContext *arg_context, gboolean is_runtime,
if (command)
{
g_print ("Using %s as command\n", command);
g_print (_("Using %s as command\n"), command);
g_key_file_set_string (keyfile, group, FLATPAK_METADATA_KEY_COMMAND, command);
}
else
{
g_print ("No executable found\n");
g_print (_("No executable found\n"));
}
}
}

View File

@@ -120,7 +120,7 @@ import_oci (OstreeRepo *repo, GFile *file,
if (commit_checksum == NULL)
return NULL;
g_print ("Importing %s (%s)\n", target_ref, commit_checksum);
g_print (_("Importing %s (%s)\n"), target_ref, commit_checksum);
return g_strdup (commit_checksum);
}
@@ -148,7 +148,7 @@ import_bundle (OstreeRepo *repo, GFile *file,
else
ref = bundle_ref;
g_print ("Importing %s (%s)\n", ref, to_checksum);
g_print (_("Importing %s (%s)\n"), ref, to_checksum);
if (!flatpak_pull_from_bundle (repo, file,
NULL, ref, FALSE,
cancellable,

View File

@@ -45,19 +45,19 @@ print_info (GVariant *meta)
g_autoptr(GVariant) gpg_keys = NULL;
if (g_variant_lookup (meta, "xa.title", "&s", &title))
g_print ("Title: %s\n", title);
g_print (_("Title: %s\n"), title);
if (g_variant_lookup (meta, "collection-id", "&s", &collection_id))
g_print ("Collection ID: %s\n", collection_id);
g_print (_("Collection ID: %s\n"), collection_id);
if (g_variant_lookup (meta, "xa.default-branch", "&s", &default_branch))
g_print ("Default branch: %s\n", default_branch);
g_print (_("Default branch: %s\n"), default_branch);
if (g_variant_lookup (meta, "xa.redirect-url", "&s", &redirect_url))
g_print ("Redirect URL: %s\n", redirect_url);
g_print (_("Redirect URL: %s\n"), redirect_url);
if (g_variant_lookup (meta, "xa.collection-id", "&s", &redirect_collection_id))
g_print ("Redirect collection ID: %s\n", redirect_collection_id);
g_print (_("Redirect collection ID: %s\n"), redirect_collection_id);
if ((gpg_keys = g_variant_lookup_value (meta, "xa.gpg-keys", G_VARIANT_TYPE_BYTESTRING)) != NULL)
{
@@ -65,7 +65,7 @@ print_info (GVariant *meta)
gsize gpg_size = g_variant_get_size (gpg_keys);
g_autofree gchar *gpg_data_checksum = g_compute_checksum_for_data (G_CHECKSUM_SHA256, gpg_data, gpg_size);
g_print ("GPG key hash: %s\n", gpg_data_checksum);
g_print (_("GPG key hash: %s\n"), gpg_data_checksum);
}
cache = g_variant_lookup_value (meta, "xa.cache", NULL);
@@ -74,7 +74,7 @@ print_info (GVariant *meta)
g_autoptr(GVariant) refdata = NULL;
refdata = g_variant_get_variant (cache);
g_print ("%zd branches\n", g_variant_n_children (refdata));
g_print (_("%zd branches\n"), g_variant_n_children (refdata));
}
}

View File

@@ -96,7 +96,7 @@ update_appstream (FlatpakDir *dir, const char *remote, GCancellable *cancellable
g_autoptr(OstreeAsyncProgress) progress = flatpak_progress_new (flatpak_terminal_progress_cb, &terminal_progress);
if (!flatpak_dir_update_appstream (dir, remotes[i], opt_arch, &changed,
progress, cancellable, &local_error))
g_printerr ("Error updating: %s\n", local_error->message);
g_printerr (_("Error updating: %s\n"), local_error->message);
ostree_async_progress_finish (progress);
flatpak_terminal_progress_end (&terminal_progress);
}
@@ -153,7 +153,7 @@ flatpak_builtin_update (int argc,
opt_no_static_deltas, !opt_no_deps, !opt_no_related);
kinds = flatpak_kinds_from_bools (opt_app, opt_runtime);
g_print ("Looking for updates...\n");
g_print (_("Looking for updates...\n"));
for (j = 0; j == 0 || j < n_prefs; j++)
{

View File

@@ -291,7 +291,7 @@ ask_for_remote (FlatpakTransaction *self, const char **remotes)
if (self->no_interaction)
{
chosen = 1;
g_print ("Found in remote %s\n", remotes[0]);
g_print (_("Found in remote %s\n"), remotes[0]);
}
else if (n_remotes == 1)
{
@@ -489,7 +489,7 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
metadata = remote_metadata;
else
{
g_print ("Warning: Can't find dependencies: %s\n", local_error->message);
g_print (_("Warning: Can't find dependencies: %s\n"), local_error->message);
g_clear_error (&local_error);
}
}
@@ -516,7 +516,7 @@ flatpak_transaction_add_ref (FlatpakTransaction *self,
if (required_version)
{
if (sscanf (required_version, "%d.%d.%d", &required_major, &required_minor, &required_micro) != 3)
g_print ("Invalid require-flatpak argument %s\n", required_version);
g_print (_("Invalid require-flatpak argument %s\n"), required_version);
else
{
if (required_major > PACKAGE_MAJOR_VERSION ||
@@ -634,7 +634,7 @@ flatpak_transaction_update_metadata (FlatpakTransaction *self,
g_debug ("Updating remote metadata for %s", remote);
if (!flatpak_dir_update_remote_configuration (self->dir, remote, cancellable, &my_error))
g_printerr("Error updating remote metadata for '%s': %s\n", remote, my_error->message);
g_printerr (_("Error updating remote metadata for '%s': %s\n"), remote, my_error->message);
}
/* Reload changed configuration */

View File

@@ -7196,7 +7196,7 @@ flatpak_dir_prune (FlatpakDir *self,
/* There was an issue in ostree where for local pulls we don't get a .commitpartial (now fixed),
which caused errors when pruning. We print these here, but don't stop processing. */
if (local_error != NULL)
g_print ("Pruning repo failed: %s", local_error->message);
g_print (_("Pruning repo failed: %s"), local_error->message);
return ret;
@@ -7816,7 +7816,7 @@ find_matching_ref (GHashTable *refs,
/* Nothing to do other than reporting the different choices */
g_autoptr(GString) err = g_string_new ("");
g_string_printf (err, "Multiple branches available for %s, you must specify one of: ", name);
g_string_printf (err, _("Multiple branches available for %s, you must specify one of: "), name);
g_ptr_array_sort (matched_refs, flatpak_strcmp0_ptr);
for (j = 0; j < matched_refs->len; j++)
{

View File

@@ -581,13 +581,13 @@ flatpak_migrate_from_xdg_app (void)
if (!g_file_test (dest, G_FILE_TEST_EXISTS) &&
g_file_test (source, G_FILE_TEST_EXISTS))
{
g_print ("Migrating %s to %s\n", source, dest);
g_print (_("Migrating %s to %s\n"), source, dest);
if (rename (source, dest) != 0)
{
if (errno != ENOENT &&
errno != ENOTEMPTY &&
errno != EEXIST)
g_print ("Error during migration: %s\n", g_strerror (errno));
g_print (_("Error during migration: %s\n"), g_strerror (errno));
}
}
}
@@ -6514,7 +6514,7 @@ progress_cb (OstreeAsyncProgress *progress, gpointer user_data)
estimating = TRUE;
g_string_append_printf (buf, "Downloading metadata: %u/(estimating) %s",
g_string_append_printf (buf, _("Downloading metadata: %u/(estimating) %s"),
fetched, formatted_bytes_total_transferred);
/* Go up to 5% until the metadata is all fetched */
@@ -6538,7 +6538,7 @@ progress_cb (OstreeAsyncProgress *progress, gpointer user_data)
total = total_delta_part_size - fetched_delta_part_size + total_extra_data_bytes;
formatted_bytes_total = g_format_size_full (total, 0);
g_string_append_printf (buf, "Downloading: %s/%s",
g_string_append_printf (buf, _("Downloading: %s/%s"),
formatted_bytes_total_transferred,
formatted_bytes_total);
}
@@ -6558,12 +6558,12 @@ progress_cb (OstreeAsyncProgress *progress, gpointer user_data)
if (downloading_extra_data)
{
g_autofree gchar *formatted_bytes_total = g_format_size_full (total, 0);;
g_string_append_printf (buf, "Downloading extra data: %s/%s",
g_string_append_printf (buf, _("Downloading extra data: %s/%s"),
formatted_bytes_total_transferred,
formatted_bytes_total);
}
else
g_string_append_printf (buf, "Downloading files: %d/%d %s",
g_string_append_printf (buf, _("Downloading files: %d/%d %s"),
fetched, requested, formatted_bytes_total_transferred);
}