1### File wide comment, for reference see https://projectfluent.org
2### And for a EBNF-Syntax, see https://github.com/projectfluent/fluent/blob/master/spec/fluent.ebnf
3
4
5## Section comment: Simple texts
6# identifier = matched word
7hello-world = Hello World
8
9# multiline text
10multiline = Some text on the first line
11    And more text on the next line
12    One could even go further
13
14# block text
15block =
16    No content on first line
17    rest is like multiline
18
19
20## Placeables, insert text from variables etc.
21variable-placeable = We currently have { $users } users
22stacked-placeable = More {{"Placeables"}}
23
24# Term, used only in other texts, not final translation string
25-name = Fluent
26about = { -name } is great
27
28# Term with parameters
29-special-term = Wrapper around { $parameter }
30using-wrapper = Wrapping { -special-term(parameter: "stuff") }
31
32placeable-with-special-character = Using a {"{ and \U01F91A or \\"}
33
34builtin-number = Time elapsed: { NUMBER($duration, maximumFractionDigits: 0) }s.
35
36builtin-date = Last checked: { DATETIME($lastChecked, day: "numeric", month: "long") }.
37
38
39## Selectors, different options for different types of numbers
40# by variable
41emails =
42    { $unreadEmails ->
43        [one] You have one unread email.
44        *[other] You have { $unreadEmails } unread emails.
45    }
46
47# by function
48your-score =
49    { NUMBER($score, minimumFractionDigits: 1) ->
50        [0.0]   You scored zero points. What happened?
51       *[other] You scored { NUMBER($score, minimumFractionDigits: 1) } points.
52    }
53
54# with keywords
55your-rank = { NUMBER($pos, type: "ordinal") ->
56   [1] You finished first!
57   [one] You finished {$pos}st
58   [two] You finished {$pos}nd
59   [few] You finished {$pos}rd
60  *[other] You finished {$pos}th
61}
62
63## Attributes
64login-input = Predefined value
65    .placeholder = email@example.com
66    .aria-label = Login input value
67    .title = Type your login email
68
69# accessible via .
70login-placeholder = {login-input.placeholder}
71
72## Faulty code, no gurantees for sense of the end of errors
73
74faulty-quote = Won't work {"\"}
75    still-inside\
76    {"lonely \\ \ "}
77}
78
79disallowed-identifier characters
80disallowed-character$
81
82# Hilight only at the end of the line, not visible since err only visible on same line
83broken-function = {fn(
84    fn(smth:123, 0, {)
85    fn(noth!ng:3)
86    fn(\)
87}
88
89# Same for open ended string and wron unicode characters
90broken-string = {
91    "
92    "\u923"
93    "\U92345"
94    "\Ubcdefg"
95}
96