File: highlight_fluent.ftl.fold

package info (click to toggle)
kf6-syntax-highlighting 6.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 47,568 kB
  • sloc: xml: 197,750; cpp: 12,850; python: 3,023; sh: 955; perl: 546; ruby: 488; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; erlang: 54; sql: 51; java: 47; objc: 37; awk: 31; asm: 30; tcl: 29; fortran: 18; cs: 10
file content (95 lines) | stat: -rw-r--r-- 2,450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<indentfold>### File wide comment, for reference see https://projectfluent.org
### And for a EBNF-Syntax, see https://github.com/projectfluent/fluent/blob/master/spec/fluent.ebnf


## Section comment: Simple texts
# identifier = matched word
hello-world = Hello World

# multiline text
multiline = Some text on the first line
    And more text on the next line
    One could even go further

# block text
block =
    No content on first line
    rest is like multiline


## Placeables, insert text from variables etc.
variable-placeable = We currently have { $users } users
stacked-placeable = More {{"Placeables"}}

# Term, used only in other texts, not final translation string
-name = Fluent
about = { -name } is great

# Term with parameters
-special-term = Wrapper around { $parameter }
using-wrapper = Wrapping { -special-term(parameter: "stuff") }

placeable-with-special-character = Using a {"{ and \U01F91A or \\"}

builtin-number = Time elapsed: { NUMBER($duration, maximumFractionDigits: 0) }s.

builtin-date = Last checked: { DATETIME($lastChecked, day: "numeric", month: "long") }.


## Selectors, different options for different types of numbers
# by variable
emails =
    { $unreadEmails ->
        [one] You have one unread email.
        *[other] You have { $unreadEmails } unread emails.
    }

# by function
your-score =
    { NUMBER($score, minimumFractionDigits: 1) ->
        [0.0]   You scored zero points. What happened?
       *[other] You scored { NUMBER($score, minimumFractionDigits: 1) } points.
    }

# with keywords
your-rank = { NUMBER($pos, type: "ordinal") ->
   [1] You finished first!
   [one] You finished {$pos}st
   [two] You finished {$pos}nd
   [few] You finished {$pos}rd
  *[other] You finished {$pos}th
}

## Attributes
login-input = Predefined value
    .placeholder = email@example.com
    .aria-label = Login input value
    .title = Type your login email

# accessible via .
login-placeholder = {login-input.placeholder}

## Faulty code, no gurantees for sense of the end of errors

faulty-quote = Won't work {"\"}
    still-inside\
    {"lonely \\ \ "}
}

disallowed-identifier characters
disallowed-character$

# Hilight only at the end of the line, not visible since err only visible on same line
broken-function = {fn(
    fn(smth:123, 0, {)
    fn(noth!ng:3)
    fn(\)
}

# Same for open ended string and wron unicode characters
broken-string = {
    "
    "\u923"
    "\U92345"
    "\Ubcdefg"
}