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 --- internal/typeutils/internaltofrontend_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'internal/typeutils/internaltofrontend_test.go') diff --git a/internal/typeutils/internaltofrontend_test.go b/internal/typeutils/internaltofrontend_test.go index d386c180e..ee8216e8f 100644 --- a/internal/typeutils/internaltofrontend_test.go +++ b/internal/typeutils/internaltofrontend_test.go @@ -712,7 +712,10 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV1ToFrontend() { "short_description": "\u003cp\u003eThis is the GoToSocial testrig. It doesn't federate or anything.\u003c/p\u003e\u003cp\u003eWhen the testrig is shut down, all data on it will be deleted.\u003c/p\u003e\u003cp\u003eDon't use this in production!\u003c/p\u003e", "email": "admin@example.org", "version": "0.0.0-testrig", - "languages": [], + "languages": [ + "nl", + "en-gb" + ], "registrations": true, "approval_required": true, "invites_enabled": false, @@ -826,7 +829,10 @@ func (suite *InternalToFrontendTestSuite) TestInstanceV2ToFrontend() { "thumbnail": { "url": "http://localhost:8080/assets/logo.png" }, - "languages": [], + "languages": [ + "nl", + "en-gb" + ], "configuration": { "urls": { "streaming": "wss://localhost:8080" -- cgit v1.2.3