Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5516d22e1 | ||
|
|
73b029dffa | ||
|
|
ab8ed5dd58 | ||
|
|
0da0bcaf01 | ||
|
|
3e1dcd609c | ||
|
|
251490523d | ||
|
|
789795d7fb | ||
|
|
482d2a0340 | ||
|
|
b0d08b0b2d | ||
|
|
4ea5f505e1 | ||
|
|
6594abfd76 | ||
|
|
8e58a42997 | ||
|
|
ed63d3d637 | ||
|
|
61c88f6532 | ||
|
|
05ae34b399 | ||
|
|
11821b1fe1 | ||
|
|
26a278eba8 | ||
|
|
3b7d4deeaa | ||
|
|
44e795b77d | ||
|
|
982e31c5be | ||
|
|
c643a95bda | ||
|
|
ba85819607 | ||
|
|
f276f4d64a | ||
|
|
375d22d230 | ||
|
|
bec10e41b5 | ||
|
|
a8daef8401 | ||
|
|
ee6bf8e8b7 | ||
|
|
bb86406b9d | ||
|
|
5fb147fe78 |
+2
-2
@@ -69,8 +69,8 @@ func parsePublicKey(der []byte) (crypto.PublicKey, error) {
|
|||||||
// them in that order.
|
// them in that order.
|
||||||
func DecodePrivateKey(k []byte) (crypto.PrivateKey, error) {
|
func DecodePrivateKey(k []byte) (crypto.PrivateKey, error) {
|
||||||
block, _ := pem.Decode(k)
|
block, _ := pem.Decode(k)
|
||||||
if block == nil || block.Type != "RSA PRIVATE KEY" {
|
if block == nil || (block.Type != "RSA PRIVATE KEY" && block.Type != "PRIVATE KEY") {
|
||||||
return nil, fmt.Errorf("failed to decode PEM block containing private key")
|
return nil, fmt.Errorf("failed to decode PEM block containing private key, type %s", block.Type)
|
||||||
}
|
}
|
||||||
|
|
||||||
return parsePrivateKey(block.Bytes)
|
return parsePrivateKey(block.Bytes)
|
||||||
|
|||||||
@@ -106,19 +106,29 @@ func NewFollowActivity(actorIRI, followeeIRI string) *FollowActivity {
|
|||||||
// Object is the primary base type for the Activity Streams vocabulary.
|
// Object is the primary base type for the Activity Streams vocabulary.
|
||||||
type Object struct {
|
type Object struct {
|
||||||
BaseObject
|
BaseObject
|
||||||
Published time.Time `json:"published"`
|
Published time.Time `json:"published,omitempty"`
|
||||||
Summary *string `json:"summary,omitempty"`
|
Summary *string `json:"summary,omitempty"`
|
||||||
InReplyTo *string `json:"inReplyTo"`
|
InReplyTo *string `json:"inReplyTo,omitempty"`
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
AttributedTo string `json:"attributedTo"`
|
AttributedTo string `json:"attributedTo,omitempty"`
|
||||||
To []string `json:"to"`
|
To []string `json:"to,omitempty"`
|
||||||
CC []string `json:"cc,omitempty"`
|
CC []string `json:"cc,omitempty"`
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content,omitempty"`
|
||||||
ContentMap map[string]string `json:"contentMap,omitempty"`
|
ContentMap map[string]string `json:"contentMap,omitempty"`
|
||||||
Tag []Tag `json:"tag"`
|
Tag []Tag `json:"tag,omitempty"`
|
||||||
Attachment []Attachment `json:"attachment,omitempty"`
|
Attachment []Attachment `json:"attachment,omitempty"`
|
||||||
|
|
||||||
|
// Person
|
||||||
|
Inbox string `json:"inbox,omitempty"`
|
||||||
|
Outbox string `json:"outbox,omitempty"`
|
||||||
|
Following string `json:"following,omitempty"`
|
||||||
|
Followers string `json:"followers,omitempty"`
|
||||||
|
PreferredUsername string `json:"preferredUsername,omitempty"`
|
||||||
|
Icon *Image `json:"icon,omitempty"`
|
||||||
|
PublicKey *PublicKey `json:"publicKey,omitempty"`
|
||||||
|
Endpoints *Endpoints `json:"endpoints,omitempty"`
|
||||||
|
|
||||||
// Extensions
|
// Extensions
|
||||||
// NOTE: add extensions here
|
// NOTE: add extensions here
|
||||||
}
|
}
|
||||||
@@ -150,3 +160,13 @@ func NewArticleObject() *Object {
|
|||||||
}
|
}
|
||||||
return &o
|
return &o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewPersonObject creates a basic Person object.
|
||||||
|
func NewPersonObject() *Object {
|
||||||
|
o := Object{
|
||||||
|
BaseObject: BaseObject{
|
||||||
|
Type: "Person",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return &o
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// Package category supports post categories
|
||||||
|
package category
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"github.com/writeas/slug"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrNotFound = errors.New("category doesn't exist")
|
||||||
|
)
|
||||||
|
|
||||||
|
// Category represents a post tag with additional metadata, like a title and slug.
|
||||||
|
type Category struct {
|
||||||
|
ID int64 `json:"-"`
|
||||||
|
Hashtag string `json:"hashtag"`
|
||||||
|
Slug string `json:"slug"`
|
||||||
|
Title string `json:"title"`
|
||||||
|
PostCount int64 `json:"post_count"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCategory creates a Category you can insert into the database, based on a hashtag. It automatically breaks up the
|
||||||
|
// hashtag by words, based on capitalization, for both the title and a URL-friendly slug.
|
||||||
|
func NewCategory(hashtag string) *Category {
|
||||||
|
title := titleFromHashtag(hashtag)
|
||||||
|
return &Category{
|
||||||
|
Hashtag: hashtag,
|
||||||
|
Slug: slug.Make(title),
|
||||||
|
Title: title,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewCategoryFromPartial creates a Category from a partially-populated Category, such as when a user initially creates
|
||||||
|
// one.
|
||||||
|
func NewCategoryFromPartial(cat *Category) *Category {
|
||||||
|
newCat := &Category{
|
||||||
|
Hashtag: cat.Hashtag,
|
||||||
|
}
|
||||||
|
// Create title from hashtag, if none supplied
|
||||||
|
if cat.Title == "" {
|
||||||
|
newCat.Title = titleFromHashtag(cat.Hashtag)
|
||||||
|
} else {
|
||||||
|
newCat.Title = cat.Title
|
||||||
|
}
|
||||||
|
// Create slug from title, if none supplied; otherwise ensure slug is valid
|
||||||
|
if cat.Slug == "" {
|
||||||
|
newCat.Slug = slug.Make(newCat.Title)
|
||||||
|
} else {
|
||||||
|
newCat.Slug = slug.Make(cat.Slug)
|
||||||
|
}
|
||||||
|
return newCat
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package category
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
"unicode"
|
||||||
|
)
|
||||||
|
|
||||||
|
// titleFromHashtag generates an all-lowercase title, with spaces inserted based on initial capitalization -- e.g.
|
||||||
|
// "MyWordyTag" becomes "my wordy tag".
|
||||||
|
func titleFromHashtag(hashtag string) string {
|
||||||
|
var t strings.Builder
|
||||||
|
var prev rune
|
||||||
|
for i, c := range hashtag {
|
||||||
|
if unicode.IsUpper(c) {
|
||||||
|
if i > 0 && !unicode.IsUpper(prev) {
|
||||||
|
// Insert space if previous rune wasn't also uppercase (e.g. an abbreviation)
|
||||||
|
t.WriteRune(' ')
|
||||||
|
}
|
||||||
|
t.WriteRune(unicode.ToLower(c))
|
||||||
|
} else {
|
||||||
|
t.WriteRune(c)
|
||||||
|
}
|
||||||
|
prev = c
|
||||||
|
}
|
||||||
|
return t.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// HashtagFromTitle generates a valid single-word, camelCase hashtag from a title (which might include spaces,
|
||||||
|
// punctuation, etc.).
|
||||||
|
func HashtagFromTitle(title string) string {
|
||||||
|
var t strings.Builder
|
||||||
|
var prev rune
|
||||||
|
for _, c := range title {
|
||||||
|
if !unicode.IsLetter(c) && !unicode.IsNumber(c) {
|
||||||
|
prev = c
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if unicode.IsSpace(prev) {
|
||||||
|
// Uppercase next word
|
||||||
|
t.WriteRune(unicode.ToUpper(c))
|
||||||
|
} else {
|
||||||
|
t.WriteRune(c)
|
||||||
|
}
|
||||||
|
prev = c
|
||||||
|
}
|
||||||
|
return t.String()
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package category
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestTitleFromHashtag(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
hashtag string
|
||||||
|
expTitle string
|
||||||
|
}{
|
||||||
|
{"proper noun", "Jane", "jane"},
|
||||||
|
{"full name", "JaneDoe", "jane doe"},
|
||||||
|
{"us words", "unitedStates", "united states"},
|
||||||
|
{"usa", "USA", "usa"},
|
||||||
|
{"us monoword", "unitedstates", "unitedstates"},
|
||||||
|
{"100dto", "100DaysToOffload", "100 days to offload"},
|
||||||
|
{"iphone", "iPhone", "iphone"},
|
||||||
|
{"ilike", "iLikeThis", "i like this"},
|
||||||
|
{"abird", "aBird", "a bird"},
|
||||||
|
{"all caps", "URGENT", "urgent"},
|
||||||
|
{"smartphone", "スマートフォン", "スマートフォン"},
|
||||||
|
}
|
||||||
|
for _, test := range tests {
|
||||||
|
t.Run(test.name, func(t *testing.T) {
|
||||||
|
res := titleFromHashtag(test.hashtag)
|
||||||
|
if res != test.expTitle {
|
||||||
|
t.Fatalf("#%s: got '%s' expected '%s'", test.hashtag, res, test.expTitle)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestHashtagFromTitle(t *testing.T) {
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
title string
|
||||||
|
expHashtag string
|
||||||
|
}{
|
||||||
|
{"proper noun", "Jane", "Jane"},
|
||||||
|
{"full name", "Jane Doe", "JaneDoe"},
|
||||||
|
{"us upper words", "United States", "UnitedStates"},
|
||||||
|
{"us lower words", "united states", "unitedStates"},
|
||||||
|
{"usa", "USA", "USA"},
|
||||||
|
{"100dto", "100 Days To Offload", "100DaysToOffload"},
|
||||||
|
{"iphone", "iPhone", "iPhone"},
|
||||||
|
{"ilike", "I like this", "ILikeThis"},
|
||||||
|
{"abird", "a Bird", "aBird"},
|
||||||
|
{"all caps", "URGENT", "URGENT"},
|
||||||
|
{"punctuation", "John’s Stories", "JohnsStories"},
|
||||||
|
{"smartphone", "スマートフォン", "スマートフォン"},
|
||||||
|
}
|
||||||
|
for _, test := range tests {
|
||||||
|
t.Run(test.name, func(t *testing.T) {
|
||||||
|
res := HashtagFromTitle(test.title)
|
||||||
|
if res != test.expHashtag {
|
||||||
|
t.Fatalf("%s: got '%s' expected '%s'", test.title, res, test.expHashtag)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,12 +5,14 @@ go 1.10
|
|||||||
require (
|
require (
|
||||||
github.com/gofrs/uuid v3.3.0+incompatible
|
github.com/gofrs/uuid v3.3.0+incompatible
|
||||||
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec
|
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec
|
||||||
github.com/microcosm-cc/bluemonday v1.0.2
|
github.com/microcosm-cc/bluemonday v1.0.5
|
||||||
|
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||||
github.com/writeas/go-strip-markdown v2.0.1+incompatible
|
github.com/writeas/go-strip-markdown v2.0.1+incompatible
|
||||||
github.com/writeas/impart v1.1.1
|
github.com/writeas/impart v1.1.1
|
||||||
github.com/writeas/openssl-go v1.0.0
|
github.com/writeas/openssl-go v1.0.0
|
||||||
github.com/writeas/saturday v1.7.1
|
github.com/writeas/saturday v1.7.1
|
||||||
|
github.com/writeas/slug v1.2.0
|
||||||
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17
|
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||||
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect
|
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
|
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||||
|
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||||
|
github.com/chris-ramon/douceur v0.2.0 h1:IDMEdxlEUUBYBKE4z/mJnFyVXox+MjuEVDJNN27glkU=
|
||||||
|
github.com/chris-ramon/douceur v0.2.0/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE=
|
||||||
github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84=
|
github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84=
|
||||||
github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||||
|
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
|
||||||
|
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
||||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
@@ -7,8 +13,10 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
|||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec h1:ZXWuspqypleMuJy4bzYEqlMhJnGAYpLrWe5p7W3CdvI=
|
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec h1:ZXWuspqypleMuJy4bzYEqlMhJnGAYpLrWe5p7W3CdvI=
|
||||||
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec/go.mod h1:voECJzdraJmolzPBgL9Z7ANwXf4oMXaTCsIkdiPpR/g=
|
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec/go.mod h1:voECJzdraJmolzPBgL9Z7ANwXf4oMXaTCsIkdiPpR/g=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s=
|
github.com/microcosm-cc/bluemonday v1.0.5 h1:cF59UCKMmmUgqN1baLvqU/B1ZsMori+duLVTLpgiG3w=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
github.com/microcosm-cc/bluemonday v1.0.5/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w=
|
||||||
|
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be h1:ta7tUOvsPHVHGom5hKW5VXNc2xZIkfCKP8iaqOyYtUQ=
|
||||||
|
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be/go.mod h1:MIDFMn7db1kT65GmV94GzpX9Qdi7N/pQlwb+AN8wh+Q=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6FkrCNfXkvbR+Nbu1ls48pXYcw=
|
github.com/writeas/go-strip-markdown v2.0.1+incompatible h1:IIqxTM5Jr7RzhigcL6FkrCNfXkvbR+Nbu1ls48pXYcw=
|
||||||
@@ -19,10 +27,11 @@ github.com/writeas/openssl-go v1.0.0 h1:YXM1tDXeYOlTyJjoMlYLQH1xOloUimSR1WMF8kjF
|
|||||||
github.com/writeas/openssl-go v1.0.0/go.mod h1:WsKeK5jYl0B5y8ggOmtVjbmb+3rEGqSD25TppjJnETA=
|
github.com/writeas/openssl-go v1.0.0/go.mod h1:WsKeK5jYl0B5y8ggOmtVjbmb+3rEGqSD25TppjJnETA=
|
||||||
github.com/writeas/saturday v1.7.1 h1:lYo1EH6CYyrFObQoA9RNWHVlpZA5iYL5Opxo7PYAnZE=
|
github.com/writeas/saturday v1.7.1 h1:lYo1EH6CYyrFObQoA9RNWHVlpZA5iYL5Opxo7PYAnZE=
|
||||||
github.com/writeas/saturday v1.7.1/go.mod h1:ETE1EK6ogxptJpAgUbcJD0prAtX48bSloie80+tvnzQ=
|
github.com/writeas/saturday v1.7.1/go.mod h1:ETE1EK6ogxptJpAgUbcJD0prAtX48bSloie80+tvnzQ=
|
||||||
|
github.com/writeas/slug v1.2.0 h1:EMQ+cwLiOcA6EtFwUgyw3Ge18x9uflUnOnR6bp/J+/g=
|
||||||
|
github.com/writeas/slug v1.2.0/go.mod h1:RE8shOqQP3YhsfsQe0L3RnuejfQ4Mk+JjY5YJQFubfQ=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17 h1:nVJ3guKA9qdkEQ3TUdXI9QSINo2CUPM/cySEvw2w8I0=
|
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17 h1:nVJ3guKA9qdkEQ3TUdXI9QSINo2CUPM/cySEvw2w8I0=
|
||||||
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
|
|||||||
+13
-7
@@ -14,23 +14,29 @@ var phrases = map[string]string{
|
|||||||
"Blogs": "Blogs",
|
"Blogs": "Blogs",
|
||||||
"Enter": "Enter",
|
"Enter": "Enter",
|
||||||
"Newer": "Newer",
|
"Newer": "Newer",
|
||||||
|
"Next": "Next",
|
||||||
"Older": "Older",
|
"Older": "Older",
|
||||||
"Posts": "Posts",
|
"Posts": "Posts",
|
||||||
|
"Previous": "Previous",
|
||||||
"Publish to...": "Publish to...",
|
"Publish to...": "Publish to...",
|
||||||
"Publish": "Publish",
|
"Publish": "Publish",
|
||||||
"Read more...": "Read more...",
|
"Read more...": "Read more...",
|
||||||
|
"Subscribe": "Subscribe",
|
||||||
"This blog requires a password.": "This blog requires a password.",
|
"This blog requires a password.": "This blog requires a password.",
|
||||||
"Toggle theme": "Toggle theme",
|
"Toggle theme": "Toggle theme",
|
||||||
"View posts": "View Posts",
|
"View posts": "View Posts",
|
||||||
"delete": "delete",
|
"delete": "delete",
|
||||||
"edit": "edit",
|
"edit": "edit",
|
||||||
|
"email subscription confirm": "Please check your email and click the confirmation link to subscribe.",
|
||||||
|
"email subscription prompt": "Enter your email to subscribe to updates.",
|
||||||
|
"email subscription success": "Subscribed. You'll now receive future blog posts via email.",
|
||||||
"move to...": "move to...",
|
"move to...": "move to...",
|
||||||
"pin": "pin",
|
"pin": "pin",
|
||||||
"published with write.as": "published with write.as",
|
"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 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 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 modal title": "Share this post",
|
||||||
"share": "share",
|
"share": "share",
|
||||||
"unpin": "unpin",
|
"unpin": "unpin",
|
||||||
"title dash": "—",
|
"title dash": "—",
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -10,17 +10,19 @@ var phrasesAR = map[string]string{
|
|||||||
"Publish to...": "النشر إلى…",
|
"Publish to...": "النشر إلى…",
|
||||||
"Publish": "نشر",
|
"Publish": "نشر",
|
||||||
"Read more...": "اقرأ المزيد…",
|
"Read more...": "اقرأ المزيد…",
|
||||||
|
"Subscribe": "اشترك",
|
||||||
"This blog requires a password.": "هذه المدونة تتطلب کلمة سرية.",
|
"This blog requires a password.": "هذه المدونة تتطلب کلمة سرية.",
|
||||||
"Toggle theme": "تغيير القالب",
|
"Toggle theme": "تغيير القالب",
|
||||||
"View posts": "مشاهدة المنشورات",
|
"View posts": "مشاهدة المنشورات",
|
||||||
"delete": "حذف",
|
"delete": "حذف",
|
||||||
"edit": "تعديل",
|
"edit": "تعديل",
|
||||||
|
"email subscription prompt": "ادخل عنوان بريدك الإلكتروني للإشتراك في التحديثات",
|
||||||
"move to...": "أنقله إلى…",
|
"move to...": "أنقله إلى…",
|
||||||
"pin": "تدبيس",
|
"pin": "تدبيس",
|
||||||
"published with write.as": "مدعوم من write.as",
|
"published with write.as": "مدعوم من write.as",
|
||||||
"share modal ending": "ارسلهه إلى صديق، شاركه عبر الويب، أو غرّده. تعلّم المزيد.",
|
"share modal ending": "ارسلهه إلى صديق، شاركه عبر الويب، أو غرّده. تعلّم المزيد.",
|
||||||
"share modal introduction": "كل الفيديوهات المنشورة لديها رابط سري مميز، يمكنك مشاركته. هذا هو الرابط:",
|
"share modal introduction": "كل الفيديوهات المنشورة لديها رابط سري مميز، يمكنك مشاركته. هذا هو الرابط:",
|
||||||
"share modal title": "شارك هذا المنشور",
|
"share modal title": "شارك هذا المنشور",
|
||||||
"share": "شارك",
|
"share": "شارك",
|
||||||
"unpin": "إلغاء التدبيس",
|
"unpin": "إلغاء التدبيس",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesCS = map[string]string{
|
||||||
|
"Anonymous post": "Anonymní článek",
|
||||||
|
"Blogs": "Blogy",
|
||||||
|
"Enter": "Vstoupit",
|
||||||
|
"Newer": "Novější",
|
||||||
|
"Older": "Starší",
|
||||||
|
"Posts": "Články",
|
||||||
|
"Publish to...": "Zveřejnit do...",
|
||||||
|
"Publish": "Zveřejnit",
|
||||||
|
"Read more...": "Číst dále...",
|
||||||
|
"Subscribe": "Odebírat",
|
||||||
|
"This blog requires a password.": "Tento blog je zaheslován.",
|
||||||
|
"Toggle theme": "Přepnout vzhled",
|
||||||
|
"View posts": "Zobrazit články",
|
||||||
|
"delete": "smazat",
|
||||||
|
"edit": "upravit",
|
||||||
|
"email subscription prompt": "Zadejte svůj e-mail a přihlaste se k odběru aktualizací.",
|
||||||
|
"move to...": "přesunout do...",
|
||||||
|
"pin": "připnout",
|
||||||
|
"published with write.as": "publikováno pomocí write.as",
|
||||||
|
"share modal ending": "Pošlete ji kamarádům, sdílejte na webu nebo na sociálních sítích. Zjistit více.",
|
||||||
|
"share modal introduction": "Každý zveřejněný článek má tajnou unikátní adresu, kterou můžete komukoliv poslat. Unikátní adresa pro tento článek je:",
|
||||||
|
"share modal title": "Sdílet tento článek",
|
||||||
|
"share": "sdílet",
|
||||||
|
"unpin": "odepnout",
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesDA = map[string]string{
|
||||||
|
"Anonymous post": "Anonymt indlæg",
|
||||||
|
"Blogs": "Blogs",
|
||||||
|
"Enter": "Enter",
|
||||||
|
"Newer": "Nyere",
|
||||||
|
"Older": "Ældre",
|
||||||
|
"Posts": "Indlæg",
|
||||||
|
"Publish to...": "Udgiv på...",
|
||||||
|
"Publish": "Udgiv",
|
||||||
|
"Read more...": "Læs videre...",
|
||||||
|
"Subscribe": "Abonnér",
|
||||||
|
"This blog requires a password.": "Den her blog kræver en adgangskode.",
|
||||||
|
"Toggle theme": "Skift design",
|
||||||
|
"View posts": "Vis indlæg",
|
||||||
|
"delete": "slet",
|
||||||
|
"edit": "redigér",
|
||||||
|
"email subscription prompt": "Indtast din email for at få tilsendt opdateringer.",
|
||||||
|
"move to...": "flyt til...",
|
||||||
|
"pin": "sæt øverst",
|
||||||
|
"published with write.as": "udgivet med write.as",
|
||||||
|
"share modal ending": "Send det til en ven, del det på nettet, eller lav et tweet. Læs mere.",
|
||||||
|
"share modal introduction": "Hvert indlæg har sit eget, hemmelige link, som du kan dele med enhver. Her er det førnævnte link:",
|
||||||
|
"share modal title": "Del indlæg",
|
||||||
|
"share": "del",
|
||||||
|
"unpin": "fjern øverst",
|
||||||
|
}
|
||||||
+10
-8
@@ -7,21 +7,23 @@ var phrasesDE = map[string]string{
|
|||||||
"Newer": "Neuer",
|
"Newer": "Neuer",
|
||||||
"Older": "Älter",
|
"Older": "Älter",
|
||||||
"Posts": "Beiträge",
|
"Posts": "Beiträge",
|
||||||
"Publish to...": "Veröffentlichen zu...",
|
"Publish to...": "Veröffentlichen zu",
|
||||||
"Publish": "Veröffentlichen",
|
"Publish": "Veröffentlichen",
|
||||||
"Read more...": "Weiterlesen...",
|
"Read more...": "Weiterlesen...",
|
||||||
|
"Subscribe": "Abonnieren",
|
||||||
"This blog requires a password.": "Dieser Blog benötigt ein Passwort",
|
"This blog requires a password.": "Dieser Blog benötigt ein Passwort",
|
||||||
"Toggle theme": "Design ändern",
|
"Toggle theme": "Design ändern",
|
||||||
"View posts": "Beiträge ansehen",
|
"View posts": "Beiträge ansehen",
|
||||||
"delete": "Löschen",
|
"delete": "Löschen",
|
||||||
"edit": "Bearbeiten",
|
"edit": "Bearbeiten",
|
||||||
|
"email subscription prompt": "Geben Sie Ihre E-Mail-Adresse ein, um Updates zu abonnieren.",
|
||||||
"move to...": "Verschieben nach...",
|
"move to...": "Verschieben nach...",
|
||||||
"pin": "Anheften",
|
"pin": "Anheften",
|
||||||
"published with write.as": "veröffentlicht mit write.as",
|
"published with write.as": "Veröffentlicht mit write.as",
|
||||||
"share modal ending": "Schicke es Freunden, teile es im Netz oder vielleicht tweete es. Lerne mehr.",
|
"share modal ending": "Schicke es Freunden, teile es im Netz oder vielleicht tweete es. Lerne mehr.",
|
||||||
"share modal introduction": "Jeder veröffentlichte Beitrag hat eine geheime, einmalige URL, die du mit jedem teilen kannst. Die URL ist:",
|
"share modal introduction": "Jeder veröffentlichte Beitrag hat eine geheime, einmalige URL, die du mit jedem teilen kannst. Die URL ist:",
|
||||||
"share modal title": "Teile diesen Beitrag",
|
"share modal title": "Teile diesen Beitrag",
|
||||||
"share": "Teilen",
|
"share": "Teilen",
|
||||||
"unpin": "Lösen",
|
"unpin": "Lösen",
|
||||||
"title dash": "–",
|
"title dash": "–",
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -10,17 +10,19 @@ var phrasesEL = map[string]string{
|
|||||||
"Publish to...": "Δημοσίευση στο...",
|
"Publish to...": "Δημοσίευση στο...",
|
||||||
"Publish": "Δημοσίευση",
|
"Publish": "Δημοσίευση",
|
||||||
"Read more...": "Διαβάστε περισσότερα...",
|
"Read more...": "Διαβάστε περισσότερα...",
|
||||||
|
"Subscribe": "Εγγραφείτε",
|
||||||
"This blog requires a password.": "Αυτό το ιστολόγιο απαιτεί κωδικό.",
|
"This blog requires a password.": "Αυτό το ιστολόγιο απαιτεί κωδικό.",
|
||||||
"Toggle theme": "Αλλαγή θέματος",
|
"Toggle theme": "Αλλαγή θέματος",
|
||||||
"View posts": "Προβολή Δημοσιεύσεων",
|
"View posts": "Προβολή Δημοσιεύσεων",
|
||||||
"delete": "διαγραφή",
|
"delete": "διαγραφή",
|
||||||
"edit": "επεξεργασία",
|
"edit": "επεξεργασία",
|
||||||
|
"email subscription prompt": "Εισάγετε το email σας για να εγγραφείτε στις ενημερώσεις.",
|
||||||
"move to...": "μετακίνηση στο...",
|
"move to...": "μετακίνηση στο...",
|
||||||
"pin": "καρφίτσωμα",
|
"pin": "καρφίτσωμα",
|
||||||
"published with write.as": "δημοσιεύθηκε με το write.as",
|
"published with write.as": "δημοσιεύθηκε με το write.as",
|
||||||
"share modal ending": "Στείλτε το σε έναν φίλο, μοιραστείτε το στο διαδίκτυο ή κάντε το tweet. Μάθετε περισσότερα.",
|
"share modal ending": "Στείλτε το σε έναν φίλο, μοιραστείτε το στο διαδίκτυο ή κάντε το tweet. Μάθετε περισσότερα.",
|
||||||
"share modal introduction": "Κάθε αναρτημένη δημοσίευση έχει ένα κρυφό, μοναδικό σύνδεσμο που μπορείτε να μοιραστείτε με οποιονδήποτε. Αυτός είναι ο εν λόγω σύνδεσμος:",
|
"share modal introduction": "Κάθε αναρτημένη δημοσίευση έχει ένα κρυφό, μοναδικό σύνδεσμο που μπορείτε να μοιραστείτε με οποιονδήποτε. Αυτός είναι ο εν λόγω σύνδεσμος:",
|
||||||
"share modal title": "Μοιραστείτε αυτή τη δημοσίευση",
|
"share modal title": "Μοιραστείτε αυτή τη δημοσίευση",
|
||||||
"share": "διαμοιρασμός",
|
"share": "διαμοιρασμός",
|
||||||
"unpin": "ξεκαρφίτσωμα",
|
"unpin": "ξεκαρφίτσωμα",
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -17,10 +17,10 @@ var phrasesEO = map[string]string{
|
|||||||
"edit": "redakti",
|
"edit": "redakti",
|
||||||
"move to...": "movi al...",
|
"move to...": "movi al...",
|
||||||
"pin": "alpingli",
|
"pin": "alpingli",
|
||||||
"published with write.as": "Eldonita per write.as",
|
"published with write.as": "Eldonita per write.as",
|
||||||
"share modal ending": "Sendu ĝin al unu amiko, kunhavu ĝin tra la retejo, aŭ eble tweet ĝin. Lernu pli.",
|
"share modal ending": "Sendu ĝin al unu amiko, kunhavu ĝin tra la retejo, aŭ eble tweet ĝin. Lernu pli.",
|
||||||
"share modal introduction": "Ĉiu eldonita afiŝo havas sekretan, unikan URL-on, kiun vi povas kunhavigi kun iu ajn. Ĉi tiu estas tiu URL-o:",
|
"share modal introduction": "Ĉiu eldonita afiŝo havas sekretan, unikan URL-on, kiun vi povas kunhavigi kun iu ajn. Ĉi tiu estas tiu URL-o:",
|
||||||
"share modal title": "Kunhavigi ĉi tiun afiŝon",
|
"share modal title": "Kunhavigi ĉi tiun afiŝon",
|
||||||
"share": "kunhavigi",
|
"share": "kunhavigi",
|
||||||
"unpin": "malalpingli",
|
"unpin": "malalpingli",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesEU = map[string]string{
|
||||||
|
"Anonymous post": "Bidalketa anonimoa",
|
||||||
|
"Blogs": "Blogak",
|
||||||
|
"Enter": "Sartu",
|
||||||
|
"Newer": "Berriagoak",
|
||||||
|
"Older": "Zaharragoak",
|
||||||
|
"Posts": "Bidalketak",
|
||||||
|
"Publish to...": "Argitaratu hemen...",
|
||||||
|
"Publish": "Argitaratu",
|
||||||
|
"Read more...": "Irakurri gehiago...",
|
||||||
|
"Subscribe": "Izena eman",
|
||||||
|
"This blog requires a password.": "Blog honek pasahitza behar du.",
|
||||||
|
"Toggle theme": "Aldatu itxura",
|
||||||
|
"View posts": "Ikusi bidalketak",
|
||||||
|
"delete": "ezabatu",
|
||||||
|
"edit": "editatu",
|
||||||
|
"email subscription prompt": "Sartu zure e-posta helbidea berriak jasotzeko.",
|
||||||
|
"move to...": "mugitu hona...",
|
||||||
|
"pin": "finkatu",
|
||||||
|
"published with write.as": "write.as bidez argitaratua",
|
||||||
|
"share modal ending": "Bidali lagun bati, partekatu sarean zehar edo agian, txiokatu. Ikasi gehiago.",
|
||||||
|
"share modal introduction": "Argitaratutako bidalketa orok URL sekretu eta bakarra dauka, edonorekin partekatu dezakezuna. Hau da URLa:",
|
||||||
|
"share modal title": "Partekatu bidalketa hau",
|
||||||
|
"share": "partekatu",
|
||||||
|
"unpin": "desfinkatu",
|
||||||
|
}
|
||||||
+24
-20
@@ -1,24 +1,28 @@
|
|||||||
package l10n
|
package l10n
|
||||||
|
|
||||||
var phrasesFR = map[string]string{
|
var phrasesFR = map[string]string{
|
||||||
"Anonymous post": "Post anonyme",
|
"Anonymous post": "Billet anonyme",
|
||||||
"Blogs": "Blogs",
|
"Blogs": "Blogs",
|
||||||
"Newer": "Nouveaux",
|
"Enter": "Valider",
|
||||||
"Older": "Anciens",
|
"Newer": "Récents",
|
||||||
"Posts": "Posts",
|
"Older": "Précédents",
|
||||||
"Publish to...": "Publie sur...",
|
"Posts": "Billets",
|
||||||
"Publish": "Publie",
|
"Publish to...": "Publier sur...",
|
||||||
"Read more...": "En savoir plus...",
|
"Publish": "Publier",
|
||||||
"Toggle theme": "Activer thème",
|
"Read more...": "Lire la suite...",
|
||||||
"View posts": "Voir Posts",
|
"Subscribe": "S'abonner",
|
||||||
"delete": "effacer",
|
"This blog requires a password.": "Ce blog requiert un mot de passe.",
|
||||||
"edit": "modifier",
|
"Toggle theme": "Changer de thème",
|
||||||
"move to...": "déplacer vers...",
|
"View posts": "Voir les billets",
|
||||||
"pin": "épingler",
|
"delete": "effacer",
|
||||||
"published with write.as": "publié avec write.as",
|
"edit": "modifier",
|
||||||
"share modal ending": "Envoie-le à un ami, partage-le sur le web, ou peut-être en tant que tweet. En savoir plus.",
|
"email subscription prompt": "Insérer votre adresse email pour recevoir les mises à jour",
|
||||||
"share modal introduction": "Tout post publié a une adresse URL secrète et unique que tu peux partager avec qui tu veux. Voici cette URL:",
|
"move to...": "déplacer vers...",
|
||||||
"share modal title": "Partage ce post",
|
"pin": "épingler",
|
||||||
"share": "partager",
|
"published with write.as": "publié avec write.as",
|
||||||
"unpin": "enlever",
|
"share modal ending": "Envoyer à un ami, partager sur le web, ou peut-être en tant que tweet. En savoir plus.",
|
||||||
|
"share modal introduction": "Chaque billet dispose d’une adresse (URL) secrète et unique qui peut être partagée avec quelqu’un. Voici cette URL:",
|
||||||
|
"share modal title": "Partager ce billet",
|
||||||
|
"share": "partager",
|
||||||
|
"unpin": "détacher",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesGL = map[string]string{
|
||||||
|
"Anonymous post": "Publicación anónima",
|
||||||
|
"Blogs": "Blogs",
|
||||||
|
"Enter": "Entrar",
|
||||||
|
"Newer": "Máis recente",
|
||||||
|
"Older": "Máis antigo",
|
||||||
|
"Posts": "Publicacións",
|
||||||
|
"Publish to...": "Publicar en...",
|
||||||
|
"Publish": "Publicar",
|
||||||
|
"Read more...": "Saber máis...",
|
||||||
|
"Subscribe": "Subscribir",
|
||||||
|
"This blog requires a password.": "Este blog require un contrasinal.",
|
||||||
|
"Toggle theme": "Cambiar decorado",
|
||||||
|
"View posts": "Ver Publicacións",
|
||||||
|
"delete": "eliminar",
|
||||||
|
"edit": "editar",
|
||||||
|
"email subscription prompt": "Escribe o teu email para recibir actualizacións.",
|
||||||
|
"move to...": "mover a...",
|
||||||
|
"pin": "fixar",
|
||||||
|
"published with write.as": "publicado con write.as",
|
||||||
|
"share modal ending": "Envíallo a un amigo, compárteo en internet e redes sociais. Saber máis.",
|
||||||
|
"share modal introduction": "Cada publicación ten un identificador, un URL único que podes compartir con calquera. Este é o URL:",
|
||||||
|
"share modal title": "Comparte a publicación",
|
||||||
|
"share": "compartir",
|
||||||
|
"unpin": "desafixar",
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesHE = map[string]string{
|
||||||
|
"Anonymous post": "פוסטים אנונימיים",
|
||||||
|
"Blogs": "בלוגים",
|
||||||
|
"Enter": "היכנס",
|
||||||
|
"Newer": "חדש יותר",
|
||||||
|
"Older": "ישן יותר",
|
||||||
|
"Posts": "פוסטים",
|
||||||
|
"Publish to...": "פירסום ל...",
|
||||||
|
"Publish": "פירסום",
|
||||||
|
"Read more...": "קרא עוד...",
|
||||||
|
"Subscribe": "הירשם",
|
||||||
|
"This blog requires a password.": "לבלוג זה ישנה סיסמה",
|
||||||
|
"Toggle theme": "החלפת ערכת נושא",
|
||||||
|
"View posts": "צפייה בפוסטים",
|
||||||
|
"delete": "מחיקה",
|
||||||
|
"edit": "עריכה",
|
||||||
|
"email subscription prompt": "הכנס את המייל שלך כדי לקבל לעידכונים",
|
||||||
|
"move to...": "העברה ל...",
|
||||||
|
"pin": "הצמדה",
|
||||||
|
"published with write.as": "פורסם ע''י write.as",
|
||||||
|
"share modal ending": "שלח לחברים, פרסם ברשת, או אולי צייץ את זה. למד עוד.",
|
||||||
|
"share modal introduction": "לכל פוסט יש קישור סודי ויחודי שניתן לשתף עם כל אחד. הנה הקישור:",
|
||||||
|
"share modal title": "שיתוף פוסט זה",
|
||||||
|
"share": "שיתוף",
|
||||||
|
"unpin": "ביטול הצמדה",
|
||||||
|
}
|
||||||
+24
-20
@@ -1,24 +1,28 @@
|
|||||||
package l10n
|
package l10n
|
||||||
|
|
||||||
var phrasesIT = map[string]string{
|
var phrasesIT = map[string]string{
|
||||||
"Anonymous post": "Post anonimo",
|
"Anonymous post": "Post anonimo",
|
||||||
"Blogs": "Blogs",
|
"Blogs": "Blogs",
|
||||||
"Newer": "Più recenti",
|
"Enter": "Invio",
|
||||||
"Older": "Più vecchi",
|
"Newer": "Recenti",
|
||||||
"Posts": "Posts",
|
"Older": "Precedenti",
|
||||||
"Publish to...": "Pubblica su...",
|
"Posts": "Posts",
|
||||||
"Publish": "Pubblica",
|
"Publish to...": "Pubblica su...",
|
||||||
"Read more...": "Continua...",
|
"Publish": "Pubblica",
|
||||||
"Toggle theme": "Attiva tema",
|
"Read more...": "Continua...",
|
||||||
"View posts": "Vedi Posts",
|
"Subscribe": "Sottoscrivi",
|
||||||
"delete": "cancella",
|
"This blog requires a password.": "Questo blog necessita una password.",
|
||||||
"edit": "modifica",
|
"Toggle theme": "Attiva tema",
|
||||||
"move to...": "sposta verso...",
|
"View posts": "Vedi Posts",
|
||||||
"pin": "attacca",
|
"delete": "cancella",
|
||||||
"published with write.as": "pubblicato con write.as",
|
"edit": "modifica",
|
||||||
"share modal ending": "Mandalo ad un amico, condividilo sul web, oppure tweettalo. Per saperne di più.",
|
"email subscription prompt": "Inserisci la tua email per ricevere aggiornamenti",
|
||||||
"share modal introduction": "Ogni post pubblicato possiede un URL segreto e unico che puoi condividere con chiunque. Questo è l'URL:",
|
"move to...": "sposta verso...",
|
||||||
"share modal title": "Condividi questo post",
|
"pin": "appunta",
|
||||||
"share": "condividi",
|
"published with write.as": "pubblicato con write.as",
|
||||||
"unpin": "stacca",
|
"share modal ending": "Mandala ad un amico, condividila sul web, oppure tweettala. Per saperne di più.",
|
||||||
|
"share modal introduction": "Ogni post pubblicato possiede una URL segreta e unica che puoi condividere con chiunque. Questa è l'URL:",
|
||||||
|
"share modal title": "Condividi questo post",
|
||||||
|
"share": "condividi",
|
||||||
|
"unpin": "stacca",
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-20
@@ -1,24 +1,28 @@
|
|||||||
package l10n
|
package l10n
|
||||||
|
|
||||||
var phrasesJA = map[string]string{
|
var phrasesJA = map[string]string{
|
||||||
"Anonymous post": "匿名投稿",
|
"Anonymous post": "匿名投稿",
|
||||||
"Blogs": "ブログ",
|
"Blogs": "ブログ",
|
||||||
"Newer": "新しい投稿",
|
"Enter": "認証",
|
||||||
"Older": "古い投稿",
|
"Newer": "新しい投稿",
|
||||||
"Posts": "投稿",
|
"Older": "古い投稿",
|
||||||
"Publish to...": "公開先…",
|
"Posts": "投稿",
|
||||||
"Publish": "公開",
|
"Publish to...": "公開先…",
|
||||||
"Read more...": "もっと読む…",
|
"Publish": "公開",
|
||||||
"Toggle theme": "テーマを変更",
|
"Read more...": "もっと読む…",
|
||||||
"View posts": "投稿を見る",
|
"Subscribe": "購読",
|
||||||
"delete": "削除",
|
"This blog requires a password.": "このブログはパスワードを必要としています。",
|
||||||
"edit": "編集",
|
"Toggle theme": "テーマを変更",
|
||||||
"move to...": "移動…",
|
"View posts": "投稿を見る",
|
||||||
"pin": "固定表示する",
|
"delete": "削除",
|
||||||
"published with write.as": "write.as を使って公開されました",
|
"edit": "編集",
|
||||||
"share modal ending": "友達に送信したり、ウェブの大海にシェアしたり、ツイートしたり。もっと知る。",
|
"email subscription prompt": "このブログを購読したい場合は、メールアドレスを入力してください。",
|
||||||
"share modal introduction": "全ての投稿には秘密の、シェアするとだれでも見ることのできる固有のURLがあります。これがそのURLです:",
|
"move to...": "移動…",
|
||||||
"share modal title": "投稿をシェアする",
|
"pin": "固定表示する",
|
||||||
"share": "シェア",
|
"published with write.as": "write.as を使って公開されました",
|
||||||
"unpin": "固定表示をやめる",
|
"share modal ending": "友達に送信したり、Web 上で共有したり、ツイートすることが出来ます。もっと詳しく。",
|
||||||
|
"share modal introduction": "全ての投稿には秘密の、シェアするとだれでも見ることのできる固有の URL があります。これがその URL です:",
|
||||||
|
"share modal title": "投稿をシェアする",
|
||||||
|
"share": "シェア",
|
||||||
|
"unpin": "固定表示をやめる",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package l10n
|
||||||
|
|
||||||
|
var phrasesNL = map[string]string{
|
||||||
|
"Anonymous post": "Anoniem artikel",
|
||||||
|
"Blogs": "Blogs",
|
||||||
|
"Enter": "Invoeren",
|
||||||
|
"Newer": "Nieuwer",
|
||||||
|
"Older": "Ouder",
|
||||||
|
"Posts": "Artikelen",
|
||||||
|
"Publish to...": "Publiceren op...",
|
||||||
|
"Publish": "Publiceren",
|
||||||
|
"Read more...": "Lees verder...",
|
||||||
|
"Subscribe": "Abonneren",
|
||||||
|
"This blog requires a password.": "Voor dit blog is een wachtwoord vereist.",
|
||||||
|
"Toggle theme": "Ander thema",
|
||||||
|
"View posts": "Artikelen bekijken",
|
||||||
|
"delete": "verwijderen",
|
||||||
|
"edit": "bewerken",
|
||||||
|
"email subscription prompt": "Voer je e-mailadres in om te abonneren op updates.",
|
||||||
|
"move to...": "verplaatsen naar...",
|
||||||
|
"pin": "vastmaken",
|
||||||
|
"published with write.as": "gepubliceerd met write.as",
|
||||||
|
"share modal ending": "Deel de link met een vriend, op het internet of op Twitter. Meer informatie.",
|
||||||
|
"share modal introduction": "Elk gepubliceerd artikel bevat een geheime, unieke link die je met iedereen kunt delen. Dit is de link:",
|
||||||
|
"share modal title": "Deel dit artikel",
|
||||||
|
"share": "delen",
|
||||||
|
"unpin": "losmaken",
|
||||||
|
}
|
||||||
+12
-10
@@ -3,24 +3,26 @@ package l10n
|
|||||||
var phrasesZH = map[string]string{
|
var phrasesZH = map[string]string{
|
||||||
"Anonymous post": "匿名文章",
|
"Anonymous post": "匿名文章",
|
||||||
"Blogs": "博客",
|
"Blogs": "博客",
|
||||||
"Enter": "按下回车",
|
"Enter": "进入",
|
||||||
"Newer": "更新",
|
"Newer": "最近的博客",
|
||||||
"Older": "较旧",
|
"Older": "之前的博客",
|
||||||
"Posts": "文章",
|
"Posts": "文章",
|
||||||
"Publish to...": "发布到...",
|
"Publish to...": "发布到...",
|
||||||
"Publish": "发布",
|
"Publish": "发布",
|
||||||
"Read more...": "阅读更多",
|
"Read more...": "阅读更多",
|
||||||
"This blog requires a password.": "这篇文章需要密码",
|
"Subscribe": "订阅",
|
||||||
|
"This blog requires a password.": "这篇博客需要密码",
|
||||||
"Toggle theme": "更换主题",
|
"Toggle theme": "更换主题",
|
||||||
"View posts": "查看文章",
|
"View posts": "查看文章",
|
||||||
"delete": "删除",
|
"delete": "删除",
|
||||||
"edit": "编辑",
|
"edit": "编辑",
|
||||||
|
"email subscription prompt": "输入邮件地址,订阅更新",
|
||||||
"move to...": "移动到",
|
"move to...": "移动到",
|
||||||
"pin": "固定文章",
|
"pin": "固定文章",
|
||||||
"published with write.as": "通过 write.as 发布",
|
"published with write.as": "用write.as来发布",
|
||||||
"share modal ending": "发送给朋友、与世界分享或者发条推。了解更多。",
|
"share modal ending": "发送给朋友,或者线上分享,如果可能的话,分享到推特上。了解更多。",
|
||||||
"share modal introduction": "发布的每篇文章都有一个唯一的私有网址,你可以把它分享给任何人:",
|
"share modal introduction": "发布的每篇文章都有一个唯一的私有URL,你可以把它分享给任何人。这是URL:",
|
||||||
"share modal title": "分享文章",
|
"share modal title": "分享这篇文章",
|
||||||
"share": "分享",
|
"share": "分享",
|
||||||
"unpin": "取消固定",
|
"unpin": "取消固定",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ func Strings(lang string) map[string]string {
|
|||||||
switch lang {
|
switch lang {
|
||||||
case "ar":
|
case "ar":
|
||||||
return phrasesAR
|
return phrasesAR
|
||||||
|
case "cs":
|
||||||
|
return phrasesCS
|
||||||
|
case "da":
|
||||||
|
return phrasesDA
|
||||||
case "de":
|
case "de":
|
||||||
return phrasesDE
|
return phrasesDE
|
||||||
case "el":
|
case "el":
|
||||||
@@ -14,10 +18,16 @@ func Strings(lang string) map[string]string {
|
|||||||
return phrasesEO
|
return phrasesEO
|
||||||
case "es":
|
case "es":
|
||||||
return phrasesES
|
return phrasesES
|
||||||
|
case "eu":
|
||||||
|
return phrasesEU
|
||||||
case "fa":
|
case "fa":
|
||||||
return phrasesFA
|
return phrasesFA
|
||||||
case "fr":
|
case "fr":
|
||||||
return phrasesFR
|
return phrasesFR
|
||||||
|
case "gl":
|
||||||
|
return phrasesGL
|
||||||
|
case "he":
|
||||||
|
return phrasesHE
|
||||||
case "hu":
|
case "hu":
|
||||||
return phrasesHU
|
return phrasesHU
|
||||||
case "it":
|
case "it":
|
||||||
@@ -28,6 +38,8 @@ func Strings(lang string) map[string]string {
|
|||||||
return phrasesLT
|
return phrasesLT
|
||||||
case "mk":
|
case "mk":
|
||||||
return phrasesMK
|
return phrasesMK
|
||||||
|
case "nl":
|
||||||
|
return phrasesNL
|
||||||
case "pl":
|
case "pl":
|
||||||
return phrasesPL
|
return phrasesPL
|
||||||
case "pt":
|
case "pt":
|
||||||
|
|||||||
@@ -33,3 +33,45 @@ Yep.`},
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestPostLede(t *testing.T) {
|
||||||
|
text := map[string]string{
|
||||||
|
"早安。跨出舒適圈,才能前往": "早安。",
|
||||||
|
"早安。This is my post. It is great.": "早安。",
|
||||||
|
"Hello. 早安。": "Hello.",
|
||||||
|
"Sup? Everyone says punctuation is punctuation.": "Sup?",
|
||||||
|
"Humans are humans, and society is full of good and bad actors. Technology, at the most fundamental level, is a neutral tool that can be used by either to meet any ends. ": "Humans are humans, and society is full of good and bad actors.",
|
||||||
|
`Online Domino Is Must For Everyone
|
||||||
|
|
||||||
|
Do you want to understand how to play poker online?`: "Online Domino Is Must For Everyone",
|
||||||
|
`おはようございます
|
||||||
|
|
||||||
|
私は日本から帰ったばかりです。`: "おはようございます",
|
||||||
|
"Hello, we say, おはよう. We say \"good morning\"": "Hello, we say, おはよう.",
|
||||||
|
}
|
||||||
|
|
||||||
|
c := 1
|
||||||
|
for i, o := range text {
|
||||||
|
if s := PostLede(i, true); s != o {
|
||||||
|
t.Errorf("#%d: Got '%s' from '%s'; expected '%s'", c, s, i, o)
|
||||||
|
}
|
||||||
|
c++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestTruncToWord(t *testing.T) {
|
||||||
|
text := map[string]string{
|
||||||
|
"Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь текст, який би міг бути і на, і в кінцевому підсумку, буде скорочено, тому що це тривало так довго.": "Можливо, ми можемо використовувати інтернет-інструменти, щоб виготовити якийсь",
|
||||||
|
"早安。This is my post. It is great. It is a long post that is great that is a post that is great.": "早安。This is my post. It is great. It is a long post that is great that is a post",
|
||||||
|
"Sup? Everyone says punctuation is punctuation.": "Sup? Everyone says punctuation is punctuation.",
|
||||||
|
"I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long layover in Calgary, I wandered wide-eyed around Narita airport looking for an ATM.": "I arrived in Japan six days ago. Tired from a 10-hour flight after a night-long",
|
||||||
|
}
|
||||||
|
|
||||||
|
c := 1
|
||||||
|
for i, o := range text {
|
||||||
|
if s, _ := TruncToWord(i, 80); s != o {
|
||||||
|
t.Errorf("#%d: Got '%s' from '%s'; expected '%s'", c, s, i, o)
|
||||||
|
}
|
||||||
|
c++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -63,6 +63,34 @@ func ApplyBasicMarkdown(data []byte) string {
|
|||||||
return outHTML
|
return outHTML
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ApplyBasicAccessibleMarkdown applies Markdown to the given data, rendering basic text formatting and preserving hard
|
||||||
|
// line breaks in HTML. It is meant for formatting text in small, multi-line UI elements, like user profile biographies.
|
||||||
|
func ApplyBasicAccessibleMarkdown(data []byte) string {
|
||||||
|
mdExtensions := 0 |
|
||||||
|
blackfriday.EXTENSION_STRIKETHROUGH |
|
||||||
|
blackfriday.EXTENSION_SPACE_HEADERS |
|
||||||
|
blackfriday.EXTENSION_HEADER_IDS |
|
||||||
|
blackfriday.EXTENSION_HARD_LINE_BREAK
|
||||||
|
htmlFlags := 0 |
|
||||||
|
blackfriday.HTML_USE_SMARTYPANTS |
|
||||||
|
blackfriday.HTML_USE_XHTML |
|
||||||
|
blackfriday.HTML_SMARTYPANTS_DASHES
|
||||||
|
|
||||||
|
// Generate Markdown
|
||||||
|
md := blackfriday.Markdown([]byte(data), blackfriday.HtmlRenderer(htmlFlags, "", ""), mdExtensions)
|
||||||
|
// Strip out bad HTML
|
||||||
|
policy := bluemonday.UGCPolicy()
|
||||||
|
policy.AllowAttrs("class", "id").Globally()
|
||||||
|
policy.AllowAttrs("rel").OnElements("a")
|
||||||
|
policy.RequireNoFollowOnLinks(false)
|
||||||
|
outHTML := string(policy.SanitizeBytes(md))
|
||||||
|
// Strip surrounding <p> tags that blackfriday adds
|
||||||
|
outHTML = markeddownReg.ReplaceAllString(outHTML, "$1")
|
||||||
|
outHTML = strings.TrimRightFunc(outHTML, unicode.IsSpace)
|
||||||
|
|
||||||
|
return outHTML
|
||||||
|
}
|
||||||
|
|
||||||
// StripHTMLWithoutEscaping strips HTML tags with bluemonday's StrictPolicy, then unescapes the HTML
|
// StripHTMLWithoutEscaping strips HTML tags with bluemonday's StrictPolicy, then unescapes the HTML
|
||||||
// entities added in by sanitizing the content.
|
// entities added in by sanitizing the content.
|
||||||
func StripHTMLWithoutEscaping(content string) string {
|
func StripHTMLWithoutEscaping(content string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user