golang.org/x/text@v0.14.0/cmd/gotext/examples/extract/locales/en-US/messages.gotext.json (about) 1 { 2 "language": "en-US", 3 "messages": [ 4 { 5 "id": "Hello world!", 6 "key": "Hello world!\n", 7 "message": "Hello world!", 8 "translation": "Hello world!", 9 "position": "golang.org/x/text/cmd/gotext/examples/extract/main.go:27:10" 10 }, 11 { 12 "id": "Hello {City}!", 13 "key": "Hello %s!\n", 14 "message": "Hello {City}!", 15 "translation": "Hello {City}n" 16 }, 17 { 18 "id": "Hello {Town}!", 19 "key": "Hello %s!\n", 20 "message": "Hello {Town}!", 21 "translation": "Hello {Town}!", 22 "placeholders": [ 23 { 24 "id": "Town", 25 "string": "%[1]s", 26 "type": "string", 27 "underlyingType": "string", 28 "argNum": 1, 29 "expr": "town", 30 "comment": "Town" 31 } 32 ] 33 }, 34 { 35 "id": "{Person} is visiting {Place}!", 36 "key": "%s is visiting %s!\n", 37 "message": "{Person} is visiting {Place}!", 38 "translation": "{Person} is visiting {Place}!\n" 39 }, 40 { 41 "id": "{Person} is visiting {Place}!", 42 "key": "%[1]s is visiting %[3]s!\n", 43 "message": "{Person} is visiting {Place}!", 44 "translation": "{Person} is visiting {Place}!", 45 "comment": "Person visiting a place." 46 }, 47 { 48 "id": "{N} more files remaining!", 49 "key": "%d more files remaining!", 50 "message": "{N} more files remaining!", 51 "translation": { 52 "select": { 53 "feature": "plural", 54 "arg": "N", 55 "cases": { 56 "one": "One file remaining!", 57 "other": "There are {N} more files remaining!" 58 } 59 } 60 } 61 }, 62 { 63 "id": "Use the following code for your discount: {ReferralCode}", 64 "key": "Use the following code for your discount: %d\n", 65 "message": "Use the following code for your discount: {ReferralCode}", 66 "translation": "" 67 }, 68 { 69 "id": [ "msgOutOfOrder", "{Device} is out of order!" ], 70 "key": "%s is out of order!", 71 "message": "{Device} is out of order!", 72 "translation": "{Device} is out of order!", 73 "comment": "FOO\n" 74 }, 75 { 76 "id": "{Miles} miles traveled ({Miles_1})", 77 "key": "%.2[1]f miles traveled (%[1]f)", 78 "message": "{Miles} miles traveled ({Miles_1})", 79 "translation": "{Miles} miles traveled ({Miles_1})" 80 } 81 ] 82 }