Repository navigation
German formulas, numbers and dates as Excel 365 de-DE shows them (builds on #443) - #1201
Open
Herr-Enklo wants to merge 7 commits into
Open
Herr-Enklo wants to merge 7 commits into
Herr-Enklo wants to merge 7 commits into
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.
Every German word in crates/formula/src/input/de.rs was observed in Excel 365 (German interface, de-DE regional format) on 2026-10-13 through its automation interface: each of GridCraft's 514 functions, plus GETPIVOTDATA, IMAGE, TRANSLATE and DETECTLANGUAGE, was entered in canonical form and read back as German Excel shows it. That confirmed 402 of storytold#443's names, corrected MAP (it stays MAP; storytold#443 had ZUORDNEN) and added the 17 it was missing (PROGNOSE.ETS*, UNREGER.KURS and the other ODD* functions, PROZENTVON, ABSCHNBEREICH, the REGEX functions, PIVOTDATENZUORDNEN, BILD, ÜBERSETZEN, SPRACHEERKENNEN). 99 functions keep their English name. The observation also settled the error values: German Excel shows #CALC! (not #KALK! as Microsoft's help pages say) for =LAMBDA(x;x) and an empty FILTER, and #ÜBERLAUF! for a blocked spill. [#Diese Zeile] is accepted when typed and shown as @, including for a column range, so the parser and printer now read and write [@[A]:[B]] as Excel does (files keep [[#This Row],[A]:[B]]). crates/formula/tests/german_observed.rs holds the 518 observed pairs plus separators, booleans, errors, arrays and table specifiers, and checks both directions: canonical -> German equals Excel's text, and Excel's text reads back as the formula. A fuzz test feeds random German fragments to the parser and printer. The calc test that every table names a known function allows the four Excel functions GridCraft doesn't compute yet, and fails once one of them is implemented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
numfmt was en-US only. A small NumberLocale (crates/core/src/locale.rs) now travels from the interface to where values are drawn or typed: a Region with its fixed conventions (date order and separator, month and weekday names, how built-in formats look) plus the decimal and thousands separators, which the user may override. de-DE was observed in Excel 365 with the German regional format on 2026-10-13 through its automation interface (typed entries read back with value and automatic format; values drawn through each format code); every other region stays en-US until observed. - numfmt: format_value_in draws `1.234,56`, `1234,56` (General), `13.10.2026` for id 14, `13. Okt 26`, `Okt 26`, `hh:mm` (ids 15-17, 20-22), German month and day names (`Mrz`, `Di`), `/` in date codes as the region's date separator, `[$-409]`/`[$-407]` tags choosing the names, and the system Long Date/Time tags. Codes stay canonical, TEXT() stays en-US, format_value is unchanged. - core: parse_input_in reads `1,5`, `1.234,5`, `-3,2%`, `1,5E+3`, `5 €`, `13.10.2026`, `13.10.26`, `13.10` (this year), `1.13` (January 2013), `13. Okt 2026`, `Okt 26`, `13.10.2026 14:30` as German Excel does, and keeps `13.10.`, `1.00`, `$5` as text. - engine: DisplayLocale (number locale + formula language) with format_in, value_text_in, cell_text_in, edit_text_in and formula_text_in; Session.display_locale (set by the interface, canonical for CLI/MCP) is what PDF/print and Save As CSV/TSV/Web Page use, so a print shows what the grid shows. cell.set and range.fill take an optional autoFormat: the interface parses German input itself and enters the canonical value with the format German typing picks. - CSV: in a session whose decimal separator is a comma, a new CSV is separated by `;` (Excel's list separator there), values are written as displayed (`1234,5;WAHR`), and opening prefers `;` and reads German numbers, dates, booleans and errors. A comma-separated file is read as en-US whoever opens it; workbooks never change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read With the interface in German, everything a person types or reads follows German Excel, while engine commands, files, CLI and MCP stay canonical. - Cells, the formula bar, the editor's starting text, the status bar, number-format previews, Ctrl+; / Ctrl+Shift+; and the Page Layout and print previews show values in the regional format (`1.234,56`, `13.10.2026`) and booleans and errors in the formula language (`WAHR`, `#NV`, `#ÜBERLAUF!`). - Typed constants are read with the regional format (crates/core parse_input_in) and entered through cell.set/range.fill with their canonical value and automatic format (autoFormat). `WAHR` and `#NV` are values; `TRUE`, `#N/A`, `10/13/2026` and `13.10.` stay text, as observed in German Excel. Spanish, Portuguese and Russian keep storytold#443's decimal-comma entry and en-US display. - Dialog fields that hold formulas or typed values speak the formula language: Name Manager's Refers to (and its list), data validation sources (`Ja;Nein`), bounds (`1,5`) and custom formulas, conditional-format values and formulas, calculated fields. OK and the control channel's ui.dialog.confirm convert them to canonical. - File › Options gets an Advanced section with "Use system separators" ("Trennzeichen vom Betriebssystem übernehmen") and the Decimal/Thousands separator fields (options.separators), kept in ui.json, never in a workbook. "System" is the interface language's regional format, which follows the system on first run. - Every engine command run from the interface carries the display locale, so Save As CSV and PDF from a German window are German, and the same commands from the CLI are not. Tests: crates/ui-egui/tests/german_interface.rs (typing, re-editing, English unchanged, separators option and its persistence, CSV, dialogs, the Options page in German) and regional.rs unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/formula-input.md describes where the formula language now applies (dialog fields, cell booleans and errors), the new Numbers and dates section (regional format, Use system separators, built-in date formats, print/PDF and CSV) and what is not localized yet; German's words are documented as observed in Excel 365 de-DE. localization-parity.md, function-parity.md, decisions.md, README and ROADMAP are updated with their Last updated lines and history rows. Random German-looking input is fuzzed through parse_input_in and format_value_in (with multi-byte separators); the Options page's Editing heading gets its German label. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lish
A data table's TABLE formula (Data › What-If Analysis › Data Table) was observed in the
hidden German Excel: `Range.Table` gives `{=MEHRFACHOPERATION(B1;B2)}` and, with one input,
`MEHRFACHOPERATION(;B1)`. The German table lists it, so interfaces that show TABLE through
the formula language spell it as German Excel does; both forms are checked in
german_observed.rs. The calc test now allows Excel's names GridCraft doesn't compute as
functions (GETPIVOTDATA, IMAGE, TRANSLATE, DETECTLANGUAGE, TABLE) without failing when a
branch starts computing one.
- File › Options › Advanced: a character typed into the Decimal or Thousands separator
field replaces the one in effect (the field used to need clearing first).
- The editor keeps en-US numbers and dates for formula languages without an observed
regional format (Spanish, Portuguese, Russian) and only shows their words.
- German Export page text: CSV is "durch Trennzeichen getrennt", not "durch Kommas".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Builds on #443 by @quantmind-br (the formula dialect mechanism; its commit is kept as-is) and makes German match a running German Excel: formulas, cell values, numbers and dates.
Observed, not looked up
Every German word was observed black-box. I used Excel 365 with a German UI and the de-DE regional format, through its automation interface: a canonical formula in,
Formula2Localout, on synthetic workbooks that were never saved.What was observed:
TABLEThe file header documents this the way #674 does.
What it changed in #443's German table:
MAPin German Excel; M12: formulas in German, Brazilian Portuguese, Russian and French, full Spanish table #443 hadZUORDNEN.#KALK!. Both=LAMBDA(x;x)and an empty FILTER display#CALC!.MEHRFACHOPERATION:{=MEHRFACHOPERATION(B1;B2)}.#WERT!,#BEZUG!,#ZAHL!,#NV,#DATEN_ABRUFENand#ÜBERLAUF!are confirmed.#Alle,#Daten,#Kopfzeilen,#Ergebnisse.[#Diese Zeile]is accepted when typed and shown as@.[@[A]:[B]]now parses and prints; Excel shows it, and GridCraft couldn't parse it at all. Files keep the long form.crates/formula/tests/german_observed.rschecks all 519 observed pairs in both directions.Formula words on more surfaces
Ja;Nein, bounds such as1,5, custom formulas), conditional-format values and formulas, calculated fields.TRUE,#N/Aand10/13/2026become text.German numbers and dates
NumberLocalein core (L0) holds the region's data, observed for de-DE. It drives display (numfmtformat_value_in) and typed input (coreparse_input_in).1.234,5613.10.2026,01.03.2026 14:30,Dienstag, 13. Oktober 20261,5,1.234,5,-3,2%,1,5E+3,5 €,13.10.2026,13.10.26,13.10,13. Okt 2026,14:30, each with Excel's automatic format.cell.set {autoFormat}.;and German values; comma-separated files are still read as en-US.Canonical boundary
Workbooks, format codes, TEXT(), the clipboard, engine commands, the CLI and MCP all stay canonical en-US/English. English sessions are unchanged; tests check that.
Behaviour change to note
With the dialect mechanism, Spanish, Portuguese and Russian sessions now also show their dialect's booleans and errors in cells, and typed English
TRUEbecomes text there, as in those Excels.Not included
#.##0,00,TT.MM.JJJJ).$.Tests
engine/tests/german_locale.rs.cargo xtask ci: all 8 steps pass (1635 tests).🤖 Generated with Claude Code