🎨 Add i18n settings in marketplace package https://github.com/siyuan-note/siyuan/issues/8177

This commit is contained in:
Liang Ding 2023-05-05 22:16:26 +08:00
parent 089a8322c7
commit f5f5a1d428
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
6 changed files with 34 additions and 0 deletions

View file

@ -75,6 +75,7 @@ func Templates() (templates []*Template) {
template.IconURL = util.BazaarOSSServer + "/package/" + repoURL + "/icon.png"
template.Funding = parseFunding(repo["package"].(map[string]interface{}))
template.PreferredFunding = getPreferredFunding(template.Funding)
template.PreferredDesc = getPreferredDesc(template.Description)
template.Updated = repo["updated"].(string)
template.Stars = int(repo["stars"].(float64))
template.OpenIssues = int(repo["openIssues"].(float64))
@ -144,6 +145,7 @@ func InstalledTemplates() (ret []*Template) {
template.IconURL = "/templates/" + dirName + "/icon.png"
template.Funding = parseFunding(templateConf)
template.PreferredFunding = getPreferredFunding(template.Funding)
template.PreferredDesc = getPreferredDesc(template.Description)
info, statErr := os.Stat(filepath.Join(installPath, "README.md"))
if nil != statErr {
logging.LogWarnf("stat install theme README.md failed: %s", statErr)