summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authornytpu <alex@nytpu.com>2021-05-11 12:34:07 -0600
committernytpu <alex@nytpu.com>2021-05-11 12:34:07 -0600
commitc072138b265eb3b7aa862aa987bca009ab722413 (patch)
treeaffc447809916c62b8ba75a6843706d39f6f298b /core
parentbb3cffdb37eb9a75c83d2818f7ac1cefe83513d3 (diff)
translate genDay() and AGPL footer
Diffstat (limited to 'core')
-rw-r--r--core/entries.go14
1 files changed, 4 insertions, 10 deletions
diff --git a/core/entries.go b/core/entries.go
index 74fb241..4e5a341 100644
--- a/core/entries.go
+++ b/core/entries.go
@@ -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 {