Commit 01483c4
committed
Treat an empty
`build_pot_entry` guarded with `.nil?`, but an empty-string form is truthy
in Ruby, so `var_dict['one'] || var_dict['other']` returned `''` for an
empty `one` and produced an entry with an empty `msgid` — which gettext
folds into the header, silently dropping the entry from the `.pot`.
Extract `msgid_for` (the `one`-or-`other` choice), shared by the forward
and reverse paths so the written `msgid` always matches the one looked up
later, and treat an empty `one` like an absent one (fall back to `other`).
The required-form guard now rejects empty strings too, so an empty `other`
fails with the existing clear error instead of emitting a broken entry.one/other plural form as missing, not as content1 parent 29b3f6f commit 01483c4
2 files changed
Lines changed: 50 additions & 5 deletions
File tree
- lib/fastlane/plugin/wpmreleasetoolkit/helper/ios
- spec
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
209 | 219 | | |
210 | | - | |
| 220 | + | |
211 | 221 | | |
212 | | - | |
| 222 | + | |
213 | 223 | | |
214 | | - | |
| 224 | + | |
215 | 225 | | |
216 | 226 | | |
217 | 227 | | |
| |||
247 | 257 | | |
248 | 258 | | |
249 | 259 | | |
250 | | - | |
251 | | - | |
| 260 | + | |
252 | 261 | | |
253 | 262 | | |
254 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
185 | 221 | | |
186 | 222 | | |
187 | 223 | | |
| |||
0 commit comments