diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index d772de89..7ee4a74d 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -215,7 +215,7 @@ void PreferencesDialog::loadSettings() ui->spinMaxRecentFiles->setValue(Settings::getValue("General", "maxRecentFiles").toInt()); } -void PreferencesDialog::saveSettings() +void PreferencesDialog::saveSettings(bool accept) { QApplication::setOverrideCursor(Qt::WaitCursor); @@ -348,7 +348,8 @@ void PreferencesDialog::saveSettings() m_proxyDialog->saveSettings(); - accept(); + if(accept) + PreferencesDialog::accept(); QApplication::restoreOverrideCursor(); } @@ -701,6 +702,8 @@ void PreferencesDialog::configureProxy() void PreferencesDialog::exportSettings() { + saveSettings(false); + const QString fileName = FileDialog::getSaveFileName(CreateSettingsFile, this, tr("Save Settings File"), tr("Initialization File (*.ini)")); if(!fileName.isEmpty()) { @@ -712,13 +715,20 @@ void PreferencesDialog::exportSettings() void PreferencesDialog::importSettings() { const QString fileName = FileDialog::getOpenFileName(OpenSettingsFile, this, tr("Open Settings File"), tr("Initialization File (*.ini)")); + const QVariant existingLanguage = Settings::getValue("General", "language"); + if(!fileName.isEmpty()) { if(Settings::importSettings(fileName)) - QMessageBox::warning(this, QApplication::applicationName(), tr("Rerun the program to apply the settings.")); - else - QMessageBox::critical(this, QApplication::applicationName(), tr("The selected settings file is not a normal settings file.\nPlease check again.")); + { + QMessageBox::information(this, QApplication::applicationName(), tr("The settings file was loaded properly.")); + if (existingLanguage != Settings::getValue("General", "language")) + QMessageBox::information(this, QApplication::applicationName(), + tr("The language will change after you restart the application.")); - PreferencesDialog::close(); + accept(); + } else { + QMessageBox::critical(this, QApplication::applicationName(), tr("The selected settings file is not a normal settings file.\nPlease check again.")); + } } } diff --git a/src/PreferencesDialog.h b/src/PreferencesDialog.h index 5ad839c1..c09bf1ff 100644 --- a/src/PreferencesDialog.h +++ b/src/PreferencesDialog.h @@ -34,7 +34,7 @@ public: private slots: void loadSettings(); - void saveSettings(); + void saveSettings(bool accept=true); void chooseLocation(); void showColourDialog(QTreeWidgetItem* item, int column); diff --git a/src/Settings.cpp b/src/Settings.cpp index eec9c486..b310bacf 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -618,5 +618,6 @@ bool Settings::importSettings(const QString fileName) importSettings->endGroup(); } + m_hCache.clear(); return true; } diff --git a/src/translations/sqlb_ko_KR.ts b/src/translations/sqlb_ko_KR.ts index 64bb1765..8b2bce58 100644 --- a/src/translations/sqlb_ko_KR.ts +++ b/src/translations/sqlb_ko_KR.ts @@ -131,16 +131,6 @@ 사용법: %1 [옵션] [<데이터베이스>|<프로젝트>] - - - The user preferences file location is replaced with the argument value instead of the environment variable value. - 사용자 기본 설정 파일 위치는 환경 변수 값 대신 인자 값으로 대체됩니다. - - - - Ignored environment variable(DB4S_PREFERENCES_FILE) value : - 환경변수(DB4S_PREFERENCES_FILE)이 무시됩니다 : - -h, --help Show command line options @@ -166,15 +156,25 @@ -R, --read-only Open database in read-only mode -R, --read-only 데이터베이스를 읽기 전용 모드로 열기합니다 + + + The user settings file location is replaced with the argument value instead of the environment variable value. + 사용자 환경설정 파일 위치는 환경 변수 값 대신 인자 값으로 대체됩니다. + + + + Ignored environment variable(DB4S_SETTINGS_FILE) value : + 무시되는 환경변수(DB4S_SETTINGS_FILE) 값 : + - -p, --preferences <preferences_file> - -p, --preferences <기본_설정_파일> + -S, --settings <settings_file> + -S, --settings <환경설정_파일> - Run application based on this preferences file - 이 기본 설정 파일을 기반으로 애플리케이션 실행 + Run application based on this settings file + 이 환경설정 파일을 바탕으로 프로그램을 실행합니다 @@ -228,8 +228,8 @@ - The -p/--preferences option requires an argument. The option is ignored. - -p/--preferences 옵션은 인자 값이 필요합니다. 따라서 이 옵션은 무시됩니다. + The -S/--settings option requires an argument. The option is ignored. + -S/--settings 옵션은 인자 값이 필요합니다. 따라서 이 옵션은 무시됩니다. @@ -1201,7 +1201,12 @@ Errors are indicated with a red squiggle underline. 현재 데이터 타입: 유효한 JSON - + + Couldn't save file: %1. + 파일을 저장할 수 없습니다: %1. + + + The data has been saved to a temporary file and has been opened with the default application. You can now edit the file and, when you are ready, apply the saved new data to the cell editor or cancel any changes. 현재 데이터는 임시 파일에 저장되었으며 기본 프로그램으로 열립니다. 이제 파일을 편집하고 준비되면 저장된 새 데이터를 셀 편집기에 적용하거나 변경 사항을 취소할 수 있습니다. @@ -5152,48 +5157,94 @@ Can be set to 0 for disabling completion. 정규 표현식 확장기능 비활성화 - - + + Export Settings + 환경설정 내보내기 + + + + Import Settings + 환경설정 불러오기 + + + + Choose a directory 디렉터리를 선택하세요 - + + The language will change after you restart the application. 언어 변경은 애플리케이션을 재시작해야 반영됩니다. - + Select extension file 확장기능 파일을 선택하세요 - + Extensions(*.so *.dylib *.dll);;All files(*) 확장기능(*.so *.dylib *dll);;모든 파일(*) - + Import certificate file 인증서 파일 가져오기 - + No certificates found in this file. 이 파일에는 인증서가 없습니다. - + Are you sure you want do remove this certificate? All certificate data will be deleted from the application settings! 정말로 이 인증서를 삭제하겠습니까? 애플리케이션 설정에서 모든 증명 데이터가 삭제될 것입니다! - + Are you sure you want to clear all the saved settings? All your preferences will be lost and default values will be used. 저장된 모든 설정을 정말로 초기화하시겠습니까? 모든 설정이 초기화되고 기본값으로 대체됩니다. + + + Save Settings File + 환경설정을 내보낼 파일을 선택하세요 + + + + + Initialization File (*.ini) + 환경설정 파일 (*.ini) + + + + The settings file has been saved in location : + + 환경설정 파일이 다음 경로에 저장되었습니다 : + + + + + Open Settings File + 가져오려는 환경설정 파일을 선택하세요 + + + + The settings file was loaded properly. + 환경설정 파일을 정상적으로 불러 왔습니다. + + + + The selected settings file is not a normal settings file. +Please check again. + 선택하신 환경설정 파일은 정상적인 환경설정 파일이 아닙니다. +다시 확인해주세요. + ProxyDialog @@ -5288,7 +5339,7 @@ All your preferences will be lost and default values will be used. 모든 파일(*) - + SQLite database files (*.db *.sqlite *.sqlite3 *.db3) SQLite 데이터베이스 파일(*.db *.sqlite *.sqlite3 *.db3) @@ -5387,6 +5438,11 @@ All your preferences will be lost and default values will be used. Extensions (*.so *.dylib *.dll) 확장기능 (*.so *.dylib *.dll) + + + Initialization File (*.ini) + 환경설정 파일 (*.ini) + RemoteCommitsModel