-
Notifications
You must be signed in to change notification settings - Fork 101
Create a FTL serializer #184
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
Conversation
I've added all tests down to "nested select expression" and they all pass locally. At this point there are no more @zbraniecki, would you be able to nominate someone as a reviewer? I'm going to finish up for today, but this should reach parity with the TypeScript serializer by tomorrow morning. |
Looks good! I'll try to review by EOW. |
Thanks @zbraniecki! We'll use git dependencies for now, so that takes the pressure off you. I've implemented all the TypeScript tests and they pass, so this should be identical to the TypeScript implementation. Having an existing serializer I can copy from, complete with a thorough test suite, made this job really easy 🙂 |
Watch out for projectfluent/fluent.js#512 |
…parated by newlines
dd320d7
to
34f7a93
Compare
@zbraniecki, any chance you can review this? |
I will. I'm sorry for the delay. As you may have heard, we're going through a bit of a change and I'm per-occupied with some non-technical tasks, but Please, be patient and feel free to use a fork in the meantime, it shouldn't bitrot. |
On a side note, wouldn't it be more beneficial to use In such a case, an application could theoretically provide its l10n files in a binary format through Over-the-air updates, reducing the number of bytes to transfer compared to using a text representation. Deserializing using Edit: I do not mean to critique the PR (which looks good btw!). It's just an idea that should probably be considered for the future as it allows to expand the ecosystem. |
@sirwindfield have you seen the The main reason to also have a manual serializer is because the
On the other hand, how you print parts of a
I'd just compress the files. The vast majority of the AST is plaintext that wouldn't disappear after being parsed, so you don't gain much by using a binary format. |
I think this would be great now that we have AST over S. You could make it work for any I'm planning to generalize Resolver soon to work on any |
Hi @Michael-F-Bryan . I'm going to close this PR in favor of a follow up in #241. |
Fixes #182.