summaryrefslogtreecommitdiff
path: root/src/lib/librexgettext
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 23:55:21 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 23:55:21 -0600
commitfdc6a869747edfc7f9ffa1603a36ee33bda0aa4f (patch)
tree4f8a47986da64d99c79d16a1178e113fb32bd0c5 /src/lib/librexgettext
parent315b6b0a025abb1002e03932918da7dc749a4089 (diff)
libremessages/librexgettext: Preserve two spaces after a period.
Well, [.!?] really--this matches the behavior of `fmt -u`.
Diffstat (limited to 'src/lib/librexgettext')
-rwxr-xr-xsrc/lib/librexgettext2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/librexgettext b/src/lib/librexgettext
index 0732f81..aad79fa 100755
--- a/src/lib/librexgettext
+++ b/src/lib/librexgettext
@@ -102,7 +102,7 @@ main() {
xgettext-sh "${simple[@]}" -- "${files[@]}"
xgettext-sh "${prose[@]}" -- "${files[@]}" | # These are the raw strings given to prose functions
tr '\n' '\r' | sed 's/"\r\s*"//g' | tr '\r' '\n' | # This removes the awkward word-wrapping done by xgettext
- sed -r -e 's/(\\n|\\t|\t)/ /g' -e 's/ +/ /g' | # This collapses whitespace, HTML-style
+ sed -r -e 's/(\\n|\\t|\t)/ /g' -e 's/(^|[^.!? ]) +/\1 /g' -e 's/([.!?]) +/\1 /g' | # This collapses whitespace
sed '/^\#, sh-format/d'
} | msguniq -Fi
}