mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🎨 Bazaar i18n
This commit is contained in:
parent
eb91448934
commit
b3e85eb567
8 changed files with 27 additions and 19 deletions
|
|
@ -150,12 +150,14 @@ func InstalledThemes() (ret []*Theme) {
|
|||
installSize, _ := util.SizeOfDirectory(installPath)
|
||||
theme.InstallSize = installSize
|
||||
theme.HInstallSize = humanize.Bytes(uint64(installSize))
|
||||
readme, readErr := os.ReadFile(filepath.Join(installPath, "README.md"))
|
||||
readmeFilename := getPreferredReadme(theme.Readme)
|
||||
readme, readErr := os.ReadFile(filepath.Join(installPath, readmeFilename))
|
||||
if nil != readErr {
|
||||
logging.LogWarnf("read install theme README.md failed: %s", readErr)
|
||||
logging.LogWarnf("read installed README.md failed: %s", readErr)
|
||||
continue
|
||||
}
|
||||
theme.README, _ = renderREADME(theme.URL, readme)
|
||||
|
||||
theme.PreferredReadme, _ = renderREADME(theme.URL, readme)
|
||||
theme.Outdated = isOutdatedTheme(theme, bazaarThemes)
|
||||
ret = append(ret, theme)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue