[Spice-devel] [spice-gtk v2] file-xfer: Error messages should always be translated

Pavel Grunt pgrunt at redhat.com
Tue Jul 11 06:05:25 UTC 2017


On Mon, 2017-07-10 at 17:57 +0200, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> Signed-off-by: Victor Toso <victortoso at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
> ---
>  src/channel-main.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/channel-main.c b/src/channel-main.c
> index 4edd575..68ec62e 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -1900,7 +1900,7 @@ static void
> main_agent_handle_xfer_status(SpiceMainChannel *channel,
>      default:
>          g_warn_if_reached();
>          error = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> -                            "unhandled status type: %u", msg->result);
> +                            _("unhandled status type: %u"), msg->result);
>          break;
>      }
>  
> @@ -2911,7 +2911,7 @@ static void
> file_transfer_operation_free(FileTransferOperation *xfer_op)
>      if (xfer_op->stats.failed != 0) {
>          GError *error = g_error_new(SPICE_CLIENT_ERROR,
>                                      SPICE_CLIENT_ERROR_FAILED,
> -                                    "Transferring %u files: %u succeed, %u
> cancelled, %u failed",
> +                                    _("Transferring %u files: %u succeed, %u
> cancelled, %u failed"),
>                                      xfer_op->stats.num_files,
>                                      xfer_op->stats.succeed,
>                                      xfer_op->stats.cancelled,
> @@ -2921,7 +2921,7 @@ static void
> file_transfer_operation_free(FileTransferOperation *xfer_op)
>      } else if (xfer_op->stats.cancelled != 0 && xfer_op->stats.succeed == 0)
> {
>          GError *error = g_error_new(G_IO_ERROR,
>                                      G_IO_ERROR_CANCELLED,
> -                                    "Transferring %u files: %u succeed, %u
> cancelled, %u failed",
> +                                    _("Transferring %u files: %u succeed, %u
> cancelled, %u failed"),
>                                      xfer_op->stats.num_files,
>                                      xfer_op->stats.succeed,
>                                      xfer_op->stats.cancelled,
> @@ -2962,7 +2962,7 @@ static void
> spice_main_channel_reset_all_xfer_operations(SpiceMainChannel *chann
>          }
>  
>          error = g_error_new(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> -                            "Agent connection closed");
> +                            _("Agent connection closed"));
>          spice_file_transfer_task_completed(xfer_task, error);
>      }
>      g_list_free(keys);
> @@ -3119,7 +3119,7 @@ void spice_main_file_copy_async(SpiceMainChannel
> *channel,
>                                  spice_main_file_copy_async,
>                                  SPICE_CLIENT_ERROR,
>                                  SPICE_CLIENT_ERROR_FAILED,
> -                                "The agent is not connected");
> +                                _("The agent is not connected"));
>          return;
>      }
>  


More information about the Spice-devel mailing list