Open
Description
From my review of the tutorial and API docs:
- It looks like http://projectfluent.org/fluent.js/fluent/ may need to be updated as it's referring to http://projectfluent.io/ which is giving a 404
- I see on MDN one argument missing from http://projectfluent.org/fluent/guide/functions.html#datetime :
hourCycle
- Under the tutorial docs for Number, I am not clear on the meaning of this one sentence: "The second example may be used to pass additional formatting options to the NUMBER formatter for the purpose of choosing the correct plural category".
- For https://github.com/projectfluent/fluent/wiki/Fluent-and-ICU-MessageFormat , I think you want the examples with
Fluent.NumberArgument
to instead useIntl.MessageNumberArgument
- Coming through https://github.com/projectfluent/fluent.js/tree/master/fluent-dom , one doesn't get automated documentation of
DOMLocalization
orLocalization
such as is within https://github.com/l20n/l20n.js/blob/master/docs/dom_localization.md and https://github.com/l20n/l20n.js/blob/master/docs/localization.md -- which would be nice to have available from fluent-dom. - I think it could help to have some clarification about the differences between the seemingly overlapping projects (and overlapping APIs),
fluent-web
(which isn't referenced on the main README),fluent-dom
, and the separatel20n.js
project (which incidentally sees like it should be dependent onfluent-dom
but isn't). - I think the above-referenced API documentation could also probably benefit from documenting the available built-in classes (
MessageArgument
,MessageNumberArgument
, andMessageDateTimeArgument
) for use as part of partial arguments withinformat
(if not the other exports,mapContextSync
andCachedIterable
) since looking through the API docs alone didn't make this apparent. If l20n.js' use ofList
(apparentlyIntl.ListFormat
) as referenced at http://l20n.org/learn/builtins is also available, it would be nice to have this documented. - If l20n.js' use of
|
for message line breaks is also available in fluent.js, it is not documented as such at http://projectfluent.org/fluent/guide/text.html (as it is at http://l20n.org/learn/working-with-text-multiline-interpolation ). (And if it isn't, I think it should be drawn out as a special feature of l10n) - If l20n.js' use of a built-in
LEN
as documented http://l20n.org/learn/advanced-selectors is also available in fluent.js, it is not documented at http://projectfluent.org/fluent/guide/functions.html#built-in-functions (and if it isn't, I think it should be drawn out as a special feature of l10n). AlsoTAKE
is mentioned in the example code at http://l20n.org/learn/complex-example without detailed explanation there, and it is not clear whether it is available by default through l20n.js or through fluent.js. (Moreover, http://l20n.org/learn/complex-example is surfacing aTypeError
on the page but as there is no issue tracker for https://github.com/l20n/l20n.js I can't report it there.) - In the example at https://github.com/projectfluent/fluent/wiki/Get-Started#high-level-api, the second
new Localization
should instead benew DOMLocalization
and the first is missing the required second argument. - I'd think another use of Terms that might be called out is use of aliases for representing repeated Unicode (as XML entities did). For example, I'd presume one could define
-ellipsis
,-copyright
, etc. for these symbols if repeating their use, with the use of Terms here designating they were just local definitions perhaps set up by the translator for their own convenience.