Repository navigation
Support common Spanish formula names and semicolon arguments - #98
Conversation
|
Thank you — the parsing is careful (bounded recursion, names/LET bindings take precedence). Before merging we need to settle the localisation design: a hard-coded Spanish-only alias table that is always on (and If you haven't already, please come join us on Discord: https://discord.gg/artcraft — happy to talk any of this through there. |
1af65a9 to
753df37
Compare
753df37 to
ada33d1
Compare
|
Landed — thank you, Harrison! This rework is exactly what we were hoping for: Spanish names and I added a small maintainer fix-up on top (your branch doesn't allow maintainer edits, so it went straight onto main): English formula display now returns the stored text untouched rather than re-printing it every frame, Spanish formula detection no longer trims leading spaces (matching the engine's If you haven't already, please come join us on Discord: https://discord.gg/artcraft |
Fixes #45.
Selecting Español in View → Interface language controls formula entry, display, autocomplete and argument hints. Spanish mode uses the supported function table, semicolon arguments, decimal commas and backslash array columns;
=SI(VERDADERO;SUMA(1,5;2,25);0)is stored asIF(TRUE,SUM(1.5,2.25),0). English mode retains English names and separators.This uses the existing persisted
UiState.language. The formula bar, cell editor, Show Formulas, Insert Function and Formula ribbon follow that setting. Canonical engine edit templates, including AutoSum and incomplete function openings, are localized when they reach the editor; typed input is not translated twice. Defined/table names and LET/LAMBDA bindings retain precedence. Engine/API/CLI, clipboard exchange and XLSX syntax remain canonical English.Rebased directly onto main
e72e16a0eccc5b8354945e0c1e9b848dda1d9299after #31, #104 and #82 merged. There is no remaining dependency stack. Upstream Portuguese translations, contextual labels, lenient saved preferences, language-command aliases and other UI changes are retained. Ten common Spanish mappings form the initial function table; other functions and formula locales retain their documented English fallback.Validation:
=SUM(instead of=SUMA() and Portuguese fallback/persistence coverage. Existing tests cover names, decimal/array separators, text cells, autocomplete and actual XLSX save/reopen.cargo check --locked -p gridcraft,cargo xtask wasm, formatting, assets (34), layers (16) and diff checks pass.cargo xtask cistops at unchangedxlsx/src/sheet_read.rs:146(collapsible_match). Scoped formula/UI Clippy stops at unchangedui-egui/src/grid.rs:1657(collapsible_match) and:1779(overly_complex_bool_expr). The flagged code was compared against the base main commit; no findings originate in this patch.Rendered GridCraft view from the offscreen UI test: