projectfluent / fluent

Fluent — planning, spec and documentation
https://projectfluent.org
Apache License 2.0
1.42k stars 45 forks source link

Message ending with a line end #371

Open lilydjwg opened 4 months ago

lilydjwg commented 4 months ago

Say I'm translating the whole mail body or the like. The content will be one or more lines, i.e. each line has its own line end. However, I can't figure out how to write that in fluent elegantly. I can do it this way:

body = this is a line with a line end.{"\u000a"}

Or I have to take care the last line end in my program, which means I need to do something like ''.join(part + '\n' for part in parts) or content += translated + '\n' instead of ''.join(parts) or content += translated.

eemeli commented 4 months ago

Is that trailing newline intended to be localizable? As in, are the locales in which it should be left out?

If so, then you may need to include it as you have it. But if it's meant to be there for each locale, then it's almost certainly better to leave it out of the FTL file.