translate genDay() and AGPL footer
This commit is contained in:
+4
-10
@@ -17,6 +17,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"golang.nytpu.com/comitium/localizations"
|
||||||
)
|
)
|
||||||
|
|
||||||
// getPageEntries returns a full list of page entries from a FullData. It will
|
// 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
|
// genDay returns a string with the current date and time
|
||||||
func genDay() string {
|
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
|
// agplCompliance returns a string containing a footer linking to the source code
|
||||||
func agplCompilance() string {
|
func agplCompilance() string {
|
||||||
return fmt.Sprintf(`
|
return TranslateString("\n\n---\n\n=> https://git.nytpu.com/comitium/about/ %s\n", "files.comitium_footer", &localizations.Replacements{"version": Version})
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
=> https://git.nytpu.com/comitium/about/ aggregated using comitium v%s
|
|
||||||
`,
|
|
||||||
Version,
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *FullData) WriteSubs(dataPath string) error {
|
func (d *FullData) WriteSubs(dataPath string) error {
|
||||||
|
|||||||
Reference in New Issue
Block a user