Skip the empty values in the `abp-translation.json` file.

pull/9630/head
maliming 4 years ago
parent cf8d33eb5e
commit 2731747bc9

@ -59,7 +59,7 @@ namespace Volo.Abp.Cli.Commands
Logger.LogInformation("Target culture: " + targetCulture);
Logger.LogInformation("Reference culture: " + referenceCulture);
Logger.LogInformation("Output file: " + outputFile);
if (allValues)
{
Logger.LogInformation("Include all keys");
@ -195,8 +195,11 @@ namespace Volo.Abp.Cli.Commands
var targetText = targetLocalizationInfo.Texts.FirstOrDefault(x => x.Name == text.LocalizationKey);
if (targetText != null)
{
Logger.LogInformation($"Update translation: {targetText.Name} => " + text.Target);
targetText.Value = text.Target;
if (!text.Target.IsNullOrEmpty())
{
Logger.LogInformation($"Update translation: {targetText.Name} => " + text.Target);
targetText.Value = text.Target;
}
}
else
{

Loading…
Cancel
Save