summaryrefslogtreecommitdiffstats
path: root/pkg/i18n
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-12-28 13:58:09 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-12-29 09:01:06 +1100
commit9ef65574db3f0fd30b3782a8582212619edf4650 (patch)
tree70a85c69018d6bec09d42095245fde3428e7fb01 /pkg/i18n
parentf89747451a609484bea0b2b5a004a6c3da66aaeb (diff)
refactor to rename pull_request to hosting_service and apply SRP
Diffstat (limited to 'pkg/i18n')
-rw-r--r--pkg/i18n/english.go3
-rw-r--r--pkg/i18n/i18n.go4
2 files changed, 4 insertions, 3 deletions
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index aa2af0a3a..d3ed9af15 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -559,7 +559,8 @@ Thanks for using lazygit! Seriously you rock. Three things to share with you:
Or even just star the repo to share the love!
`
-func englishTranslationSet() TranslationSet {
+// exporting this so we can use it in tests
+func EnglishTranslationSet() TranslationSet {
return TranslationSet{
NotEnoughSpace: "Not enough space to render panels",
DiffTitle: "Diff",
diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go
index 8f6452c54..f6c57da8d 100644
--- a/pkg/i18n/i18n.go
+++ b/pkg/i18n/i18n.go
@@ -33,7 +33,7 @@ func NewTranslationSetFromConfig(log *logrus.Entry, configLanguage string) (*Tra
func NewTranslationSet(log *logrus.Entry, language string) *TranslationSet {
log.Info("language: " + language)
- baseSet := englishTranslationSet()
+ baseSet := EnglishTranslationSet()
for languageCode, translationSet := range GetTranslationSets() {
if strings.HasPrefix(language, languageCode) {
@@ -48,7 +48,7 @@ func GetTranslationSets() map[string]TranslationSet {
return map[string]TranslationSet{
"pl": polishTranslationSet(),
"nl": dutchTranslationSet(),
- "en": englishTranslationSet(),
+ "en": EnglishTranslationSet(),
"zh": chineseTranslationSet(),
}
}