[DRE-commits] [ruby-gettext] 01/05: Add patch to wrap sentences without breaking words
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Fri Aug 18 14:01:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-gettext.
commit 7c81a8189778d4e103fc4ef18cfacf50a99d432b
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Fri Nov 11 18:08:49 2016 +0300
Add patch to wrap sentences without breaking words
---
debian/patches/0005-wrap-without-breaking-words.patch | 18 ++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 19 insertions(+)
diff --git a/debian/patches/0005-wrap-without-breaking-words.patch b/debian/patches/0005-wrap-without-breaking-words.patch
new file mode 100644
index 0000000..3fdc335
--- /dev/null
+++ b/debian/patches/0005-wrap-without-breaking-words.patch
@@ -0,0 +1,18 @@
+From: "Francesco Poli \(wintermute\)" <invernomuto at paranoici.org>
+Date: Sat, 15 Oct 2016 19:50:34 +0200
+Subject: wrap without breaking words
+
+---
+
+diff -ruN a/lib/gettext/po_entry.rb b/lib/gettext/po_entry.rb
+--- a/lib/gettext/po_entry.rb 2016-08-08 17:56:05.000000000 +0200
++++ b/lib/gettext/po_entry.rb 2016-10-15 18:56:49.824585840 +0200
+@@ -491,7 +491,7 @@
+ chunks << line
+ else
+ # TODO: use character width instead of the number of characters
+- line.scan(/.{1,#{max_line_width}}/m) do |chunk|
++ line.scan(/.{1,#{max_line_width}}\z|\S{#{max_line_width},}|.{1,#{max_line_width - 1}}\s/m) do |chunk|
+ chunks << chunk
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 5674133..c92c0d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
0002-Make-test-unit-notify-and-test-unit-rr-optional-to-r.patch
0003-Do-not-use-Bundler-in-Rakefile.patch
0004-Use-system-racc-in-Rakefile.patch
+0005-wrap-without-breaking-words.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-gettext.git
More information about the Pkg-ruby-extras-commits
mailing list