Been looking for a full stack including tools for gettext-style i18n with AngularJS.
- Gettext-style support in markup (html and javascript) supporting singular, plural and interpolation/sprintf
- Tooling for extraction of strings to be translated (to .pot) from html and javascript
- Tooling for generating .json of .po files
Ended up (working proof of concept) with the following:
Glad if it helped!
I've yet not found any issues, however - the extraction (look at the pybabel command) and the functionality (wrapping Jed) is based on pure function calls within an expression (no filtering), i.e _("string to extract") or _n("singular", "plural", n)
I don't understand how (or why) you'd want to extract (for translation) what your example denotes.
But, it is problematic when/if pybabel fails (silently) and stops extraction for that entire file.
This is the most gettext-like workflow for Angular (with no server-side magic) I've been able to find/come up with, any suggestions for improvements will be most appreciated!