pl: fix five speech/navigation defects and catch up with recent en changes - #738
Open
michaldziwisz wants to merge 5 commits into
Open
pl: fix five speech/navigation defects and catch up with recent en changes#738michaldziwisz wants to merge 5 commits into
michaldziwisz wants to merge 5 commits into
Conversation
Follow-up to 45aefb2 for Polish. Editors commonly emit U+22A5 where perpendicularity is meant, so both U+27C2 and U+22A5 now say "jest prostopadle do". LiteralSpeak keeps reading U+22A5 literally as "dol". Previously Polish said "dol" for U+22A5, so the same formula was read differently in Polish than in English. Adds up_tack_330 to tests/Languages/pl/alphabets.rs, mirroring the English test.
Follow-up to 4347d88 for Polish. That commit added the `|` syntax and updated the Polish tests, but not the Polish rule files, so several intents lost their function name in speech. Fixed, with the spoken output before -> after: quotient "podzielone przez z x przecinek, y" -> "czesc calkowita z x podzielone przez y" remainder "podzielone przez z x przecinek, y" -> "reszta z x podzielone przez y" set-difference "i z wielka a przecinek, wielka b" -> "roznica zbiorow z wielka a i wielka b" polar-coordinate "przecinek z x przecinek, y" -> "wspolrzedna biegunowa z x przecinek, y" The `|` syntax needs the function-intent rule to call IntentFunctionUseArityPath / IntentFunctionGlueBefore. Only en and hu had it, so it is now ported to pl (with "of" -> "z"). Also here: * SharedRules/geometry.yaml: the `coordinate` rule matched "." instead of "not(*[@arg])", so it swallowed coordinate($x,...) intents that should fall through to IntentMappings. Its name was also mistranslated as "przecinek" (comma) rather than "punkt" (point). * transpose: fixity order now matches en (postfix first). The function form is tested explicitly via intent='transpose:function($x)', as en does. * empty-set: added, it was missing. NOT adopted: arity templates ("| po | od,do") for sum/product. intent_function_glue_before in src/infer_intent.rs hardcodes the English word "of" for the last argument, which yields "suma po i of x" in Polish. This affects every non-English language; hu avoids it the same way. The binary separator form works correctly and is what this commit uses.
Follow-up to ec36e05 and 080ca16 for Polish, but it also fixes a long-standing Polish bug rather than only porting the new code. navigate.yaml compared the suffix of $NavCommand (always English, e.g. "ZoomIn") against a substring offset by the length of the SPOKEN $Prefix. For English those are the same; for any translation they are not. With "przybliz" (8 chars) vs "Zoom" (4), "ZoomIn" was cut to "" instead of "In", so ALL 16 branches were dead: ZoomIn -> "" (want "In") ZoomOutAll -> "ll" (want "OutAll") MoveNext -> "t" (want "Next") DescribeNext -> "ibeNext" (want "Next") Users heard "przejdz; do mianownika" with no direction, never "przejdz w prawo". Using $CommandOffset, as ec36e05 introduced, fixes all of them. Two more things here: * Polish needs two verbs where English reuses "zoom": "przybliz na zewnatrz" (zoom in outwards) is self-contradictory, so ZoomOut* now says "oddal". The direction word for plain In/Out is dropped, as the verb already carries it: "przybliz" / "oddal", and "przybliz maksymalnie" / "oddal maksymalnie". * Ports into-or-out-of-prefix-or-silent-without-parts (080ca16) and the SpeakIntentName fallbacks in into-or-out-of-default, keeping our own Polish preposition logic (including "ze stopnia" euphony). Adds zoom_speech_pl and move_char_speech_pl. Both fail on the old formula, showing the missing direction word, so they do discriminate.
Follow-up to fbc49bb (daisy#679) for Polish. The HasVisibleColumnLine / HasVisibleRowLine rules were missing from pl/SharedRules/default.yaml, so visible lines in a matrix were silent for Polish users, e.g. an augmented matrix was read exactly like a plain one. before: "2 na 3 macierz rozszerzona; wiersz 1; 3, 1, 4; ..." after: "2 na 3 macierz rozszerzona; wiersz 1; 3, 1, separator, 4; ..." Two existing tests (augmented_matrix_2x3, augmented_matrix_3x4_end_matrix) were pinning the pre-daisy#679 output; their English counterparts already expect "separator", so they are updated rather than worked around. Adds dashed_augmented_matrix_separator and matrix_row_separator, ported from tests/Languages/en/mtable.rs. Removing either rule fails all four tests, so they discriminate.
The audit tool reported 81 unicode entries whose text equals the English
source. Reviewing them one by one, only two were actually untranslated:
U+2127 "mhos" -> "mho" (unit, as nb and sv have it)
U+2644 "Saturn" (Polish spelling is the same; key raised)
The other 75 are correct as-is and only needed the verified key:
* 30 Roman numerals (U+2160..U+217F) spelled out letter by letter
* 29 space, PUA and zero-width entries with no speech at all
* 6 typographic ligatures (ff, fl, ffi, ffl, ft, st)
* 10 proper names and symbols (spesmilos, paragraphos, hypodiastole,
digamma, differential d, imaginary j, oV, pH)
Four more in unicode.yaml (digit separator, space, U+2062, U+2063)
likewise carry no translatable speech.
Raising the key on an entry whose text legitimately matches English is
what the convention is for; it is not the same as marking English text
as verified. Only the wording of "mhos" changed - the diff is otherwise
key case only, checked line by line.
Audit's "untranslated" for unicode files: 81 -> 0.
This was referenced Aug 31, 2026
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.
Summary
Five independent fixes to the Polish localization. Three catch up with recent
changes to the English rule files; two fix defects that predate them.
Each commit is self-contained and can be reviewed on its own.
1. Up tack spoken as perpendicular (
6d0aaed9)Follow-up to 45aefb2. Editors commonly emit U+22A5 where perpendicularity is
meant, so both U+27C2 and U+22A5 now say "jest prostopadle do", while
LiteralSpeak keeps reading U+22A5 literally. Previously Polish said "dol" for
U+22A5, so the same formula was read differently in Polish than in English.
2. The
|argument-glue syntax (92cfaf9b)Follow-up to 4347d88. Several intents lost their function name in speech:
quotientremainderset-differencepolar-coordinateAdopting the syntax in
definitions.yamlalone was not enough: thefunction-intentrule has to callIntentFunctionUseArityPath/IntentFunctionGlueBefore, which onlyenandhudid. That rule is nowported to
pl.Also fixes
SharedRules/geometry.yaml, where thecoordinaterule matched"."instead of
not(*[@arg])and so swallowedcoordinate($x,...)intents thatshould fall through to IntentMappings; its name was mistranslated as "przecinek"
(comma) rather than "punkt" (point). Adds the missing
empty-set, and orderstransposefixities asendoes.Not adopted: arity templates (
| po | od,do) forsum/product— see theissue linked below.
3. Navigation direction words (
1fe33293)This is the most user-visible one, and it is not just a port.
navigate.yamlcompared the suffix of$NavCommand— always English, e.g.ZoomIn— against a substring offset by the length of the spoken$Prefix.For English those lengths coincide; for any translation they do not:
All 16 branches were dead, so users heard "przejdz; do mianownika" with no
direction, never "przejdz w prawo".
$CommandOffset, introduced in ec36e05,fixes all of them.
Polish also needs two verbs where English reuses "zoom": "przybliz na zewnatrz"
(zoom in outwards) is self-contradictory, so
ZoomOut*now says "oddal" and thedirection word is dropped for plain In/Out, as the verb already carries it.
Ports
into-or-out-of-prefix-or-silent-without-parts(080ca16) and theSpeakIntentNamefallbacks, keeping the Polish preposition logic.4. Table column and row separators (
3cf59ebc)Follow-up to fbc49bb. The
HasVisibleColumnLine/HasVisibleRowLineruleswere missing from
pl, so visible lines were silent and an augmented matrix wasread exactly like a plain one. Two existing Polish tests were pinning the
pre-#679 output; their English counterparts already expect "separator", so they
are updated rather than worked around.
5. Remaining untranslated unicode entries (
3ca7fac5)The audit tool reported 81 unicode entries whose text equals the English source.
Reviewing them one by one, only two were actually untranslated: U+2127
mhos->mho(asnbandsvhave it) and U+2644 Saturn, whose Polishspelling is the same. The other 79 are correct as-is and only needed the
verified key: 30 Roman numerals spelled out letter by letter, 29 space/PUA/
zero-width entries with no speech, 6 typographic ligatures, and proper names
such as spesmilos, paragraphos and digamma.
Audit's "untranslated" count for the unicode files: 81 -> 0.
Test plan
Adds four tests:
up_tack_330,zoom_speech_pl,move_char_speech_pl,dashed_augmented_matrix_separator,matrix_row_separator.Each new test was checked for discrimination by reverting the corresponding fix:
with the old offset formula both navigation tests fail showing the missing
direction word, and removing either separator rule fails all four matrix tests.
src/navigate.rsgains only test code; no engine logic is touched.