Beispiel #1
0
        public AssetScanner(List <IGameProcessor> customProcessors = null)
        {
            var stringFormatToIgnore = new List <string>()
            {
                "XXXX"
            };

            _customProcessorState = new CustomScriptProcessorState(toIgnore, TranslationUtility.getUtilityInstanceForDebugging(), stringFormatToIgnore);

            if (customProcessors != null)
            {
                _gameProcessors.AddRange(customProcessors);
            }

            //_gameProcessors.Add(new ButtonViewProcessor());

            _gameProcessors.Add(new TextMeshProcessor());
            _gameProcessors.Add(new GUITextProcessor());
        }
            public static void setKeyInDefaultLanguageDB(string key, string value, string groupid = "")
            {
                //Debug.LogWarning("Make sure to set language to game source language before saving a new translation key");
                Dictionary <string, string> translationDictionary =
                    TranslationUtility.getUtilityInstanceForDebugging().allKnownTranslations;
                TranslationConfigurationSO config = ResourceLoadFacade.LoadConfigGroup(groupid);

                GameTranslationSet gameTranslationSet =
                    GameTranslationGetter.GetTranslaitonSetFromLanguageCode(config.sourceLanguage.code);

                bool exists = translationDictionary.ContainsKey(key);

                if (!exists)
                {
                    translationDictionary.Add(key, key);
                }
                translationDictionary[key] = value;                 //find a way to make sure the the SO gets set dirty?

                gameTranslationSet.mergeInSet(groupid, translationDictionary);
                //EditorUtility.SetnDirty(TransfluentUtility.getUtilityInstanceForDebugging());
            }