[ibus-table/f18] Resolves: #856903
Mike FABIAN
mfabian at fedoraproject.org
Thu Sep 13 14:19:46 UTC 2012
commit 49fb7daa16e92ddb921d76bbeed9570c438bca41
Author: Mike FABIAN <mfabian at redhat.com>
Date: Thu Sep 13 15:44:53 2012 +0200
Resolves: #856903
- Fix ipa-x-sampa table and phrases containing spaces in emoji-table
Currently there is a regular expression which filters out several
lines defining valid phrases. The emoji-table for example has phrases
containing spaces which are currently filtered out and the ipa-x-sampa
table has trailing comments which are filtered out as well.
...sampa-table-and-phrases-containing-spaces.patch | 42 ++++++++++++++++++++
ibus-table.spec | 12 +++++-
2 files changed, 53 insertions(+), 1 deletions(-)
---
diff --git a/fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch b/fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch
new file mode 100644
index 0000000..59d0c21
--- /dev/null
+++ b/fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch
@@ -0,0 +1,42 @@
+From 9d8a7228fca7615b8a3b7f74f7bf8cfe7861fe8b Mon Sep 17 00:00:00 2001
+From: Mike FABIAN <mfabian at redhat.com>
+Date: Thu, 13 Sep 2012 15:32:10 +0200
+Subject: [PATCH] Fix ipa-x-sampa table and phrases containing spaces in
+ emoji-table
+
+Currently there is a regular expression which filters out several
+lines defining valid phrases. The emoji-table for example has phrases
+containing spaces which are currently filtered out and the ipa-x-sampa
+table has trailing comments which are filtered out as well.
+
+In phrase_parser, the phrases are parsed like:
+
+xingma, phrase, freq = unicode (l, "utf-8").strip ().split ('\t')[:3]
+
+Therefore, it seems reasonable to change the regular expression checking
+for a table line containing a phrase definition to accept every
+line which has 3 columns seperated by tabs followed optionally
+by more columns also separated by tabs (the optional columns are ignored,
+i.e. they are just comments in the table source).
+
+See: https://bugzilla.redhat.com/show_bug.cgi?id=856903
+---
+ engine/tabcreatedb.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/engine/tabcreatedb.py b/engine/tabcreatedb.py
+index 5b4a359..c644660 100644
+--- a/engine/tabcreatedb.py
++++ b/engine/tabcreatedb.py
+@@ -125,7 +125,7 @@ def main ():
+ patt_com = re.compile(r'^###.*')
+ patt_blank = re.compile(r'^[ \t]*$')
+ patt_conf = re.compile(r'[^\t]*=[^\t]*')
+- patt_table = re.compile(r' *([^\s]+) *\t *([^\s]+)\t *[^\s]+ *$')
++ patt_table = re.compile(r'([^\t]+)\t([^\t]+)\t([^t]+)(\t.*)?$')
+ patt_gouci = re.compile(r' *[^\s]+ *\t *[^\s]+ *$')
+ patt_s = re.compile(r' *([^\s]+) *\t *([\x00-\xff]{3}) *\t *[^\s]+ *$')
+
+--
+1.7.11.4
+
diff --git a/ibus-table.spec b/ibus-table.spec
index 7f1a946..36b7ca8 100644
--- a/ibus-table.spec
+++ b/ibus-table.spec
@@ -1,6 +1,6 @@
Name: ibus-table
Version: 1.4.99.20120907
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Table engine for IBus platform
License: LGPLv2+
Group: System Environment/Libraries
@@ -8,6 +8,7 @@ URL: http://code.google.com/p/ibus/
Source0: http://mfabian.fedorapeople.org/ibus-table/%{name}-%{version}.tar.gz
Patch1: ibus-table-1.3.9.20110827-uppercase-umlauts.patch
Patch2: ibus-table-1.4.99.20120907-improve-chinese-category-check.patch
+Patch3: fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch
Requires: ibus > 1.3.0
BuildRequires: ibus-devel > 1.3.0
@@ -32,6 +33,7 @@ Development files for %{name}.
%setup -q
%patch1 -p1 -b .uppercase-umlauts
%patch2 -p1 -b .improve-chinese-category-check
+%patch3 -p1 -b .fix-ipa-x-sampa-table
%build
%configure --disable-static --disable-additional
@@ -102,6 +104,14 @@ Development files for %{name}.
%{_datadir}/pkgconfig/%{name}.pc
%changelog
+* Thu Sep 13 2012 Mike FABIAN <mfabian at redhat.com> - 1.4.99.20120907-3
+- Resolves: #856903
+- Fix ipa-x-sampa table and phrases containing spaces in emoji-table
+ Currently there is a regular expression which filters out several
+ lines defining valid phrases. The emoji-table for example has phrases
+ containing spaces which are currently filtered out and the ipa-x-sampa
+ table has trailing comments which are filtered out as well.
+
* Tue Sep 11 2012 Mike FABIAN <mfabian at redhat.com> - 1.4.99.20120907-2
- Resolves: #856320
- Improve check whether a phrase is simplified or traditional Chinese
More information about the scm-commits
mailing list