Adds support to LocalizationStreamParser for po entrys spanning multiple lines#7752
Merged
sebastienros merged 2 commits intoOrchardCMS:1.10.xfrom Jul 6, 2017
andrewcartwright1:patch-1
Merged
Adds support to LocalizationStreamParser for po entrys spanning multiple lines#7752sebastienros merged 2 commits intoOrchardCMS:1.10.xfrom andrewcartwright1:patch-1
sebastienros merged 2 commits intoOrchardCMS:1.10.xfrom
andrewcartwright1:patch-1
Conversation
|
@andrewcartwright1, |
Contributor
|
👍 |
| if (str.StartsWith("\"") && str.EndsWith("\"")) { | ||
| if (str.Length == 1) { | ||
| // Handle corner case - string containing single quote | ||
| Logger.Warning("Invalid localization string detected: " + str); |
Contributor
Author
There was a problem hiding this comment.
Need to readd this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After spending some time making our gulp localization task work I came across an issue were some PO entries were half complete and noticed that they had been shifted into a new line by the task - after reviewing it, it wraps at 78 characters which seemed like an issue, but after some research, string wrapping is perfectly fine: http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html
The summary of my change is instead of reading line by line and determining what we are working with later on... do the following.
Afterwards, check what scope we started with and do the required action.