diff options
author | Elias Nahum <nahumhbl@gmail.com> | 2016-01-21 10:07:29 -0300 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2016-01-21 10:14:02 -0300 |
commit | 507fbeb068ac168868ef00bd1f40d3ba4d17c884 (patch) | |
tree | 3743620af45c649352e04e2c86587b4dbb1f7ba7 /api/api.go | |
parent | 9f526555df64885be27e38e588c23332d80cd208 (diff) | |
download | chat-507fbeb068ac168868ef00bd1f40d3ba4d17c884.tar.gz chat-507fbeb068ac168868ef00bd1f40d3ba4d17c884.tar.bz2 chat-507fbeb068ac168868ef00bd1f40d3ba4d17c884.zip |
Refactoring api to use translations (chunk 1)
- Add spanish translations
- Files in order by name from admin to export
- Does not include api templates and tests
- Fix web_test to load translations
- Fix i18n to fallback to DEFAULT_LOCALE if no system locale found
Diffstat (limited to 'api/api.go')
-rw-r--r-- | api/api.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/api.go b/api/api.go index 3b35a08fa..d0f41bcab 100644 --- a/api/api.go +++ b/api/api.go @@ -30,7 +30,7 @@ func NewServerTemplatePage(templateName string) *ServerTemplatePage { func (me *ServerTemplatePage) Render() string { var text bytes.Buffer if err := ServerTemplates.ExecuteTemplate(&text, me.TemplateName, me); err != nil { - l4g.Error("Error rendering template %v err=%v", me.TemplateName, err) + l4g.Error(utils.T("api.api.render.error"), me.TemplateName, err) } return text.String() @@ -52,10 +52,10 @@ func InitApi() { InitLicense(r) templatesDir := utils.FindDir("api/templates") - l4g.Debug("Parsing server templates at %v", templatesDir) + l4g.Debug(utils.T("api.api.init.parsing_templates.debug"), templatesDir) var err error if ServerTemplates, err = template.ParseGlob(templatesDir + "*.html"); err != nil { - l4g.Error("Failed to parse server templates %v", err) + l4g.Error(utils.T("api.api.init.parsing_templates.error"), err) } } |