diff --git a/contrib/backends/srndv2/src/srnd/i18n.go b/contrib/backends/srndv2/src/srnd/i18n.go index e540e78..c8e43b5 100644 --- a/contrib/backends/srndv2/src/srnd/i18n.go +++ b/contrib/backends/srndv2/src/srnd/i18n.go @@ -18,7 +18,7 @@ type I18N struct { // root directory for translations translation_dir string // name of locale - name string + Name string } var I18nProvider *I18N = nil @@ -71,7 +71,7 @@ func NewI18n(locale, dir string) (*I18N, error) { } return &I18N{ - name: locale, + Name: locale, translation_dir: dir, Formats: formats.Options(), Translations: translations.Options(), diff --git a/contrib/backends/srndv2/src/srnd/model_mem.go b/contrib/backends/srndv2/src/srnd/model_mem.go index 809c909..36a173a 100644 --- a/contrib/backends/srndv2/src/srnd/model_mem.go +++ b/contrib/backends/srndv2/src/srnd/model_mem.go @@ -486,7 +486,11 @@ func (self *post) Attachments() []AttachmentModel { } func (self *post) PostURL() string { - return fmt.Sprintf("%st/%s/#%s", self.Prefix(), HashMessageID(self.Parent), self.PostHash()) + i18n := self._i18n + if i18n == nil { + i18n = I18nProvider + } + return fmt.Sprintf("%st/%s/?lang=%s#%s", self.Prefix(), HashMessageID(self.Parent), i18n.Name, self.PostHash()) } func (self *post) Prefix() string { diff --git a/contrib/backends/srndv2/src/srnd/null_cache.go b/contrib/backends/srndv2/src/srnd/null_cache.go index cc9d49d..1e03daa 100644 --- a/contrib/backends/srndv2/src/srnd/null_cache.go +++ b/contrib/backends/srndv2/src/srnd/null_cache.go @@ -29,7 +29,7 @@ type nullHandler struct { func (self *nullHandler) GetI18N(r *http.Request) *I18N { lang := r.URL.Query().Get("lang") if lang == "" { - lang = I18nProvider.name + lang = I18nProvider.Name } self.access.Lock() i, ok := self.i18n[lang] diff --git a/contrib/templates/placebo/board.mustache b/contrib/templates/placebo/board.mustache index d253053..4c1715f 100644 --- a/contrib/templates/placebo/board.mustache +++ b/contrib/templates/placebo/board.mustache @@ -24,7 +24,7 @@ - + - + - + - + {{^DisableCaptcha}} @@ -45,7 +45,7 @@ {{/DisableCaptcha}} {{#files}} - +
Name{{#i18n.Translations}}{{name}}{{/i18n.Translations}}
Subject{{#i18n.Translations}}{{subject}}{{/i18n.Translations}}
Comment{{#i18n.Translations}}{{comment}}{{/i18n.Translations}}
File{{#i18n.Translations}}{{file}}{{/i18n.Translations}} diff --git a/contrib/templates/placebo/thread.mustache b/contrib/templates/placebo/thread.mustache index 2539794..97e5862 100644 --- a/contrib/templates/placebo/thread.mustache +++ b/contrib/templates/placebo/thread.mustache @@ -24,7 +24,7 @@ - + @@ -32,10 +32,10 @@ {{{thread.Navbar}}}
-

CHANGOLIA

+

CHANGOLIA

Most of the rest of the wild west.
-
{{thread.Board}}
+
{{thread.Board}}

{{{form}}} diff --git a/contrib/templates/placebo/ukko.mustache b/contrib/templates/placebo/ukko.mustache index af14f6c..382a8be 100644 --- a/contrib/templates/placebo/ukko.mustache +++ b/contrib/templates/placebo/ukko.mustache @@ -19,7 +19,7 @@ - + @@ -34,19 +34,19 @@
{{#prev}} - previous + previous {{/prev}} {{#next}} - next + next {{/next}}
{{#threads}} {{#Truncate}}
- Posted on {{Board}} + Posted on {{Board}}
{{{OP.RenderTruncatedPost}}}
{{MissingPostCount}} posts excluded
@@ -60,12 +60,12 @@
{{#prev}} - previous + previous {{/prev}} {{#next}} - next + next {{/next}}