diff --git a/domain/setting/smtp.go b/domain/setting/smtp.go index 8803afac..66ca3222 100644 --- a/domain/setting/smtp.go +++ b/domain/setting/smtp.go @@ -36,7 +36,7 @@ func GetSMTPConfig(s *store.Store) (c smtp.Config) { c.SenderEmail, _ = s.Setting.Get("SMTP", "sender") c.SenderName, _ = s.Setting.Get("SMTP", "senderName") if c.SenderName == "" { - c.SenderName = "Documize" + c.SenderName = "Documize Community" } // anon auth? diff --git a/edition/community.go b/edition/community.go index cc70fca0..27f44cf0 100644 --- a/edition/community.go +++ b/edition/community.go @@ -41,7 +41,7 @@ func main() { rt.Product.Major = "4" rt.Product.Minor = "2" rt.Product.Patch = "3" - rt.Product.Revision = "220214141054" + rt.Product.Revision = "220301191336" rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch) rt.Product.Edition = domain.CommunityEdition rt.Product.Title = "Community" diff --git a/gui/app/pods/auth/forgot/template.hbs b/gui/app/pods/auth/forgot/template.hbs index eb97bb25..73672284 100644 --- a/gui/app/pods/auth/forgot/template.hbs +++ b/gui/app/pods/auth/forgot/template.hbs @@ -2,7 +2,7 @@
diff --git a/gui/app/pods/auth/reset/template.hbs b/gui/app/pods/auth/reset/template.hbs index 5928d9cc..cfbdbe60 100644 --- a/gui/app/pods/auth/reset/template.hbs +++ b/gui/app/pods/auth/reset/template.hbs @@ -2,7 +2,7 @@
{{user/password-reset reset=(action "reset")}} diff --git a/gui/app/pods/folders/template.hbs b/gui/app/pods/folders/template.hbs index 328a8366..ddf1d05b 100644 --- a/gui/app/pods/folders/template.hbs +++ b/gui/app/pods/folders/template.hbs @@ -12,7 +12,7 @@ {{/if}} {{#if session.isAdmin}} {{ui/ui-toolbar-icon icon=constants.Icon.Settings color=constants.Color.Green - tooltip="Documize Community settings" linkTo="customize"}} + linkTo="customize"}} {{/if}} {{/ui/ui-toolbar}} {{/if}} @@ -27,20 +27,20 @@
-
All ({{model.spaces.length}})
+
{{localize 'all'}} ({{model.spaces.length}})
-
Public ({{publicSpaces.length}})
+
{{localize 'public'}} ({{publicSpaces.length}})
{{#if session.authenticated}}
-
Protected ({{protectedSpaces.length}})
+
{{localize 'protected'}} ({{protectedSpaces.length}})
-
Personal ({{personalSpaces.length}})
+
{{localize 'personal'}} ({{personalSpaces.length}})
{{/if}}
@@ -49,7 +49,7 @@
-
label
+
{{localize 'label'}}
{{#if labels}}
{{#each labels as |label|}} @@ -62,7 +62,7 @@ {{/each}}
{{else}} -
No labels
+
{{localize 'no_labels'}}
{{/if}}
diff --git a/gui/app/services/app-meta.js b/gui/app/services/app-meta.js index 25633bfa..9c11cea0 100644 --- a/gui/app/services/app-meta.js +++ b/gui/app/services/app-meta.js @@ -44,7 +44,7 @@ export default Service.extend({ updateAvailable: false, // empty theme uses default theme theme: '', - locale: 'en-US', + locale: '', getBaseUrl(endpoint) { return [this.get('endpoint'), endpoint].join('/'); diff --git a/gui/app/services/i18n.js b/gui/app/services/i18n.js index 72581ef1..68b382c3 100644 --- a/gui/app/services/i18n.js +++ b/gui/app/services/i18n.js @@ -20,14 +20,28 @@ export default Service.extend({ }); }, - localize(key) { + localize(key, ...args) { console.log(this.session.locale); + let str = ""; + switch(this.session.locale) { case "fr-FR": - return "unsupported"; + str = ""; + break; default: - return this.langs.enUS[key]; - } + str = this.langs.enUS[key]; + } + + if (str === "") { + console.log("i18n miss", key); + return; + } + + for (let i = 0; i < args.length; i++) { + str = str.replace(`{${i+1}}`, args[i]); + } + + return str; }, }); diff --git a/gui/app/templates/components/setup/documize-setup.hbs b/gui/app/templates/components/setup/documize-setup.hbs index ea09e557..e4c01e96 100644 --- a/gui/app/templates/components/setup/documize-setup.hbs +++ b/gui/app/templates/components/setup/documize-setup.hbs @@ -1,5 +1,5 @@
- Documize Community Setup + Documize Community Setup

Setup

@@ -38,7 +38,7 @@

{{textarea id="activation-key" value=model.activationKey rows="5" class=(if hasKeyError "form-control is-invalid" "form-control")}} - You can get it from https://www.documize.com/downloads + You can get from https://www.documize.com/community
{{/if}} {{ui/ui-button submit=true color=constants.Color.Green light=true label=buttonLabel onClick=(action "save")}} diff --git a/model/org/meta.go b/model/org/meta.go index 542f8304..9781b2ba 100644 --- a/model/org/meta.go +++ b/model/org/meta.go @@ -45,4 +45,5 @@ type SiteMeta struct { Location string `json:"location"` // reserved for internal use Theme string `json:"theme"` // default side-wide theme, user overrideble Configured bool `json:"configured"` // is Documize instance configured + Locale string `json:"locale"` // server default locale }