Skip to content

Commit

Permalink
Merge pull request #5998 from tomachalek/pos_translat
Browse files Browse the repository at this point in the history
Translate basic PoS names going to 'Wposlist'
  • Loading branch information
tomachalek authored Aug 16, 2023
2 parents 0c85dbb + a704a87 commit 59c58e0
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/action/model/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ async def _add_corpus_related_globals(self, result, maincorp):
if tagset.ident == corp_info.default_tagset:
poslist = tagset.pos_category
break
result['Wposlist'] = [{'n': x.pos, 'v': x.pattern} for x in poslist]
result['Wposlist'] = [{'n': self._req.translate(x.pos), 'v': x.pattern} for x in poslist]

def get_mapped_attrs(self, attr_names: Iterable[str], force_values: Optional[Dict] = None) -> Dict[str, Any]:
"""
Expand Down Expand Up @@ -714,7 +714,7 @@ async def attach_aligned_query_params(self, tpl_out: Dict[str, Any]) -> None:
if tagset.ident == corp_info.default_tagset:
poslist = tagset.pos_category
break
tpl_out['Wposlist_' + al] = [{'n': x.pos, 'v': x.pattern} for x in poslist]
tpl_out['Wposlist_' + al] = [{'n': self._req.translate(x.pos), 'v': x.pattern} for x in poslist]
tpl_out['input_languages'][al] = corp_info.metadata.default_virt_keyboard if corp_info.metadata.default_virt_keyboard else corp_info.collator_locale

async def create_preflight_subcorpus(self) -> str:
Expand Down
Binary file modified locale/cs_CZ/LC_MESSAGES/messages.mo
Binary file not shown.
36 changes: 36 additions & 0 deletions locale/cs_CZ/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,39 @@ msgstr "Uživatel KonTextu {} vám zaslal odkaz na tabulku frekvenční distribu

msgid "Keywords analysis"
msgstr "Analýza klíčových slov"

msgid "noun"
msgstr "podstatné jméno"

msgid "adjective"
msgstr "přídavné jméno"

msgid "pronoun"
msgstr "zájmeno"

msgid "numeral"
msgstr "číslovka"

msgid "verb"
msgstr "sloveso"

msgid "adverb"
msgstr "příslovce"

msgid "preposition"
msgstr "předložka"

msgid "conjunction"
msgstr "spojka"

msgid "particle"
msgstr "částice"

msgid "interjection"
msgstr "citoslovce"

msgid "punctuation"
msgstr "interpunkce"

msgid "unknown"
msgstr "neznámý"
Binary file modified locale/sl_SI/LC_MESSAGES/messages.mo
Binary file not shown.
36 changes: 36 additions & 0 deletions locale/sl_SI/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -673,3 +673,39 @@ msgstr "Uživatel KonTextu {} vám zaslal odkaz na tabulku frekvenční distribu

msgid "Keywords analysis"
msgstr "Keywords analysis UNTRANSLATED"

msgid "noun"
msgstr "noun UNTRANSLATED"

msgid "adjective"
msgstr "adjective UNTRANSLATED"

msgid "pronoun"
msgstr "pronoun UNTRANSLATED"

msgid "numeral"
msgstr "numeral UNTRANSLATED"

msgid "verb"
msgstr "verb UNTRANSLATED"

msgid "adverb"
msgstr "adverb UNTRANSLATED"

msgid "preposition"
msgstr "preposition UNTRANSLATED"

msgid "conjunction"
msgstr "conjunction UNTRANSLATED"

msgid "particle"
msgstr "particle UNTRANSLATED"

msgid "interjection"
msgstr "interjection UNTRANSLATED"

msgid "punctuation"
msgstr "punctuation UNTRANSLATED"

msgid "unknown"
msgstr "unknown UNTRANSLATED"
Binary file modified locale/szl/LC_MESSAGES/messages.mo
Binary file not shown.
37 changes: 37 additions & 0 deletions locale/szl/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -480,3 +480,40 @@ msgstr "Uživatel KonTextu {} vám zaslal odkaz na tabulku frekvenční distribu

msgid "Keywords analysis"
msgstr "Keywords analysis UNTRANSLATED"

msgid "noun"
msgstr "noun UNTRANSLATED"

msgid "adjective"
msgstr "adjective UNTRANSLATED"

msgid "pronoun"
msgstr "pronoun UNTRANSLATED"

msgid "numeral"
msgstr "numeral UNTRANSLATED"

msgid "verb"
msgstr "verb UNTRANSLATED"

msgid "adverb"
msgstr "adverb UNTRANSLATED"

msgid "preposition"
msgstr "preposition UNTRANSLATED"

msgid "conjunction"
msgstr "conjunction UNTRANSLATED"

msgid "particle"
msgstr "particle UNTRANSLATED"

msgid "interjection"
msgstr "interjection UNTRANSLATED"

msgid "punctuation"
msgstr "punctuation UNTRANSLATED"

msgid "unknown"
msgstr "unknown UNTRANSLATED"

0 comments on commit 59c58e0

Please sign in to comment.