split a bunch of lists free of UI templates, and also fixed profile language display

This commit is contained in:
2025-10-20 15:53:23 -06:00
parent e5ad827f24
commit 8b00cfce1f
6 changed files with 215 additions and 126 deletions
+2 -4
View File
@@ -15,8 +15,8 @@ import (
"git.erbosoft.com/amy/amsterdam/database"
"git.erbosoft.com/amy/amsterdam/ui"
"git.erbosoft.com/amy/amsterdam/util"
"github.com/biter777/countries"
"golang.org/x/text/language/display"
)
/* ShowCommunity renders the community profile display.
@@ -119,9 +119,7 @@ func ShowCommunity(ctxt ui.AmContext) (string, any, error) {
}
tag, err := comm.LanguageTag()
if err == nil && tag != nil {
my_lang := prefs.LanguageTag()
disp := display.Languages(*my_lang)
ctxt.VarMap().Set("language", disp.Name(tag))
ctxt.VarMap().Set("language", util.AmLanguageInLanguage(*tag, *prefs.LanguageTag()))
}
if comm.Rules != nil && *comm.Rules != "" {
ctxt.VarMap().Set("rules", *comm.Rules)