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
10 changes: 8 additions & 2 deletions apps/mint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ API `https://mint-api.juw12.workers.dev/api/health`
- **Privacy and Terms in four languages,** with a switcher; English prevails if they ever differ.
- **Localized spreadsheets.** Downloaded .xlsx files name their tabs, headers and tips in your language, and the
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 understands Chinese and Spanish (3.5.1).** Tweak commands such as `添加供应商列`, `货币 人民币`,
`añade la columna Proveedor` or `resalta Qty menor que 5 en rojo` now work, as the zh/es screens already
suggested; colour and currency words in those languages also steer new templates (`网店库存表,绿色` → green).
- **Desktop works offline from the first launch.** The Windows and macOS apps carry a copy of Mint and open it from
the computer when there is no internet; budgets made offline move into the online app the next time it connects.

Expand Down Expand Up @@ -320,8 +325,9 @@ apps/mint/web apps/mint/cloud/src/index
template. Each user gets 20 generations a day, anonymous visitors 5, with a global cap
(`AI_DAILY_LIMIT`). If AI is busy, the instant rule-based generator takes over. An optional
bring-your-own OpenAI-compatible model is available under Account.
- **Studio.** Tweak commands work in English and Indonesian: `add column Supplier`,
`tambah kolom Catatan`, `theme midnight`, `currency EUR`, `highlight Qty below 5 red`,
- **Studio.** Tweak commands work in English, Indonesian, Chinese and Spanish: `add column Supplier`,
`tambah kolom Catatan`, `添加供应商列`, `añade la columna Proveedor`, `theme midnight`,
`货币 人民币`, `highlight Qty below 5 red`, `resalta Qty menor que 5 en rojo`,
`add column Margin = [Price] - [Cost]`. It also includes a safe formula engine (no `eval`),
a real .xlsx writer (Dashboard + Data sheets, 200 ready rows, validation, conditional
formats), CSV export, a content kit (X, LinkedIn, TikTok, blog/SEO, Pinterest, WhatsApp
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.0")
VERSION = os.environ.get("MINT_VERSION", "3.5.1")
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.0"
VERSION = "3.5.1"
TITLE = "Mint"
APP_URL = os.environ.get("MINT_DESKTOP_URL") or "https://juw12.github.io/projects/mint/"
DEFAULT_SIZE = (1280, 860)
Expand Down
39 changes: 39 additions & 0 deletions apps/mint/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,32 @@ def seed_checks():
var t5 = C.applyTweak(budget, "remove column Item");
var t6 = C.applyTweak(budget, "currency EUR");
var t7 = C.applyTweak(budget, "flibber the wobble");
var tZhAdd = C.applyTweak(budget, "添加供应商列");
var tZhOpts = C.applyTweak(budget, "添加列 状态 选项 待办、完成");
var tZhRename = C.applyTweak(budget, "把 Planned 重命名为 计划");
var tZhTheme = C.applyTweak(budget, "主题 深色;货币 人民币");
var tZhRule = C.applyTweak(budget, "高亮 Actual 大于 500 红色");
var tEsAdd = C.applyTweak(budget, "añade la columna Proveedor");
var tEsOpts = C.applyTweak(budget, "añade columna Estado como lista con opciones Pendiente o Hecho");
var tEsRemove = C.applyTweak(budget, "elimina la columna Item");
var tEsSum = C.applyTweak(budget, "suma de Actual");
var tEsCur = C.applyTweak(budget, "cambia la moneda a pesos mexicanos");
function lastCol(r) {
return r.spec.sheet.columns.slice(-1)[0];
}
out.tweaksIntl = {
zhAdd: lastCol(tZhAdd).name,
zhOpts: [lastCol(tZhOpts).type, lastCol(tZhOpts).options],
zhRename: tZhRename.spec.sheet.columns.map(function (c) { return c.name; }),
zhTheme: [tZhTheme.spec.theme, tZhTheme.spec.currency],
zhRule: tZhRule.spec.rules.map(function (k) { return k.column + k.op + k.value + ":" + k.style; }),
esAdd: lastCol(tEsAdd).name,
esOpts: [lastCol(tEsOpts).type, lastCol(tEsOpts).options],
esRemove: tEsRemove.spec.sheet.columns.map(function (c) { return c.name; }),
esSum: tEsSum.spec.summary.map(function (s) { return s.fn + ":" + s.column; }),
esCur: tEsCur.spec.currency,
zhGenTheme: C.generate("网店库存表,绿色").spec.theme
};
out.tweaks = {
rows: t1.spec.sheet.rows.length,
addedId: t2.spec.sheet.columns.map(function (c) { return c.name; }),
Expand Down Expand Up @@ -281,6 +307,19 @@ def js_checks():
check("Item" not in tweaks["removed"], "'remove column Item'")
check(tweaks["currency"] == "EUR", "'currency EUR'")
check(tweaks["unknownChanged"] is False, "unknown command changes nothing")

intl = out["tweaksIntl"]
check(intl["zhAdd"] == "供应商", "zh '添加供应商列' adds a column")
check(intl["zhOpts"] == ["select", ["待办", "完成"]], "zh options split on 、")
check("计划" in intl["zhRename"] and "Planned" not in intl["zhRename"], "zh rename 把…重命名为")
check(intl["zhTheme"] == ["midnight", "CNY"], "zh theme + currency split on ;")
check("Actual>500:bad" in intl["zhRule"], "zh highlight rule")
check(intl["esAdd"] == "Proveedor", "es 'añade la columna Proveedor'")
check(intl["esOpts"] == ["select", ["Pendiente", "Hecho"]], "es dropdown options with 'o'")
check("Item" not in intl["esRemove"], "es remove column")
check("SUM:Actual" in intl["esSum"], "es 'suma de'")
check(intl["esCur"] == "MXN", "es currency words")
check(intl["zhGenTheme"] == "forest", "zh colour word picks the theme in prompts")
check(out["diffRows"] == [p[0] - p[1] for p in pairs], "Diff column evaluates per row")

f = out["formulas"]
Expand Down
2 changes: 1 addition & 1 deletion apps/mint/web/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
if (/[?&](embed|standalone)=1(&|$)/.test(q)) return;
var inParams = new URLSearchParams(q);
var out = new URLSearchParams();
['ref', 'coupon', 'api'].forEach(function (k) {
['ref', 'coupon', 'api', 'lang'].forEach(function (k) {
if (inParams.get(k)) out.set(k, inParams.get(k));
});
out.set('view', 'market');
Expand Down
2 changes: 2 additions & 0 deletions apps/mint/web/budget/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,8 @@
});
keep.set('embed', '1');
keep.set('nolocale', '1');
// The marketplace speaks Budget's language, even when a ?lang= link chose it without saving.
keep.set('lang', K.i18n.lang);
let r = String(route || 'market').replace(/^#/, '');
if (r.charAt(0) !== '/') r = '/' + r;
return MARKET_PAGE + '?' + keep.toString() + '#' + r;
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.0';
K.VERSION = '3.5.1';

/** 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-v15';
const CACHE = 'mint-budget-v16';
// 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
10 changes: 9 additions & 1 deletion apps/mint/web/budget/version.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
{
"version": "3.5.0",
"version": "3.5.1",
"released": "2026-11-09",
"notes": {
"en": [
"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."
],
"id": [
"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."
],
"zh": [
"链接可以指定语言:加上 ?lang=zh(或 en、id、es),预算、市场和法律页面就会以该语言打开,不会改变你保存的设置。",
"模板工作室现在能听懂中文和西班牙语指令,例如“添加供应商列”或“añade la columna Proveedor”。",
"投资页实时价格:股票和 ETF(印尼与美股)、加密货币和黄金按市场价更新。随时点“刷新价格”;你手动填写的价格会保留到你刷新为止。",
"Mint 会请求浏览器保留数据,显示上次备份时间,并在预算有了足够记录后提醒你同步或备份。",
"模板和市场现在也支持中文和西班牙语,下载的 .xlsx 文件的工作表名称和提示也使用你的语言。",
"隐私政策和条款现提供印尼语、中文和西班牙语版本。",
"桌面应用:即使第一次打开时没有网络也能使用;离线创建的预算会在联网后自动同步。"
],
"es": [
"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.",
Expand Down
10 changes: 9 additions & 1 deletion apps/mint/web/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@

function studioChange(e) {
var t = e.target;
if (!draft) {
// The prompt box (before any draft exists) also fires change events.
return;
}
var spec = draft.spec;
if (t.dataset.r !== undefined && t.dataset.c) {
var col = spec.sheet.columns.filter(function (c) { return c.id === t.dataset.c; })[0];
Expand Down Expand Up @@ -823,14 +827,18 @@
if (!text) {
return;
}
var themeBefore = draft.spec.theme;
var currencyBefore = draft.spec.currency;
var res = Core.applyTweak(draft.spec, text);
draft.spec = res.spec;
tweakLog.push({ who: "you", text: text });
res.messages.forEach(function (m) {
tweakLog.push({ who: /^Didn/.test(m) ? "err" : "mint", text: m });
});
input.value = "";
if (/theme|tema|dark|gelap/i.test(text)) {
// A new theme or currency repaints the whole Studio (colours, the Details currency picker);
// any language can change them (主题 深色, tema oscuro, 货币 人民币).
if (draft.spec.theme !== themeBefore || draft.spec.currency !== currencyBefore) {
viewStudio();
} else {
refreshStudio();
Expand Down
Loading
Loading