Skip to content

Commit

Permalink
Moved defaults in defaults.go to setting.go (#5764)
Browse files Browse the repository at this point in the history
Signed-off-by: jolheiser <john.olheiser@gmail.com>
  • Loading branch information
jolheiser authored and techknowlogick committed Jan 19, 2019
1 parent 6822a89 commit 6f194b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
12 changes: 0 additions & 12 deletions modules/setting/defaults.go

This file was deleted.

12 changes: 9 additions & 3 deletions modules/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ var (
PullRequest: struct {
WorkInProgressPrefixes []string
}{
WorkInProgressPrefixes: defaultPullRequestWorkInProgressPrefixes,
WorkInProgressPrefixes: []string{"WIP:", "[WIP]"},
},
}
RepoRootPath string
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 6f194b8

Please sign in to comment.