From 7a7108488bb16645b86aa9423e71bf39c85235ce Mon Sep 17 00:00:00 2001 From: Nicke Manarin Date: Fri, 22 Dec 2017 20:18:10 -0200 Subject: [PATCH] Fixes! And some changes to the translations. --- .../Localization/StringResources.es-AR.xaml | 2 +- .../Localization/StringResources.es-ES.xaml | 2 +- .../Localization/StringResources.it.xaml | 2 +- .../Localization/StringResources.nl.xaml | 2 +- .../Localization/StringResources.pl.xaml | 2 +- .../Localization/StringResources.pt-BR.xaml | 2 +- .../Localization/StringResources.ru.xaml | 2 +- .../Localization/StringResources.tr.xaml | 2 +- .../Localization/StringResources.zh-CN.xaml | 2 +- .../Localization/StringResources.zh-TW.xaml | 2 +- ScreenToGif/Windows/Other/Encoder.xaml.cs | 19 ++++++++++++++++++- 11 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml b/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml index 37942069..31ca0f66 100644 --- a/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.es-AR.xaml @@ -237,7 +237,7 @@ Quitar lo completado Iniciando… Completado - Completado Copiado al portapapales + Copiado al portapapales Archivo eliminado o movido Cancelado Error diff --git a/ScreenToGif/Resources/Localization/StringResources.es-ES.xaml b/ScreenToGif/Resources/Localization/StringResources.es-ES.xaml index d4e4f05b..f22654f2 100644 --- a/ScreenToGif/Resources/Localization/StringResources.es-ES.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.es-ES.xaml @@ -301,7 +301,7 @@ Limpiar todos los completados Iniciando Completado - Completado Copiado en el Portapapeles + Copiado en el Portapapeles Archivo Borrado o Movido Cancelado Error diff --git a/ScreenToGif/Resources/Localization/StringResources.it.xaml b/ScreenToGif/Resources/Localization/StringResources.it.xaml index 7b144bc7..c5c25f55 100644 --- a/ScreenToGif/Resources/Localization/StringResources.it.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.it.xaml @@ -289,7 +289,7 @@ Svuota tutti i completati Inizio Completato - Completato copiato negli appunti + copiato negli appunti File eliminato o spostato Annullato Errore diff --git a/ScreenToGif/Resources/Localization/StringResources.nl.xaml b/ScreenToGif/Resources/Localization/StringResources.nl.xaml index b4a78bc7..3ed78a8d 100644 --- a/ScreenToGif/Resources/Localization/StringResources.nl.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.nl.xaml @@ -301,7 +301,7 @@ Weghalen alle voltooide Opstarten Voltooid - Voltooid Gekopieerd naar klembord + Gekopieerd naar klembord Bestand verwijderd of verplaatst Geannuleerd Fout diff --git a/ScreenToGif/Resources/Localization/StringResources.pl.xaml b/ScreenToGif/Resources/Localization/StringResources.pl.xaml index 590853fd..4979b6e5 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pl.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pl.xaml @@ -279,7 +279,7 @@ Wyczyść wszystkie zakończone. Startowanie Zakończone - Ukończono Skopiowano do schowka + Skopiowano do schowka Plik usunięty lub przeniesiony Anulowano Błąd diff --git a/ScreenToGif/Resources/Localization/StringResources.pt-BR.xaml b/ScreenToGif/Resources/Localization/StringResources.pt-BR.xaml index c2608de7..c417a897 100644 --- a/ScreenToGif/Resources/Localization/StringResources.pt-BR.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.pt-BR.xaml @@ -309,7 +309,7 @@ Remover Todos os Completos Iniciando Finalizado - Finalizado Copiado para Área de Transferência + Copiado Falha ao copiar Comando executado Exibe a resposta dos comando(s). diff --git a/ScreenToGif/Resources/Localization/StringResources.ru.xaml b/ScreenToGif/Resources/Localization/StringResources.ru.xaml index e01daf4f..dfd87931 100644 --- a/ScreenToGif/Resources/Localization/StringResources.ru.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.ru.xaml @@ -301,7 +301,7 @@ Очистка завершена Запуск Готово - Готово. Скопировано в буфер обмена. + Скопировано в буфер обмена. Файл удален или перемещен Отменено Ошибка diff --git a/ScreenToGif/Resources/Localization/StringResources.tr.xaml b/ScreenToGif/Resources/Localization/StringResources.tr.xaml index 7679a1ae..62a4ffb9 100644 --- a/ScreenToGif/Resources/Localization/StringResources.tr.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.tr.xaml @@ -237,7 +237,7 @@ Tümünü Temizleme Tamamlandı Başlıyor Tamamlandı - Tamamlandı Panoya Kopyalandı + Panoya Kopyalandı Dosya Silinmiş veya Taşınmış İptal edildi Hata diff --git a/ScreenToGif/Resources/Localization/StringResources.zh-CN.xaml b/ScreenToGif/Resources/Localization/StringResources.zh-CN.xaml index e523cd44..74f1b58d 100644 --- a/ScreenToGif/Resources/Localization/StringResources.zh-CN.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.zh-CN.xaml @@ -304,7 +304,7 @@ 清除所有已完成条目 开始 已完成 - 已完成 已复制到剪贴板 + 已复制到剪贴板 已删除或移动文件 已取消 错误 diff --git a/ScreenToGif/Resources/Localization/StringResources.zh-TW.xaml b/ScreenToGif/Resources/Localization/StringResources.zh-TW.xaml index 6df3fcb2..bce490e6 100644 --- a/ScreenToGif/Resources/Localization/StringResources.zh-TW.xaml +++ b/ScreenToGif/Resources/Localization/StringResources.zh-TW.xaml @@ -245,7 +245,7 @@ 清除所有已完成 正在開始 已完成 - 已完成 已複製到剪貼簿 + 已複製到剪貼簿 檔案已刪除或已移動 已取消 錯誤 diff --git a/ScreenToGif/Windows/Other/Encoder.xaml.cs b/ScreenToGif/Windows/Other/Encoder.xaml.cs index 70bd9cad..a16eee00 100644 --- a/ScreenToGif/Windows/Other/Encoder.xaml.cs +++ b/ScreenToGif/Windows/Other/Encoder.xaml.cs @@ -329,6 +329,21 @@ private void InternalSetUpload(int id, bool uploaded, string link, string delete }); } + private string InternalGetUpload(int id) + { + return Dispatcher.Invoke(() => + { + CommandManager.InvalidateRequerySuggested(); + + var item = EncodingListView.Items.Cast().FirstOrDefault(x => x.Id == id); + + if (item == null) + return ""; + + return item.UploadLink; + }); + } + private void InternalSetCopy(int id, bool copied, Exception exception = null) { Dispatcher.Invoke(() => @@ -983,7 +998,9 @@ private void Encode(List listFrames, int id, Parameters param, Cancel data.SetText(Path.GetDirectoryName(param.Filename) ?? param.Filename, TextDataFormat.Text); break; case CopyType.Link: - data.SetText(param.Filename, TextDataFormat.Text); //TODO: Link. + var link = InternalGetUpload(id); + + data.SetText(string.IsNullOrEmpty(link) ? param.Filename : link, TextDataFormat.Text); break; default: data.SetText(param.Filename, TextDataFormat.Text);