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

parse_strings parser doesn't support multi-line values #63

Open
liuwin7 opened this issue May 11, 2017 · 2 comments
Open

parse_strings parser doesn't support multi-line values #63

liuwin7 opened this issue May 11, 2017 · 2 comments
Labels

Comments

@liuwin7
Copy link

liuwin7 commented May 11, 2017

Hi there,

In my xxx.strings file, I have one string, for example,

/* Button's title */
"Button.Title"="Hello 
world!"

Note: Xcode supports this style.

I cannot get the "Hello \n world!", what should I do for this ?

@iafan
Copy link
Contributor

iafan commented May 13, 2017

@liuwin7 thanks for reporting! Indeed, our current .strings parser doesn't support such multi-line strings; we internally don't have such strings, and genstrings tool we use to extract strings from source code also produces single-line strings with \n inside.

In order to support such multi-line strings, the parser needs to be rewritten to support streaming mode. Until this happens, you might just want to replace your actual newlines with \n, like follows:

/* Button's title */
"Button.Title"="Hello\nworld!"

@iafan iafan changed the title String with multiline value will be ignore parse_strings parser doesn't support multi-line values May 13, 2017
@iafan iafan added the bug label May 13, 2017
@liuwin7
Copy link
Author

liuwin7 commented May 14, 2017

@iafan Thanks for your reply. I have found the source code, and the Serge only accepts the single-line strings. I haved modified my original strings file just like as what you said.
many thanks.

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

No branches or pull requests

2 participants