1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-28 10:08:24 +00:00

Upgrade to 1.5.27.

Release notes at https://github.com/mike-fabian/ibus-typing-booster/releases
This commit is contained in:
Thierry Thomas 2017-03-17 18:24:38 +00:00
parent 57cf026781
commit 7d14a1ba67
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=436348
4 changed files with 4 additions and 111 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= ibus-typing-booster
PORTVERSION= 1.5.25
PORTVERSION= 1.5.27
CATEGORIES= textproc
MAINTAINER= thierry@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1489430261
SHA256 (mike-fabian-ibus-typing-booster-1.5.25_GH0.tar.gz) = e32acf6d757e82bd94bc18db49d36184d72f82f99f79cc7eb517e6ad5e429312
SIZE (mike-fabian-ibus-typing-booster-1.5.25_GH0.tar.gz) = 4799666
TIMESTAMP = 1489774308
SHA256 (mike-fabian-ibus-typing-booster-1.5.27_GH0.tar.gz) = 29f6cfd7d42620c59f58d548ea5ebdd5073013d97f195dcb18e312cd654129fa
SIZE (mike-fabian-ibus-typing-booster-1.5.27_GH0.tar.gz) = 4801545

View File

@ -1,40 +0,0 @@
--- engine/hunspell_suggest.py.orig 2017-03-13 08:42:29 UTC
+++ engine/hunspell_suggest.py
@@ -76,8 +76,9 @@ class Dictionary:
'''
if DEBUG_LEVEL > 0:
sys.stderr.write("load_dictionary() ...\n")
- (dic_path, self.words) = itb_util.get_hunspell_dictionary_wordlist(
- self.name)
+ (dic_path,
+ self.encoding,
+ self.words) = itb_util.get_hunspell_dictionary_wordlist(self.name)
if self.words:
# List of languages where accent insensitive matching makes sense:
accent_languages = (
@@ -183,6 +184,9 @@ class Hunspell:
>>> h.suggest('Glühwürmchen')[0]
('Glühwürmchen', 0)
+ >>> h.suggest('Alpengluhen')[0]
+ ('Alpenglühen', 0)
+
>>> h.suggest('filosofictejsi')
[('filosofičtější', 0), ('filosofičtěji', -1)]
@@ -291,7 +295,9 @@ class Hunspell:
# the result back to the internal
# normalization form (NFD) (hunspell does the
# right thing for Korean if the input is NFC).
- if dictionary.pyhunspell_object.spell(input_phrase_nfc):
+ if dictionary.pyhunspell_object.spell(
+ input_phrase_nfc.encode(
+ dictionary.encoding, 'replace')):
# This is a valid word in this dictionary.
# It might have been missed by the matching
# above because the dictionary might not
@@ -380,3 +386,4 @@ def main():
if __name__ == "__main__":
main()
+

View File

@ -1,67 +0,0 @@
--- engine/itb_util.py.orig 2017-03-13 08:42:29 UTC
+++ engine/itb_util.py
@@ -348,11 +348,12 @@ def get_hunspell_dictionary_wordlist(lan
:param language: The language of the dictionary to open
:type language: String
- :rtype: tuple of the form (dic_path, wordlist) where
- dic_path is the full path of the dictionary file found
+ :rtype: tuple of the form (dic_path, dictionary_encoding, wordlist) where
+ dic_path is the full path of the dictionary file found,
+ dictionary_encoding is the encoding of that dictionary file,
and wordlist is a list of words found in that file.
If no dictionary can be found for the requested language,
- the return value is ('', []).
+ the return value is ('', '', []).
'''
dirnames = [
'/usr/share/hunspell',
@@ -374,7 +375,7 @@ def get_hunspell_dictionary_wordlist(lan
'get_hunspell_dictionary_wordlist(): '
+ 'No file %s.dic found in %s\n'
%(language, dirnames))
- return ('', [])
+ return ('', '', [])
sys.stderr.write(
'get_hunspell_dictionary_wordlist(): '
+ '%s file found.\n'
@@ -439,21 +440,21 @@ def get_hunspell_dictionary_wordlist(lan
%(dic_path, dictionary_encoding)
+ 'giving up.\n')
traceback.print_exc()
- return ('', [])
+ return ('', '', [])
except:
sys.stderr.write(
'get_hunspell_dictionary_wordlist(): '
+ 'Unexpected error loading .dic File: %s\n' %dic_path)
traceback.print_exc()
- return ('', [])
+ return ('', '', [])
except:
sys.stderr.write(
'get_hunspell_dictionary_wordlist(): '
+ 'Unexpected error loading .dic File: %s\n' %dic_path)
traceback.print_exc()
- return ('', [])
+ return ('', '', [])
if not dic_buffer:
- return ('', [])
+ return ('', '', [])
sys.stderr.write(
'get_hunspell_dictionary_wordlist(): '
+ 'Successfully loaded %s using %s encoding.\n'
@@ -488,7 +489,7 @@ def get_hunspell_dictionary_wordlist(lan
re.sub(r'[/\t].*', '', x.replace('\n', '')))
for x in dic_buffer
]
- return (dic_path, word_list)
+ return (dic_path, dictionary_encoding, word_list)
if __name__ == "__main__":
import doctest
@@ -497,3 +498,4 @@ if __name__ == "__main__":
sys.exit(1)
else:
sys.exit(0)
+