private static StringResource GetTargetString(StringResource sourceString, StringResources targetStrings) { if (targetStrings.Strings.TryGetValue(sourceString.Name, out var targetString) && (sourceString.ResourceType == targetString.ResourceType)) { sourceString.UpdateTarget(targetString); return(targetString); } // A translation is not found, or the resource type of the source is no longer the same as that of the target return(null); }