Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message ending with a line end #371

Open
lilydjwg opened this issue Jul 6, 2024 · 1 comment
Open

Message ending with a line end #371

lilydjwg opened this issue Jul 6, 2024 · 1 comment

Comments

@lilydjwg
Copy link

lilydjwg commented Jul 6, 2024

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
Copy link
Member

eemeli commented Jul 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants