コード例 #1
0
        public static void AddUnknownEntries(this TranslationList defaultTranslations, IAsset <TranslationList> translations)
        {
            bool hasChanged = false;

            foreach (TranslationListEntry entry in defaultTranslations)
            {
                if (translations.Instance[entry.Id] == null)
                {
                    translations.Instance.Add(entry);
                    hasChanged = true;
                }
            }
            if (hasChanged)
            {
                translations.Save();
            }
        }
コード例 #2
0
 public void AddRange(TranslationList collection)
 {
     translations.AddRange(collection.translations);
 }