aboutsummaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2021-12-01 15:50:01 +0800
committerGitHub <noreply@github.com>2021-12-01 15:50:01 +0800
commit042cac5fedeec8af53080b9666fe043072f3a6be (patch)
treeb13d57faa71ba8bc9f8b3d40f5be7e3735ac66a4 /options
parenta3517d8668482b58cb80ba10a956fe4e27e1a429 (diff)
downloadgitea-042cac5fedeec8af53080b9666fe043072f3a6be.tar.gz
gitea-042cac5fedeec8af53080b9666fe043072f3a6be.zip
Improve install code to avoid low-level mistakes. (#17779)
* Improve install code to avoid low-level mistakes. If a user tries to do a re-install in a Gitea database, they gets a warning and double check. When Gitea runs, it never create empty app.ini automatically. Also some small (related) refactoring: * Refactor db.InitEngine related logic make it more clean (especially for the install code) * Move some i18n strings out from setting.go to make the setting.go can be easily maintained. * Show errors in CLI code if an incorrect app.ini is used. * APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more).
Diffstat (limited to 'options')
-rw-r--r--options/locale/locale_en-US.ini9
1 files changed, 9 insertions, 0 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 523f1c78d7..a2f6389e5c 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -138,6 +138,11 @@ ssl_mode = SSL
charset = Charset
path = Path
sqlite_helper = File path for the SQLite3 database.<br>Enter an absolute path if you run Gitea as a service.
+reinstall_error = You are trying to install into an existing Gitea database
+reinstall_confirm_message = Re-installing with an existing Gitea database can cause multiple problems. In most cases, you should use your existing "app.ini" to run Gitea. If you know what you are doing, confirm the following:
+reinstall_confirm_check_1 = The data encrypted by the SECRET_KEY in app.ini may be lost: users may not be able to log in with 2FA/OTP & mirrors may not function correctly. By checking this box you confirm that the current app.ini file contains the correct the SECRET_KEY.
+reinstall_confirm_check_2 = The repositories and settings may need to be re-synchronized. By checking this box you confirm that you will resynchronize the hooks for the repositories and authorized_keys file manually. You confirm that you will ensure that repository and mirror settings are correct.
+reinstall_confirm_check_3 = You confirm that you are absolutely sure that this Gitea is running with the correct app.ini location and that you are sure that you have have to re-install. You confirm that you acknowledge the above risks.
err_empty_db_path = The SQLite3 database path cannot be empty.
no_admin_and_disable_registration = You cannot disable user self-registration without creating an administrator account.
err_empty_admin_password = The administrator password cannot be empty.
@@ -203,8 +208,12 @@ install_btn_confirm = Install Gitea
test_git_failed = Could not test 'git' command: %v
sqlite3_not_available = This Gitea version does not support SQLite3. Please download the official binary version from %s (not the 'gobuild' version).
invalid_db_setting = The database settings are invalid: %v
+invalid_db_table = The database table '%s' is invalid: %v
invalid_repo_path = The repository root path is invalid: %v
+invalid_app_data_path = The app data path is invalid: %v
run_user_not_match = The 'run as' username is not the current username: %s -> %s
+internal_token_failed = Failed to generate internal token: %v
+secret_key_failed = Failed to generate secret key: %v
save_config_failed = Failed to save configuration: %v
invalid_admin_setting = Administrator account setting is invalid: %v
install_success = Welcome! Thank you for choosing Gitea. Have fun and take care!