-
Notifications
You must be signed in to change notification settings - Fork 277
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
V2 #92
V2 #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
=========================================
+ Coverage 59.92% 63.13% +3.2%
=========================================
Files 14 27 +13
Lines 1138 2268 +1130
=========================================
+ Hits 682 1432 +750
- Misses 424 762 +338
- Partials 32 74 +42
Continue to review full report at Codecov.
|
This looks really, really good. I assume that old bundle files will still work after this? |
No, I have not spent any time thinking about backcompat yet; I designed this fresh. I think the best way to deal with old message files is to run a one-time conversion via |
I think there should be a really good reason to break the file formats. Coming from Hugo, I mainly want this for the "non-globals". If I have to somehow handle migration of all the sites in the wild (I know I can probably point to some tool out there, but I still have to document it and answer questions from confused people), I may think twice before doing the upgrade. |
might this help golang/dep#221 |
Note that I'm happy to do the work if it's a really good reason to, i.e. the change itself adds really useful stuff. But not just for vanity reasons ("this looks prettier"). |
The file format (and everything else) in this PR was created from first principals, given the knowledge of file formats that we want to support, and feedback from users like this. There are also new things, like keeping track of the original content hash to know if a source translation was edited. Supporting multiple file formats in general is confusing to users and a pain to maintain/test/document. The fact that v1 has multiple formats is an artifact of not understanding the limitations of alternative encodings (e.g. toml) from the beginning of the library. How to deal with backwards compatibility is simply something that I have not thought about yet because backcompat was not a goal of mine when designing v2, but I will think about it soon. Of course I want to make the transition to v2 as easy as possible. |
[skip ci]
@bep the runtime library can load message files from v1, and message files from v1 will automatically get reformated to the new structure the first time |
[ci skip]
[ci skip]
[ci skip]
API ready for review.
To consider
goi18n
command?fixes #88
fixes #87
fixes #85
fixes #82
fixes #76
fixes #64
fixes #56
fixes #44
fixes #30
fixes #27
fixes #8