New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0-index null #32
Comments
It's been ages since I wrote that, so I really don't know. At the time, I did a considerable chunk of research on the formats, so I doubt it was nothing. My gut is that po indexes are 1-indexed and arrays are 0-indexed, and we could just do the conversion in the math, rather than adding the blank index. What's your best suggestion that you think might not break everyone's existing code? |
I don't even know if it's needed, it's just been bothering me. But if it were done ... it should go hand in hand with and edit of that line I think But really, it's not NEEDed. But, sending across the wire useless info has been always bugged me 😆 edit: https://github.com/Sinewyk/ff-kit/blob/master/lang/fr.po#L56 seems to me that it's 0 indexed, so I don't know. This was generated by the lastest Poedit software. |
I guess I am too far removed from these details to make a good call. If we just killed the |
Pass both suites of test with Sinewyk/Jed@8cc37367 and Sinewyk/jed-gettext-parser@024bded1. The last test of jed-gettext-parser did not work by npm test-ing (automatic). I whipped up a Fact is, both suites are green one way or another. And I don't know what to do with this 😞 . |
I'm not particularly bothered about the indexing, but if the null 0-index is removed, I'll happily merge a PR from @Sinewyk. As for the jed-gettext-parser tests failing, is that not being cause the tests check for a null 0-index? I don't think that's been updated. |
Wrong branch @WrinklyNinja ^^, use my link for the correct one + the commit ^^. But no, the test fail if using npm test, and the test works if I manually I took that as a success for a quick POC. |
Hi, this has been bugging me for a while
// Note: by convention, the 0-index location of the translations
// is never accessed. It's just a thing, I guess.
what does this mean, convention by whom ? I look at my po files and all of them have all useful data.
They don't have any useless translation that is never accessed, so where is this convention coming from.
For kicks I've been going through the source code and deleting all ' + 1' there and there, and with an ugly
val_list = _.compact(val_list);
It just works, but there's no waste of an empty index in an array. Why would I parse an mo file to generate empty data ?
The text was updated successfully, but these errors were encountered: