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.
This commit is contained in:
parent
52b91b4b42
commit
cbfd09b0fb
42
fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch
Normal file
42
fix-ipa-x-sampa-table-and-phrases-containing-spaces.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 9d8a7228fca7615b8a3b7f74f7bf8cfe7861fe8b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mike FABIAN <mfabian@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
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: ibus-table
|
Name: ibus-table
|
||||||
Version: 1.4.99.20120907
|
Version: 1.4.99.20120907
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: The Table engine for IBus platform
|
Summary: The Table engine for IBus platform
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
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
|
Source0: http://mfabian.fedorapeople.org/ibus-table/%{name}-%{version}.tar.gz
|
||||||
Patch1: ibus-table-1.3.9.20110827-uppercase-umlauts.patch
|
Patch1: ibus-table-1.3.9.20110827-uppercase-umlauts.patch
|
||||||
Patch2: ibus-table-1.4.99.20120907-improve-chinese-category-check.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
|
Requires: ibus > 1.3.0
|
||||||
BuildRequires: ibus-devel > 1.3.0
|
BuildRequires: ibus-devel > 1.3.0
|
||||||
@ -32,6 +33,7 @@ Development files for %{name}.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .uppercase-umlauts
|
%patch1 -p1 -b .uppercase-umlauts
|
||||||
%patch2 -p1 -b .improve-chinese-category-check
|
%patch2 -p1 -b .improve-chinese-category-check
|
||||||
|
%patch3 -p1 -b .fix-ipa-x-sampa-table
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static --disable-additional
|
%configure --disable-static --disable-additional
|
||||||
@ -102,6 +104,14 @@ Development files for %{name}.
|
|||||||
%{_datadir}/pkgconfig/%{name}.pc
|
%{_datadir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 13 2012 Mike FABIAN <mfabian@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@redhat.com> - 1.4.99.20120907-2
|
* Tue Sep 11 2012 Mike FABIAN <mfabian@redhat.com> - 1.4.99.20120907-2
|
||||||
- Resolves: #856320
|
- Resolves: #856320
|
||||||
- Improve check whether a phrase is simplified or traditional Chinese
|
- Improve check whether a phrase is simplified or traditional Chinese
|
||||||
|
Loading…
Reference in New Issue
Block a user