Add l10n package

This includes basic US English terms and a function to get any
translation set.
This commit is contained in:
Matt Baer
2018-02-05 00:54:19 -05:00
parent c0e4c95cfb
commit 18dcf10012
2 changed files with 41 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
package l10n
// Term constants
const (
DefReadMore = "Read more..."
DefPublishedWith = "published with write.as"
DefOlder = "Older"
DefNewer = "Newer"
)
// Default phrases
var phrases = map[string]string{
"Anonymous post": "Anonymous post",
"Blogs": "Blogs",
"Newer": "Newer",
"Older": "Older",
"Posts": "Posts",
"Publish to...": "Publish to...",
"Publish": "Publish",
"Read more...": "Read more...",
"Toggle theme": "Toggle theme",
"View posts": "View Posts",
"delete": "delete",
"edit": "edit",
"move to...": "move to...",
"pin": "pin",
"published with write.as": "published with write.as",
"share modal ending": "Send it to a friend, share it across the web, or maybe tweet it. Learn more.",
"share modal introduction": "Each published post has a secret, unique URL you can share with anyone. This is that URL:",
"share modal title": "Share this post",
"share": "share",
"unpin": "unpin",
}