예제 #1
0
파일: MenuItems.cs 프로젝트: Habi-Thapa/csv
        public static void ImportXliffFile()
        {
            var file = EditorUtility.OpenFilePanel("Import XLIFF", "", "xlf");

            if (string.IsNullOrEmpty(file))
            {
                return;
            }

            Xliff.ImportFile(file, null, TaskReporter.CreateDefaultReporter());
        }
예제 #2
0
파일: MenuItems.cs 프로젝트: Habi-Thapa/csv
        public static void ImportXliffDirectory()
        {
            var dir = EditorUtility.OpenFolderPanel("Import XLIFF from directory", EditorPrefs.GetString(kPrefXliffDirectory, ""), "");

            if (string.IsNullOrEmpty(dir))
            {
                return;
            }
            EditorPrefs.SetString(kPrefXliffDirectory, dir);

            Xliff.ImportDirectory(dir, null, TaskReporter.CreateDefaultReporter());
        }
예제 #3
0
파일: MenuItems.cs 프로젝트: Habi-Thapa/csv
        static void ImportIntoTable(MenuCommand command)
        {
            var table = command.context as StringTable;

            Debug.Assert(table != null, "Expected StringTable");

            var file = EditorUtility.OpenFilePanel("Import XLIFF", EditorPrefs.GetString(kPrefXliffFile, ""), "xlf");

            if (string.IsNullOrEmpty(file))
            {
                return;
            }
            EditorPrefs.SetString(kPrefXliffFile, file);

            Xliff.ImportFileIntoTable(file, table, Xliff.ImportNotesBehavior.Replace, TaskReporter.CreateDefaultReporter());
        }
예제 #4
0
파일: MenuItems.cs 프로젝트: Habi-Thapa/csv
        public static void ImportIntoCollection(MenuCommand command)
        {
            var collection = command.context as StringTableCollection;

            Debug.Assert(collection != null, "Expected StringTableCollection");

            var file = EditorUtility.OpenFilePanel("Import XLIFF", EditorPrefs.GetString(kPrefXliffFile, ""), "xlf");

            if (string.IsNullOrEmpty(file))
            {
                return;
            }
            EditorPrefs.SetString(kPrefXliffFile, file);

            Xliff.ImportFileIntoCollection(collection, file, null, TaskReporter.CreateDefaultReporter());
        }