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.
Every label of the reference table (381) in the names Italian Excel users know; it-IT, it-CH and it_IT.UTF-8 system locales pick Italian. Formulas and number formats stay en-US until an Italian formula locale exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/localization-parity.md
…ecifiers An Italian dialect for the formula languages from storytold#443: 455 function names, `;` arguments, decimal comma, `\` between array columns and `.` between rows, VERO/FALSO, the ten error values and the five structured-reference specifiers. The Italian interface now enters and shows Italian formulas. The lexer now ends an array row at the language's row separator even when it is a word character (`.` in Italian: `{1\2.3\4}`). Names come from knowledge of Italian Excel; the array separators and the ERRORE.TIPO errors cite Microsoft it-it pages. Sources and what is not yet observed are listed in crates/formula/src/input/it.rs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I checked this table against a running Italian Excel: it matches Excel for 448 of its 455 names. Seven differ, and nine functions that change name in Italian are missing (the ones you kept English "until their Italian spelling is observed"). How: Microsoft 365 Excel for Windows with the Italian interface and the it-IT regional format, black-box. In a new, never-saved workbook a VBA macro set each formula in English through
Note the trailing dot in Also observed: All 514 observed names (canonical → Italian)
Happy to help with a follow-up commit if useful. |
The 422-alias table was a translation of the English names rather than the names Italian Excel uses: 195 of them differed (`ABS` is `ASS`, `COLUMN` is `RIF.COLONNA`, `CHAR` is `CODICE.CARATT`, `CLEAN` is `LIBERA`, `DEVSQ` is `DEV.Q`), and 83 renamed functions were missing altogether, so `=ASS(...)` and `=RIF.COLONNA(...)` were rejected while `=VAL.ABS(...)` was accepted. The table is rebuilt from names read back from a running Italian Excel (Microsoft 365, it-IT, black box: each English name set through `Range.Formula2` and read back through `Range.Formula2Local`, all 514 catalog functions resolved) and cross-checked against the table in storytold#714: 464 aliases. The 41 names Excel keeps in English (`MAX`, `MIN`, `INT`, `MAP`, `MAKEARRAY`, `XOR`, `CONCAT`, `ISOMITTED`, `EUROCONVERT`…) are no longer translated, and two names Excel spells with a trailing dot (`SE.NON.DISP.`, `INTERVALLO.DISTRIB.BINOM.N.`) are kept as typed. Tests cover the names Excel shows, the newer families the table lacked, the names that stay English, the trailing-dot round-trip, and a unit test that rejects an alias repeating its English name or claimed by two functions.
The 422-alias table was a translation of the English names rather than the names Italian Excel uses: 195 of them differed (`ABS` is `ASS`, `COLUMN` is `RIF.COLONNA`, `CHAR` is `CODICE.CARATT`, `CLEAN` is `LIBERA`, `DEVSQ` is `DEV.Q`), and 83 renamed functions were missing altogether, so `=ASS(...)` and `=RIF.COLONNA(...)` were rejected while `=VAL.ABS(...)` was accepted. The table is rebuilt from names read back from a running Italian Excel (Microsoft 365, it-IT, black box: each English name set through `Range.Formula2` and read back through `Range.Formula2Local`, all 514 catalog functions resolved) and cross-checked against the table in storytold#714: 464 aliases. The 41 names Excel keeps in English (`MAX`, `MIN`, `INT`, `MAP`, `MAKEARRAY`, `XOR`, `CONCAT`, `ISOMITTED`, `EUROCONVERT`…) are no longer translated, and two names Excel spells with a trailing dot (`SE.NON.DISP.`, `INTERVALLO.DISTRIB.BINOM.N.`) are kept as typed. Tests cover the names Excel shows, the newer families the table lacked, the names that stay English, the trailing-dot round-trip, and a unit test that rejects an alias repeating its English name or claimed by two functions.
Summary
Italian formula entry and display, as a dialect for the formula languages from #443. With the interface in Italiano,
=SE(VERO;SOMMA(1,5;2,25);#N/D),=somma.più.se(A1:A3;B1:B3;">1")and=SOMMA({1\2.3\4})work as typed. Files keep canonical English formulas.crates/formula/src/input/it.rs: aDialectwith:;between arguments and,as the decimal separator;\between array columns and.between rows;VERO/FALSO, the ten error values and the five structured-reference specifiers.FormulaLocale::ItinALLanddialect(), andLanguage::It => FormulaLocale::It.., so before this{1\2.3\4}lexed.3as a word. The new arm runs before the trim-reference.arm and only inside braces. Word scanning inside braces also stops at the row separator. Other languages behave as before: their row separators (;,:) are not word characters, and the existing tests are unchanged.formula-input.md(Italian column),localization-parity.md,ROADMAP.md.Where the words come from
Question 1 in #430 (which sources are acceptable) is still open, so here is exactly what was done:
={1\2\3\4.5\6\7\8.9\10\11\12}, a 3×4 constant. An accepted answer on Microsoft Q&A (it-it) says Italian Excel uses={1\2\3\4\5}for horizontal,={1.2.3.4.5}for vertical, and rejects;inside braces. Both sources agree, but this has not been observed in a current Italian Excel.#NULLO!,#DIV/0!,#VALORE!,#RIF!,#NOME?,#NUM!,#N/Dand#ESTRAZIONE_DATI_IN_CORSOcome from the it-it ERRORE.TIPO page.#ESPANSIONE!and#CALC!are not from a Microsoft page.#Tutti,#Dati,#Intestazioni,#Totali,#Questa riga): written from knowledge of Italian Excel with Claude (AI agent). The it-it structured-references page keeps the English specifiers in its examples, so they are not confirmed by Microsoft.Not observed yet in a licensed Italian Excel: the function names one by one, the table specifiers and
#ESPANSIONE!. If someone with Italian Excel can run theFORMULATEXTcheck described in #674, corrections are one-line edits.Tests
crates/formula/tests/localized_input.rs:ItinLOCALIZED. New Italian cases cover:\and., including decimal commas inside an array;;;RIGHE(Tabella1[#Tutti]), E/O/NON;SE.NON.DISP.with its trailing dot, and MATR.SOMMA.PRODOTTO next to MAX, which stays English;somma.più.seand{vero.falso}.The round-trip check picks up
ItthroughFormulaLocale::ALL.crates/calc:formula_language_tables_only_name_functions_the_engine_knowspasses with the Italian table.crates/ui-egui/tests/formula_locale.rs: the fallback test from i18n: add Italian (it) interface #713 becomesitalian_interface_enters_and_shows_italian_formulas.Ran locally (Rust 1.99):
cargo fmt --all --check,cargo xtask assets,cargo xtask layersandcargo xtask wasmpass.cargo test --workspace: everything passes except the three failures already onmain(FrenchDifferent First Pagefix(i18n): French labels name unrelated actions and omit two required translations #529; the two semicolon-CSV save tests).Not in this PR
🤖 Generated with Claude Code