translate genDay() and AGPL footer

This commit is contained in:
nytpu
2021-05-11 12:34:07 -06:00
parent bb3cffdb37
commit c072138b26
+4 -10
View File
@@ -17,6 +17,8 @@ import (
"path/filepath"
"sort"
"time"
"golang.nytpu.com/comitium/localizations"
)
// getPageEntries returns a full list of page entries from a FullData. It will
@@ -74,20 +76,12 @@ func toLocalDay(t time.Time) time.Time {
// genDay returns a string with the current date and time
func genDay() string {
return fmt.Sprintf("Generated on %s\n", time.Now().Format("2006-01-02 at 15:04 MST"))
return TranslateString("%s\n", "files.generated_on", &localizations.Replacements{"date": time.Now().Format("2006-01-02 at 15:04 MST")})
}
// agplCompliance returns a string containing a footer linking to the source code
func agplCompilance() string {
return fmt.Sprintf(`
---
=> https://git.nytpu.com/comitium/about/ aggregated using comitium v%s
`,
Version,
)
return TranslateString("\n\n---\n\n=> https://git.nytpu.com/comitium/about/ %s\n", "files.comitium_footer", &localizations.Replacements{"version": Version})
}
func (d *FullData) WriteSubs(dataPath string) error {