Skip to content

Commit

Permalink
VCST-786: Save only changed localization items (#2796)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-dudarev committed May 23, 2024
1 parent 453392f commit 3f347bd
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ public virtual async Task SaveAsync(string settingName, IList<DictionaryItem> it

if (localizedItem != null)
{
localizedItem.Value = value;
if (localizedItem.Value != value)
{
localizedItem.Value = value;
itemsToSave.Add(localizedItem);
}
}
else
{
Expand All @@ -189,9 +193,9 @@ public virtual async Task SaveAsync(string settingName, IList<DictionaryItem> it
localizedItem.Alias = alias;
localizedItem.LanguageCode = language;
localizedItem.Value = value;
}

itemsToSave.Add(localizedItem);
itemsToSave.Add(localizedItem);
}
}
}

Expand Down

0 comments on commit 3f347bd

Please sign in to comment.