Skip to content

Instantly share code, notes, and snippets.

@stasm
Forked from zbraniecki/attrs.ftl
Last active October 5, 2017 20:45
Show Gist options
  • Save stasm/0dcafe79db9cca2b8cb86067905873e6 to your computer and use it in GitHub Desktop.
Save stasm/0dcafe79db9cca2b8cb86067905873e6 to your computer and use it in GitHub Desktop.
Experiment with FTL syntax
key = Value
key.attr = Attribute
key.attr2 = Attribute 2
key.attr = Attribute
key.attr2 = Attribute 2
key =
Multiline
Value
key.attr = Attribute
key.attr2 = Attribute 2
### File wide comment
key = Value
key =
Value
# Message comment
key =
Multiline
value
# A multiline message comment
# spans multiple lines
key =
This is a message with
an escaped \{.
# key = Value
key = {" "}Leading and trailing space are meaningful here{" "}
key = {""}
The blank lines around this message
are meaningful.
{""}
key = This is a { $placeable }
key =
A placeable in
{ $foo } multiline
works just fine
key.attr = Placeable in { $foo } attribute works
key = { $var ->
[one] Variant 1
*[other] Variant 2
}
key =
{ $ var ->
[one] Variant 1
*[other] Variant 2
}
key = { $var ->
[one] Multiline
message can work
*[other] Inside
a variant
}
# Super complex example!
key = { $var ->
[one] Let's try { $var2 ->
[masculine] Mascline
*[feminie] Feminine
} example
*[other] Multiline message
with some placeable { $var2 ->
[masculine] Also
*[feminine] works
} quite well.
}
key.attr = Attribute
key.attr2 = Attribute 2
# flattened nested
key = { $var, $var2 ->
[one, masculine] Masculine
[one, feminine] Feminine
*[other] And this is for other
}
## This is a section
key = value
## Another Section
##
## Sections are used for grouping messages,
## assigning comments to the whole group,
## and aiding CAT tools in presenting groups
## of messages together.
key = Value 2
key2 = Value 3
brand-name = { -brand-name-nominative }
-brand-name-nominative = Firefox
-brand-name-genitive = Firefoksa
-brand-name-gender = masculine
key = Używam { -brand-name-gender ->
[masculine] go
[feminine] jej
*[other] { -brand-name-genitive }
}
key = {
[one] Variant 1
*[other] Variant 2
}
key.attr = {
[one] Variant 1
*[other] Variant 2
}
key = {
[one] Variant 1
*[other] Variant 2
}
key = Value
key.attr = {
[one] Variant 1
*[other] Variant 2
}
key.attr2 = {
*[one] Variant 1
[other] Variant 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment