mirror of
https://github.com/LibreOffice/dictionaries.git
synced 2025-07-23 00:45:33 +00:00
update Russian proofreading rules
Change-Id: Iedc3af5671241a6e9202916c0a813f0f91303e8f
This commit is contained in:

committed by
László Németh

parent
54aa90ef47
commit
4e468c8b15
@ -3,5 +3,5 @@ Russian grammar checker
|
||||
(developed by the Lightproof grammar checker extension generator,
|
||||
see http://launchpad.net/lightproof)
|
||||
|
||||
2009, 2011, 2012 (c) Yakov Reztsov <yr at myooo dot ru>, license: MPL 1.1 / GPL / LGPL
|
||||
2009, 2011, 2012, 2014 (c) Yakov Reztsov <yr at myooo dot ru>, license: MPL 1.1 / GPL / LGPL
|
||||
|
||||
|
@ -6,7 +6,7 @@ from com.sun.star.beans import PropertyValue
|
||||
pkg = "ru_RU"
|
||||
lang = "ru_RU"
|
||||
locales = {'ru-RU': ['ru', 'RU', '']}
|
||||
version = "0.3.2"
|
||||
version = "0.3.4"
|
||||
author = "Yakov Reztsov <yr at myooo dot ru>"
|
||||
name = "Lightproof grammar checker (Russian)"
|
||||
|
||||
@ -53,6 +53,8 @@ def _morph(rLoc, word, pattern, all, onlyaffix):
|
||||
return None
|
||||
t = x.getAlternatives()
|
||||
if not t:
|
||||
if not analyses: # fix synchronization problem (missing alternatives with unloaded dictionary)
|
||||
return None
|
||||
t = [""]
|
||||
analyses[word] = t[0].split("</a>")[:-1]
|
||||
a = analyses[word]
|
||||
@ -118,7 +120,7 @@ def suggest(rLoc, word):
|
||||
if not x:
|
||||
return word
|
||||
t = x.getAlternatives()
|
||||
suggestions[word] = "\\n".join(t)
|
||||
suggestions[word] = "|".join(t)
|
||||
return suggestions[word]
|
||||
|
||||
# get the nth word of the input string or None
|
||||
@ -215,7 +217,7 @@ def compile_rules(dic):
|
||||
i[0] = re.compile(i[0])
|
||||
except:
|
||||
if 'PYUNO_LOGLEVEL' in os.environ:
|
||||
print("Lightproof: bad regular expression: ", traceback.format_exc())
|
||||
print("Lightproof: bad regular expression: " + str(traceback.format_exc()))
|
||||
i[0] = None
|
||||
|
||||
def get_rule(loc):
|
||||
|
@ -1,4 +1,4 @@
|
||||
lopts = {}
|
||||
lopts_default = {}
|
||||
lopts['ru_RU'] = [u'hyphen', u'comma', u'multiword', u'together', u'common', u'space', u'abbreviation', u'dup', u'numsep', u'typographica', u'quotation']
|
||||
lopts_default['ru_RU'] = [u'hyphen', u'comma', u'multiword', u'together', u'common', u'space', u'abbreviation', u'dup', u'typographica', u'quotation']
|
||||
lopts['ru_RU'] = ['hyphen', 'comma', 'multiword', 'together', 'common', 'space', 'abbreviation', 'dup', 'numsep', 'typographica', 'quotation']
|
||||
lopts_default['ru_RU'] = ['hyphen', 'comma', 'multiword', 'together', 'common', 'space', 'abbreviation', 'dup', 'typographica']
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user