From fc02d3c6f7db5a7794448f31fd9d6d81d3d224eb Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 17 Nov 2023 11:35:28 +0100 Subject: [feature] Set/show instance language(s); show post language on frontend (#2362) * update go text, include text/display * [feature] Set instance langs, show post lang on frontend * go fmt * WebGet * set language for whole article, don't use FA icon * mention instance languages + other optional config vars * little tweak * put languages in config properly * warn log language parse * change some naming around * tidy up validate a bit * lint * rename LanguageTmpl in template --- web/template/about.tmpl | 18 +++++++++++++++++- web/template/status.tmpl | 37 ++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 20 deletions(-) (limited to 'web/template') diff --git a/web/template/about.tmpl b/web/template/about.tmpl index 34fbe2570..6579f492f 100644 --- a/web/template/about.tmpl +++ b/web/template/about.tmpl @@ -25,6 +25,22 @@ {{.instance.Description |noescape}} +
+

Languages

+

+ {{ if .languages }} + This instance prefers the following languages: +

    + {{range .languages}} +
  1. {{.}}
  2. + {{end}} +
+ {{ else }} + This instance does not have any preferred languages. + {{ end }} +

+
+

Admin Contact

{{if .instance.ContactAccount}} @@ -81,7 +97,7 @@

Moderated servers

- ActivityPub instances exchange (federate) data with other servers, including accounts and toots. + ActivityPub instances exchange (federate) data with other instances, including accounts and toots. This can be prevented for specific domains by suspending them. None of their content is stored, and interaction with their users is blocked both ways.
{{if .blocklistExposed}} diff --git a/web/template/status.tmpl b/web/template/status.tmpl index 5e264a339..bf24f6e7c 100644 --- a/web/template/status.tmpl +++ b/web/template/status.tmpl @@ -36,15 +36,15 @@ {{if .SpoilerText}}

- {{emojify .Emojis (escape .SpoilerText)}} + {{emojify .Emojis (escape .SpoilerText)}} Toggle visibility -
+
{{emojify .Emojis (noescape .Content)}}
{{else}} -
+
{{emojify .Emojis (noescape .Content)}}
{{end}} @@ -113,30 +113,29 @@ Open -- cgit v1.2.3