Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/mint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ API `https://mint-api.juw12.workers.dev/api/health`
formulas follow the renamed tabs.
- **Links pick the language (3.5.1).** Add `?lang=en|id|zh|es` to any Mint link (Budget, the marketplace, the
legal pages) and it opens in that language without changing the reader's saved choice.
- **Studio speaks your language all the way (3.5.3).** Replies no longer leave English bits behind: theme names
(`主题已设为午夜(深色)`, `Tema cambiado a Bosque`), column types (`teks`, `数字`, `fecha`) and card functions are
translated, and a dashboard card added by a command (`合计 数量`, `promedio de cantidad`) is labelled in the
template's own language (`数量合计`, `Promedio de cantidad`).
- **Templates in your language (3.5.2).** A prompt in Indonesian, Chinese or Spanish (`anggaran bulanan keluarga`,
`网店库存表,绿色`, `Inventario para mi tienda online`) now finds the right blueprint and fills it in that language:
title, column names, dropdowns, summary cards, highlight rules and sample rows. Columns are renamed through the
Expand Down
2 changes: 1 addition & 1 deletion apps/mint/desktop/mint.spec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import os
import sys

DESKTOP = os.path.dirname(os.path.abspath(SPEC)) # noqa: F821 (provided by PyInstaller)
VERSION = os.environ.get("MINT_VERSION", "3.5.2")
VERSION = os.environ.get("MINT_VERSION", "3.5.3")
VERSION_FILE = os.environ.get("MINT_VERSION_FILE") or None
ICON = os.environ.get("MINT_ICON") or None
IS_WIN = sys.platform == "win32"
Expand Down
2 changes: 1 addition & 1 deletion apps/mint/desktop/mint_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import urllib.request
import webbrowser

VERSION = "3.5.2"
VERSION = "3.5.3"
TITLE = "Mint"
APP_URL = os.environ.get("MINT_DESKTOP_URL") or "https://juw12.github.io/projects/mint/"
DEFAULT_SIZE = (1280, 860)
Expand Down
16 changes: 16 additions & 0 deletions apps/mint/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,17 @@ def seed_checks():
idBudget: [idBudget.sheet.columns[0].name, idBudget.sheet.columns[0].options[0]],
enInv: enInv.sheet.columns.map(function (c) { return c.name; }),
uiZh: uiZh.title,
// 3.5.3: the template remembers its language, so a card added by a tweak is labelled in it
specLang: [zhInv.lang, esInv.lang, enInv.lang || "en"],
zhCard: (function () {
var num = zhInv.sheet.columns.filter(function (c) { return c.type === "number" && !c.formula; })[0];
return [num.name, C.applyTweak(zhInv, "合计 " + num.name).spec.summary.slice(-1)[0].label,
C.applyTweak(zhInv, "average " + num.name).spec.summary.slice(-1)[0].label];
})(),
enCard: (function () {
var num = enInv.sheet.columns.filter(function (c) { return c.type === "number" && !c.formula; })[0];
return C.applyTweak(enInv, "total " + num.name).spec.summary.slice(-1)[0].label;
})(),
langs: [C.detectPromptLang("网店库存表"), C.detectPromptLang("Inventario para mi tienda"),
C.detectPromptLang("anggaran bulanan keluarga"), C.detectPromptLang("inventory tracker for my shop"),
C.detectPromptLang("budget")],
Expand Down Expand Up @@ -347,6 +358,11 @@ def js_checks():
check(tl["uiZh"] == "每月预算表", "unclear prompt follows the app language")
check(tl["langs"] == ["zh", "es", "id", "en", None], "prompt language detection")
check(tl["broken"] == [], "every blueprint computes the same in id/zh/es " + str(tl["broken"]))
check(tl["specLang"] == ["zh", "es", "en"], "templates remember their language " + str(tl["specLang"]))
zh_col, zh_total, zh_avg = tl["zhCard"]
check(zh_total == zh_col + "合计" and zh_avg == "平均" + zh_col,
"zh tweak cards are labelled in Chinese " + str(tl["zhCard"]))
check(tl["enCard"].startswith("Total "), "English tweak cards stay English " + tl["enCard"])

intl = out["tweaksIntl"]
check(intl["zhAdd"] == "供应商", "zh '添加供应商列' adds a column")
Expand Down
2 changes: 1 addition & 1 deletion apps/mint/web/budget/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(function (root) {
'use strict';
const K = (root.MintBudget = root.MintBudget || {});
K.VERSION = '3.5.2';
K.VERSION = '3.5.3';

/** Compare dotted versions numerically: 1, 0 or -1 ("1.10.0" is newer than "1.9.9"). */
K.compareVersions = function (a, b) {
Expand Down
2 changes: 1 addition & 1 deletion apps/mint/web/budget/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Mint Budget service worker: network-first app shell so updates land immediately, cache as offline fallback.
* Scope is budget/ only; Mint Templates (../app.html) has its own worker at ../sw.js. */
const CACHE = 'mint-budget-v17';
const CACHE = 'mint-budget-v18';
// Caches this worker owns: its own generations, plus the ones versions before Mint 3.0 left behind.
// Never touch other caches: every app on this origin shares one CacheStorage.
const OWN_CACHE = /^(mint-budget-v|kitty-v)/;
Expand Down
18 changes: 9 additions & 9 deletions apps/mint/web/budget/version.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
{
"version": "3.5.2",
"version": "3.5.3",
"released": "2026-11-09",
"notes": {
"en": [
"Templates Studio answers fully in your language: theme names, column types and the dashboard cards a command adds (like 数量合计 or Promedio de cantidad) no longer slip into English.",
"Templates come out in your language: a prompt in Indonesian, Chinese or Spanish gives column names, dropdowns, cards and sample rows in that language, with every formula still working.",
"Links can choose the language: add ?lang=es (or id, zh, en) and Budget, the marketplace and the legal pages open in it, without changing your saved choice.",
"Templates Studio understands Chinese and Spanish commands, like 添加供应商列 or añade la columna Proveedor.",
"Live prices in Invest: stocks and ETFs (IDX and US), crypto and gold update from the market. Tap Refresh prices any time; prices you type yourself stay until you refresh.",
"Mint asks your browser to keep its data, shows when you last backed up, and reminds you to sync or back up once a budget has real history.",
"Templates and the Marketplace now speak Chinese and Spanish too, and downloaded .xlsx files use your language for tabs and tips.",
"Privacy and Terms are available in Indonesian, Chinese and Spanish.",
"Desktop app: opens even without internet the very first time; budgets made offline move online on their own."
"Privacy and Terms are available in Indonesian, Chinese and Spanish."
],
"id": [
"Studio Template menjawab sepenuhnya dalam bahasamu: nama tema, jenis kolom, dan kartu dashboard yang ditambahkan lewat perintah tidak lagi muncul dalam bahasa Inggris.",
"Template kini keluar dalam bahasamu: perintah dalam Bahasa Indonesia, Mandarin, atau Spanyol menghasilkan nama kolom, pilihan, kartu, dan contoh baris dalam bahasa itu, dengan semua rumus tetap berjalan.",
"Tautan bisa memilih bahasa: tambahkan ?lang=id (atau en, zh, es) dan Budget, marketplace, serta halaman legal terbuka dalam bahasa itu tanpa mengubah pilihan tersimpanmu.",
"Studio Template kini memahami perintah berbahasa Mandarin dan Spanyol, seperti 添加供应商列 atau añade la columna Proveedor.",
"Harga live di Investasi: saham dan ETF (BEI dan AS), kripto, dan emas mengikuti pasar. Ketuk Perbarui harga kapan saja; harga yang kamu isi sendiri tetap sampai kamu memperbarui.",
"Mint meminta browser menyimpan datanya, menampilkan kapan terakhir kamu mencadangkan, dan mengingatkan untuk sinkron atau mencadangkan saat anggaran sudah berisi banyak riwayat.",
"Template dan Marketplace kini juga berbahasa Mandarin dan Spanyol, dan file .xlsx yang diunduh memakai bahasamu untuk tab dan petunjuk.",
"Privasi dan Ketentuan tersedia dalam bahasa Indonesia, Mandarin, dan Spanyol.",
"Aplikasi desktop: tetap terbuka tanpa internet sejak pertama kali; anggaran yang dibuat offline pindah ke online dengan sendirinya."
"Privasi dan Ketentuan tersedia dalam bahasa Indonesia, Mandarin, dan Spanyol."
],
"zh": [
"模板工作室完全用你的语言回复:主题名称、列类型以及通过指令添加的仪表盘卡片(例如“数量合计”)不再夹杂英文。",
"模板现在用你的语言生成:用中文、印尼语或西班牙语描述,列名、下拉选项、汇总卡片和示例行都会是该语言,所有公式照常运行。",
"链接可以指定语言:加上 ?lang=zh(或 en、id、es),预算、市场和法律页面就会以该语言打开,不会改变你保存的设置。",
"模板工作室现在能听懂中文和西班牙语指令,例如“添加供应商列”或“añade la columna Proveedor”。",
"投资页实时价格:股票和 ETF(印尼与美股)、加密货币和黄金按市场价更新。随时点“刷新价格”;你手动填写的价格会保留到你刷新为止。",
"Mint 会请求浏览器保留数据,显示上次备份时间,并在预算有了足够记录后提醒你同步或备份。",
"模板和市场现在也支持中文和西班牙语,下载的 .xlsx 文件的工作表名称和提示也使用你的语言。",
"隐私政策和条款现提供印尼语、中文和西班牙语版本。",
"桌面应用:即使第一次打开时没有网络也能使用;离线创建的预算会在联网后自动同步。"
"隐私政策和条款现提供印尼语、中文和西班牙语版本。"
],
"es": [
"El estudio de Plantillas responde del todo en tu idioma: los nombres de tema, los tipos de columna y las tarjetas del panel que añade una orden (como «Promedio de cantidad») ya no salen en inglés.",
"Las plantillas salen en tu idioma: una petición en español, chino o indonesio da nombres de columna, listas, tarjetas y filas de ejemplo en ese idioma, y todas las fórmulas siguen funcionando.",
"Los enlaces pueden elegir el idioma: añade ?lang=es (o en, id, zh) y Budget, el mercado y las páginas legales se abren en ese idioma sin cambiar tu elección guardada.",
"El estudio de Plantillas entiende órdenes en chino y en español, como «añade la columna Proveedor» o 添加供应商列.",
"Precios en vivo en Invertir: acciones y ETF (IDX y EE. UU.), cripto y oro se actualizan con el mercado. Toca Actualizar precios cuando quieras; los precios que escribes tú se quedan hasta que actualices.",
"Mint pide al navegador que conserve sus datos, muestra cuándo hiciste la última copia y te recuerda sincronizar o hacer copia cuando un presupuesto ya tiene historial.",
"Plantillas y el Marketplace ahora también hablan chino y español, y los .xlsx descargados usan tu idioma en pestañas y consejos.",
"Privacidad y Términos disponibles en indonesio, chino y español.",
"App de escritorio: se abre sin internet incluso la primera vez; los presupuestos creados sin conexión pasan solos a la versión en línea."
"Privacidad y Términos disponibles en indonesio, chino y español."
]
}
}
19 changes: 18 additions & 1 deletion apps/mint/web/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,13 @@

var CUSTOM_DESCRIPTION = {"id": "Tracker kustom dibuat dari: “{prompt}”.", "zh": "根据“{prompt}”生成的自定义表格。", "es": "Registro personalizado creado a partir de: “{prompt}”."};
var TOTAL_LABEL = {"id": "Total {name}", "zh": "{name}合计", "es": "Total {name}"};
// Dashboard cards a Studio tweak adds ("total of Qty", "合计 数量") follow the template's language
var AGG_LABEL = {
id: { total: "Total {name}", average: "Rata-rata {name}", max: "{name} tertinggi", min: "{name} terendah", count: "Jumlah data {name}" },
zh: { total: "{name}合计", average: "平均{name}", max: "最高{name}", min: "最低{name}", count: "{name}计数" },
es: { total: "Total {name}", average: "Promedio de {name}", max: "Máximo de {name}", min: "Mínimo de {name}", count: "Recuento de {name}" }
};
var AGG_ALIAS = { sum: "total", avg: "average" };

var LANG_WORDS = {
en: ["the", "for", "my", "with", "and", "in", "of", "to", "a", "an", "our", "your", "tracker", "track", "list", "planner", "plan", "log", "monthly", "weekly", "daily"],
Expand Down Expand Up @@ -1794,7 +1801,13 @@
}
var fnMap = { total: "SUM", sum: "SUM", average: "AVERAGE", avg: "AVERAGE", max: "MAX", min: "MIN", count: "COUNTA" };
var fn = fnMap[m[1].toLowerCase()];
spec.summary.push({ id: uid("s"), label: titleCase(m[1]) + " " + col3.name.toLowerCase(), fn: fn, column: col3.name, match: "" });
var aggWord = m[1].toLowerCase();
var aggLabels = AGG_LABEL[spec.lang];
var cardLabel = aggLabels
? aggLabels[AGG_ALIAS[aggWord] || aggWord].replace("{name}", spec.lang === "zh" ? col3.name : col3.name.toLowerCase())
: titleCase(m[1]) + " " + col3.name.toLowerCase();
cardLabel = cardLabel.charAt(0).toUpperCase() + cardLabel.slice(1);
spec.summary.push({ id: uid("s"), label: clampText(cardLabel, 40), fn: fn, column: col3.name, match: "" });
return "Added a " + fn + " card for \u201c" + col3.name + "\u201d.";
}
// highlight rules: highlight Profit below 0 red
Expand Down Expand Up @@ -2471,6 +2484,10 @@
summary: [],
rules: []
};
// the language a template was written in, so later Studio tweaks label new cards the same way
if (BLUEPRINT_L10N[raw.lang]) {
spec.lang = raw.lang;
}
var seen = {};
var srcCols = (raw.sheet && raw.sheet.columns) || [];
srcCols.slice(0, 30).forEach(function (c) {
Expand Down
40 changes: 32 additions & 8 deletions apps/mint/web/js/i18n-more.js
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,30 @@
"it means an order still waiting for your payment.": "significa que un pedido aún espera tu pago."
};

// Studio replies name themes, column types and card functions in English; say those natively too
var STUDIO_WORDS = {
zh: {
"Mint": "薄荷", "Ocean": "海洋", "Sunset": "日落", "Lavender": "薰衣草",
"Blush (pastel)": "粉彩", "Forest": "森林", "Minimal mono": "极简黑白", "Midnight (dark)": "午夜(深色)",
text: "文本", number: "数字", currency: "金额", percent: "百分比", date: "日期",
select: "下拉选项", check: "勾选",
SUM: "求和", AVERAGE: "平均值", MAX: "最大值", MIN: "最小值", COUNTA: "计数"
},
es: {
"Mint": "Menta", "Ocean": "Océano", "Sunset": "Atardecer", "Lavender": "Lavanda",
"Blush (pastel)": "Rosa pastel", "Forest": "Bosque", "Minimal mono": "Mono minimalista",
"Midnight (dark)": "Medianoche (oscuro)",
text: "texto", number: "número", currency: "moneda", percent: "porcentaje", date: "fecha",
select: "lista", check: "casilla",
SUM: "SUMA", AVERAGE: "PROMEDIO", MAX: "MÁX", MIN: "MÍN", COUNTA: "CONTAR"
}
};

function studioWord(lang, word) {
var map = STUDIO_WORDS[lang];
return Object.prototype.hasOwnProperty.call(map, word) ? map[word] : word;
}

// Whole-text patterns (same order and captures as the Indonesian RULES in i18n.js).
var RULES_ZH = [
[/^Buy — (.+)$/, "购买 — $1"],
Expand Down Expand Up @@ -1199,19 +1223,19 @@
[/^Opened draft “(.+)”\.?$/, "已打开草稿“$1”。"],
[/^Started from the “(.+)” blueprint\.$/, "已从“$1”蓝本开始。"],
[/^Added formula column “(.+)” — edit its formula below\.$/, "已添加公式列“$1”——在下方编辑公式。"],
[/^Added column “(.+)” \((\w+)\)\.$/, "已添加列“$1”($2)。"],
[/^Added column “(.+)” \((\w+)\)\.$/, function (m, name, type) { return "已添加列“" + name + "”(" + studioWord("zh", type) + ")。"; }],
[/^Added a “(.+)” column\.$/, "已添加“$1”列。"],
[/^Added (\d+) rows\.$/, "已添加 $1 行。"],
[/^Removed “(.+)”\.$/, "已删除“$1”。"],
[/^Renamed the template to “(.+)”\.$/, "模板已重命名为“$1”。"],
[/^Renamed “(.+)” to “(.+)”\.$/, "已将“$1”重命名为“$2”。"],
[/^Currency changed to (.+)\.$/, "货币已改为 $1。"],
[/^Theme set to (.+)\.$/, "主题已设为 $1。"],
[/^Theme: (.+)\.$/, "主题:$1。"],
[/^Theme set to (.+)\.$/, function (m, theme) { return "主题已设为" + studioWord("zh", theme) + "。"; }],
[/^Theme: (.+)\.$/, function (m, theme) { return "主题:" + studioWord("zh", theme) + "。"; }],
[/^Currency: (\w+)\.$/, "货币:$1。"],
[/^AI unavailable \((.+)\) — used the quick generator\.$/, "AI 暂不可用($1)——已改用快速生成器。"],
[/^Generated with your AI model \((.+)\)\.$/, "由你的 AI 模型($1)生成。"],
[/^Added a (\w+) card for “(.+)”\.$/, "已为“$2”添加 $1 卡片。"],
[/^Added a (\w+) card for “(.+)”\.$/, function (m, fn, name) { return "已为“" + name + "”添加" + studioWord("zh", fn) + "卡片。"; }],
[/^Highlight rule added on “(.+)”\.$/, "已在“$1”上添加高亮规则。"],
[/^Didn’t understand “(.+)”\. Try: (.+)$/, "没听懂“$1”。试试:添加列 优先级 · 删除列 备注 · 把 成本 重命名为 价格 · 添加 5 行 · 主题 ocean · 货币 CNY · 合计 金额 · 高亮 利润 小于 0 红色。"],
[/^(.+) connected — orders now unlock automatically$/, "$1 已连接——订单现在会自动解锁"]
Expand Down Expand Up @@ -1244,19 +1268,19 @@
[/^Opened draft “(.+)”\.?$/, "Borrador “$1” abierto."],
[/^Started from the “(.+)” blueprint\.$/, "Empezaste desde el modelo “$1”."],
[/^Added formula column “(.+)” — edit its formula below\.$/, "Columna de fórmula “$1” añadida: edita su fórmula abajo."],
[/^Added column “(.+)” \((\w+)\)\.$/, "Columna “$1” ($2) añadida."],
[/^Added column “(.+)” \((\w+)\)\.$/, function (m, name, type) { return "Columna “" + name + "” (" + studioWord("es", type) + ") añadida."; }],
[/^Added a “(.+)” column\.$/, "Columna “$1” añadida."],
[/^Added (\d+) rows\.$/, "$1 filas añadidas."],
[/^Removed “(.+)”\.$/, "“$1” eliminada."],
[/^Renamed the template to “(.+)”\.$/, "Plantilla renombrada a “$1”."],
[/^Renamed “(.+)” to “(.+)”\.$/, "“$1” renombrada a “$2”."],
[/^Currency changed to (.+)\.$/, "Moneda cambiada a $1."],
[/^Theme set to (.+)\.$/, "Tema cambiado a $1."],
[/^Theme: (.+)\.$/, "Tema: $1."],
[/^Theme set to (.+)\.$/, function (m, theme) { return "Tema cambiado a " + studioWord("es", theme) + "."; }],
[/^Theme: (.+)\.$/, function (m, theme) { return "Tema: " + studioWord("es", theme) + "."; }],
[/^Currency: (\w+)\.$/, "Moneda: $1."],
[/^AI unavailable \((.+)\) — used the quick generator\.$/, "IA no disponible ($1): usé el generador rápido."],
[/^Generated with your AI model \((.+)\)\.$/, "Generado con tu modelo de IA ($1)."],
[/^Added a (\w+) card for “(.+)”\.$/, "Tarjeta $1 añadida para “$2”."],
[/^Added a (\w+) card for “(.+)”\.$/, function (m, fn, name) { return "Tarjeta " + studioWord("es", fn) + " añadida para “" + name + "”."; }],
[/^Highlight rule added on “(.+)”\.$/, "Regla de resaltado añadida en “$1”."],
[/^Didn’t understand “(.+)”\. Try: (.+)$/, "No entendí “$1”. Prueba: añade columna Prioridad · elimina la columna Notas · renombra Costo a Precio · añade 5 filas · tema ocean · moneda EUR · suma de Importe · resalta Beneficio menor que 0 en rojo."],
[/^(.+) connected — orders now unlock automatically$/, "$1 conectado: los pedidos ahora se desbloquean solos"]
Expand Down
Loading
Loading