public virtual void ImportFiles()
        {
            var filePaths = GetFilePaths();

            if (filePaths.Count() == 0)
            {
                Debug.LogWarningFormat("No input xml files!");
                return;
            }

            var vocabularyMapList = AnalyzeFiles(filePaths);

            if (vocabularyMapList.Count == 0)
            {
                Debug.LogWarningFormat("Can not read any vocabulary!");
                return;
            }

            GenerateVocabularyAssets(vocabularyMapList);

            //It is important to do this after reloading, so the ui component can display updated info, such as id selection or a preview.
            EditorMultiLanguageEntryCollection.Reload();

            GenerateIdConstantSourceFile(vocabularyMapList);
        }
Exemple #2
0
        static EditorLocalizationInitializer()
        {
            if (EditorApplication.isPlayingOrWillChangePlaymode)
            {
                return;
            }

            EditorUtility.LoadOrCreateAsset <LocalizationConfig>(Localization.ASSETPATH_CONFIG);
            EditorMultiLanguageEntryCollection.Reload();
        }
Exemple #3
0
 public static void Reload()
 {
     if (_instance != null)
     {
         _instance._textEntries.Clear();
         _instance._imageEntries.Clear();
     }
     else
     {
         _instance = new EditorMultiLanguageEntryCollection();
     }
     _instance.LoadEntries();
 }