i18n: Add initial support in PyCompatibilityInspection

All its warnings are extracted into the bundle, but they are still poorly
adapted for translation. Each of them in constructed from two separate
messages, a common prefix and an individual feature description, with negation
of the main verb being split. Only the first message can vary depending on
the affected versions number, but both parts of the verb need to agree in many
languages other than English. It's not clear how to address it without
overhauling inspection internals, thus it will be revised later.

I also slightly updated the warnings format. Namely, put "version" in plural,
if a warning applies to multiple Python versions, and removed trailing periods
from single-sentence messages.

GitOrigin-RevId: 51e577201b11fb4e8b6967e1f5ad27143ba9f82e
This commit is contained in:
Mikhail Golubev
2020-08-19 14:22:06 +00:00
committed by intellij-monorepo-bot
parent 7d9e25a990
commit 0adac7f9ea
49 changed files with 295 additions and 232 deletions
@@ -1 +1 @@
<error bundleMsg="bad-trail|l">1000l</error>
<error descr="Python version 3.9 does not support a trailing 'l'">1000l</error>
@@ -1,2 +1,2 @@
class <warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>sync</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>sync</warning>(object):
pass
@@ -1,2 +1,2 @@
def <warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>sync</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>sync</warning>():
pass
@@ -1 +1 @@
<warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">async</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">async</warning> = 1
@@ -1,2 +1,2 @@
class <warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>wait</warning>(object):
class <warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>wait</warning>(object):
pass
@@ -1,2 +1,2 @@
def <warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>wait</warning>():
def <warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">a<caret>wait</warning>():
pass
@@ -1 +1 @@
<warning descr="Python version 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">await</warning> = 1
<warning descr="Python versions 3.7, 3.8, 3.9 do not allow 'async' and 'await' as names">await</warning> = 1