internal static void Open(ILocalizationData targetObj, ImportLocalizationData importLocalizationData)
        {
            var target = targetObj ?? throw new ArgumentNullException(nameof(targetObj));
            var window = GetWindow(typeof(WindowImportProject)) as WindowImportProject;

            window.titleContent = new GUIContent("ImportLanguage");

            window._data       = target;
            window._importData = importLocalizationData;
        }
        private void OnGuiButtons()
        {
            EditorGUILayout.BeginHorizontal();
            GUI.enabled = _importData != null;

            if (GUILayout.Button("Import Language"))
            {
                _data.SetData(_importData.Languages, _importData.Keys);
                _importData = null;
                Close();
                Debug.Log("Successful import");
            }

            GUI.enabled = true;

            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Space();
        }
        public ImportLocalizationData Load()
        {
            _loadPath = EditorUtility.OpenFilePanel("Import file", Application.dataPath,
                                                    string.Join(";*.", FileExtensions));

            var result = default(ImportLocalizationData);

            var workbook = OpenWorkbook();

            if (workbook != null)
            {
                var languages = GetLanguages(workbook);
                var sheets    = GetSheetsList(workbook);

                result = new ImportLocalizationData(languages, sheets);

                workbook.close();
            }

            return(result);
        }