public void Apply(List<PoEntry> entries, ResourceDirectory resdir, TextWriter statusOutput)
{
foreach (PoEntry entry in entries) {
foreach (PoLocation location in entry.Locations) {
LocString str = FindLocString(location, resdir);
if (str != null) {
ApplyEntry(entry, str, statusOutput);
}
else {
statusOutput.WriteLine("No string found for non-loc '{0}' in '{1}'/'{2}' ", entry.NonLocalized, location.FileName, location.Name);
}
}
foreach (ResXFile resxfile in resdir.AllFiles)
foreach (LocString str in resxfile.AllStrings) {
if (str.NonLocalized == entry.NonLocalized) {
if (str.Localized != entry.Localized) {
statusOutput.WriteLine("Updating localized RESX for '{0}' to '{1}'", str.Name, entry.Localized);
str.Localized = entry.Localized;
}
}
}
}
}