Support concatenated localizer strings - #129
Conversation
Before I dig into the code, it would be better to use a multi-line string instead var key = @"my
text";
...
var value = S[key]; |
But that's not the same thing, is it? This introduces a new line into the text. |
|
Yep, but why do you need to do the concatenation inside the indexer? I assume this should work normally with `IStringLocalizer ', or do you get unexpected behavior? |
|
This is just for source code formatting - wrapping long lines so the code is more readable. I'm rather clueless about gettext, but I think this is generally supported. https://www.gnu.org/software/gettext/manual/html_node/Mark-Keywords.html#How-Marks-Appear-in-Sources
https://www.gnu.org/software/gettext/manual/html_node/Long-Lines.html
|
Co-authored-by: Junie <junie@jetbrains.com>
b30ff96 to
6bd28e9
Compare
hishamco
left a comment
There was a problem hiding this comment.
Please add more tests for a string with multiple lines (3 or more)
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
|
Fix the build, then we can merge |
| """, | ||
| "This is a multi-line\nstring.")] | ||
| """ | ||
| This is a multi-line |
There was a problem hiding this comment.
Yes, but this is the output
|
Thanks a lot for your contribution |
Support concatenated localizer strings (
S["my " + "text"]), allowing breaking of long strings into multiple lines.