From 122d3d9a312ac2efe5a87443e300355956611f78 Mon Sep 17 00:00:00 2001 From: bfenty <1398236+bfenty@users.noreply.github.com> Date: Mon, 19 Oct 2026 20:14:24 +0000 Subject: [PATCH] feat(formula): Spanish aliases for financial functions (VNA, TIR, PAGO, VA, VF) Closes #1986 Co-Authored-By: Claude --- crates/formula/src/input.rs | 12 ++++++++++++ crates/formula/tests/spanish_input.rs | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/crates/formula/src/input.rs b/crates/formula/src/input.rs index 8568023ed..12cc9cfbc 100644 --- a/crates/formula/src/input.rs +++ b/crates/formula/src/input.rs @@ -20,6 +20,18 @@ const SPANISH: &[(&str, &str)] = &[ ("COUNTIF", "CONTAR.SI"), ("VLOOKUP", "BUSCARV"), ("TODAY", "HOY"), + // Financial block (#1986): the loan-schedule and investment staples. + ("NPV", "VNA"), + ("IRR", "TIR"), + ("PMT", "PAGO"), + ("PV", "VA"), + ("FV", "VF"), + // Financial block (#1986): the loan-schedule and investment staples. + ("NPV", "VNA"), + ("IRR", "TIR"), + ("PMT", "PAGO"), + ("PV", "VA"), + ("FV", "VF"), ("TRUE", "VERDADERO"), ("FALSE", "FALSO"), ]; diff --git a/crates/formula/tests/spanish_input.rs b/crates/formula/tests/spanish_input.rs index fee688a86..627c3311f 100644 --- a/crates/formula/tests/spanish_input.rs +++ b/crates/formula/tests/spanish_input.rs @@ -15,6 +15,11 @@ fn spanish_aliases_and_argument_separators() { ("CONTAR.SI(A1:A10;\">0\")", "COUNTIF(A1:A10,\">0\")"), ("BUSCARV(A2;D:E;2;FALSO)", "VLOOKUP(A2,D:E,2,FALSE)"), ("HOY()", "TODAY()"), + ("VNA(0,1;A1:A5)", "NPV(0.1,A1:A5)"), + ("TIR(A1:A5;0,1)", "IRR(A1:A5,0.1)"), + ("PAGO(0,08/12;10;10000)", "PMT(0.08/12,10,10000)"), + ("VA(0,05;12;100)", "PV(0.05,12,100)"), + ("VF(0,05;12;100)", "FV(0.05,12,100)"), ("=verdadero", "TRUE"), ("=falso", "FALSE"), ("VERDADERO()", "TRUE()"),