summaryrefslogtreecommitdiffstats
path: root/templates/base/head_script.tmpl
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 22:58:46 +0200
committerGitHub <noreply@github.com>2022-06-27 15:58:46 -0500
commitd55a0b723809f5b94acd948b924c8518014445e0 (patch)
tree0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/base/head_script.tmpl
parentb551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff)
downloadgitea-d55a0b723809f5b94acd948b924c8518014445e0.tar.gz
gitea-d55a0b723809f5b94acd948b924c8518014445e0.zip
Refactor `i18n` to `locale` (#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
Diffstat (limited to 'templates/base/head_script.tmpl')
-rw-r--r--templates/base/head_script.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/base/head_script.tmpl b/templates/base/head_script.tmpl
index e6a8060a16..2f74b959e2 100644
--- a/templates/base/head_script.tmpl
+++ b/templates/base/head_script.tmpl
@@ -38,10 +38,10 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
{{/* this global i18n object should only contain general texts. for specialized texts, it should be provided inside the related modules by: (1) API response (2) HTML data-attribute (3) PageData */}}
i18n: {
- copy_success: '{{.i18n.Tr "copy_success"}}',
- copy_error: '{{.i18n.Tr "copy_error"}}',
- error_occurred: '{{.i18n.Tr "error.occurred"}}',
- network_error: '{{.i18n.Tr "error.network_error"}}',
+ copy_success: '{{.locale.Tr "copy_success"}}',
+ copy_error: '{{.locale.Tr "copy_error"}}',
+ error_occurred: '{{.locale.Tr "error.occurred"}}',
+ network_error: '{{.locale.Tr "error.network_error"}}',
},
};
{{/* in case some pages don't render the pageData, we make sure it is an object to prevent null access */}}