Browse Source

Renamed Export String to Export Localisation File

master
chrisgregan 10 years ago
parent
commit
c94840384f
  1. 14
      Assets/Fungus/Flowchart/Editor/LanguageEditor.cs
  2. 2
      Assets/Fungus/Flowchart/Scripts/Language.cs

14
Assets/Fungus/Flowchart/Editor/LanguageEditor.cs

@ -29,24 +29,26 @@ namespace Fungus
EditorGUILayout.PropertyField(activeLanguageProp);
EditorGUILayout.PropertyField(localizationFileProp);
if (GUILayout.Button(new GUIContent("Export to CSV")))
if (GUILayout.Button(new GUIContent("Export Localization File")))
{
ExportStrings(t);
ExportLocalizationFile(t);
}
serializedObject.ApplyModifiedProperties();
}
public virtual void ExportStrings(Language language)
public virtual void ExportLocalizationFile(Language language)
{
string path = EditorUtility.SaveFilePanel("Export strings", "",
"strings.csv", "");
"localization.csv", "");
if (path.Length == 0)
{
return;
}
string csvData = language.ExportCSV();
Debug.Log(path);
string csvData = language.ExportLocalizationFile();
File.WriteAllText(path, csvData);
}
}

2
Assets/Fungus/Flowchart/Scripts/Language.cs

@ -48,7 +48,7 @@ namespace Fungus
/**
* Export all localized strings to an easy to edit CSV file.
*/
public virtual string ExportCSV()
public virtual string ExportLocalizationFile()
{
// Collect all the language items present in the scene
Dictionary<string, LanguageItem> languageItems = FindLanguageItems();

Loading…
Cancel
Save