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/config/validate_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/config/validate_test.go') diff --git a/internal/config/validate_test.go b/internal/config/validate_test.go index 72c268c16..1ae3d6c78 100644 --- a/internal/config/validate_test.go +++ b/internal/config/validate_test.go @@ -80,7 +80,7 @@ func (suite *ConfigValidateTestSuite) TestValidateAccountDomainNotSubdomain1() { config.SetAccountDomain("example.com") err := config.Validate() - suite.EqualError(err, "host was gts.example.org and account-domain was example.com, but gts.example.org is not a valid subdomain of example.com") + suite.EqualError(err, "account-domain example.com is not a valid subdomain of host gts.example.org") } func (suite *ConfigValidateTestSuite) TestValidateAccountDomainNotSubdomain2() { @@ -90,7 +90,7 @@ func (suite *ConfigValidateTestSuite) TestValidateAccountDomainNotSubdomain2() { config.SetAccountDomain("gts.example.org") err := config.Validate() - suite.EqualError(err, "host was example.org and account-domain was gts.example.org, but example.org is not a valid subdomain of gts.example.org") + suite.EqualError(err, "account-domain gts.example.org is not a valid subdomain of host example.org") } func (suite *ConfigValidateTestSuite) TestValidateConfigNoProtocol() { @@ -118,7 +118,7 @@ func (suite *ConfigValidateTestSuite) TestValidateConfigNoProtocolOrHost() { config.SetProtocol("") err := config.Validate() - suite.EqualError(err, "host must be set; protocol must be set") + suite.EqualError(err, "host must be set\nprotocol must be set") } func (suite *ConfigValidateTestSuite) TestValidateConfigBadProtocol() { @@ -137,7 +137,7 @@ func (suite *ConfigValidateTestSuite) TestValidateConfigBadProtocolNoHost() { config.SetProtocol("foo") err := config.Validate() - suite.EqualError(err, "host must be set; protocol must be set to either http or https, provided value was foo") + suite.EqualError(err, "host must be set\nprotocol must be set to either http or https, provided value was foo") } func TestConfigValidateTestSuite(t *testing.T) { -- cgit v1.2.3