golang.org/x/text@v0.14.0/message/pipeline/testdata/test1/extracted.gotext.json.want (about) 1 { 2 "language": "en-US", 3 "messages": [ 4 { 5 "id": "Hello world!", 6 "key": "Hello world!\n", 7 "message": "Hello world!", 8 "translation": "", 9 "position": "testdata/test1/test1.go:19:10" 10 }, 11 { 12 "id": "Hello {City}!", 13 "key": "Hello %s!\n", 14 "message": "Hello {City}!", 15 "translation": "", 16 "placeholders": [ 17 { 18 "id": "City", 19 "string": "%[1]s", 20 "type": "string", 21 "underlyingType": "string", 22 "argNum": 1, 23 "expr": "city" 24 } 25 ], 26 "position": "testdata/test1/test1.go:24:10" 27 }, 28 { 29 "id": "{Person} is visiting {Place}!", 30 "key": "%s is visiting %s!\n", 31 "message": "{Person} is visiting {Place}!", 32 "translation": "", 33 "placeholders": [ 34 { 35 "id": "Person", 36 "string": "%[1]s", 37 "type": "string", 38 "underlyingType": "string", 39 "argNum": 1, 40 "expr": "person", 41 "comment": "The person of matter." 42 }, 43 { 44 "id": "Place", 45 "string": "%[2]s", 46 "type": "string", 47 "underlyingType": "string", 48 "argNum": 2, 49 "expr": "place", 50 "comment": "Place the person is visiting." 51 } 52 ], 53 "position": "testdata/test1/test1.go:30:10" 54 }, 55 { 56 "id": "{Person} is visiting {Place}!", 57 "key": "%[1]s is visiting %[3]s!\n", 58 "message": "{Person} is visiting {Place}!", 59 "translation": "", 60 "comment": "Field names are placeholders.", 61 "placeholders": [ 62 { 63 "id": "Person", 64 "string": "%[1]s", 65 "type": "string", 66 "underlyingType": "string", 67 "argNum": 1, 68 "expr": "pp.Person" 69 }, 70 { 71 "id": "Place", 72 "string": "%[3]s", 73 "type": "string", 74 "underlyingType": "string", 75 "argNum": 3, 76 "expr": "pp.Place", 77 "comment": "Place the person is visiting." 78 }, 79 { 80 "id": "Extra", 81 "string": "%[2]v", 82 "type": "int", 83 "underlyingType": "int", 84 "argNum": 2, 85 "expr": "pp.extra" 86 } 87 ], 88 "position": "testdata/test1/test1.go:44:10" 89 }, 90 { 91 "id": "{2} files remaining!", 92 "key": "%d files remaining!", 93 "message": "{2} files remaining!", 94 "translation": "", 95 "placeholders": [ 96 { 97 "id": "2", 98 "string": "%[1]d", 99 "type": "int", 100 "underlyingType": "int", 101 "argNum": 1, 102 "expr": "2" 103 } 104 ], 105 "position": "testdata/test1/test1.go:51:10" 106 }, 107 { 108 "id": "{N} more files remaining!", 109 "key": "%d more files remaining!", 110 "message": "{N} more files remaining!", 111 "translation": "", 112 "placeholders": [ 113 { 114 "id": "N", 115 "string": "%[1]d", 116 "type": "int", 117 "underlyingType": "int", 118 "argNum": 1, 119 "expr": "n" 120 } 121 ], 122 "position": "testdata/test1/test1.go:56:10" 123 }, 124 { 125 "id": "Use the following code for your discount: {ReferralCode}", 126 "key": "Use the following code for your discount: %d\n", 127 "message": "Use the following code for your discount: {ReferralCode}", 128 "translation": "", 129 "placeholders": [ 130 { 131 "id": "ReferralCode", 132 "string": "%[1]d", 133 "type": "testdata/test1.referralCode", 134 "underlyingType": "int", 135 "argNum": 1, 136 "expr": "c" 137 } 138 ], 139 "position": "testdata/test1/test1.go:64:10" 140 }, 141 { 142 "id": [ 143 "msgOutOfOrder", 144 "{Device} is out of order!" 145 ], 146 "key": "%s is out of order!", 147 "message": "{Device} is out of order!", 148 "translation": "", 149 "comment": "This comment wins.\n", 150 "placeholders": [ 151 { 152 "id": "Device", 153 "string": "%[1]s", 154 "type": "string", 155 "underlyingType": "string", 156 "argNum": 1, 157 "expr": "device" 158 } 159 ], 160 "position": "testdata/test1/test1.go:70:10" 161 }, 162 { 163 "id": "{Miles} miles traveled ({Miles_1})", 164 "key": "%.2[1]f miles traveled (%[1]f)", 165 "message": "{Miles} miles traveled ({Miles_1})", 166 "translation": "", 167 "placeholders": [ 168 { 169 "id": "Miles", 170 "string": "%.2[1]f", 171 "type": "float64", 172 "underlyingType": "float64", 173 "argNum": 1, 174 "expr": "miles" 175 }, 176 { 177 "id": "Miles_1", 178 "string": "%[1]f", 179 "type": "float64", 180 "underlyingType": "float64", 181 "argNum": 1, 182 "expr": "miles" 183 } 184 ], 185 "position": "testdata/test1/test1.go:74:10" 186 } 187 ] 188 }