Repository navigation
[RU] Fix the words dropped by render errors - #2843
Merged
Merged
Conversation
Member
|
Nice! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A RU render of the 20261101 dump fails on four words, and they are missing from the dictionary:
strip_examples()counted the braces inside<math>as template ones (2^{-P(x)log{P(x)}}), so the example was cut in the middle of the formula and an unclosed<math>was left. Braces inside<math>,<chem>,<nowiki>and comments are skipped now.{{мест ru 1a-вwith a trailing U+200E.transform_variant()strips it from the name, but RU registered the name with only.strip(), so the lookup failed with aKeyError. The name is stripped the same way now. ES, EU, LT, NL, NO, PL, PT and SV had the same.strip(), so they get the same fix. The other languages already strip U+200E.Шаблон:гл ru 5b/c"-сяhas an unclosed{{#if:on Wiktionary, so it expands to a raw{{Гл-блок ...call. That text was taken as a{|table and gave junk forms like "=спимся" and "Вы", and then anIndexError. Only output that starts with{|is read as a wikitable now. The word is kept, without forms until the template is fixed upstream.Testing
parse_word()on all 103 pages with<math>and random samples of 2,500 verbs, 2,500 nouns and all 393 pronouns: only радиан and перплексия changed (an error before, a definition now).tests/test_ru.py, RU doctests, mypy and ruff pass.