-
Notifications
You must be signed in to change notification settings - Fork 215
Description
- Modify content server code to add fluent support
- edit
server/lib/i18n.js
file to compile fluent instead of gettext - remove helper from
grunttasks-l10n-generate-pages.js
- replace bundling script in
grunttasks/l10n-extract.js
with fluent bundling script - Create ftl file with single string in it
- update all instances of gettext template helper with fluent syntax
From Dave's original comment:
I'm seeing this issue as about 5 parts:
- edit
server/lib/i18n.js
file to compile fluent instead of gettext (3 points) - address
res.gettext
inserver/lib/500.js
(3 points) - remove helper from
grunttasks-l10n-generate-pages.js
(1 point) - replace bundling script in
grunttasks/l10n-extract.js
with fluent bundling script (3 points) - update all instances of gettext template helper with fluent syntax (3 points)
I believe we will need to merge this effort into master as a large group of commits, as I don't think it will work when partially implemented. So we may need to leave this issue as a large estimate and just try and hack it out over a sprint.
##1
We will most likely use handlebars-helper-fluent package to achieve this in server/lib/i18n.js
##2
I'm unsure about how to achieve the equivalent of 【 highlighted #ffffff 】res.【 end highlighted 】【 highlighted #6eff40 】gettext【 end highlighted 】【 highlighted #ffffff 】(【 end highlighted 】【 highlighted #4efff8 】'System unavailable, try again soon'【 end highlighted 】【 highlighted #ffffff 】),【 end highlighted 】
in the server/lib/500.js
but this is a single string so we maybe could work around it. I'm reaching out to stasm today to see if there is a Fluent way to do this.
##3
I think that the helper in grunttasks/l10n-generate-pages.js
will be rendered obsolete with [handlebars-helper-fluent package|https://github.com/alerque/handlebars-helper-fluent,] but will know more once I get to dig into it.
##4
The bundling that happens inside of grunttasks/l10n-extract.js
could get hairy, but there are examples of the bundling in the fluent project, hopefully we can use the same snippet we are using inside of payments server. Again, I can't be certain with this one until I actually try it out.
##5
Going through and replacing strings and template tags to the fluent syntax should be rather painless, except for being monotonous. These sort of tasks can tend to take a while because of the amount hand edits that will need to be made. Though the edits themselves are practically brainless
┆Issue is synchronized with this Jira Story
┆Issue Number: FXA-1083