mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 15:22:26 -05:00
[feature] Federate status language in and out (#2366)
* [feature] Federate status language in + out * go fmt * tests, little fix * improve comments * unnest a bit * avoid unnecessary nil check * use more descriptive variable for contentMap * prefer instance languages when selecting from contentMap * update docs to reflect lang selection * rename rdfLangString -> rdfLangs * update comments to mention Pollable * iter through slice instead of map
This commit is contained in:
parent
1f962372af
commit
cfefbc08d8
15 changed files with 758 additions and 168 deletions
|
|
@ -30,10 +30,11 @@ type ExtractContentTestSuite struct {
|
|||
|
||||
func (suite *ExtractContentTestSuite) TestExtractContent1() {
|
||||
note := suite.noteWithMentions1
|
||||
|
||||
content := ap.ExtractContent(note)
|
||||
|
||||
suite.Equal("hey @f0x and @dumpsterqueer", content)
|
||||
suite.Equal("hey @f0x and @dumpsterqueer", content.Content)
|
||||
suite.Equal("bonjour @f0x et @dumpsterqueer", content.ContentMap["fr"])
|
||||
suite.Equal("hey @f0x and @dumpsterqueer", content.ContentMap["en"])
|
||||
}
|
||||
|
||||
func TestExtractContentTestSuite(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue