Closed Bug 1310148 Opened 9 years ago Closed 9 years ago

Create reference documentation for Builtins

Categories

(L20n :: Evangelism, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Pike, Assigned: zbraniecki)

References

Details

(Whiteboard: [gecko-l20n])

Attachments

(1 file)

40 bytes, text/x-github-pull-request
zbraniecki
: review+
Details | Review
We don't seem to have a reference documentation for Builtins like LEN etc yet?
Assignee: nobody → gandalf
Blocks: 1291693
Attached file pr
Attachment #8802751 - Flags: review?(stas)
Attachment #8802751 - Flags: review?(l10n)
Comment on attachment 8802751 [details] [review] pr I think we need to make the options explicit in our documentation. For one, I think our documentation should be self-contained, but also because the intl spec is really hard to decipher, if you're not acquainted with the nomenclature. I'm not sure if we should keep the "In the future we might" part. I'm even wondering if that's a question for the binding part? For example: Default options for builtins can be passed in by the developer, if the API supports it. At this point, there's no API that does that, though. I wonder if we should keep the PLURAL builtin, mostly because we don't implement it as documented. It's really just an alias for NUMBER, and I wonder if it's easier to explain why people should use the same options in the selector as in the placable. PS: PLURAL is one of the things that made me file this bug when I tried to read the code of which builtins we have ;-)
Attachment #8802751 - Flags: review?(l10n) → review-
(In reply to Axel Hecht [:Pike] from comment #2) > Comment on attachment 8802751 [details] [review] > pr > > I think we need to make the options explicit in our documentation. For one, > I think our documentation should be self-contained, but also because the > intl spec is really hard to decipher, if you're not acquainted with the > nomenclature. +1 > > I'm not sure if we should keep the "In the future we might" part. I'm even > wondering if that's a question for the binding part? For example: > > Default options for builtins can be passed in by the developer, if the API > supports it. At this point, there's no API that does that, though. That's actually already supported by MessageContext: https://github.com/l20n/l20n.js/blob/3ba0b9ad8f20a9540eb7ef6c4bda4604af4677e1/src/intl/polyfill.js#L6-L7 > I wonder if we should keep the PLURAL builtin, mostly because we don't > implement it as documented. It's really just an alias for NUMBER, and I > wonder if it's easier to explain why people should use the same options in > the selector as in the placable. I think we should remove it. I filed bug 1311662 to have that discussion there. Zibi did a good job documenting the current state of the code. Let's discuss changes to the code in separate bugs. I also filed bug 1311666 in which I suggest we rename OS to PLATFORM.
Comment on attachment 8802751 [details] [review] pr I left my feedback at https://github.com/l20n/l20n.js/pull/160#pullrequestreview-5051881. I'd like to see another iteration.
Attachment #8802751 - Flags: review?(stas) → review-
Depends on: 1311662
Depends on: 1311666
Removing the dependencies as they aren't really blocking this.
No longer depends on: 1311662, 1311666
Also note that the parser requires `:` for the keyword arguments, as well as quotes: today-is = Today is { DATETIME($date, weekday: "long") } https://github.com/l20n/l20n.js/blob/3ba0b9ad8f20a9540eb7ef6c4bda4604af4677e1/src/ftl/ast/parser.js#L503 We should probably change the EBNF grammar: https://github.com/l20n/spec/blob/126b422ae146cdb81eed38484eca8d732cec46a6/grammar.ebnf#L49
Comment on attachment 8802751 [details] [review] pr carry over r+ from Stas on IRC
Attachment #8802751 - Flags: review-
Attachment #8802751 - Flags: review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: