Repository navigation
Conversation
…sh table The interface language picks the formula language, as in Excel. Each language is a data table in crates/formula/src/input/<lang>.rs (function names, booleans, errors, structured reference specifiers and separators) behind one Dialect, so the lexer, parser and display printer take no per-language code: - es (424 names), de (403), pt-BR (412), ru (459), each entry with its source; Microsoft's localized pages are machine-translated, so a name needs two agreeing signals - local error literals (#WERT!, #Н/Д, #¡VALOR!), longest match wins - local table specifiers ([#Kopfzeilen], [#Эта строка]) and separators inside [] - German `.` between array columns; Russian `:` between array rows (no row ranges inside braces), merged with upstream trim references (A1.:.F10, 1.:3) - LET/LAMBDA bindings and workbook names shadow local names case-insensitively in any script - editor autocomplete and argument hints take Unicode names; Insert Function searches and sorts by the local name; help shows the local name with local separators - Czech and French interfaces keep English formulas until they get a table Files, clipboard, engine commands, CLI and MCP keep canonical English syntax.
A 381-entry table covering every key of the reference (Japanese) table, registered as a Pl variant in the Language enum (name "Polski", code pl, system tags pl-* / pl_*). Written from the meaning of the English labels; no other product's localisation was consulted. Formulas and number formats keep the canonical en-US locale; a test pins it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/localization-parity.md
…cifiers A Polish dialect for the formula languages from storytold#443: 429 function names, `;` arguments, decimal comma, `\\` and `;` in array constants, PRAWDA/FAŁSZ, the ten error values and the five structured-reference specifiers. The Polish interface now enters and shows Polish formulas. Names and words were observed in a licensed Excel for the web with a Polish interface, in synthetic workbooks; #POBIERANIE_DANYCH and #Ten wiersz come from Microsoft's pl-pl help pages. Sources are listed in crates/formula/src/input/pl.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/ui-egui/src/control.rs
# Conflicts: # ROADMAP.md # crates/ui-egui/src/control.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both new interface languages: Serbian from main and Polish from this branch (enum, ALL, names, codes, tags, lookup and tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both calc tests, and maps Serbian to the canonical en-US formula locale like Czech and French, since it has no function table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both formula-locale tests and both localization-parity rows (Polish ribbon catalog, Brazilian Portuguese dialog catalog). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main now has the Format Cells lookup (storytold#788) and six new reference keys (the Page Setup margins); this adds their Polish entries and keeps both localization-parity rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sh table The interface language picks the formula language, as in Excel. Each language is a data table in crates/formula/src/input/<lang>.rs (function names, booleans, errors, structured reference specifiers and separators) behind one Dialect, so the lexer, parser and display printer take no per-language code: - es (424 names), de (403), pt-BR (412), ru (459), each entry with its source; Microsoft's localized pages are machine-translated, so a name needs two agreeing signals - local error literals (#WERT!, #Н/Д, #¡VALOR!), longest match wins - local table specifiers ([#Kopfzeilen], [#Эта строка]) and separators inside [] - German `.` between array columns; Russian `:` between array rows (no row ranges inside braces), merged with upstream trim references (A1.:.F10, 1.:3) - LET/LAMBDA bindings and workbook names shadow local names case-insensitively in any script - editor autocomplete and argument hints take Unicode names; Insert Function searches and sorts by the local name; help shows the local name with local separators - Czech and French interfaces keep English formulas until they get a table Files, clipboard, engine commands, CLI and MCP keep canonical English syntax.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main's Backstage Recent list added ten reference keys (Modified, Not
available, Just now, Yesterday and the {n} … ago forms).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reference key main added; the catalog test requires it in Polish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
storytold#443 was rebased onto main and now spells a function passed by name (BYROW(…;SOMA), GROUPBY(…;SUMME)) in the formula language. This keeps the Polish dialect next to it (enum, ALL, dialect lookup, tests), takes the new argument translation, and adds Polish cases for it (WIERSZAMI(…;SUMA), GRUPUJ.WEDŁUG(…;SUMA)). The calc test both sides carried is kept once.
|
I cross-checked the 429 names in
Both are recent functions whose names Microsoft may have changed between the web and desktop builds, so the observation in Excel for the web might simply differ from the current desktop release. Not blocking, just flagging it for whoever can check against a desktop Excel 365 in Polish. For what it's worth, the Polish names Microsoft documents for functions the engine doesn't have yet (WEŹDANETABELI, DANE.CZASU.RZECZ, OBRAZ, HISTORIA.AKCJI, PRZETŁUMACZ, WYKRYJJĘZYK, WYWOŁAJ, REJESTR.KOD) are correctly left out, given |
Microsoft's pl-pl pages name PERCENTOF PROCENT and MAP MAPUJ. Observed again in Excel for the web (excel.cloud.microsoft) with a Polish interface: ODSETEK, MAP and BYCOL calculate, and PROCENT, MAPUJ and KOLUMNAMI are not functions there.
|
@yrrh thanks for going through all 429 names against the pl-pl pages. That is a useful independent check. I rechecked the flagged entries today in Excel for the web (excel.cloud.microsoft) with a Polish interface, in a fresh workbook. Excel confirms the table:
So for these three the pl-pl pages disagree with what Excel for the web accepts, and the table follows Excel. Your point about desktop builds still stands: I can't check a desktop Excel 365 in Polish. If someone can, a desktop/web difference would be worth knowing. a71220c records the recheck in the header of The table itself comes only from observing Excel with |
Keeps both changes to function-parity.md's status line and both progress-log rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing in favour of #1678. @quantmind-br thanks for the heads-up and for the offer. #443, which this was built on, is closed and split, and moving this branch onto #1522 would mean a rebase and force-push of a branch with an open PR, which I avoid. So I started clean: #1678 is cut from The review here (@yrrh's comparison with the pl-pl pages and my recheck of ODSETEK, MAP and BYCOL in Excel) stays as the record behind the table; the header of |
Summary
Polish formula entry and display, as a dialect for the formula languages from #443. With the interface in Polski,
=JEŻELI(PRAWDA;SUMA(1,5;2,25);#N/D)and=suma.jeżeli(A1:A3;">1")work as typed, and files keep canonical English formulas.crates/formula/src/input/pl.rs: aDialectwith 429 function names,;arguments, decimal comma,\and;in array constants,PRAWDA/FAŁSZ, the ten error values and the five structured-reference specifiers.FormulaLocale::PlinALLanddialect();Language::Pl => FormulaLocale::Plinformula_locale()(this also resolves the exhaustive-match trap between M12: formulas in German, Brazilian Portuguese, Russian and French, full Spanish table #443 and i18n: add Polish (pl) interface #650).Where the words come from
Question 1 in #430 (which sources are acceptable) is still open for the maintainers, so here is exactly what was done:
_xlfn.), andFORMULATEXTshowed how Polish Excel displays it. This gave all 514 functions: 429 with a Polish name, 85 that keep the English one.=SUMA(1;2),=1,5+1,{1\2\3},{1;2;3}), booleans, the errors#ZERO!,#DZIEL/0!,#ARG!,#ADR!,#NAZWA?,#LICZBA!,#N/D,#OBL!,#ROZLANIE!, and the specifiers#Wszystko,#Dane,#Nagłówki,#Sumy.#POBIERANIE_DANYCHand#Ten wiersz(Excel shows the@short form).Two things the observation showed that the help pages get wrong or leave open:
#N/D, while the pl-pl ERROR.TYPE page prints#N/D!.LAMBDA,LET,MAP,REDUCE,SCAN,MAKEARRAYandBYCOLin English while translatingBYROWasWIERSZAMI. The table follows what Excel does.JIS,EUROCONVERTandADD2are unknown to Excel for the web and keep their English names.I am a native Polish speaker. The table was built with Claude (AI agent) from the observations above; no second native speaker has reviewed it yet.
Tests
crates/formula/tests/localized_input.rs:PlinLOCALIZED. New Polish entry/display cases cover IF/VLOOKUP/#N/D, arrays with\, a table specifier with;, IFERROR/XLOOKUP andILE.WIERSZY(Tabela1[#Wszystko]), plus lower-casesuma.jeżeli/fałsz/złącz.tekst. The round-trip and table checks pick upPlthroughFormulaLocale::ALL.crates/calc:formula_language_tables_only_name_functions_the_engine_knowspasses with the Polish table.crates/ui-egui/tests/formula_locale.rs: the i18n: add Polish (pl) interface #650 test that pinned Polish to canonical English is nowpolish_interface_enters_and_shows_polish_formulas.Ran locally on Rust 1.95.0:
cargo test -p gridcraft-formulapasses.cargo test -p gridcraft-ui-egui --test formula_locale --test interactionpasses (11 + 25).cargo fmt --all --checkandcargo clippy -p gridcraft-formula --all-targets -- -D warningsare clean.cargo test -p gridcraft-ui-egui --libhas one failure that is already onmain:missing French: Different First Page(fix(i18n): French labels name unrelated actions and omit two required translations #529).I did not run the full
cargo xtask ci.Not in this PR
docs/formula-input.md,docs/localization-parity.mdandROADMAP.mdstill describe Polish formulas as English. I'll update them once the base PRs settle, to avoid three-way doc conflicts.