Replies: 1 comment 1 reply
-
const someFunc = () => {
if (somesituation) {
setAlert({
open: true,
message: t({
id: 'somemsg',
message: 'some message\nwith two lines'
});
})
}
} I will re-check the case with escaped new line sequences. THis escaping actually done by babel / swc when the code is converted to AST but when it printed back by macro it should be correctly processed as new line without extra escaping.... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a significant number of messages in functions in my React modules that have newlines; the strings are passed to a custom dialog to control the message flow onscreen.
For example:
This extracts into a po file as:
I can use template strings' multi-line, but then I give up clean code formatting where the template strings go to the first column.
What I've been doing is creating a msg template, eg:
Which works, but it's ... verbose.
Am I missing something? Is this a feature, a bug, etc?
Beta Was this translation helpful? Give feedback.
All reactions