Exemplo n.º 1
0
        private static LanguageChange CompareLanguages(byte index, ILanguage original, IReader originalReader, ILanguage modified, IReader newReader)
        {
            LocaleTable originalLocales = original.LoadStrings(originalReader);
            LocaleTable newLocales = modified.LoadStrings(newReader);

            // Compare each locale in the two tables
            LanguageChange result = new LanguageChange(index);
            for (int i = 0; i < originalLocales.Strings.Count; i++)
            {
                string oldValue = originalLocales.Strings[i].Value;
                string newValue = newLocales.Strings[i].Value;
                if (oldValue != newValue)
                    result.LocaleChanges.Add(new LocaleChange(i, newValue));
            }
            return result;
        }