From 473acc61c8392dc7ae303d91568e179c4f105a76 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 2 Jul 2019 12:12:53 +0200 Subject: add black list --- .../x/text/cmd/gotext/examples/extract/catalog.go | 76 -------- .../extract/locales/de/messages.gotext.json | 186 ------------------- .../examples/extract/locales/de/out.gotext.json | 206 --------------------- .../extract/locales/en-US/messages.gotext.json | 82 -------- .../examples/extract/locales/en-US/out.gotext.json | 206 --------------------- .../examples/extract/locales/extracted.gotext.json | 206 --------------------- .../extract/locales/zh/messages.gotext.json | 203 -------------------- .../examples/extract/locales/zh/out.gotext.json | 206 --------------------- .../x/text/cmd/gotext/examples/extract/main.go | 87 --------- 9 files changed, 1458 deletions(-) delete mode 100644 vendor/golang.org/x/text/cmd/gotext/examples/extract/catalog.go delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/messages.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/out.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/messages.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/out.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/extracted.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/messages.gotext.json delete mode 100755 vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/out.gotext.json delete mode 100644 vendor/golang.org/x/text/cmd/gotext/examples/extract/main.go (limited to 'vendor/golang.org/x/text/cmd/gotext/examples/extract') diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/catalog.go b/vendor/golang.org/x/text/cmd/gotext/examples/extract/catalog.go deleted file mode 100644 index 4c2303f..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/catalog.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package main - -import ( - "golang.org/x/text/language" - "golang.org/x/text/message" - "golang.org/x/text/message/catalog" -) - -type dictionary struct { - index []uint32 - data string -} - -func (d *dictionary) Lookup(key string) (data string, ok bool) { - p := messageKeyToIndex[key] - start, end := d.index[p], d.index[p+1] - if start == end { - return "", false - } - return d.data[start:end], true -} - -func init() { - dict := map[string]catalog.Dictionary{ - "de": &dictionary{index: deIndex, data: deData}, - "en_US": &dictionary{index: en_USIndex, data: en_USData}, - "zh": &dictionary{index: zhIndex, data: zhData}, - } - fallback := language.MustParse("en-US") - cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) - if err != nil { - panic(err) - } - message.DefaultCatalog = cat -} - -var messageKeyToIndex = map[string]int{ - "%.2[1]f miles traveled (%[1]f)": 6, - "%[1]s is visiting %[3]s!\n": 3, - "%d more files remaining!": 4, - "%s is out of order!": 5, - "%s is visiting %s!\n": 2, - "Hello %s!\n": 1, - "Hello world!\n": 0, -} - -var deIndex = []uint32{ // 8 elements - 0x00000000, 0x0000000d, 0x0000001b, 0x00000031, - 0x00000047, 0x00000066, 0x00000066, 0x00000066, -} // Size: 56 bytes - -const deData string = "" + // Size: 102 bytes - "\x02Hallo Welt!\x0a\x02Hallo %[1]s!\x0a\x02%[1]s besucht %[2]s!\x0a\x02%" + - "[1]s besucht %[3]s!\x0a\x02Noch %[1]d Bestände zu gehen!" - -var en_USIndex = []uint32{ // 8 elements - 0x00000000, 0x0000000e, 0x0000001c, 0x00000036, - 0x00000050, 0x00000093, 0x000000aa, 0x000000c9, -} // Size: 56 bytes - -const en_USData string = "" + // Size: 201 bytes - "\x02Hello world!\x0a\x02Hello %[1]s!\x0a\x02%[1]s is visiting %[2]s!\x0a" + - "\x02%[1]s is visiting %[3]s!\x0a\x04\x01\x81\x01\x00\x02\x14\x02One file" + - " remaining!\x00&\x02There are %[1]d more files remaining!\x02%[1]s is ou" + - "t of order!\x02%.2[1]f miles traveled (%[1]f)" - -var zhIndex = []uint32{ // 8 elements - 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, -} // Size: 56 bytes - -const zhData string = "" - -// Total table size 471 bytes (0KiB); checksum: 7746955 diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/messages.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/messages.gotext.json deleted file mode 100755 index 221990f..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/messages.gotext.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "language": "de", - "messages": [ - { - "id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "Hallo Welt!\n", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:27:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "Hallo {City}!\n", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:31:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "Hallo {Town}!\n", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:35:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "{Person} besucht {Place}!\n", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:40:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "{Person} besucht {Place}!\n", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:55:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "Noch {N} Bestände zu gehen!", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:67:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:73:10" - }, - { - "id": [ "msgOutOfOrder", "{Device} is out of order!" ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:81:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:85:10" - } - ] -} diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/out.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/out.gotext.json deleted file mode 100755 index 354e8e6..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/de/out.gotext.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "language": "de", - "messages": [ - { - "id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:28:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:32:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:36:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:41:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:56:10" - }, - { - "id": "{} files remaining!", - "key": "%d files remaining!", - "message": "{} files remaining!", - "translation": "", - "placeholders": [ - { - "id": "", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "2" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:63:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:68:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:74:10" - }, - { - "id": [ - "msgOutOfOrder", - "{Device} is out of order!" - ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:82:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:86:10" - } - ] -} \ No newline at end of file diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/messages.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/messages.gotext.json deleted file mode 100755 index 37d691b..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/messages.gotext.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "language": "en-US", - "messages": [ - { -"id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "Hello world!\n", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:27:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "Hello {City}!\n" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "Hello {Town}!\n", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ] - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "{Person} is visiting {Place}!\n" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "{Person} is visiting {Place}!\n", - "comment": "Person visiting a place." - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": { - "select": { - "feature": "plural", - "arg": "N", - "cases": { - "one": "One file remaining!", - "other": "There are {N} more files remaining!" - } - } - } - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "" - }, - { - "id": [ "msgOutOfOrder", "{Device} is out of order!" ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "{Device} is out of order!", - "comment": "FOO\n" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "{Miles} miles traveled ({Miles_1})" - } - ] -} diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/out.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/out.gotext.json deleted file mode 100755 index fea86e5..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/en-US/out.gotext.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "language": "en-US", - "messages": [ - { - "id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:28:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:32:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:36:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:41:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:56:10" - }, - { - "id": "{} files remaining!", - "key": "%d files remaining!", - "message": "{} files remaining!", - "translation": "", - "placeholders": [ - { - "id": "", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "2" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:63:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:68:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:74:10" - }, - { - "id": [ - "msgOutOfOrder", - "{Device} is out of order!" - ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:82:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:86:10" - } - ] -} \ No newline at end of file diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/extracted.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/extracted.gotext.json deleted file mode 100755 index fea86e5..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/extracted.gotext.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "language": "en-US", - "messages": [ - { - "id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:28:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:32:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:36:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:41:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:56:10" - }, - { - "id": "{} files remaining!", - "key": "%d files remaining!", - "message": "{} files remaining!", - "translation": "", - "placeholders": [ - { - "id": "", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "2" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:63:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:68:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:74:10" - }, - { - "id": [ - "msgOutOfOrder", - "{Device} is out of order!" - ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:82:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:86:10" - } - ] -} \ No newline at end of file diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/messages.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/messages.gotext.json deleted file mode 100755 index 8530740..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/messages.gotext.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "language": "zh", - "messages": [ - { -"id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:27:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:31:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:35:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:40:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:55:10" - }, - { - "id": "{} files remaining!", - "key": "%d files remaining!", - "message": "{} files remaining!", - "translation": "", - "placeholders": [ - { - "id": "", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "2" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:62:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:67:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:73:10" - }, - { - "id": [ "{Device} is out of order!", "msgOutOfOrder" ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:81:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:85:10" - } - ] -} \ No newline at end of file diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/out.gotext.json b/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/out.gotext.json deleted file mode 100755 index 88739a3..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/locales/zh/out.gotext.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "language": "zh", - "messages": [ - { - "id": "Hello world!\n", - "key": "Hello world!\n", - "message": "Hello world!\n", - "translation": "", - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:28:10" - }, - { - "id": "Hello {City}!\n", - "key": "Hello %s!\n", - "message": "Hello {City}!\n", - "translation": "", - "placeholders": [ - { - "id": "City", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "city" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:32:10" - }, - { - "id": "Hello {Town}!\n", - "key": "Hello %s!\n", - "message": "Hello {Town}!\n", - "translation": "", - "placeholders": [ - { - "id": "Town", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "town", - "comment": "Town" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:36:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%s is visiting %s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "person", - "comment": "The person of matter." - }, - { - "id": "Place", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "place", - "comment": "Place the person is visiting." - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:41:10" - }, - { - "id": "{Person} is visiting {Place}!\n", - "key": "%[1]s is visiting %[3]s!\n", - "message": "{Person} is visiting {Place}!\n", - "translation": "", - "comment": "Person visiting a place.", - "placeholders": [ - { - "id": "Person", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "pp.Person" - }, - { - "id": "Place", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "pp.Place", - "comment": "Place the person is visiting." - }, - { - "id": "Extra", - "string": "%[2]v", - "type": "int", - "underlyingType": "int", - "argNum": 2, - "expr": "pp.extra" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:56:10" - }, - { - "id": "{} files remaining!", - "key": "%d files remaining!", - "message": "{} files remaining!", - "translation": "", - "placeholders": [ - { - "id": "", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "2" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:63:10" - }, - { - "id": "{N} more files remaining!", - "key": "%d more files remaining!", - "message": "{N} more files remaining!", - "translation": "", - "placeholders": [ - { - "id": "N", - "string": "%[1]d", - "type": "int", - "underlyingType": "int", - "argNum": 1, - "expr": "n" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:68:10" - }, - { - "id": "Use the following code for your discount: {ReferralCode}\n", - "key": "Use the following code for your discount: %d\n", - "message": "Use the following code for your discount: {ReferralCode}\n", - "translation": "", - "placeholders": [ - { - "id": "ReferralCode", - "string": "%[1]d", - "type": "golang.org/x/text/cmd/gotext/examples/extract.referralCode", - "underlyingType": "int", - "argNum": 1, - "expr": "c" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:74:10" - }, - { - "id": [ - "msgOutOfOrder", - "{Device} is out of order!" - ], - "key": "%s is out of order!", - "message": "{Device} is out of order!", - "translation": "", - "comment": "FOO\n", - "placeholders": [ - { - "id": "Device", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "device" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:82:10" - }, - { - "id": "{Miles} miles traveled ({Miles_1})", - "key": "%.2[1]f miles traveled (%[1]f)", - "message": "{Miles} miles traveled ({Miles_1})", - "translation": "", - "placeholders": [ - { - "id": "Miles", - "string": "%.2[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - }, - { - "id": "Miles_1", - "string": "%[1]f", - "type": "float64", - "underlyingType": "float64", - "argNum": 1, - "expr": "miles" - } - ], - "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:86:10" - } - ] -} \ No newline at end of file diff --git a/vendor/golang.org/x/text/cmd/gotext/examples/extract/main.go b/vendor/golang.org/x/text/cmd/gotext/examples/extract/main.go deleted file mode 100644 index cbbc370..0000000 --- a/vendor/golang.org/x/text/cmd/gotext/examples/extract/main.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package main - -//go:generate gotext extract --lang=de,zh -//go:generate gotext generate -out catalog.go - -import ( - "golang.org/x/text/language" - "golang.org/x/text/message" -) - -func main() { - p := message.NewPrinter(language.English) - - p.Print("Hello world!\n") - - p.Println("Hello", "world!") - - person := "Sheila" - place := "Zürich" - - p.Print("Hello ", person, " in ", place, "!\n") - - // Greet everyone. - p.Printf("Hello world!\n") - - city := "Amsterdam" - // Greet a city. - p.Printf("Hello %s!\n", city) - - town := "Amsterdam" - // Greet a town. - p.Printf("Hello %s!\n", - town, // Town - ) - - // Person visiting a place. - p.Printf("%s is visiting %s!\n", - person, // The person of matter. - place, // Place the person is visiting. - ) - - pp := struct { - Person string // The person of matter. // TODO: get this comment. - Place string - extra int - }{ - person, place, 4, - } - - // extract will drop this comment in favor of the one below. - // argument is added as a placeholder. - p.Printf("%[1]s is visiting %[3]s!\n", // Person visiting a place. - pp.Person, - pp.extra, - pp.Place, // Place the person is visiting. - ) - - // Numeric literal - p.Printf("%d files remaining!", 2) - - const n = 2 - - // Numeric var - p.Printf("%d more files remaining!", n) - - // Infer better names from type names. - type referralCode int - - const c = referralCode(5) - p.Printf("Use the following code for your discount: %d\n", c) - - // Using a constant for a message will cause the constant name to be - // added as an identifier, allowing for stable message identifiers. - - // Explain that a device is out of order. - const msgOutOfOrder = "%s is out of order!" // FOO - const device = "Soda machine" - p.Printf(msgOutOfOrder, device) - - // Double arguments. - miles := 1.2345 - p.Printf("%.2[1]f miles traveled (%[1]f)", miles) -} -- cgit v1.2.3