diff options
author | John Olheiser <42128690+jolheiser@users.noreply.github.com> | 2019-01-19 14:39:27 -0600 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2019-01-19 15:39:27 -0500 |
commit | 6f194b83c6a46d95f9e97bd89a61887f11bcdb5e (patch) | |
tree | 3c1f039dfca4212c7eb68abea2d6e2dd6adfaeb0 /modules/setting | |
parent | 6822a8993b847c794c84ab241c5e0088611bb199 (diff) | |
download | gitea-6f194b83c6a46d95f9e97bd89a61887f11bcdb5e.tar.gz gitea-6f194b83c6a46d95f9e97bd89a61887f11bcdb5e.zip |
Moved defaults in defaults.go to setting.go (#5764)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules/setting')
-rw-r--r-- | modules/setting/defaults.go | 12 | ||||
-rw-r--r-- | modules/setting/setting.go | 12 |
2 files changed, 9 insertions, 15 deletions
diff --git a/modules/setting/defaults.go b/modules/setting/defaults.go deleted file mode 100644 index 48257284c7..0000000000 --- a/modules/setting/defaults.go +++ /dev/null @@ -1,12 +0,0 @@ -package setting - -import ( - "strings" -) - -var ( - defaultLangs = strings.Split("en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR", ",") - defaultLangNames = strings.Split("English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,Українська,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어", ",") - defaultPullRequestWorkInProgressPrefixes = strings.Split("WIP:,[WIP]", ",") - defaultThemes = strings.Split("gitea", "arc-green") -) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 2560c09107..437c86ff6d 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -286,7 +286,7 @@ var ( PullRequest: struct { WorkInProgressPrefixes []string }{ - WorkInProgressPrefixes: defaultPullRequestWorkInProgressPrefixes, + WorkInProgressPrefixes: []string{"WIP:", "[WIP]"}, }, } RepoRootPath string @@ -1141,11 +1141,17 @@ func NewContext() { Langs = Cfg.Section("i18n").Key("LANGS").Strings(",") if len(Langs) == 0 { - Langs = defaultLangs + Langs = []string{ + "en-US", "zh-CN", "zh-HK", "zh-TW", "de-DE", "fr-FR", "nl-NL", "lv-LV", + "ru-RU", "uk-UA", "ja-JP", "es-ES", "pt-BR", "pl-PL", "bg-BG", "it-IT", + "fi-FI", "tr-TR", "cs-CZ", "sr-SP", "sv-SE", "ko-KR"} } Names = Cfg.Section("i18n").Key("NAMES").Strings(",") if len(Names) == 0 { - Names = defaultLangNames + Names = []string{"English", "简体中文", "繁體中文(香港)", "繁體中文(台灣)", "Deutsch", + "français", "Nederlands", "latviešu", "русский", "Українська", "日本語", + "español", "português do Brasil", "polski", "български", "italiano", + "suomi", "Türkçe", "čeština", "српски", "svenska", "한국어"} } dateLangs = Cfg.Section("i18n.datelang").KeysHash() |