From c94840384f0a08f44d48f7e7d5ebfdf03c5b442c Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Thu, 9 Apr 2015 09:30:28 +0100 Subject: [PATCH] Renamed Export String to Export Localisation File --- Assets/Fungus/Flowchart/Editor/LanguageEditor.cs | 14 ++++++++------ Assets/Fungus/Flowchart/Scripts/Language.cs | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Assets/Fungus/Flowchart/Editor/LanguageEditor.cs b/Assets/Fungus/Flowchart/Editor/LanguageEditor.cs index 16dc1a69..e735c81b 100644 --- a/Assets/Fungus/Flowchart/Editor/LanguageEditor.cs +++ b/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); } } diff --git a/Assets/Fungus/Flowchart/Scripts/Language.cs b/Assets/Fungus/Flowchart/Scripts/Language.cs index 70225e25..9d4af892 100644 --- a/Assets/Fungus/Flowchart/Scripts/Language.cs +++ b/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 languageItems = FindLanguageItems();