diff --git a/MetadataTranslator/Metadata Translator/Resources/StringDictionary.xaml b/MetadataTranslator/Metadata Translator/Resources/StringDictionary.xaml
index 5fb7b1b..387e3ad 100644
--- a/MetadataTranslator/Metadata Translator/Resources/StringDictionary.xaml
+++ b/MetadataTranslator/Metadata Translator/Resources/StringDictionary.xaml
@@ -32,6 +32,8 @@
This is typically the Global region, but could also be a single Azure region.Please select at least one language before you translate the metadata.Microsoft Translator was unable to translate the metadata strings into {0}. Please try again later or remove this language from the translation.
+ Microsoft Translator was unable to translate the metadata strings because of a Web request error. Make sure the Microsoft Translator configuration settings are correct and check your network connection.
+ Web Request ErrorExport .csv filesYou can export the metadata captions, descriptions, and display folder strings into .csv files based on the locale identifiers (LCIDs) of the selected languages. Metadata Translator creates a separate .csv file for each LCID.Select the folder where you want to store your .csv files. Note that Metadata Translator might overwrite any existing files in this folder.
diff --git a/MetadataTranslator/Metadata Translator/Translations/TranslatorService.cs b/MetadataTranslator/Metadata Translator/Translations/TranslatorService.cs
index a109c0c..478e403 100644
--- a/MetadataTranslator/Metadata Translator/Translations/TranslatorService.cs
+++ b/MetadataTranslator/Metadata Translator/Translations/TranslatorService.cs
@@ -7,6 +7,7 @@ using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
+using System.Windows;
namespace Metadata_Translator
{
@@ -111,15 +112,18 @@ namespace Metadata_Translator
/// Translate the batch and assign the translated strings to the target languages.
///
var translatedStrings = TranslateBatch(translationBatch, translationId);
- for (int i = 0; i < maxBatchSize; i++)
+ if (translatedStrings.Count > 0)
{
- foreach (Language language in targetLanguages)
+ for (int i = 0; i < maxBatchSize; i++)
{
- dataRows[batchStart + i].SetValue(language.LanguageTag, translatedStrings[i], replaceExistingTranslations);
+ foreach (Language language in targetLanguages)
+ {
+ dataRows[batchStart + i].SetValue(language.LanguageTag, translatedStrings[i], replaceExistingTranslations);
+ }
}
- }
- Translate(dataRows, targetLanguages, translationId, replaceExistingTranslations, ++iterationId);
+ Translate(dataRows, targetLanguages, translationId, replaceExistingTranslations, ++iterationId);
+ }
}
private List TranslateBatch(List