Repository navigation
M12: formulas in German, Brazilian Portuguese, Russian and French, full Spanish table - #443
quantmind-br wants to merge 7 commits into
Conversation
a1256e5 to
bff1dda
Compare
…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>
f1afeb1 to
5688046
Compare
5688046 to
dda1ed0
Compare
|
Rebased onto |
dda1ed0 to
2df0039
Compare
2df0039 to
dece6ee
Compare
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.
…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.
dece6ee to
f962984
Compare
Français selects French formula syntax: 398 local function names from Microsoft's fr-fr function pages (two agreeing signals per entry, 35 reviewed by hand), VRAI/FAUX, French errors and table specifiers, ';' between arguments and array rows, ',' decimals and '.' between array columns. Separators, SOMME, TEXTE, AUJOURDHUI, LIGNES, #VALEUR! and four specifiers were observed in French Excel 2013 (storytold#191).
French Excel 2024 gives #NOM? for NBCARB, CHERCHEB and TROUVEB, the names that were inferred from the base name + B pattern (storytold#191). The French names are LENB (unchanged), CHERCHERB and TROUVERB, as in Microsoft's French text-function reference, perfectxl and auditexcel. Adds the functions added after the table was collected: the four ODD* bond functions (PRIX/REND.PCOUPON/DCOUPON.IRREG) and the four PREVISION.ETS* functions, each from the Microsoft fr-fr page and ledojo. PERCENTOF and TRIMRANGE keep English: the two sources disagree.
…ables Name the functions the four tables were missing, each from a Microsoft page plus an independent reference (excel-translator, perfectxl, native tutorials and user formulas); where they disagree the function keeps its English name. - de (413): UNREGER.KURS/REND, UNREGLE.KURS/REND, PROGNOSE.ETS*, PROZENTVON, ABSCHNBEREICH. - es (434): PRECIO.PER.IRREGULAR.1/2, RENDTO.PER.IRREGULAR.1/2, PRONOSTICO.ETS, .CONFINT, .ESTACIONALIDAD, PORCENTAJEDE, RECORTAR.RANGO, TEXTOBAHT. FORECAST.ETS.STAT stays English (Microsoft's page gives both ESTADISTICA and STAT). - pt-BR (420): PREÇOPRIMINC, LUCROPRIMINC, PREÇOÚLTINC, LUCROÚLTINC, PREVISÃO.ETS*, PORCENTAGEMDE, CONVERTEREURO. REGEXTEST and REGEXREPLACE stay English, as in Brazilian Excel, and REPLACEB is SUBSTITUIRB, not the pattern-guessed MUDARB. - ru (471): ЦЕНАПЕРВНЕРЕГ, ДОХОДПЕРВНЕРЕГ, ЦЕНАПОСЛНЕРЕГ, ДОХОДПОСЛНЕРЕГ, ПРЕДСКАЗ.ETS*, ПРОЦЕНТ, УРЕЗДИАПАЗОН, ДОЛЛСША, БАТТЕКСТ. FORECAST.ETS.CONFINT keeps the Cyrillic Е Excel spells it with. The remaining pattern-derived byte-function names (FINDENB, ERSETZENB, PROCURARB, EXT.TEXTOB, ENCONTRARB) now cite two sources. The table test types and shows every name back.
|
Hi! I completed all 13 retests in Excel 2024, using A1:A6 containing the values 1 through 6. All 13 tests passed and returned the expected results:
Regarding my environment:
These results suggest that the earlier formula-entry errors were caused by the array-constant syntax rather than incorrect French function names. The retests using cell ranges and commas worked as expected. I hope this helps with the French formula table in #443. Thanks again for your work! |
RedDevilMan retested 13 French names in French Excel 2024 (storytold#443): PRENDRE, EXCLURE, ETENDRE, DANSCOL, ORGA.COLS, CENTILE.EXCLURE, PREVISION.LINEAIRE, FILTRE, RECHERCHEX, TROUVERB, CHERCHERB, LENB and URLENCODAGE all work. Record them in fr.rs and the French tests, with the separators that Excel took from its Windows region.
French Excel 2024 with the Windows regional format English (Europe) takes =CENTILE.EXCLURE(A1:A6,0.5): the separators come from the region, the names from the interface (storytold#443).
|
@RedDevilMan thank you, that settles both questions. Names. All 13 pass. With the 13 from your first run, 26 French names are now confirmed in Excel 2024, including the three corrected ones ( Separators. Your settings explain the earlier syntax errors. With "Use system separators" on and the "English (Europe)" regional format, Excel takes GridCraft does that in #1398: the function names follow the interface language and the separators follow File › Options › Regional format. In #443 alone they still follow the language, as Spanish does on |
|
Hi! I'm happy to help with further testing of the French localization if needed. I've completed the Excel 2024 formula tests and would be glad to test more functions, regional formats, or compare GridCraft's behavior against Excel to help get the French support ready. Is there anything else you'd like me to test or verify? |
|
@RedDevilMan yes, two short batches would help, both in your Excel 2024 with your current settings. 1. The last marked names nobody has checked. Put
2. TEXT format codes. In your Excel 2013,
For 10–13 the exact text shown matters more than pass/fail. |
|
Hi! I completed both test batches in Excel 2024 with my current settings. 1. Remaining marked function names All nine tests passed:
2. TEXT format codes Here are the exact results from Excel 2024:
My Excel interface is French, but Windows uses English (United States) as its display language and English (Europe) as its regional format. Excel's “Use system separators” option is enabled, with The results suggest that the TEXT format codes may follow different rules from the localized function names. The last result is unexpected to me, so I am reporting it exactly as displayed. |
RedDevilMan checked ESTVIDE, ESTERR, ESTERREUR, ESTLOGIQUE, ESTNA, ESTNONTEXTE, NON, ORGA.LIGNES and BDLIRE in French Excel 2024 (storytold#443): all work. Record them, and that TEXTE format codes followed that Excel's English region (dd/mm/yyyy works, jj/mm/aaaa is #VALEUR!).
|
@RedDevilMan thanks, both batches answer what I needed. Names. All nine pass. Every name I marked as uncertain in the #191 list has now been checked in your Excel, except the three TEXT format codes. Your results show that the codes follow the Windows region, not the interface language. Your 2013 machine (French separators) wanted So GridCraft should eventually tie TEXT codes to the Regional format, like the separators in #1398, not to the formula language. Today it accepts only the English codes in every region. That matches your 2024 setup, but not a French region. I noted this in the #1398 docs. It's separate work and not part of these PRs. If your 2013 machine is still around, one result would confirm the number side: |
French Excel 2024 with an English regional format takes dd/mm/yyyy and refuses jj/mm/aaaa, which French Excel 2013 with a French region needed (storytold#191, storytold#443). Note it next to the separators; GridCraft's codes stay English in every region.
|
Just to clarify, Excel 2013 is on my work computer at the company. Windows is in French there, but I'm not sure which regional settings the company has configured. I may be able to check them later. Excel 2024 is on my personal computer at home, where I have full control over the language and regional settings. If useful, I can change these settings, test different combinations of Windows regional settings and Excel languages, or even try different Excel versions and configurations. So if you need any additional tests to help verify GridCraft's compatibility across different locales or Excel versions, feel free to let me know. I'm happy to help. |
|
@RedDevilMan thanks, that's very useful. Since your 2024 machine is yours, one switch would settle the rest: the same Excel with a French region. Please set Windows › Time & language › Region › Regional format to French (France), keep "Use system separators" on in Excel, restart Excel, and try:
Tests 1–3 check the separators GridCraft uses for a French interface with a French region; test 2 is the array-column test that couldn't run with a |
|
I switched Windows Regional format to French (France), kept Excel's interface language unchanged, left "Use system separators" enabled, and restarted Excel. All six tests matched the expected results:
All results matched the expected values. This confirms that, on my Excel 2024 installation, changing the Windows regional format to French (France) was enough to change both formula separator behavior and the accepted I've finished the tests and can switch the regional format back now. |
RedDevilMan switched only the Windows regional format of his French Excel 2024 to French (France) (storytold#443): =SOMME(1,5;2) is 3,5, =COLONNES({1.2.3}) is 3, confirming . between array columns, and TEXTE takes jj/mm/aaaa and refuses dd/mm/yyyy.
The same French Excel 2024 takes the English separators and TEXT codes with an English regional format and the French ones with French (France), with nothing else changed (storytold#443).
|
@RedDevilMan perfect, thank you. Yes, switch it back. That A/B is the cleanest evidence we have: on one Excel, with only the Windows regional format changed, the argument and decimal separators, the That covers everything I needed for French. Thanks again for the careful testing. |
|
Closing in favour of smaller PRs: at +3.5k lines this one was hard to review in one go.
The function tables, lexer and parser are the same as here (I merged the five branches and compared). #1398 (separators from the regional format, draft) will be rebuilt on the new stack. |
Closes #367, closes #430. First of the focused PRs announced in #191: formula languages on top of main's
i18n.rsandFormulaLocale, the way Spanish works now.What changes
With the interface language set to Deutsch, Português (Brasil), Русский or Français, the cell editor, formula bar, Show Formulas, autocomplete, argument hints, the Formulas ribbon and Insert Function use that language's formula syntax. Spanish gets its full table (main has 10 names). Stored formulas, XLSX, clipboard, engine commands, CLI and MCP keep canonical English, as with Spanish today.
VERDADERO/FALSOWAHR/FALSCHVERDADEIRO/FALSOИСТИНА/ЛОЖЬVRAI/FAUX#¡VALOR!,#N/D#WERT!,#NV#VALOR!,#N/D#ЗНАЧ!,#Н/Д#VALEUR!,#NOM?;/,;/,;/,;/,;/,\/;./;\/;;/:./;[#Encabezados][#Kopfzeilen][#Cabeçalhos][#Заголовки][#En-têtes]=WENN(WAHR;SUMME({1.2;3,5.4});#NV)is stored asIF(TRUE,SUM({1,2;3.5,4}),#N/A). Czech keeps English formulas until it has a table; Japanese, Chinese and Korean use English names, as their Excel does.How
Dialectincrates/formula/src/input/<lang>.rs(names, booleans, errors, table specifiers, separators). The lexer, parser and display printer read the dialect, so adding a language is one data file and oneFormulaLocalevariant. The hard-coded Spanish paths are replaced, not kept beside it.#N/Dvs#N/A), local specifiers and separators inside[...], German.between array columns, Russian:between array rows (no row ranges inside braces). Merged with main's trim references:ZEILEN(A1:.F10),СУММ(A:.A;{1;2:3;4})andLINS(A1.:.F10)round-trip.zählenwenn,сумм).Where the names come from
Microsoft's localized function pages are machine-translated and sometimes wrong (e.g. untranslated or mixed names in examples). So each name needs two agreeing signals on its page: title, meta description, the syntax paragraph aligned with the en-US page, and
=NAME(examples. Entries markedreviewedwere decided by hand against independent function-name references. Booleans, errors and table specifiers cite their sources per item in each file's header. A French user checked the French separators,SOMME,TEXTE,AUJOURDHUI,LIGNES,#VALEUR!and four table specifiers in Excel 2013 (#191, comment), and 16 more names in Excel 2024 (comment): three byte-function names guessed from a pattern were#NOM?and are fixed (LENB,CHERCHERB,TROUVERB); a retest of 13 more in the same Excel all passed (PRENDRE,FILTRE,RECHERCHEX,CENTILE.EXCLURE,URLENCODAGEand the three corrected names; comment), and so did the last nine marked names (ESTVIDE,NON,ORGA.LIGNES,BDLIRE…; comment). Switching only the Windows regional format of that Excel from English (Europe) to French (France) changed the separators to;,,and.between array columns (=COLONNES({1.2.3})= 3), and the TEXT codes fromdd/mm/yyyytojj/mm/aaaa(comment); this PR uses the French-region separators, #1398 makes them follow the region. His observations are tests. Nothing else was checked against a running localized Excel or by native speakers. A correction is a one-line edit with a source.Functions the tables were missing (the irregular-period bond functions,
FORECAST.ETS*,PERCENTOF,TRIMRANGE,BAHTTEXT,USDOLLAR,EUROCONVERT,ISOMITTED,JIS/DBCS) were then checked name by name in German, Spanish, Brazilian Portuguese and Russian against a Microsoft page plus an independent reference (excel-translator, perfectxl, native tutorials, user formulas); where they disagree the function keeps its English name (SpanishFORECAST.ETS.STAT, GermanDBCS). That pass also fixed Brazilian names no Brazilian source confirms:REGEXTEST/REGEXREPLACEstay English as in Brazilian Excel, andREPLACEBisSUBSTITUIRB(the earlierMUDARBwas a pattern guess, like the French ones #191 caught).Tests
crates/formula/tests/localized_input.rs:TRIM(MIRR) vsSUPPRESPACE(TRIM) is checked both ways;TRUE()/FALSE()spell like booleans, and every local name can be typed and is shown back (dots, digits, accents, mixed scripts);calc: every canonical name in every table is a function the engine knows (a typo would turn a local name into#NAME?).ui-egui:cargo xtask cilocally onaf114aa(79ec028after it only adds source comments) (upstreamd9d09f0, Release 0.7.0, only a version bump since84acf62): all 8 steps pass (fmt, clippy, test, assets, layers, wasm, parity, keytips), 1609 tests.Smoke on the release build through the control channel:
=summ, Tab,{1.2;3,5.4};wahr*1)gives=SUM({1,2;3.5,4},TRUE*1)= 11.5.=SUMME({1.2;3,5.4};WAHR*1)in German,=СУММ({1;2:3,5;4};ИСТИНА*1)in Russian,=SOMA({1\2;3,5\4};VERDADEIRO*1)in Portuguese, and canonically in English.cell.setthrough the API still takes=SUM(1.5,2.25)with a non-English interface.be5390d):=SOMME(1,5;2)= 3.5,=SOMME({1,2;3,4})= 4.6,=COLONNES({1.2.3})= 3,=TRIM({1000.-200.300};0,1;0,1)is stored asMIRR(…),=SUPPRESPACE(" a b ")asTRIM(…); each re-edits in French;=AUJOURDH+ Tab gives=AUJOURDHUI(; Insert Function findsSOMME,SOMME.SI,BDSOMME… for "SOMME".Follow-up, #1398 (draft, stacked on this and #447): Excel takes the argument and decimal separators from the regional settings, not the interface language. English Excel with a Croatian region accepts
=SUM(1;2)(#447), and the French Excel 2024 above takes,and.from its Windows regional format (English (Europe), system separators on) with the French interface. #1398 moves the separators onto the Regional format and keeps the names and array separators here. This PR is unchanged.