From 2ee1b8f1732561f4053a27c2406f056236622355 Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 09:31:48 +0700 Subject: [PATCH 1/6] Mint 3.5 (wip): live prices via /api/quote, refresh + auto-refresh in Invest; storage persistence + backup reminder --- .github/workflows/mint-api.yml | 3 + apps/mint/budget/i18n/strings.txt | 27 +++++ apps/mint/cloud/src/index.js | 153 ++++++++++++++++++++++++- apps/mint/cloud/test/api_test.mjs | 21 ++++ apps/mint/cloud/test/mock_services.mjs | 26 +++++ apps/mint/cloud/wrangler.local.toml | 2 + apps/mint/web/budget/js/app.js | 151 +++++++++++++++++++++++- apps/mint/web/budget/js/core.js | 83 ++++++++++++++ apps/mint/web/budget/js/lang/es.js | 23 ++++ apps/mint/web/budget/js/lang/id.js | 23 ++++ apps/mint/web/budget/js/lang/zh.js | 23 ++++ apps/mint/web/budget/styles.css | 6 + apps/mint/web/budget/tests.html | 45 ++++++++ 13 files changed, 582 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mint-api.yml b/.github/workflows/mint-api.yml index ce6c47bd..f01b7c20 100644 --- a/.github/workflows/mint-api.yml +++ b/.github/workflows/mint-api.yml @@ -80,6 +80,9 @@ jobs: echo "Exchange rates:" curl -fsS -H "Origin: https://juw12.github.io" "$MINT_API_URL/api/fx" | head -c 300 echo + echo "Live prices:" + curl -sS -H "Origin: https://juw12.github.io" "$MINT_API_URL/api/quote?q=stock:BBCA,stock:AAPL,crypto:BTC,gold:XAU®ion=ID" | head -c 900 + echo echo "News (Indonesia):" curl -sS -H "Origin: https://juw12.github.io" "$MINT_API_URL/api/news?region=ID&lang=id" | head -c 600 echo diff --git a/apps/mint/budget/i18n/strings.txt b/apps/mint/budget/i18n/strings.txt index 29eb1c8a..ad0ec66c 100644 --- a/apps/mint/budget/i18n/strings.txt +++ b/apps/mint/budget/i18n/strings.txt @@ -1086,3 +1086,30 @@ Your numbers are unlinked and anything still waiting is deleted. Entries already WhatsApp disconnected || WhatsApp diputuskan || WhatsApp 已断开 || WhatsApp desconectado Could not remove it || Tidak bisa menghapusnya || 无法移除 || No se pudo quitar Remove || Hapus || 移除 || Quitar + +# 3.5 live prices +Refresh prices || Perbarui harga || 刷新价格 || Actualizar precios +Updating… || Memperbarui… || 正在更新… || Actualizando… +Price you entered || Harga yang kamu isi || 你填写的价格 || Precio que introdujiste +Live price: {source}, {time} || Harga live: {source}, {time} || 实时价格:{source},{time} || Precio en vivo: {source}, {time} +Fetching live prices… || Mengambil harga live… || 正在获取实时价格… || Obteniendo precios en vivo… +Stocks, ETFs, crypto and gold update from the market automatically; bonds and funds keep the price you enter. || Saham, ETF, kripto, dan emas diperbarui otomatis dari pasar; obligasi dan reksa dana memakai harga yang kamu isi. || 股票、ETF、加密货币和黄金会自动按市场价更新;债券和基金使用你填写的价格。 || Acciones, ETF, cripto y oro se actualizan solos con el mercado; bonos y fondos usan el precio que introduces. +Live prices for stocks, ETFs, crypto and gold — tap Refresh prices. || Harga live untuk saham, ETF, kripto, dan emas — ketuk Perbarui harga. || 股票、ETF、加密货币和黄金支持实时价格——点“刷新价格”。 || Precios en vivo para acciones, ETF, cripto y oro: toca Actualizar precios. +Live prices updated {time} || Harga live diperbarui {time} || 实时价格更新于 {time} || Precios en vivo actualizados {time} +Couldn’t reach live prices ({time}); showing the last ones. || Harga live tidak bisa dihubungi ({time}); menampilkan harga terakhir. || 无法获取实时价格({time});显示上次的价格。 || No se pudo obtener precios en vivo ({time}); se muestran los últimos. +Nothing to price yet || Belum ada yang bisa diberi harga || 暂无可更新价格的资产 || Aún no hay nada que valorar +Live prices cover stocks, ETFs, crypto and gold. Add a holding with its ticker, e.g. BBCA, AAPL or BTC. || Harga live mencakup saham, ETF, kripto, dan emas. Tambahkan aset dengan kodenya, mis. BBCA, AAPL, atau BTC. || 实时价格支持股票、ETF、加密货币和黄金。用代码添加持仓,例如 BBCA、AAPL 或 BTC。 || Los precios en vivo cubren acciones, ETF, cripto y oro. Añade una posición con su símbolo, p. ej. BBCA, AAPL o BTC. +Live prices are unreachable || Harga live tidak bisa dihubungi || 无法获取实时价格 || No se pueden obtener precios en vivo +Check your connection; your prices stay as they are. || Periksa koneksimu; hargamu tetap seperti sebelumnya. || 请检查网络;你的价格保持不变。 || Revisa tu conexión; tus precios se quedan como están. +Updated {n} prices || {n} harga diperbarui || 已更新 {n} 个价格 || {n} precios actualizados +No market price for {names}; keep typing those. || Tidak ada harga pasar untuk {names}; isi sendiri yang itu. || {names} 没有市场价格,请继续手动填写。 || Sin precio de mercado para {names}; sigue escribiéndolos tú. +Values and drift now use today’s prices. || Nilai dan selisih alokasi kini memakai harga hari ini. || 市值和偏离度现已使用今日价格。 || Los valores y la desviación ya usan los precios de hoy. + +# 3.5 data safety +This browser keeps Mint’s data even when space runs low. || Browser ini menyimpan data Mint meski ruang penyimpanan menipis. || 即使存储空间不足,此浏览器也会保留 Mint 的数据。 || Este navegador conserva los datos de Mint aunque falte espacio. +This browser may clear site data when space runs low — sync or back up. || Browser ini bisa menghapus data situs saat ruang menipis — aktifkan sinkronisasi atau buat cadangan. || 存储空间不足时,此浏览器可能会清除网站数据——请开启同步或备份。 || Este navegador puede borrar datos del sitio si falta espacio: sincroniza o haz una copia. +Last backup: {date} || Cadangan terakhir: {date} || 上次备份:{date} || Última copia: {date} +No backup yet. || Belum ada cadangan. || 尚未备份。 || Aún no hay copia de seguridad. +Keep your budget safe || Jaga anggaranmu tetap aman || 保护好你的预算 || Mantén tu presupuesto a salvo +{n} transactions live only in this browser. Turn on sync in Settings or save a backup. || {n} transaksi hanya tersimpan di browser ini. Aktifkan sinkronisasi di Pengaturan atau simpan cadangan. || 有 {n} 笔交易只保存在此浏览器中。请在设置中开启同步或保存备份。 || {n} movimientos solo están en este navegador. Activa la sincronización en Ajustes o guarda una copia. +Back up now || Cadangkan sekarang || 立即备份 || Hacer copia ahora diff --git a/apps/mint/cloud/src/index.js b/apps/mint/cloud/src/index.js index 11fcafd2..cdc54540 100644 --- a/apps/mint/cloud/src/index.js +++ b/apps/mint/cloud/src/index.js @@ -7,7 +7,8 @@ * AI: POST /api/ai/template turns a prompt into a template with Workers AI. * Sync: /api/sync keeps each account's Mint budgets in step across devices. Items are encrypted in the * browser before upload (the key is wrapped with the user's password), so the server stores ciphertext only. - * Market data: /api/fx (daily exchange rates) and /api/news (money headlines per region), cached at the edge. + * Market data: /api/fx (daily exchange rates), /api/quote (live stock, crypto and gold prices) and /api/news + * (money headlines per region), all cached at the edge. * WhatsApp: /api/whatsapp lets people log expenses by chatting with Mint's number. Messages are sealed to a key * only the user's devices hold, the moment they arrive (see whatsapp.js). */ @@ -80,6 +81,9 @@ export default { if (request.method === "GET" && url.pathname === "/api/fx") { return withCors(await fxRates(env), publicCors); } + if (request.method === "GET" && url.pathname === "/api/quote") { + return withCors(await liveQuotes(env, url), publicCors); + } if (request.method === "GET" && url.pathname === "/api/news") { return withCors(await moneyNews(env, url), publicCors); } @@ -180,6 +184,153 @@ async function fxRates(env) { }); } +// ------------------------------------------------------------------ live investment prices +// GET /api/quote?q=stock:BBCA,crypto:BTC,gold:XAU®ion=ID → last prices for the Invest holdings. +// Stocks and ETFs come from Yahoo Finance's chart endpoint (Indonesian tickers get ".JK" when the region is ID), +// crypto from CoinGecko (Yahoo "BTC-USD" as a fallback), and gold from CoinGecko's PAX Gold (1 troy ounce of +// LBMA gold) with COMEX futures as a fallback. Each symbol is cached at the edge for 15 minutes. +const QUOTE_TTL = 15 * 60; +const QUOTE_MAX = 30; +const TROY_OUNCE_GRAMS = 31.1034768; +const QUOTE_SYMBOL_RE = /^[A-Z0-9][A-Z0-9.=^-]{0,19}$/; +const COINGECKO_IDS = { + BTC: "bitcoin", ETH: "ethereum", USDT: "tether", USDC: "usd-coin", BNB: "binancecoin", SOL: "solana", + XRP: "ripple", ADA: "cardano", DOGE: "dogecoin", TRX: "tron", TON: "the-open-network", DOT: "polkadot", + AVAX: "avalanche-2", LINK: "chainlink", LTC: "litecoin", SHIB: "shiba-inu", MATIC: "matic-network", + POL: "polygon-ecosystem-token", NEAR: "near", ATOM: "cosmos", XLM: "stellar", BCH: "bitcoin-cash", + UNI: "uniswap", APT: "aptos", SUI: "sui", PEPE: "pepe", PAXG: "pax-gold", XAUT: "tether-gold", +}; + +function parseQuoteQuery(url) { + const region = /^[A-Z]{2}$/.test(String(url.searchParams.get("region") || "").toUpperCase()) + ? String(url.searchParams.get("region")).toUpperCase() + : ""; + const items = []; + const seen = new Set(); + for (const raw of String(url.searchParams.get("q") || "").split(",")) { + const [kindRaw, symRaw] = raw.split(":"); + const kind = String(kindRaw || "").trim().toLowerCase(); + const symbol = String(symRaw || "").trim().toUpperCase(); + if (!["stock", "crypto", "gold"].includes(kind) || !QUOTE_SYMBOL_RE.test(symbol)) { + continue; + } + const key = kind + ":" + symbol; + if (!seen.has(key)) { + seen.add(key); + items.push({ key, kind, symbol }); + } + if (items.length >= QUOTE_MAX) { + break; + } + } + return { region, items }; +} + +async function yahooQuote(env, ticker) { + const bases = env.QUOTE_YAHOO_URL + ? [env.QUOTE_YAHOO_URL] + : ["https://query1.finance.yahoo.com/v8/finance/chart/", "https://query2.finance.yahoo.com/v8/finance/chart/"]; + for (const base of bases) { + const data = await fetchJson(base + encodeURIComponent(ticker) + "?range=1d&interval=1d", 6000); + const meta = data && data.chart && data.chart.result && data.chart.result[0] && data.chart.result[0].meta; + const price = meta && Number(meta.regularMarketPrice); + if (meta && Number.isFinite(price) && price > 0 && /^[A-Z]{3}$/.test(String(meta.currency || ""))) { + return { + price, + currency: String(meta.currency), + ticker: String(meta.symbol || ticker).slice(0, 24), + name: String(meta.longName || meta.shortName || "").slice(0, 80), + at: Number(meta.regularMarketTime) || now(), + source: "Yahoo Finance", + }; + } + } + return null; +} + +async function coingeckoUsd(env, id) { + const base = env.QUOTE_COINGECKO_URL || "https://api.coingecko.com/api/v3/simple/price"; + const data = await fetchJson(base + "?ids=" + encodeURIComponent(id) + "&vs_currencies=usd&include_last_updated_at=true", 6000); + const row = data && data[id]; + const price = row && Number(row.usd); + if (Number.isFinite(price) && price > 0) { + return { price, currency: "USD", at: Number(row.last_updated_at) || now(), source: "CoinGecko" }; + } + return null; +} + +async function produceQuote(env, item, region) { + if (item.kind === "stock") { + const tickers = []; + // Indonesian shares are listed on Yahoo as e.g. BBCA.JK; try that first for Indonesian users. + if (region === "ID" && /^[A-Z]{4}$/.test(item.symbol)) { + tickers.push(item.symbol + ".JK"); + } + tickers.push(item.symbol); + for (const ticker of tickers) { + const quote = await yahooQuote(env, ticker); + if (quote) { + return quote; + } + } + return null; + } + if (item.kind === "crypto") { + const id = COINGECKO_IDS[item.symbol]; + const quote = (id && (await coingeckoUsd(env, id))) || (await yahooQuote(env, item.symbol + "-USD")); + return quote ? Object.assign(quote, { ticker: item.symbol }) : null; + } + // Gold: one troy ounce in USD, plus the per-gram price most Indonesian holders use. + const ounce = (await coingeckoUsd(env, "pax-gold")) || (await yahooQuote(env, "GC=F")); + if (!ounce || ounce.currency !== "USD") { + return null; + } + return { + price: ounce.price, + perGram: Math.round((ounce.price / TROY_OUNCE_GRAMS) * 10000) / 10000, + currency: "USD", + unit: "troy ounce", + ticker: "XAU", + at: ounce.at, + source: ounce.source === "CoinGecko" ? "CoinGecko (PAX Gold)" : "Yahoo Finance (COMEX gold)", + }; +} + +async function cachedQuote(env, item, region) { + const cache = typeof caches !== "undefined" ? caches.default : null; + const scope = item.kind === "stock" && region === "ID" ? "ID" : "XX"; + const key = new Request("https://mint-cache.internal/quote/v1/" + scope + "/" + encodeURIComponent(item.key)); + if (cache) { + const hit = await cache.match(key); + if (hit) { + return hit.json(); + } + } + const quote = await produceQuote(env, item, region); + if (quote && cache) { + await cache.put(key, json(quote, 200, { "Cache-Control": "public, max-age=" + QUOTE_TTL })); + } + return quote; +} + +async function liveQuotes(env, url) { + const { region, items } = parseQuoteQuery(url); + if (!items.length) { + return json({ error: "Ask for one or more symbols, e.g. ?q=stock:AAPL,crypto:BTC,gold:XAU" }, 400); + } + const quotes = {}; + const missing = []; + const results = await Promise.all(items.map((item) => cachedQuote(env, item, region).catch(() => null))); + items.forEach((item, i) => { + if (results[i]) { + quotes[item.key] = results[i]; + } else { + missing.push(item.key); + } + }); + return json({ updated: now(), region, quotes, missing }, 200, { "Cache-Control": "public, max-age=60" }); +} + // ------------------------------------------------------------------ money news // Headlines from Google News RSS for the user's region and language, cached for 2 hours. const NEWS_TTL = 2 * 3600; diff --git a/apps/mint/cloud/test/api_test.mjs b/apps/mint/cloud/test/api_test.mjs index f959a53d..2378a7d2 100644 --- a/apps/mint/cloud/test/api_test.mjs +++ b/apps/mint/cloud/test/api_test.mjs @@ -780,6 +780,27 @@ assert.equal(r.data.region, "US"); assert.equal(r.data.lang, "en"); ok("exchange rates and regional money news"); +// ---- live investment prices (edge-cached per symbol, mocked upstreams) +r = await api("GET", "quote?q=stock:BBCA,stock:AAPL,crypto:BTC,crypto:WIF,gold:XAU,stock:NOPE,bonds:ORI,stock:®ion=ID"); +assert.equal(r.status, 200, JSON.stringify(r.data)); +assert.equal(r.headers.get("access-control-allow-origin"), "*", "prices are public read-only data"); +assert.equal(r.data.quotes["stock:BBCA"].price, 9875); +assert.equal(r.data.quotes["stock:BBCA"].currency, "IDR"); +assert.equal(r.data.quotes["stock:BBCA"].ticker, "BBCA.JK", "Indonesian tickers get .JK for region ID"); +assert.equal(r.data.quotes["stock:AAPL"].price, 230.5, "falls back to the plain ticker when .JK is unknown"); +assert.equal(r.data.quotes["stock:AAPL"].currency, "USD"); +assert.equal(r.data.quotes["crypto:BTC"].price, 108000); +assert.equal(r.data.quotes["crypto:BTC"].source, "CoinGecko"); +assert.equal(r.data.quotes["crypto:WIF"].price, 1.25, "unknown coins fall back to Yahoo SYM-USD"); +assert.equal(r.data.quotes["gold:XAU"].price, 3110.4); +assert.equal(r.data.quotes["gold:XAU"].perGram, 100.0017, "gold also comes per gram (1 troy oz = 31.1034768 g)"); +assert.deepEqual(r.data.missing, ["stock:NOPE"], "unknown symbols are listed; bad kinds and symbols are ignored"); +r = await api("GET", "quote?q="); +assert.equal(r.status, 400); +r = await api("GET", "quote?q=" + Array.from({ length: 40 }, (_, i) => "stock:T" + i).join(",")); +assert.equal(Object.keys(r.data.quotes).length + r.data.missing.length, 30, "at most 30 symbols per request"); +ok("live stock, crypto and gold prices"); + // ---- AI endpoint (no binding locally → 503; live → spec) r = await api("POST", "ai/template", { token: buyer.token, body: { prompt: "habit tracker" } }); assert.ok([200, 503, 429].includes(r.status), "ai status " + r.status); diff --git a/apps/mint/cloud/test/mock_services.mjs b/apps/mint/cloud/test/mock_services.mjs index 3de15e86..8eeddeb2 100644 --- a/apps/mint/cloud/test/mock_services.mjs +++ b/apps/mint/cloud/test/mock_services.mjs @@ -48,6 +48,32 @@ export function startMockServices(port = 8799) { if (req.method === "GET" && path === "/fx") { return send(res, 200, { result: "success", time_last_update_unix: 1761696000, rates: { USD: 1, IDR: 16300, EUR: 0.92, SGD: 1.3, JPY: 151.5, bogus: "x" } }); } + // ---- live prices (Yahoo chart v8 and CoinGecko simple/price shapes) + if (req.method === "GET" && path.startsWith("/yahoo/")) { + const ticker = decodeURIComponent(path.slice("/yahoo/".length)); + const book = { + "BBCA.JK": { currency: "IDR", price: 9875, longName: "PT Bank Central Asia Tbk" }, + AAPL: { currency: "USD", price: 230.5, longName: "Apple Inc." }, + "GC=F": { currency: "USD", price: 3110.4, shortName: "Gold" }, + "WIF-USD": { currency: "USD", price: 1.25, shortName: "dogwifhat USD" }, + }; + const row = book[ticker]; + if (!row) { + return send(res, 404, { chart: { result: null, error: { code: "Not Found" } } }); + } + return send(res, 200, { chart: { result: [{ meta: { symbol: ticker, regularMarketPrice: row.price, currency: row.currency, regularMarketTime: 1761696000, longName: row.longName, shortName: row.shortName } }], error: null } }); + } + if (req.method === "GET" && path === "/coingecko") { + state.coingeckoHits = (state.coingeckoHits || 0) + 1; + const prices = { bitcoin: 108000, "pax-gold": 3110.4 }; + const out = {}; + for (const id of String(url.searchParams.get("ids") || "").split(",")) { + if (prices[id]) { + out[id] = { usd: prices[id], last_updated_at: 1761696000 }; + } + } + return send(res, 200, out); + } if (req.method === "GET" && path === "/news") { state.newsHits = (state.newsHits || 0) + 1; const gl = url.searchParams.get("gl"); diff --git a/apps/mint/cloud/wrangler.local.toml b/apps/mint/cloud/wrangler.local.toml index 13fe15d1..20de6395 100644 --- a/apps/mint/cloud/wrangler.local.toml +++ b/apps/mint/cloud/wrangler.local.toml @@ -33,6 +33,8 @@ VAPID_SUBJECT = "mailto:mint@example.test" PUSH_ALLOW_HTTP = "1" FX_URL = "http://127.0.0.1:8799/fx" NEWS_URL = "http://127.0.0.1:8799/news" +QUOTE_YAHOO_URL = "http://127.0.0.1:8799/yahoo/" +QUOTE_COINGECKO_URL = "http://127.0.0.1:8799/coingecko" # WhatsApp Cloud API test double (mock_services.mjs /graph) and throwaway test secrets. WHATSAPP_GRAPH_BASE = "http://127.0.0.1:8799/graph" WHATSAPP_TOKEN = "wa_test_token" diff --git a/apps/mint/web/budget/js/app.js b/apps/mint/web/budget/js/app.js index 9793df46..4f3109c2 100644 --- a/apps/mint/web/budget/js/app.js +++ b/apps/mint/web/budget/js/app.js @@ -1633,6 +1633,7 @@ if (S.investTab === 'tips') return investTabs() + viewInvestTips(st); if (S.investTab === 'news') return investTabs() + viewNews(); const pf = K.portfolio(S.book); + autoRefreshPrices(); const target = S.book.meta.target || K.targetFor(S.profile.traits ? S.profile.traits.risk : 50); const suggested = K.targetFor(S.profile.traits ? S.profile.traits.risk : NaN); const investCat = st.rows.find((r) => r.cat.group === 'invest'); @@ -1647,8 +1648,11 @@ ''; const classOpts = (sel) => Object.keys(K.ASSET_CLASSES).map((k) => '').join(''); const holdings = - '

Holdings

' + + '

Holdings

' + + '' + + '
' + '

' + esc(K.t('Prices are in each holding’s currency; values are converted to {cur}.', { cur: cur() })) + '

' + + quoteStatus() + '
' + '' + pf.rows @@ -1661,7 +1665,7 @@ '' + '' + '' + - '' + + '' + '' + '' + '' @@ -2004,6 +2008,92 @@ return '

≈ ' + esc(K.fmt(K.convert(amount, cur(), rc), rc)) + ' ' + rc + '

'; } + // ================================================================ live prices + // Stocks/ETFs, crypto and gold get market prices from the Mint API (/api/quote, edge-cached 15 min). + // Opening Invest refreshes them at most every 4 hours; "Refresh prices" fetches now and also overrides + // prices typed by hand. Bonds, funds and cash keep the price you enter. + const QUOTE_EVERY = 4 * 3600 * 1000; + function quoteStore() { + return store.get('mint.quotes.' + S.book.id, null) || {}; + } + function quoteTime(at) { + if (!at) return ''; + try { + return new Date(at).toLocaleString(document.documentElement.lang || undefined, { day: 'numeric', month: 'short', hour: '2-digit', minute: '2-digit' }); + } catch (e) { + return new Date(at).toISOString().slice(0, 16).replace('T', ' '); + } + } + function priceTitle(h) { + if (h.priceManual || !h.priceSrc) return ' title="' + esc(K.t('Price you entered')) + '"'; + return ' title="' + esc(K.t('Live price: {source}, {time}', { source: h.priceSrc, time: quoteTime((h.priceAt || 0) * 1000) })) + '"'; + } + function quoteStatus() { + if (S.quoteBusy) return '

' + esc(K.t('Fetching live prices…')) + '

'; + const last = quoteStore(); + const has = K.list(S.book, 'holdings').some((h) => K.quoteKey(h)); + if (!has) return '

' + esc(K.t('Stocks, ETFs, crypto and gold update from the market automatically; bonds and funds keep the price you enter.')) + '

'; + if (!last.at) return '

' + esc(K.t('Live prices for stocks, ETFs, crypto and gold — tap Refresh prices.')) + '

'; + return ( + '

' + + esc(last.ok ? K.t('Live prices updated {time}', { time: quoteTime(last.at) }) : K.t('Couldn’t reach live prices ({time}); showing the last ones.', { time: quoteTime(last.at) })) + + '

' + ); + } + function autoRefreshPrices() { + if (!S.book || S.quoteBusy || !navigator.onLine) return; + const last = quoteStore(); + if (last.at && Date.now() - last.at < QUOTE_EVERY) return; + if (!K.quoteRequests(S.book).length) return; + setTimeout(() => refreshPrices(false), 0); + } + function refreshPrices(force) { + if (!S.book || S.quoteBusy) return Promise.resolve(0); + const book = S.book; + const reqs = K.quoteRequests(book, { force: force }); + if (!reqs.length) { + if (force) toast({ tone: 'warn', title: 'Nothing to price yet', body: 'Live prices cover stocks, ETFs, crypto and gold. Add a holding with its ticker, e.g. BBCA, AAPL or BTC.' }); + return Promise.resolve(0); + } + S.quoteBusy = true; + scheduleRender(); + const ask = (r) => + fetch(apiUrl('quote?q=' + encodeURIComponent(r.keys.join(',')) + (r.region ? '®ion=' + r.region : ''))) + .then((res) => (res.ok ? res.json() : null)) + .catch(() => null); + return Promise.all(reqs.map(ask)).then((replies) => { + S.quoteBusy = false; + const answers = {}; + let ok = false; + let missing = []; + reqs.forEach((r, i) => { + const reply = replies[i]; + if (!reply) return; + ok = true; + answers[r.region] = reply.quotes || {}; + missing = missing.concat(reply.missing || []); + }); + if (S.book !== book) return 0; + store.set('mint.quotes.' + book.id, { at: Date.now(), ok: ok }); + const updates = ok ? K.priceUpdates(book, answers, { force: force }) : []; + if (updates.length) commit(updates.map((u) => put('holdings', u)), true); + else scheduleRender(); + if (force) { + if (!ok) toast({ tone: 'warn', title: 'Live prices are unreachable', body: 'Check your connection; your prices stay as they are.' }); + else { + const names = missing.map((k) => k.split(':')[1]).slice(0, 4).join(', '); + toast({ + tone: 'good', + icon: '📈', + title: K.t('Updated {n} prices', { n: updates.length }), + body: names ? K.t('No market price for {names}; keep typing those.', { names: names }) : K.t('Values and drift now use today’s prices.'), + }); + } + } + return updates.length; + }); + } + // ================================================================ invest: learn, tips, news function investTabs() { const tabs = [ @@ -2563,7 +2653,9 @@ '' + '' + updatesCard() + - '

Your data

' + (window.MintCloud && window.MintCloud.signedIn() ? 'Saved on this device and synced, encrypted, to your account. Export a backup any time.' : 'Everything lives in this browser. Export a backup any time.') + '

' + + '

Your data

' + (window.MintCloud && window.MintCloud.signedIn() ? 'Saved on this device and synced, encrypted, to your account. Export a backup any time.' : 'Everything lives in this browser. Export a backup any time.') + '

' + + dataSafetyNote() + + '
' + '' + '' + '' + @@ -3407,6 +3499,53 @@ const copy = JSON.parse(JSON.stringify(S.book)); delete copy.room; download('mint-backup-' + S.book.meta.name.replace(/[^\w-]+/g, '-').toLowerCase() + '-' + K.today() + '.json', JSON.stringify({ mint: 1, exportedAt: new Date().toISOString(), book: copy }, null, 1), 'application/json'); + store.set(BACKUP_KEY, Date.now()); + } + + // ================================================================ data safety + // Ask the browser to keep Mint's storage (exempt from "clear when space is low"), remember when the last + // backup was made, and nudge people who neither sync nor back up once their budget holds real history. + const BACKUP_KEY = 'mint.backup.at'; + const BACKUP_NUDGE_KEY = 'mint.backup.nudged'; + const DAY_MS = 86400000; + function requestPersistence() { + const sm = navigator.storage; + if (!sm || !sm.persisted || !sm.persist) { + S.persisted = null; + return; + } + sm.persisted() + .then((already) => already || sm.persist()) + .then((granted) => { + S.persisted = !!granted; + }) + .catch(() => { + S.persisted = null; + }); + } + function dataSafetyNote() { + const last = Number(store.get(BACKUP_KEY, 0)) || 0; + const kept = S.persisted === true ? K.t('This browser keeps Mint’s data even when space runs low.') : S.persisted === false ? K.t('This browser may clear site data when space runs low — sync or back up.') : ''; + const backup = last ? K.t('Last backup: {date}', { date: new Date(last).toLocaleDateString(document.documentElement.lang || undefined) }) : K.t('No backup yet.'); + return '

' + esc((kept ? kept + ' ' : '') + backup) + '

'; + } + function maybeBackupNudge() { + if (!S.book || /^demo-/.test(S.book.id)) return; + if (window.MintCloud && window.MintCloud.signedIn()) return; + const txns = K.list(S.book, 'txns').length; + if (txns < 25) return; + const now = Date.now(); + const last = Number(store.get(BACKUP_KEY, 0)) || 0; + const nudged = Number(store.get(BACKUP_NUDGE_KEY, 0)) || 0; + if (now - last < 30 * DAY_MS || now - nudged < 7 * DAY_MS) return; + store.set(BACKUP_NUDGE_KEY, now); + toast({ + tone: 'warn', + icon: '🛟', + title: 'Keep your budget safe', + body: K.t('{n} transactions live only in this browser. Turn on sync in Settings or save a backup.', { n: txns }), + action: { label: 'Back up now', fn: exportJSON }, + }); } function importJSON(text) { let data; @@ -3486,6 +3625,8 @@ } const rec = { id: id }; rec[field] = v; + // A price typed by hand wins over live prices until the user taps "Refresh prices". + if (coll === 'holdings' && field === 'price') rec.priceManual = true; commit(put(coll, rec)); } @@ -4053,6 +4194,8 @@ return goalAdd(el.dataset.id); case 'voice-trade': return openTradeVoice(); + case 'refresh-prices': + return refreshPrices(true); case 'add-holding': return addHolding(); case 'preset': { @@ -4488,6 +4631,7 @@ // ================================================================ boot function boot() { loadRates(); + requestPersistence(); setupCloud(); const returning = !!(S.profile && S.books.length); const join = K.parseJoin(location.hash); @@ -4527,6 +4671,7 @@ if (resume && resume.y) requestAnimationFrame(() => window.scrollTo(0, resume.y)); const justUpdated = setupUpdates(returning); if (S.book && !justUpdated) setTimeout(() => maybeTipToast(K.monthStats(S.book, S.month)), 2500); + if (S.book && !justUpdated) setTimeout(maybeBackupNudge, 9000); if ('serviceWorker' in navigator && location.protocol === 'https:') { navigator.serviceWorker .register('sw.js') diff --git a/apps/mint/web/budget/js/core.js b/apps/mint/web/budget/js/core.js index 66aa38eb..72042cb4 100644 --- a/apps/mint/web/budget/js/core.js +++ b/apps/mint/web/budget/js/core.js @@ -1288,6 +1288,89 @@ }; }; + // ---------------------------------------------------------------- live prices + // The Mint API's /api/quote returns last prices for stocks/ETFs (Yahoo Finance), crypto (CoinGecko) and gold + // (one troy ounce plus per gram). These helpers decide what to ask for and turn answers into holding updates; + // the network call lives in the app. A price typed by hand (priceManual) is kept until the user refreshes. + K.QUOTE_SYMBOL_RE = /^[A-Z0-9][A-Z0-9.=^-]{0,19}$/; + K.TROY_OUNCE_GRAMS = 31.1034768; + + /** The live-price key for a holding ('stock:BBCA', 'crypto:BTC', 'gold:XAU'), or '' when it has no market price. */ + K.quoteKey = function (h) { + if (!h) return ''; + if (h.cls === 'gold') return 'gold:XAU'; + const sym = String(h.symbol || '').trim().toUpperCase().replace(/\s+/g, ''); + if (!K.QUOTE_SYMBOL_RE.test(sym)) return ''; + if (h.cls === 'stocks') return 'stock:' + sym; + if (h.cls === 'crypto') return 'crypto:' + sym.replace(/-USDT?$/, ''); + return ''; + }; + + /** Gold held in grams (the default, e.g. Antam bars) or troy ounces (name or symbol says oz / ounce / XAU). */ + K.goldUnit = function (h) { + const text = String((h && h.name) || '') + ' ' + String((h && h.symbol) || ''); + if (/gram|\bgr?\b/i.test(text)) return 'g'; + return /\boz\b|ounce|troy|\bxau\b/i.test(text) ? 'oz' : 'g'; + }; + + function quoteRegion(h, base) { + return (h.cur || base) === 'IDR' ? 'ID' : ''; + } + + /** Requests to make: [{ region: 'ID' | '', keys: [...] }]. Holdings priced in IDR ask with region ID (BBCA → BBCA.JK). */ + K.quoteRequests = function (book, opts) { + const base = (book.meta && book.meta.currency) || 'IDR'; + const force = !!(opts && opts.force); + const groups = {}; + K.list(book, 'holdings').forEach((h) => { + if (h.priceManual && !force) return; + const key = K.quoteKey(h); + if (!key) return; + const region = quoteRegion(h, base); + const list = groups[region] || (groups[region] = []); + if (list.indexOf(key) < 0 && list.length < 30) list.push(key); + }); + return Object.keys(groups).map((region) => ({ region: region, keys: groups[region] })); + }; + + /** Round a live price: currency decimals for normal prices, 6 significant digits for tiny ones (e.g. PEPE). */ + K.roundPrice = function (value, cur) { + const v = Number(value) || 0; + const money = K.roundMoney(v, cur); + if (v > 0 && Math.abs(money - v) / v > 0.001) return Number(v.toPrecision(6)); + return money; + }; + + /** + * Turn API answers ({ 'ID': quotes, '': quotes }) into holding patches { id, price, priceAt, priceSrc }. + * Prices are converted into each holding's own currency; holdings with no answer or no exchange rate are skipped. + */ + K.priceUpdates = function (book, answers, opts) { + const base = (book.meta && book.meta.currency) || 'IDR'; + const force = !!(opts && opts.force); + const out = []; + K.list(book, 'holdings').forEach((h) => { + if (h.priceManual && !force) return; + const key = K.quoteKey(h); + if (!key) return; + const q = ((answers || {})[quoteRegion(h, base)] || {})[key]; + if (!q || !/^[A-Z]{3}$/.test(String(q.currency || ''))) return; + let px = Number(q.price); + if (key === 'gold:XAU' && K.goldUnit(h) === 'g') px = Number(q.perGram) || px / K.TROY_OUNCE_GRAMS; + const to = h.cur || base; + const rate = K.rate(q.currency, to); + if (!(px > 0) || !isFinite(rate)) return; + const price = K.roundPrice(px * rate, to); + const priceAt = Math.round(Number(q.at) || 0); + const priceSrc = String(q.source || '').slice(0, 40); + if (price === Number(h.price) && priceAt === Number(h.priceAt) && !h.priceManual) return; + const patch = { id: h.id, price: price, priceAt: priceAt, priceSrc: priceSrc }; + if (h.priceManual) patch.priceManual = false; + out.push(patch); + }); + return out; + }; + /** Future value per year with monthly contributions (monthly compounding). */ K.projectFV = function (start, monthly, annualPct, years) { const r = (Number(annualPct) || 0) / 100 / 12; diff --git a/apps/mint/web/budget/js/lang/es.js b/apps/mint/web/budget/js/lang/es.js index 297b71f7..5d7d60fa 100644 --- a/apps/mint/web/budget/js/lang/es.js +++ b/apps/mint/web/budget/js/lang/es.js @@ -103,6 +103,7 @@ MintBudget.i18n.add('es', { "Ayu just added Rp 180.000 · 6 days to go": "Ayu acaba de añadir Rp 180.000 · quedan 6 días", "BPJS + health insurance": "BPJS + seguro médico", "Back": "Atrás", +"Back up now": "Hacer copia ahora", "Backup (JSON)": "Copia de seguridad (JSON)", "Backup restored": "Copia restaurada", "Badminton court": "Pista de bádminton", @@ -166,6 +167,7 @@ MintBudget.i18n.add('es', { "Check my budget first": "Reviso mi presupuesto primero", "Check now": "Comprobar ahora", "Check the fees": "Revisa las comisiones", +"Check your connection; your prices stay as they are.": "Revisa tu conexión; tus precios se quedan como están.", "Check your monthly plan": "Revisa tu plan mensual", "Checking daily makes you nervous. A yearly check-up to rebalance is enough for most people.": "Mirarlo cada día te pone nervioso. Para la mayoría basta con una revisión anual para rebalancear.", "Checking for updates…": "Buscando actualizaciones…", @@ -205,6 +207,7 @@ MintBudget.i18n.add('es', { "Could not save on this device": "No se pudo guardar en este dispositivo", "Could not save the file": "No se pudo guardar el archivo", "Could not unlock synced data on this device. Sign in again.": "No se pudieron desbloquear los datos sincronizados en este dispositivo. Vuelve a iniciar sesión.", +"Couldn’t reach live prices ({time}); showing the last ones.": "No se pudo obtener precios en vivo ({time}); se muestran los últimos.", "Create": "Crear", "Create a \"Giving & gifts\" envelope so generosity is planned, not guilt-driven.": "Crea un sobre de \"Regalos y donaciones\" para que la generosidad sea planificada, no por culpa.", "Create a budget": "Crear un presupuesto", @@ -300,6 +303,7 @@ MintBudget.i18n.add('es', { "Family budget": "Presupuesto familiar", "Fees": "Comisiones", "Fees compound too. Paying 1.8% more every year can eat roughly 40% of the final amount over 30 years.": "Las comisiones también se acumulan. Pagar un 1,8% más cada año puede comerse cerca del 40% del importe final en 30 años.", +"Fetching live prices…": "Obteniendo precios en vivo…", "Fetching the latest data from your collaborators…": "Obteniendo los últimos datos de tus colaboradores…", "Filter category": "Filtrar categoría", "Filter person": "Filtrar persona", @@ -443,11 +447,13 @@ MintBudget.i18n.add('es', { "Keep it to 3 buckets (needs, wants, savings) until it feels easy.": "Quédate con 3 sobres (necesidades, deseos, ahorro) hasta que sea fácil.", "Keep it under {amount} a day to finish the month inside the limit.": "Mantente por debajo de {amount} al día para terminar el mes dentro del límite.", "Keep speculative bets (single stocks, crypto) under 10% of the portfolio.": "Mantén las apuestas especulativas (acciones sueltas, cripto) por debajo del 10 % de la cartera.", +"Keep your budget safe": "Mantén tu presupuesto a salvo", "Keyboard shortcuts": "Atajos de teclado", "Kind": "Tipo", "Language": "Idioma", "Largest drift": "Mayor desviación", "Last WhatsApp entry removed": "Último registro de WhatsApp eliminado", +"Last backup: {date}": "Última copia: {date}", "Last edited by {name}": "Última edición de {name}", "Later": "Más tarde", "Learn": "Aprender", @@ -467,6 +473,11 @@ MintBudget.i18n.add('es', { "List every subscription and cancel the ones you have not used in 30 days.": "Haz una lista de suscripciones y cancela las que no usaste en 30 días.", "Live": "En vivo", "Live activity": "Actividad en vivo", +"Live price: {source}, {time}": "Precio en vivo: {source}, {time}", +"Live prices are unreachable": "No se pueden obtener precios en vivo", +"Live prices cover stocks, ETFs, crypto and gold. Add a holding with its ticker, e.g. BBCA, AAPL or BTC.": "Los precios en vivo cubren acciones, ETF, cripto y oro. Añade una posición con su símbolo, p. ej. BBCA, AAPL o BTC.", +"Live prices for stocks, ETFs, crypto and gold — tap Refresh prices.": "Precios en vivo para acciones, ETF, cripto y oro: toca Actualizar precios.", +"Live prices updated {time}": "Precios en vivo actualizados {time}", "Load demo budget": "Cargar presupuesto de ejemplo", "Loading headlines…": "Cargando titulares…", "Local-first and end-to-end encrypted. Sign in only if you want sync across your devices.": "Primero en tu dispositivo y con cifrado de extremo a extremo. Inicia sesión solo si quieres sincronizar entre dispositivos.", @@ -545,7 +556,9 @@ MintBudget.i18n.add('es', { "Next tip": "Siguiente consejo", "No account, local-first, end-to-end encrypted sync. The server never sees your numbers.": "Sin cuenta, local primero y sincronización cifrada de extremo a extremo. El servidor nunca ve tus números.", "No accounts. Works offline and syncs when you are back": "Sin cuentas. Funciona sin conexión y sincroniza al volver", +"No backup yet.": "Aún no hay copia de seguridad.", "No goals yet": "Aún no hay metas", +"No market price for {names}; keep typing those.": "Sin precio de mercado para {names}; sigue escribiéndolos tú.", "No real investment guarantees high returns with no risk. Walk away and check your regulator's warning list.": "Ninguna inversión real garantiza altas rentabilidades sin riesgo. Aléjate y consulta la lista de advertencias de tu regulador.", "No rows found in that CSV": "No hay filas en ese CSV", "No sign-up, no ads": "Sin registro ni anuncios", @@ -556,6 +569,7 @@ MintBudget.i18n.add('es', { "Not quite.": "No exactamente.", "Not syncing": "Sin sincronizar", "Nothing new from WhatsApp": "Nada nuevo de WhatsApp", +"Nothing to price yet": "Aún no hay nada que valorar", "Nothing to worry about.": "Nada de qué preocuparse.", "Notifications are blocked in your browser settings.": "Las notificaciones están bloqueadas en la configuración del navegador.", "Notifications on": "Notificaciones activadas", @@ -616,6 +630,7 @@ MintBudget.i18n.add('es', { "Preferences": "Preferencias", "Previous month": "Mes anterior", "Price": "Precio", +"Price you entered": "Precio que introdujiste", "Prices are entered by you; update them any time.": "Los precios los introduces tú; actualízalos cuando quieras.", "Prices are in each holding’s currency; values are converted to {cur}.": "Los precios están en la moneda de cada inversión; los valores se convierten a {cur}.", "Private": "Privado", @@ -636,6 +651,7 @@ MintBudget.i18n.add('es', { "Rebalancing keeps your risk where you chose it and quietly sells high and buys low.": "Rebalancear mantiene tu riesgo donde lo elegiste y, sin darte cuenta, vende caro y compra barato.", "Reconnecting…": "Reconectando…", "Refresh": "Actualizar", +"Refresh prices": "Actualizar precios", "Region": "Región", "Relay server": "Servidor relé", "Relay unreachable, retrying…": "Relé inaccesible, reintentando…", @@ -771,6 +787,7 @@ MintBudget.i18n.add('es', { "Stocks": "Acciones", "Stocks & ETFs": "Acciones y ETF", "Stocks or ETFs regularly": "Acciones o ETF con regularidad", +"Stocks, ETFs, crypto and gold update from the market automatically; bonds and funds keep the price you enter.": "Acciones, ETF, cripto y oro se actualizan solos con el mercado; bonos y fondos usan el precio que introduces.", "Stocks, crypto and more": "Acciones, cripto y más", "Stop syncing": "Dejar de sincronizar", "Stop syncing on this device": "Dejar de sincronizar en este dispositivo", @@ -836,6 +853,8 @@ MintBudget.i18n.add('es', { "This account’s sync key changed on another device. Sign in again to unlock it.": "La clave de sincronización de esta cuenta cambió en otro dispositivo. Vuelve a iniciar sesión para desbloquearla.", "This brings {cat} to {pct}% of its limit.": "Esto lleva {cat} al {pct} % de su límite.", "This browser cannot sync (needs HTTPS and a modern browser).": "Este navegador no puede sincronizar (requiere HTTPS y un navegador moderno).", +"This browser keeps Mint’s data even when space runs low.": "Este navegador conserva los datos de Mint aunque falte espacio.", +"This browser may clear site data when space runs low — sync or back up.": "Este navegador puede borrar datos del sitio si falta espacio: sincroniza o haz una copia.", "This budget": "Este presupuesto", "This budget is empty": "Este presupuesto está vacío", "This device": "Este dispositivo", @@ -883,13 +902,16 @@ MintBudget.i18n.add('es', { "Update Mint": "Actualizar Mint", "Update now": "Actualizar ahora", "Updated to Mint {v}": "Mint se actualizó a la {v}", +"Updated {n} prices": "{n} precios actualizados", "Updates": "Actualizaciones", "Updating Mint…": "Actualizando Mint…", +"Updating…": "Actualizando…", "Use Mint's plan": "Usar el plan de Mint", "Use tax-friendly accounts": "Usa cuentas con ventajas fiscales", "Use the 48-hour rule: add wants to a wishlist and buy only if you still want it 2 days later.": "Usa la regla de las 48 horas: anota el capricho y cómpralo solo si 2 días después lo sigues queriendo.", "Use “{name}” as your investing target?": "¿Usar “{name}” como tu objetivo de inversión?", "Value": "Valor", +"Values and drift now use today’s prices.": "Los valores y la desviación ya usan los precios de hoy.", "Vanguard S&P 500 ETF (fractional)": "ETF Vanguard S&P 500 (fraccionado)", "Version": "Versión", "Vietnamese dong": "Dong vietnamita", @@ -1045,6 +1067,7 @@ MintBudget.i18n.add('es', { "{n} online": "{n} en línea", "{n} people": "{n} personas", "{n} transactions": "{n} movimientos", +"{n} transactions live only in this browser. Turn on sync in Settings or save a backup.": "{n} movimientos solo están en este navegador. Activa la sincronización en Ajustes o guarda una copia.", "{n} transactions without a category": "{n} movimientos sin categoría", "{n} waiting to be added": "{n} pendientes de añadir", "{n}d ago": "hace {n} d", diff --git a/apps/mint/web/budget/js/lang/id.js b/apps/mint/web/budget/js/lang/id.js index 4c35b1d2..007d58e7 100644 --- a/apps/mint/web/budget/js/lang/id.js +++ b/apps/mint/web/budget/js/lang/id.js @@ -103,6 +103,7 @@ MintBudget.i18n.add('id', { "Ayu just added Rp 180.000 · 6 days to go": "Ayu baru menambah Rp 180.000 · 6 hari lagi", "BPJS + health insurance": "BPJS + asuransi kesehatan", "Back": "Kembali", +"Back up now": "Cadangkan sekarang", "Backup (JSON)": "Cadangan (JSON)", "Backup restored": "Cadangan dipulihkan", "Badminton court": "Sewa lapangan bulu tangkis", @@ -166,6 +167,7 @@ MintBudget.i18n.add('id', { "Check my budget first": "Cek anggaran dulu", "Check now": "Periksa sekarang", "Check the fees": "Cek biayanya", +"Check your connection; your prices stay as they are.": "Periksa koneksimu; hargamu tetap seperti sebelumnya.", "Check your monthly plan": "Cek rencana bulananmu", "Checking daily makes you nervous. A yearly check-up to rebalance is enough for most people.": "Mengecek setiap hari membuatmu gugup. Pemeriksaan tahunan untuk menyeimbangkan ulang sudah cukup bagi kebanyakan orang.", "Checking for updates…": "Memeriksa pembaruan…", @@ -205,6 +207,7 @@ MintBudget.i18n.add('id', { "Could not save on this device": "Tidak bisa menyimpan di perangkat ini", "Could not save the file": "Tidak bisa menyimpan file", "Could not unlock synced data on this device. Sign in again.": "Tidak bisa membuka data tersinkron di perangkat ini. Masuk lagi.", +"Couldn’t reach live prices ({time}); showing the last ones.": "Harga live tidak bisa dihubungi ({time}); menampilkan harga terakhir.", "Create": "Buat", "Create a \"Giving & gifts\" envelope so generosity is planned, not guilt-driven.": "Buat amplop \"Sedekah & hadiah\" agar kemurahan hati terencana, bukan karena rasa bersalah.", "Create a budget": "Buat anggaran", @@ -300,6 +303,7 @@ MintBudget.i18n.add('id', { "Family budget": "Anggaran keluarga", "Fees": "Biaya", "Fees compound too. Paying 1.8% more every year can eat roughly 40% of the final amount over 30 years.": "Biaya juga berlipat. Membayar 1,8% lebih banyak tiap tahun bisa memakan sekitar 40% hasil akhir dalam 30 tahun.", +"Fetching live prices…": "Mengambil harga live…", "Fetching the latest data from your collaborators…": "Mengambil data terbaru dari rekanmu…", "Filter category": "Filter kategori", "Filter person": "Filter orang", @@ -443,11 +447,13 @@ MintBudget.i18n.add('id', { "Keep it to 3 buckets (needs, wants, savings) until it feels easy.": "Cukup 3 pos (kebutuhan, keinginan, tabungan) sampai terasa mudah.", "Keep it under {amount} a day to finish the month inside the limit.": "Jaga di bawah {amount} per hari agar bulan ini tetap dalam batas.", "Keep speculative bets (single stocks, crypto) under 10% of the portfolio.": "Jaga taruhan spekulatif (saham tunggal, kripto) di bawah 10% portofolio.", +"Keep your budget safe": "Jaga anggaranmu tetap aman", "Keyboard shortcuts": "Pintasan keyboard", "Kind": "Sifat", "Language": "Bahasa", "Largest drift": "Selisih terbesar", "Last WhatsApp entry removed": "Catatan WhatsApp terakhir dihapus", +"Last backup: {date}": "Cadangan terakhir: {date}", "Last edited by {name}": "Terakhir diubah oleh {name}", "Later": "Nanti", "Learn": "Belajar", @@ -467,6 +473,11 @@ MintBudget.i18n.add('id', { "List every subscription and cancel the ones you have not used in 30 days.": "Daftar semua langganan dan batalkan yang tidak dipakai 30 hari terakhir.", "Live": "Langsung", "Live activity": "Aktivitas langsung", +"Live price: {source}, {time}": "Harga live: {source}, {time}", +"Live prices are unreachable": "Harga live tidak bisa dihubungi", +"Live prices cover stocks, ETFs, crypto and gold. Add a holding with its ticker, e.g. BBCA, AAPL or BTC.": "Harga live mencakup saham, ETF, kripto, dan emas. Tambahkan aset dengan kodenya, mis. BBCA, AAPL, atau BTC.", +"Live prices for stocks, ETFs, crypto and gold — tap Refresh prices.": "Harga live untuk saham, ETF, kripto, dan emas — ketuk Perbarui harga.", +"Live prices updated {time}": "Harga live diperbarui {time}", "Load demo budget": "Muat anggaran demo", "Loading headlines…": "Memuat berita utama…", "Local-first and end-to-end encrypted. Sign in only if you want sync across your devices.": "Data disimpan lokal dan terenkripsi end-to-end. Masuk hanya jika kamu ingin sinkronisasi antarperangkat.", @@ -545,7 +556,9 @@ MintBudget.i18n.add('id', { "Next tip": "Tips berikutnya", "No account, local-first, end-to-end encrypted sync. The server never sees your numbers.": "Tanpa akun, data lokal, sinkron terenkripsi end-to-end. Server tidak pernah melihat angkamu.", "No accounts. Works offline and syncs when you are back": "Tanpa akun. Bisa offline dan sinkron saat kamu kembali online", +"No backup yet.": "Belum ada cadangan.", "No goals yet": "Belum ada target", +"No market price for {names}; keep typing those.": "Tidak ada harga pasar untuk {names}; isi sendiri yang itu.", "No real investment guarantees high returns with no risk. Walk away and check your regulator's warning list.": "Tidak ada investasi sungguhan yang menjamin imbal hasil tinggi tanpa risiko. Tinggalkan dan cek daftar peringatan regulator.", "No rows found in that CSV": "Tidak ada baris di CSV itu", "No sign-up, no ads": "Tanpa daftar, tanpa iklan", @@ -556,6 +569,7 @@ MintBudget.i18n.add('id', { "Not quite.": "Belum tepat.", "Not syncing": "Tidak menyinkronkan", "Nothing new from WhatsApp": "Tidak ada yang baru dari WhatsApp", +"Nothing to price yet": "Belum ada yang bisa diberi harga", "Nothing to worry about.": "Tidak ada yang perlu dikhawatirkan.", "Notifications are blocked in your browser settings.": "Notifikasi diblokir di pengaturan browsermu.", "Notifications on": "Notifikasi aktif", @@ -616,6 +630,7 @@ MintBudget.i18n.add('id', { "Preferences": "Preferensi", "Previous month": "Bulan sebelumnya", "Price": "Harga", +"Price you entered": "Harga yang kamu isi", "Prices are entered by you; update them any time.": "Harga kamu isi sendiri; perbarui kapan saja.", "Prices are in each holding’s currency; values are converted to {cur}.": "Harga dalam mata uang tiap aset; nilai dikonversi ke {cur}.", "Private": "Pribadi", @@ -636,6 +651,7 @@ MintBudget.i18n.add('id', { "Rebalancing keeps your risk where you chose it and quietly sells high and buys low.": "Penyeimbangan ulang menjaga risikomu sesuai pilihan dan diam-diam menjual saat tinggi serta membeli saat rendah.", "Reconnecting…": "Menghubungkan ulang…", "Refresh": "Muat ulang", +"Refresh prices": "Perbarui harga", "Region": "Wilayah", "Relay server": "Server relay", "Relay unreachable, retrying…": "Relay tidak terjangkau, mencoba lagi…", @@ -771,6 +787,7 @@ MintBudget.i18n.add('id', { "Stocks": "Saham", "Stocks & ETFs": "Saham & ETF", "Stocks or ETFs regularly": "Rutin saham atau ETF", +"Stocks, ETFs, crypto and gold update from the market automatically; bonds and funds keep the price you enter.": "Saham, ETF, kripto, dan emas diperbarui otomatis dari pasar; obligasi dan reksa dana memakai harga yang kamu isi.", "Stocks, crypto and more": "Saham, kripto, dan lainnya", "Stop syncing": "Berhenti sinkron", "Stop syncing on this device": "Hentikan sinkron di perangkat ini", @@ -836,6 +853,8 @@ MintBudget.i18n.add('id', { "This account’s sync key changed on another device. Sign in again to unlock it.": "Kunci sinkronisasi akun ini berubah di perangkat lain. Masuk lagi untuk membukanya.", "This brings {cat} to {pct}% of its limit.": "Ini membuat {cat} jadi {pct}% dari batasnya.", "This browser cannot sync (needs HTTPS and a modern browser).": "Browser ini tidak bisa sinkron (butuh HTTPS dan browser modern).", +"This browser keeps Mint’s data even when space runs low.": "Browser ini menyimpan data Mint meski ruang penyimpanan menipis.", +"This browser may clear site data when space runs low — sync or back up.": "Browser ini bisa menghapus data situs saat ruang menipis — aktifkan sinkronisasi atau buat cadangan.", "This budget": "Anggaran ini", "This budget is empty": "Anggaran ini masih kosong", "This device": "Perangkat ini", @@ -883,13 +902,16 @@ MintBudget.i18n.add('id', { "Update Mint": "Perbarui Mint", "Update now": "Perbarui sekarang", "Updated to Mint {v}": "Mint diperbarui ke {v}", +"Updated {n} prices": "{n} harga diperbarui", "Updates": "Pembaruan", "Updating Mint…": "Memperbarui Mint…", +"Updating…": "Memperbarui…", "Use Mint's plan": "Pakai rencana Mint", "Use tax-friendly accounts": "Gunakan rekening yang ramah pajak", "Use the 48-hour rule: add wants to a wishlist and buy only if you still want it 2 days later.": "Pakai aturan 48 jam: masukkan keinginan ke daftar dan beli hanya jika 2 hari kemudian masih mau.", "Use “{name}” as your investing target?": "Pakai “{name}” sebagai target investasimu?", "Value": "Nilai", +"Values and drift now use today’s prices.": "Nilai dan selisih alokasi kini memakai harga hari ini.", "Vanguard S&P 500 ETF (fractional)": "ETF Vanguard S&P 500 (pecahan)", "Version": "Versi", "Vietnamese dong": "Dong Vietnam", @@ -1045,6 +1067,7 @@ MintBudget.i18n.add('id', { "{n} online": "{n} online", "{n} people": "{n} orang", "{n} transactions": "{n} transaksi", +"{n} transactions live only in this browser. Turn on sync in Settings or save a backup.": "{n} transaksi hanya tersimpan di browser ini. Aktifkan sinkronisasi di Pengaturan atau simpan cadangan.", "{n} transactions without a category": "{n} transaksi tanpa kategori", "{n} waiting to be added": "{n} menunggu dimasukkan", "{n}d ago": "{n} hari lalu", diff --git a/apps/mint/web/budget/js/lang/zh.js b/apps/mint/web/budget/js/lang/zh.js index f627cbbd..671651b9 100644 --- a/apps/mint/web/budget/js/lang/zh.js +++ b/apps/mint/web/budget/js/lang/zh.js @@ -103,6 +103,7 @@ MintBudget.i18n.add('zh', { "Ayu just added Rp 180.000 · 6 days to go": "Ayu 刚记了 Rp 180.000 · 还剩 6 天", "BPJS + health insurance": "BPJS + 健康保险", "Back": "返回", +"Back up now": "立即备份", "Backup (JSON)": "备份(JSON)", "Backup restored": "备份已恢复", "Badminton court": "羽毛球场", @@ -166,6 +167,7 @@ MintBudget.i18n.add('zh', { "Check my budget first": "先看看预算", "Check now": "立即检查", "Check the fees": "留意费用", +"Check your connection; your prices stay as they are.": "请检查网络;你的价格保持不变。", "Check your monthly plan": "查看你的月度计划", "Checking daily makes you nervous. A yearly check-up to rebalance is enough for most people.": "天天看盘会让人紧张。对大多数人来说,每年检查并再平衡一次就够了。", "Checking for updates…": "正在检查更新…", @@ -205,6 +207,7 @@ MintBudget.i18n.add('zh', { "Could not save on this device": "无法保存到此设备", "Could not save the file": "无法保存文件", "Could not unlock synced data on this device. Sign in again.": "无法在本设备上解锁已同步的数据,请重新登录。", +"Couldn’t reach live prices ({time}); showing the last ones.": "无法获取实时价格({time});显示上次的价格。", "Create": "创建", "Create a \"Giving & gifts\" envelope so generosity is planned, not guilt-driven.": "建一个\"人情与礼物\"信封,让慷慨有计划,而不是出于内疚。", "Create a budget": "创建预算", @@ -300,6 +303,7 @@ MintBudget.i18n.add('zh', { "Family budget": "家庭预算", "Fees": "费用", "Fees compound too. Paying 1.8% more every year can eat roughly 40% of the final amount over 30 years.": "费用也会复利。每年多付 1.8%,30 年下来可能吃掉最终金额的约 40%。", +"Fetching live prices…": "正在获取实时价格…", "Fetching the latest data from your collaborators…": "正在获取协作者的最新数据…", "Filter category": "筛选类别", "Filter person": "筛选成员", @@ -443,11 +447,13 @@ MintBudget.i18n.add('zh', { "Keep it to 3 buckets (needs, wants, savings) until it feels easy.": "先只用 3 个桶(必需、想要、储蓄),等熟练了再细分。", "Keep it under {amount} a day to finish the month inside the limit.": "每天控制在 {amount} 以内,就能在额度内过完这个月。", "Keep speculative bets (single stocks, crypto) under 10% of the portfolio.": "投机性仓位(个股、加密货币)控制在组合的 10% 以下。", +"Keep your budget safe": "保护好你的预算", "Keyboard shortcuts": "键盘快捷键", "Kind": "性质", "Language": "语言", "Largest drift": "最大偏离", "Last WhatsApp entry removed": "已删除最后一条 WhatsApp 记录", +"Last backup: {date}": "上次备份:{date}", "Last edited by {name}": "最后由 {name} 修改", "Later": "稍后", "Learn": "学习", @@ -467,6 +473,11 @@ MintBudget.i18n.add('zh', { "List every subscription and cancel the ones you have not used in 30 days.": "列出所有订阅,取消 30 天内没用过的。", "Live": "实时", "Live activity": "实时动态", +"Live price: {source}, {time}": "实时价格:{source},{time}", +"Live prices are unreachable": "无法获取实时价格", +"Live prices cover stocks, ETFs, crypto and gold. Add a holding with its ticker, e.g. BBCA, AAPL or BTC.": "实时价格支持股票、ETF、加密货币和黄金。用代码添加持仓,例如 BBCA、AAPL 或 BTC。", +"Live prices for stocks, ETFs, crypto and gold — tap Refresh prices.": "股票、ETF、加密货币和黄金支持实时价格——点“刷新价格”。", +"Live prices updated {time}": "实时价格更新于 {time}", "Load demo budget": "载入示例预算", "Loading headlines…": "正在加载新闻…", "Local-first and end-to-end encrypted. Sign in only if you want sync across your devices.": "数据优先保存在本地并端到端加密。只有需要跨设备同步时才需登录。", @@ -545,7 +556,9 @@ MintBudget.i18n.add('zh', { "Next tip": "下一条建议", "No account, local-first, end-to-end encrypted sync. The server never sees your numbers.": "无需账号,本地优先,端到端加密同步。服务器永远看不到你的数字。", "No accounts. Works offline and syncs when you are back": "无需账号。离线可用,恢复联网后自动同步", +"No backup yet.": "尚未备份。", "No goals yet": "还没有目标", +"No market price for {names}; keep typing those.": "{names} 没有市场价格,请继续手动填写。", "No real investment guarantees high returns with no risk. Walk away and check your regulator's warning list.": "没有任何真实投资能保证零风险高回报。远离它,并查看监管机构的警示名单。", "No rows found in that CSV": "该 CSV 中没有数据行", "No sign-up, no ads": "无需注册,没有广告", @@ -556,6 +569,7 @@ MintBudget.i18n.add('zh', { "Not quite.": "不太对。", "Not syncing": "未同步", "Nothing new from WhatsApp": "WhatsApp 暂无新记录", +"Nothing to price yet": "暂无可更新价格的资产", "Nothing to worry about.": "一切正常,无需担心。", "Notifications are blocked in your browser settings.": "浏览器设置中已屏蔽通知。", "Notifications on": "通知已开启", @@ -616,6 +630,7 @@ MintBudget.i18n.add('zh', { "Preferences": "偏好设置", "Previous month": "上个月", "Price": "价格", +"Price you entered": "你填写的价格", "Prices are entered by you; update them any time.": "价格由你自行填写,可随时更新。", "Prices are in each holding’s currency; values are converted to {cur}.": "价格按各持仓的货币计价,市值换算为 {cur}。", "Private": "私密", @@ -636,6 +651,7 @@ MintBudget.i18n.add('zh', { "Rebalancing keeps your risk where you chose it and quietly sells high and buys low.": "再平衡让风险保持在你选定的水平,并在不知不觉中高卖低买。", "Reconnecting…": "正在重新连接…", "Refresh": "刷新", +"Refresh prices": "刷新价格", "Region": "地区", "Relay server": "中继服务器", "Relay unreachable, retrying…": "无法连接中继,正在重试…", @@ -771,6 +787,7 @@ MintBudget.i18n.add('zh', { "Stocks": "股票", "Stocks & ETFs": "股票与 ETF", "Stocks or ETFs regularly": "定期买股票或 ETF", +"Stocks, ETFs, crypto and gold update from the market automatically; bonds and funds keep the price you enter.": "股票、ETF、加密货币和黄金会自动按市场价更新;债券和基金使用你填写的价格。", "Stocks, crypto and more": "股票、加密货币等", "Stop syncing": "停止同步", "Stop syncing on this device": "在此设备上停止同步", @@ -836,6 +853,8 @@ MintBudget.i18n.add('zh', { "This account’s sync key changed on another device. Sign in again to unlock it.": "此账户的同步密钥已在另一台设备上更改,请重新登录以解锁。", "This brings {cat} to {pct}% of its limit.": "这会让 {cat} 达到额度的 {pct}%。", "This browser cannot sync (needs HTTPS and a modern browser).": "此浏览器无法同步(需要 HTTPS 和较新的浏览器)。", +"This browser keeps Mint’s data even when space runs low.": "即使存储空间不足,此浏览器也会保留 Mint 的数据。", +"This browser may clear site data when space runs low — sync or back up.": "存储空间不足时,此浏览器可能会清除网站数据——请开启同步或备份。", "This budget": "当前预算", "This budget is empty": "这个预算还是空的", "This device": "本设备", @@ -883,13 +902,16 @@ MintBudget.i18n.add('zh', { "Update Mint": "更新 Mint", "Update now": "立即更新", "Updated to Mint {v}": "Mint 已更新到 {v}", +"Updated {n} prices": "已更新 {n} 个价格", "Updates": "更新", "Updating Mint…": "正在更新 Mint…", +"Updating…": "正在更新…", "Use Mint's plan": "使用 Mint 的方案", "Use tax-friendly accounts": "利用税收优惠账户", "Use the 48-hour rule: add wants to a wishlist and buy only if you still want it 2 days later.": "用 48 小时法则:先把想买的加入心愿单,两天后还想要再买。", "Use “{name}” as your investing target?": "要把“{name}”设为你的投资目标吗?", "Value": "市值", +"Values and drift now use today’s prices.": "市值和偏离度现已使用今日价格。", "Vanguard S&P 500 ETF (fractional)": "先锋标普 500 ETF(碎股)", "Version": "版本", "Vietnamese dong": "越南盾", @@ -1045,6 +1067,7 @@ MintBudget.i18n.add('zh', { "{n} online": "{n} 人在线", "{n} people": "{n} 人", "{n} transactions": "{n} 笔交易", +"{n} transactions live only in this browser. Turn on sync in Settings or save a backup.": "有 {n} 笔交易只保存在此浏览器中。请在设置中开启同步或保存备份。", "{n} transactions without a category": "{n} 笔交易未分类", "{n} waiting to be added": "{n} 条等待记入", "{n}d ago": "{n} 天前", diff --git a/apps/mint/web/budget/styles.css b/apps/mint/web/budget/styles.css index 436b9aec..c95d764b 100644 --- a/apps/mint/web/budget/styles.css +++ b/apps/mint/web/budget/styles.css @@ -1196,3 +1196,9 @@ h1, h2, h3, h4 { font-weight: 650; letter-spacing: -0.015em; } .qa-mic.is-busy { opacity: .6; animation: qa-mic-pulse 1s ease-in-out infinite; } @keyframes qa-mic-pulse { 50% { transform: scale(.92); } } @media (prefers-reduced-motion: reduce) { .qa-mic, .qa-mic.is-busy { animation: none; transition: none; } } + +/* 3.5 live prices */ +.holdings-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; } +.quote-status { display: flex; align-items: center; gap: 6px; margin-top: -4px; } +.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good, #1f9d55); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--good, #1f9d55) 22%, transparent); } +.grid-table.holdings td.is-live input { box-shadow: inset 2px 0 0 var(--good, #1f9d55); } diff --git a/apps/mint/web/budget/tests.html b/apps/mint/web/budget/tests.html index bbab4a18..a6e8cb87 100644 --- a/apps/mint/web/budget/tests.html +++ b/apps/mint/web/budget/tests.html @@ -193,6 +193,51 @@

🌿 Mint Budget self-test

check('tips include persona tips', tips.filter((t) => t.kind === 'persona').length === 6); check('tips include data tips', tips.filter((t) => t.kind === 'data').length >= 1); + + // ---------------------------------------------------------- live prices (3.5) + const qb = K.newBook({ currency: 'IDR' }); + const hBBCA = K.put(qb, 'holdings', { symbol: 'bbca', name: 'Bank Central Asia', cls: 'stocks', qty: 100, cost: 8000, price: 8000 }, 'me').id; + const hAAPL = K.put(qb, 'holdings', { symbol: 'AAPL', name: 'Apple', cls: 'stocks', cur: 'USD', qty: 2, cost: 200, price: 200 }, 'me').id; + const hBTC = K.put(qb, 'holdings', { symbol: 'BTC', name: 'Bitcoin', cls: 'crypto', qty: 0.01, cost: 1e9, price: 1e9 }, 'me').id; + const hGold = K.put(qb, 'holdings', { symbol: 'ANTAM', name: 'Gold (grams)', cls: 'gold', qty: 10, cost: 1.5e6, price: 1.5e6 }, 'me').id; + const hBond = K.put(qb, 'holdings', { symbol: 'ORI025', name: 'Retail bond', cls: 'bonds', qty: 1, cost: 1e6, price: 1e6 }, 'me').id; + const hMine = K.put(qb, 'holdings', { symbol: 'TLKM', name: 'Telkom', cls: 'stocks', qty: 1, cost: 3000, price: 3100, priceManual: true }, 'me').id; + eq('quote key: stock', K.quoteKey(qb.holdings[hBBCA]), 'stock:BBCA'); + eq('quote key: gold', K.quoteKey(qb.holdings[hGold]), 'gold:XAU'); + eq('quote key: bonds have no market price', K.quoteKey(qb.holdings[hBond]), ''); + eq('gold held in grams', K.goldUnit(qb.holdings[hGold]), 'g'); + eq('gold in ounces', K.goldUnit({ name: 'Gold 1 oz coin', symbol: 'XAU' }), 'oz'); + const qreq = K.quoteRequests(qb); + const idReq = qreq.find((r) => r.region === 'ID'); + const usReq = qreq.find((r) => r.region === ''); + check('IDR holdings ask with region ID', idReq && idReq.keys.indexOf('stock:BBCA') >= 0 && idReq.keys.indexOf('crypto:BTC') >= 0, JSON.stringify(qreq)); + check('USD holdings ask without region', usReq && usReq.keys.join() === 'stock:AAPL', JSON.stringify(qreq)); + check('manual prices are skipped on auto refresh', idReq.keys.indexOf('stock:TLKM') < 0); + check('refresh button includes manual prices', K.quoteRequests(qb, { force: true }).find((r) => r.region === 'ID').keys.indexOf('stock:TLKM') >= 0); + const answers = { + ID: { + 'stock:BBCA': { price: 9875, currency: 'IDR', at: 1761696000, source: 'Yahoo Finance' }, + 'crypto:BTC': { price: 100000, currency: 'USD', at: 1761696000, source: 'CoinGecko' }, + 'gold:XAU': { price: 3110.35, perGram: 100, currency: 'USD', at: 1761696000, source: 'CoinGecko (PAX Gold)' }, + 'stock:TLKM': { price: 3500, currency: 'IDR', at: 1761696000, source: 'Yahoo Finance' }, + }, + '': { 'stock:AAPL': { price: 230.5, currency: 'USD', at: 1761696000, source: 'Yahoo Finance' } }, + }; + const ups = K.priceUpdates(qb, answers); + const upOf = (id) => ups.find((u) => u.id === id); + eq('IDX price stays in rupiah', upOf(hBBCA).price, 9875); + eq('US stock stays in dollars', upOf(hAAPL).price, 230.5); + eq('crypto converted into the holding currency', upOf(hBTC).price, K.roundPrice(100000 * K.rate('USD', 'IDR'), 'IDR')); + eq('gold priced per gram', upOf(hGold).price, K.roundPrice(100 * K.rate('USD', 'IDR'), 'IDR')); + check('bonds and manual prices untouched', !upOf(hBond) && !upOf(hMine)); + eq('source recorded', upOf(hBTC).priceSrc, 'CoinGecko'); + const forced = K.priceUpdates(qb, answers, { force: true }); + const tl = forced.find((u) => u.id === hMine); + check('refresh clears the manual flag', tl && tl.price === 3500 && tl.priceManual === false, JSON.stringify(tl)); + eq('tiny prices keep 6 significant digits', K.roundPrice(0.0000123456789, 'USD'), 0.0000123457); + ups.forEach((u) => K.put(qb, 'holdings', u, 'me')); + eq('no churn when prices are unchanged', K.priceUpdates(qb, answers).length, 0); + // ---------------------------------------------------------- crypto const keyStr = K.newRoomKey(); const key = await K.importRoomKey(keyStr); From 0ff86fa09b504ffd93c1755cf3a70b5505abcf1b Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 09:46:35 +0700 Subject: [PATCH 2/6] Mint 3.5 (wip): Templates speaks Chinese and Spanish (578 phrases + rules), 4-language switcher --- apps/mint/web/app.html | 3 +- apps/mint/web/js/i18n-more.js | 1321 +++++++++++++++++++++++++++++++++ apps/mint/web/js/i18n.js | 72 +- apps/mint/web/mobile.html | 3 +- apps/mint/web/sw.js | 2 +- apps/mint/web/web.html | 3 +- 6 files changed, 1379 insertions(+), 25 deletions(-) create mode 100644 apps/mint/web/js/i18n-more.js diff --git a/apps/mint/web/app.html b/apps/mint/web/app.html index 4020f006..46444edf 100644 --- a/apps/mint/web/app.html +++ b/apps/mint/web/app.html @@ -79,7 +79,8 @@ - + + diff --git a/apps/mint/web/js/i18n-more.js b/apps/mint/web/js/i18n-more.js new file mode 100644 index 00000000..9d816fe4 --- /dev/null +++ b/apps/mint/web/js/i18n-more.js @@ -0,0 +1,1321 @@ +/* Mint Templates — Chinese (简体) and Spanish packs for js/i18n.js. Loaded before i18n.js. + * Keys are the English source strings (the same keys as the Indonesian dictionary in i18n.js). + * Mint 3.5: Templates now speaks all four Mint languages (en / id / zh / es). */ +(function (root) { + "use strict"; + + var ZH = { + "🛍️ Browse": "🛍️ 浏览", + "🏷️ Sell": "🏷️ 出售", + "🤝 Earn": "🤝 赚佣金", + "Help": "帮助", + "Marketplace": "市场", + "💰 Use in my budget": "💰 用在我的预算里", + "📈 Use as my investing target": "📈 设为我的投资目标", + "Budget": "预算", + "Your shared budgets": "你的共享预算", + "Create": "创建", + "Market": "市场", + "Library": "我的模板", + "Sell": "出售", + "Affiliate": "推广联盟", + "Guides": "指南", + "Log in": "登录", + "Log out": "退出登录", + "Account": "账户", + "Skip to content": "跳到内容", + "Light / dark": "浅色 / 深色", + "Toggle light or dark interface": "切换浅色或深色界面", + "Loading Mint…": "正在加载 Mint…", + "Loading…": "加载中…", + "Mint · buyers pay sellers directly ·": "Mint · 买家直接付款给卖家 ·", + "Get the app": "下载应用", + "Privacy": "隐私", + "Terms": "条款", + "· made by": "· 作者", + "Main": "主菜单", + "Live": "在线", + "Offline": "离线", + "Language": "语言", + "Prompt a spreadsheet template.": "一句话生成表格模板。", + "Tweak it. Sell it.": "随心修改,挂牌出售。", + "Describe what you need in English or Bahasa Indonesia. Mint builds a themed Excel / Google Sheets template with live formulas, dropdowns and a dashboard — then publish it to the market, or let affiliates sell it for you.": "用中文、英文或印尼语描述你的需求。Mint 会生成带主题的 Excel / Google 表格模板,包含实时公式、下拉菜单和仪表盘——然后发布到市场,或让推广者帮你卖。", + "Prompt": "描述", + "“Inventory for my online shop, green” → a working template in a second.": "“网店库存表,绿色” → 一秒得到可用的模板。", + "Tweak": "调整", + "Edit with words (“add column Supplier”) or by hand. Pick a theme.": "用文字(“添加供应商列”)或手动修改,选择一个主题。", + "Publish with a price and affiliate %, get a content kit, track sales.": "设定价格和推广佣金比例后发布,获取推广素材包,跟踪销量。", + "Fresh in the market": "市场新品", + "Browse all →": "浏览全部 →", + "Creator guides": "创作者指南", + "All guides →": "全部指南 →", + "← All guides": "← 全部指南", + "Earn without making templates": "不做模板也能赚钱", + "Join the affiliate program: share any listing with an “Earn %” badge and get paid commission on every sale you refer.": "加入推广联盟:分享任何带“赚 %”标记的商品,你带来的每笔销售都能拿佣金。", + "How it works": "使用方法", + "How it works →": "使用方法 →", + "No listings yet.": "还没有商品。", + "Make, theme, price, promote and sell spreadsheet templates.": "制作、美化、定价、推广并出售表格模板。", + "Create a template": "创建模板", + "Describe your template": "描述你的模板", + "e.g. Freelance invoice tracker in rupiah with notes, ocean theme": "例如:自由职业发票追踪表,人民币计价,带备注,海洋主题", + "Use my AI": "使用我的 AI", + "Designed by an AI model; the quick generator is used if AI is busy": "由 AI 模型设计;AI 繁忙时改用快速生成器", + "Mint AI": "Mint AI", + "✨ Generate": "✨ 生成", + "Generating…": "生成中…", + "…or start from a blueprint": "…或从蓝本开始", + "Freelance invoice tracker with notes": "带备注的自由职业发票追踪表", + "Monthly budget in rupiah, pastel pink": "印尼盾月度预算,粉彩粉色", + "Inventory for my online shop, green": "网店库存表,绿色", + "Content calendar for TikTok and Instagram": "TikTok 和 Instagram 内容日历", + "Airbnb host profit tracker": "Airbnb 房东利润追踪表", + "Describe the template you want first": "请先描述你想要的模板", + "Designed by Mint AI. Tweak anything below — or ask in words.": "由 Mint AI 设计。下面任何内容都可以修改——或直接用文字说明。", + "AI returned too few columns": "AI 返回的列太少", + "Tweak with words": "用文字修改", + "Type a change and press Apply.": "输入修改内容,然后点“应用”。", + "Apply": "应用", + "Theme": "主题", + "Details": "详情", + "Title": "标题", + "Description": "描述", + "Category": "类别", + "Currency": "货币", + "💾 Save draft": "💾 保存草稿", + "🚀 Publish to market": "🚀 发布到市场", + "+ New template": "+ 新模板", + "Saved draft": "草稿已保存", + "Unsaved": "未保存", + "· changes auto-save on this device": "· 更改会自动保存在此设备上", + "+ Add row": "+ 添加行", + "Columns": "列", + "Dashboard cards": "仪表盘卡片", + "Colour rules": "颜色规则", + "Name": "名称", + "Type": "类型", + "Options / formula": "选项 / 公式", + "Use [Column Name]": "使用 [列名]", + "Result format": "结果格式", + "Column name": "列名", + "Column type": "列类型", + "Move left": "左移", + "Move right": "右移", + "Delete column": "删除列", + "New column name": "新列名", + "Add column": "添加列", + "Card label": "卡片标签", + "Count when equal to": "当等于以下值时计数", + "equals": "等于", + "Remove card": "移除卡片", + "+ Add card": "+ 添加卡片", + "Value": "值", + "Remove rule": "移除规则", + "+ Add rule": "+ 添加规则", + "Formula:": "公式:", + "Formula problems:": "公式问题:", + "Formula included in the full template": "完整模板中包含该公式", + "Delete row": "删除行", + "Draft saved to your account": "草稿已保存到你的账户", + "Start a new template? Unsaved changes to this one stay only if you saved the draft.": "开始新模板?只有保存过草稿,当前模板的未保存更改才会保留。", + "Log in to save drafts and publish": "登录后即可保存草稿并发布", + "Downloaded .xlsx — opens in Excel and Google Sheets": "已下载 .xlsx——可在 Excel 和 Google 表格中打开", + "Copied": "已复制", + "Something went wrong": "出了点问题", + "Save or open": "保存或打开", + "Yes": "是", + "No": "否", + "Template market": "模板市场", + "Search templates…": "搜索模板…", + "Search": "搜索", + "All categories": "所有类别", + "Sort": "排序", + "Newest": "最新", + "Best selling": "最畅销", + "Top rated": "评分最高", + "Price: low to high": "价格:从低到高", + "Price: high to low": "价格:从高到低", + "Free only": "仅免费", + "No templates match.": "没有匹配的模板。", + "Create the first one": "创建第一个", + "Free": "免费", + "New": "新品", + "Earn": "赚佣金", + "Earn %": "赚 %", + "No ratings yet": "暂无评分", + "← Market": "← 市场", + "by": "作者", + "Live preview": "实时预览", + "🔒 Preview — columns marked 🔒 show sample results only. The formulas, dropdown logic and dashboard come with the file after purchase.": "🔒 预览——标有 🔒 的列只显示示例结果。公式、下拉逻辑和仪表盘会在购买后随文件提供。", + "Reviews": "评价", + "No reviews yet.": "暂无评价。", + "Rating": "评分", + "Rate this template": "为这个模板评分", + "What did it help with?": "它帮你解决了什么?", + "Post review": "发表评价", + "Reported — thanks, we’ll take a look": "已举报——谢谢,我们会查看", + "⚠ Report this template": "⚠ 举报此模板", + "This is your listing.": "这是你发布的商品。", + "📣 Content kit": "📣 推广素材包", + "Content kit": "推广素材包", + "✔ In your library": "✔ 已在我的模板中", + "⬇ Download .xlsx": "⬇ 下载 .xlsx", + "Download .xlsx": "下载 .xlsx", + "— waiting for payment": "——等待付款", + "Pay now ↗": "立即付款 ↗", + "I’ve paid — check now": "我已付款——立即检查", + "Cancel order": "取消订单", + "Got a coupon? Re-order at the lower price": "有优惠码?按更低价格重新下单", + "Have a coupon?": "有优惠码吗?", + "Coupon code": "优惠码", + "Put": "把", + "in the payment note.": "填写在付款备注中。", + "The seller confirms → it unlocks in your library.": "卖家确认后 → 模板会出现在你的模板库中。", + "seller’s checkout": "卖家的结账页面", + "Get it free": "免费获取", + "You’ll pay on": "你将在以下渠道付款:", + "You pay the seller directly on their checkout (QRIS, e-wallet, card…). Your order reference unlocks the template once the seller confirms. Your name and email are shared with the seller for this order.": "你直接在卖家的结账页面付款(二维码、电子钱包、银行卡…)。卖家确认后,订单编号会解锁模板。此订单会向卖家提供你的姓名和邮箱。", + "Offline — connect to buy.": "离线——联网后才能购买。", + "Get affiliate link": "获取推广链接", + "Your affiliate link": "你的推广链接", + "Copy link": "复制链接", + "Copy code": "复制代码", + "Log in to get this template": "登录后获取此模板", + "Already in your library": "已在你的模板库中", + "Added to your library 🎉": "已添加到你的模板库 🎉", + "Checking…": "检查中…", + "Payment confirmed — it’s in your library 🎉": "付款已确认——已加入你的模板库 🎉", + "Not paid yet — finish on the checkout page, then check again": "尚未付款——请在结账页面完成付款后再检查", + "Log in to report a template": "登录后才能举报模板", + "What’s wrong with this template? (copied, misleading, broken, spam, offensive…)": "这个模板有什么问题?(抄袭、误导、无法使用、垃圾内容、冒犯…)", + "Thanks — report sent": "谢谢——举报已发送", + "Cancel this order? Only do this if you haven’t paid.": "取消此订单?仅在你尚未付款时这样做。", + "Order cancelled": "订单已取消", + "Log in to become an affiliate": "登录后成为推广者", + "Thanks for the review": "感谢你的评价", + "Not found": "未找到", + "Back to market": "返回市场", + "Log in to use a coupon": "登录后使用优惠码", + "Your library": "我的模板库", + "Templates you buy or claim appear here.": "你购买或领取的模板会显示在这里。", + "Orders": "订单", + "waiting for seller": "等待卖家确认", + "Pay ↗": "付款 ↗", + "Check payment": "检查付款", + "View": "查看", + "Paid already? Instant-checkout orders unlock automatically (or tap Check payment); for payment-link orders the seller confirms using the reference.": "已经付款?即时结账的订单会自动解锁(或点“检查付款”);付款链接订单由卖家根据订单编号确认。", + "Nothing here yet.": "这里还什么都没有。", + "Browse the market": "逛逛市场", + "Copy into the Studio for personal edits": "复制到工作室进行个人修改", + "Customize": "自定义", + "Purchased templates are licensed for your own use. Re-selling someone else’s template is not allowed.": "购买的模板仅授权你本人使用,不得转售他人的模板。", + "Payment confirmed 🎉": "付款已确认 🎉", + "Not paid yet": "尚未付款", + "Sell templates": "出售模板", + "Log in to save drafts, publish and track sales.": "登录后即可保存草稿、发布并跟踪销量。", + "Seller dashboard": "卖家后台", + "Gross": "总额", + "Affiliate payouts": "推广佣金支出", + "Your earnings": "你的收入", + "Sales": "销量", + "Orders to confirm": "待确认订单", + "Check your payment app for the reference in the payment note, then confirm. Confirmed buyers can download immediately.": "在你的收款应用里查看付款备注中的订单编号,然后确认。确认后的买家可立即下载。", + "Payment received": "已收到付款", + "Not paid": "未付款", + "Last 30 days": "最近 30 天", + "views count once per visitor per hour": "每位访客每小时只计一次浏览", + "Views": "浏览量", + "Conversion": "转化率", + "Earned": "已赚取", + "Coupons": "优惠码", + "Discount codes for launches, followers or bundles. Buyers type the code or open your coupon link; affiliate commission is paid on the discounted price.": "用于新品发布、粉丝或组合优惠的折扣码。买家输入优惠码或打开你的优惠链接;推广佣金按折后价计算。", + "All your templates": "你的所有模板", + "Pause": "暂停", + "Resume": "恢复", + "Delete": "删除", + "New coupon": "新建优惠码", + "Code": "代码", + "Discount %": "折扣 %", + "Applies to": "适用于", + "All my paid templates": "我所有的付费模板", + "Max uses (0 = unlimited)": "最多使用次数(0 = 不限)", + "Expires after days (0 = never)": "多少天后过期(0 = 永不)", + "Create coupon": "创建优惠码", + "Coupons work on paid templates — publish one first.": "优惠码仅适用于付费模板——请先发布一个。", + "Affiliate commissions": "推广佣金", + "Pay affiliates to the details they gave, then mark it paid.": "按推广者提供的收款信息付款,然后标记为已付。", + "affiliate hasn’t added payout details yet": "推广者尚未添加收款信息", + "Mark paid": "标记为已付", + "Listings": "商品", + "Unpublish": "下架", + "Republish": "重新上架", + "Save": "保存", + "No listings yet — publish a draft below.": "还没有商品——在下方发布一份草稿。", + "Drafts": "草稿", + "Publish": "发布", + "No saved drafts.": "没有已保存的草稿。", + "Recent sales": "最近销售", + "No sales yet. Share your listing with the content kit.": "还没有销售。用推广素材包分享你的商品吧。", + "Turn off automatic payments? Listings without a payment link stop accepting new orders.": "关闭自动收款?没有付款链接的商品将不再接受新订单。", + "Automatic payments turned off": "已关闭自动收款", + "Delete this coupon? Orders that used it keep their price.": "删除此优惠码?已使用它的订单保持原价格。", + "Coupon deleted": "优惠码已删除", + "Coupon updated": "优惠码已更新", + "Mark this order as not paid? The buyer can order again.": "将此订单标记为未付款?买家可以重新下单。", + "Confirmed — the buyer can download now": "已确认——买家现在可以下载", + "Order rejected": "订单已拒绝", + "Commission marked paid": "佣金已标记为已付", + "Delete this draft?": "删除这份草稿?", + "Checking the key…": "正在检查密钥…", + "Connect": "连接", + "Listing updated": "商品已更新", + "test mode": "测试模式", + "Disconnect": "断开连接", + "⚡ Get paid automatically": "⚡ 自动收款", + "— QRIS, e-wallets, VA and cards; files unlock the moment buyers pay": "——二维码、电子钱包、虚拟账户和银行卡;买家付款后文件立即解锁", + "Connect your own payment account. Buyers pay on its secure checkout, Mint confirms the payment directly with the provider and unlocks the template instantly. The money goes to you, not to Mint.": "连接你自己的收款账户。买家在其安全结账页面付款,Mint 直接向支付服务商确认付款并立即解锁模板。钱直接到你账上,不经过 Mint。", + "Provider": "支付服务商", + "(most currencies)": "(支持大多数货币)", + "Try it first with a sandbox / test key — Mint shows “test mode” until you switch to a live key.": "先用沙盒 / 测试密钥试用——在你换成正式密钥之前,Mint 会显示“测试模式”。", + "and unlocks the file instantly — nothing to confirm by hand. Money goes straight to your account.": "并立即解锁文件——无需手动确认。钱直接进入你的账户。", + "; other listings keep using your payment link.": ";其他商品继续使用你的付款链接。", + "· stored encrypted, used only to create checkouts and read their status.": "· 加密存储,仅用于创建结账页面和读取付款状态。", + "live": "正式", + "hidden": "已隐藏", + "flagged": "已被标记", + "removed": "已移除", + "active": "有效", + "paused": "已暂停", + "expired": "已过期", + "owed": "待付", + "paid": "已付", + "Log in to publish templates.": "登录后发布模板。", + "Draft not found.": "未找到草稿。", + "Tags (comma separated)": "标签(用逗号分隔)", + "Your payment link": "你的付款链接", + "(required for paid templates — or turn on automatic payments under Sell)": "(付费模板必填——或在“出售”中开启自动收款)", + "Buyers pay you directly there and add their order reference; you confirm in your dashboard and they get the file. Mint never holds your money.": "买家在那里直接付款给你并填写订单编号;你在后台确认后,买家即可获得文件。Mint 从不经手你的钱。", + "Platform fee": "平台费", + "Buyer preview": "买家预览", + "Published! 🎉": "已发布!🎉", + "Affiliate program": "推广联盟计划", + "Log in, open any listing with an “Earn %” badge and get your link.": "登录后,打开任何带“赚 %”标记的商品即可获取你的链接。", + "Affiliate dashboard": "推广者后台", + "Where should sellers pay you?": "卖家应如何付款给你?", + "Shown only to sellers who owe you commission. E.g. “BCA 1234567 a.n. Your Name”, “GoPay 0812…” or a PayPal email.": "只会显示给欠你佣金的卖家。例如“支付宝 138…”、“微信 …”或 PayPal 邮箱。", + "Bank / e-wallet / PayPal": "银行 / 电子钱包 / PayPal", + "Save payout details": "保存收款信息", + "Links": "链接", + "Clicks": "点击量", + "Referred sales": "带来的销售", + "No links yet. Find templates with an": "还没有链接。去找带有", + "Find templates to promote": "寻找可推广的模板", + "Payout details saved": "收款信息已保存", + "Ready-to-post copy with": "现成可发的文案,含", + "your affiliate link": "你的推广链接", + "the listing link": "商品链接", + "and a themed share card. Disclose affiliate links where required.": "以及带主题的分享卡片。请按要求披露推广链接。", + "Promo copy": "推广文案", + "Copy text": "复制文本", + "Share card preview": "分享卡片预览", + "⬇ Download share card (PNG)": "⬇ 下载分享卡片(PNG)", + "TikTok / Reels script": "TikTok / Reels 脚本", + "Blog outline (SEO)": "博客大纲(SEO)", + "Email": "邮箱", + "Password": "密码", + "Forgot password?": "忘记密码?", + "Create account": "创建账户", + "Password (8+ characters)": "密码(至少 8 个字符)", + "Mint is offline right now — this account only lives in this browser until the connection is back.": "Mint 目前离线——在恢复连接之前,此账户只保存在这个浏览器中。", + "Your account works on every device. Passwords are hashed; we never see them.": "你的账户可在所有设备上使用。密码经过哈希处理,我们永远看不到。", + "Reset password": "重置密码", + "Use the recovery code you saved when you created your account (MINT-XXXX-XXXX-XXXX). Without it the account can’t be recovered — Mint stores no other way to prove it’s you.": "使用你创建账户时保存的恢复码(MINT-XXXX-XXXX-XXXX)。没有它就无法找回账户——Mint 没有其他方式验证是你本人。", + "Recovery code": "恢复码", + "New password (8+ characters)": "新密码(至少 8 个字符)", + "Reset and log in": "重置并登录", + "Back to log in": "返回登录", + "Your recovery code": "你的恢复码", + "🔑 Save your recovery code": "🔑 保存你的恢复码", + "Copy": "复制", + "Save as file": "保存为文件", + "I saved it somewhere safe": "我已妥善保存", + "Done": "完成", + "If you ever forget your password, this code is the only way back into your account. Keep it in your notes or password manager.": "如果你忘记密码,这个恢复码是找回账户的唯一方式。请把它存进备忘录或密码管理器。", + "Password changed and other devices signed out. Your old recovery code is used up — here is the new one.": "密码已更改,其他设备已退出登录。旧的恢复码已失效——这是新的恢复码。", + "Close": "关闭", + "Log in or create an account to buy, sell and earn as an affiliate.": "登录或创建账户,即可购买、出售并以推广者身份赚钱。", + "Offline — changes stay in this browser": "离线——更改保留在此浏览器中", + "Clear offline data": "清除离线数据", + "Profile & payouts": "个人资料与收款", + "Display name": "显示名称", + "Affiliate payout details": "推广佣金收款信息", + "📲 Mint on your phone": "📲 手机上的 Mint", + "Android app, iPhone home-screen app, or install from your browser.": "Android 应用、iPhone 主屏幕应用,或从浏览器安装。", + "Advanced: your own AI model": "高级:使用你自己的 AI 模型", + "Mint AI is built in. If you prefer your own OpenAI-compatible model, add it here — the key stays in this browser and is sent only to that endpoint.": "Mint AI 已内置。如果你更喜欢自己的 OpenAI 兼容模型,可在此添加——密钥只保存在此浏览器中,且只发送到该接口。", + "Save AI settings": "保存 AI 设置", + "AI settings saved": "AI 设置已保存", + "Saved": "已保存", + "Erase the offline data stored in this browser?": "清除此浏览器中存储的离线数据?", + "🔔 Notifications": "🔔 通知", + "New orders to confirm, payments received, templates unlocked and commissions paid.": "待确认的新订单、已收到的付款、已解锁的模板和已付的佣金。", + "Checking this device…": "正在检查此设备…", + "Email me about orders, payments and commissions": "通过邮件通知我订单、付款和佣金", + "Email notifications will appear here once Mint’s email sender is set up.": "Mint 的邮件发送设置好后,邮件通知会显示在这里。", + "Notifications are blocked for Mint in this browser’s site settings.": "此浏览器的网站设置已屏蔽 Mint 的通知。", + "✔ On for this device.": "✔ 此设备已开启。", + "Turn off": "关闭", + "Turn on notifications on this device": "在此设备上开启通知", + "Notifications were not allowed": "未允许通知", + "Notifications on — a test notification is on its way": "通知已开启——测试通知正在发送", + "Notifications off for this device": "此设备的通知已关闭", + "Email notifications on": "邮件通知已开启", + "Email notifications off": "邮件通知已关闭", + "Phone notifications aren’t available inside the Android app yet. Open Mint in Chrome (or install it from Chrome) and switch them on there.": "Android 应用内暂不支持手机通知。请在 Chrome 中打开 Mint(或从 Chrome 安装),然后在那里开启。", + "Push notifications aren’t switched on for this Mint server yet.": "此 Mint 服务器尚未开启推送通知。", + "This browser can’t show notifications. On iPhone, add Mint to your Home Screen first (iOS 16.4+), then turn them on from the Home Screen app.": "此浏览器无法显示通知。在 iPhone 上,请先把 Mint 添加到主屏幕(iOS 16.4+),然后在主屏幕应用中开启。", + "You have a recovery code. Lost it? Make a new one — the old one stops working.": "你已有恢复码。弄丢了?生成一个新的——旧的会失效。", + "You don’t have a recovery code yet. Make one now so you can reset a forgotten password.": "你还没有恢复码。现在生成一个,以便忘记密码时可以重置。", + "Change password": "更改密码", + "Current password": "当前密码", + "Your other devices are signed out.": "你的其他设备已退出登录。", + "New recovery code": "新恢复码", + "Delete account": "删除账户", + "Removes your login, drafts, affiliate links and payout details and takes your listings off the market.": "删除你的登录信息、草稿、推广链接和收款信息,并下架你的商品。", + "Buyers keep templates they already paid for and order records stay for their bookkeeping. This can’t be undone.": "买家保留已付款的模板,订单记录也会保留供其记账。此操作无法撤销。", + "Type DELETE to confirm": "输入 DELETE 以确认", + "Delete my account": "删除我的账户", + "Password changed — other devices signed out": "密码已更改——其他设备已退出登录", + "Your previous recovery code no longer works. Save this new one.": "你之前的恢复码已失效。请保存这个新的。", + "Your account was deleted": "你的账户已删除", + "Connected to Mint": "已连接到 Mint", + "Finance": "理财", + "Business": "商业", + "Productivity": "效率", + "Lifestyle": "生活", + "Creator": "创作者", + "Health": "健康", + "Education": "教育", + "Events": "活动", + "Other": "其他", + "Install Mint": "安装 Mint", + "badge.": "标记的模板。", + "Edit": "编辑", + "Secret / server key": "密钥 / 服务器密钥", + "API key": "API 密钥", + "Midtrans — QRIS, GoPay, ShopeePay, OVO, bank transfer (VA), cards": "Midtrans——QRIS、GoPay、ShopeePay、OVO、银行转账(VA)、银行卡", + "Xendit — QRIS, e-wallets, bank transfer (VA), retail outlets, cards": "Xendit——QRIS、电子钱包、银行转账(VA)、零售网点、银行卡", + "Stripe — cards, Apple Pay, Google Pay, local methods Stripe enables for you": "Stripe——银行卡、Apple Pay、Google Pay,以及 Stripe 为你开通的本地支付方式", + "Views per day for the last 30 days, dots mark days with sales": "过去 30 天每天的浏览量,圆点表示有销售的日子", + "BCA 1234567 a.n. Name · GoPay 0812… · PayPal email": "支付宝 138… · 微信 … · PayPal 邮箱", + "download": "下载", + "Can’t reach Mint — working offline in this browser": "无法连接 Mint——正在此浏览器中离线工作", + "📲 You’re using the Mint app": "📲 你正在使用 Mint 应用", + "It always loads the latest version of Mint, so there’s nothing to update by hand.": "它总是加载最新版本的 Mint,无需手动更新。", + "Back to Mint": "返回 Mint", + "📲 Get the Mint app": "📲 获取 Mint 应用", + "One account everywhere: web, Android and iPhone. The apps load the live Mint, so new features arrive without updating.": "一个账户通用:网页、Android 和 iPhone。应用加载的是在线版 Mint,新功能无需更新即可获得。", + "⬇ Download the Android app (APK)": "⬇ 下载 Android 应用(APK)", + "Open the downloaded": "打开下载的", + "Allow installs from your browser when Android asks (one time).": "Android 询问时,允许从浏览器安装(仅一次)。", + "Open Mint from your home screen. Same account and templates as the website.": "从主屏幕打开 Mint。与网站使用相同的账户和模板。", + "Or install straight from Chrome:": "或者直接从 Chrome 安装:", + "Install from Chrome": "从 Chrome 安装", + "Prefer no APK? In Chrome open the ⋮ menu →": "不想用 APK?在 Chrome 中打开 ⋮ 菜单 →", + "Install app": "安装应用", + "Add to Home screen": "添加到主屏幕", + "Open": "打开", + "Tap": "点按", + "Share": "分享", + "(the square with the arrow) →": "(带箭头的方框)→", + "Add to Home Screen": "添加到主屏幕", + "Add": "添加", + "Open Mint from the home screen — it runs full-screen with its own icon.": "从主屏幕打开 Mint——它会全屏运行,并有自己的图标。", + "Not in the App Store yet (that needs an Apple developer account). The home-screen app is the same Mint with the same account.": "尚未上架 App Store(需要 Apple 开发者账户)。主屏幕应用就是同一个 Mint,账户也相同。", + "💻 Computer": "💻 电脑", + "Chrome or Edge: click the install icon in the address bar (or menu →": "Chrome 或 Edge:点击地址栏中的安装图标(或菜单 →", + "). Everything also works right here in the browser.": ")。在浏览器中也能使用全部功能。", + "Installed 🎉": "已安装 🎉", + "Can’t reach Mint right now — check your connection": "现在无法连接 Mint——请检查网络连接", + "Please log in": "请登录", + "Log in first": "请先登录", + "Enter a valid email": "请输入有效的邮箱", + "Name is required": "名称为必填项", + "Password must be at least 8 characters": "密码至少需要 8 个字符", + "An account with this email already exists": "该邮箱已注册账户", + "Wrong email or password": "邮箱或密码错误", + "Password is wrong": "密码错误", + "Listing not found": "未找到商品", + "Title is required": "标题为必填项", + "Description is required": "描述为必填项", + "Price must be 0 or more": "价格必须为 0 或以上", + "Affiliate commission must be 0–50%": "推广佣金必须在 0–50% 之间", + "Payment link must start with https://": "付款链接必须以 https:// 开头", + "You can’t buy your own template": "你不能购买自己的模板", + "Only buyers can review": "只有买家可以评价", + "Rating must be 1–5": "评分必须为 1–5", + "This seller doesn’t offer affiliate commission": "该卖家不提供推广佣金", + "This template doesn’t offer affiliate commission": "该模板不提供推广佣金", + "This seller hasn’t set up payments yet": "该卖家尚未设置收款方式", + "Coupons need a connection to Mint": "使用优惠码需要连接 Mint", + "Orders need a connection to Mint": "下单需要连接 Mint", + "Editing listings needs a connection to Mint": "编辑商品需要连接 Mint", + "Mint AI needs a connection": "Mint AI 需要联网", + "Mint is offline right now — try again when it shows Live": "Mint 目前离线——显示“在线”时再试", + "That coupon code isn’t valid for this template": "该优惠码不适用于此模板", + "That coupon has expired": "该优惠码已过期", + "That coupon has been fully used": "该优惠码已用完", + "Enter a coupon code": "请输入优惠码", + "This template is already free": "该模板已经是免费的", + "Too many coupon attempts — wait a few minutes": "优惠码尝试次数过多——请稍等几分钟", + "Discount must be 5–90%": "折扣必须在 5–90% 之间", + "Too many requests — try again later": "请求过多——请稍后再试", + "Too many orders — try again later": "订单过多——请稍后再试", + "Create a template in 2 minutes": "2 分钟做出一个模板", + "Describe it, tweak it with words, check the preview, export.": "描述它,用文字调整,查看预览,然后导出。", + "Themes & branding": "主题与品牌", + "Look consistent across every template you sell.": "让你出售的每个模板风格统一。", + "Pricing that sells": "好卖的定价", + "Free lead magnets, paid niche systems, bundles.": "免费引流款、付费细分系统、组合套装。", + "How the affiliate program works": "推广联盟计划如何运作", + "Anyone can promote any template and earn commission.": "任何人都可以推广任何模板并赚取佣金。", + "Content marketing playbook": "内容营销手册", + "Turn one template into a week of posts.": "把一个模板变成一周的帖子。", + "How payments work": "付款如何运作", + "How buying works on Mint, and how you get paid.": "在 Mint 上如何购买,以及你如何收款。", + "Install Mint on your phone": "在手机上安装 Mint", + "Android app, iPhone home-screen app, same account everywhere.": "Android 应用、iPhone 主屏幕应用,所有设备同一个账户。", + "1. Describe the job, not the spreadsheet.": "1. 描述要做的事,而不是表格本身。", + "“Invoice tracker for freelancers in rupiah, with notes” works better than “a table with 6 columns”. Mint picks the closest blueprint, then applies your currency, theme words (pastel, dark, minimal, green…) and extra columns (priority, owner, notes, deadline, status).": "“自由职业者发票追踪表,人民币计价,带备注”比“一个 6 列的表格”效果更好。Mint 会选出最接近的蓝本,再应用你的货币、主题词(粉彩、深色、极简、绿色…)和额外的列(优先级、负责人、备注、截止日期、状态)。", + "2. Tweak with plain commands": "2. 用简单的指令调整", + "— one per line, English or Bahasa Indonesia:": "——每行一条,可用英文或印尼语:", + "(formulas use [Column Name])": "(公式使用 [列名])", + "3. Fine-tune by hand.": "3. 手动微调。", + "Every cell, column type, dropdown option, formula, dashboard card and colour rule is editable in the Studio.": "每个单元格、列类型、下拉选项、公式、仪表盘卡片和颜色规则都可以在工作室中编辑。", + "4. Export.": "4. 导出。", + "The .xlsx has live formulas, dropdowns, colour rules, a frozen header, 200 ready rows and a Dashboard tab. It opens in Excel and in Google Sheets (File › Import).": ".xlsx 文件包含实时公式、下拉菜单、颜色规则、冻结表头、200 行空白行和一个仪表盘工作表。可在 Excel 和 Google 表格中打开(文件 › 导入)。", + "Buyers judge templates by the thumbnail. Pick": "买家会根据缩略图判断模板。为你的店铺选择", + "one signature theme": "一个标志性主题", + "for your shop (for example Blush for a lifestyle brand, Midnight for tech, Mono for business) and use it on every listing so your products are recognisable in the market grid.": "(例如生活方式品牌用 Blush,科技用 Midnight,商务用 Mono),并在每个商品上使用,让你的产品在市场列表中一眼可辨。", + "Light themes": "浅色主题", + "(Mint, Ocean, Sunset, Lavender, Blush, Forest, Mono) print well and suit business buyers.": "(Mint、Ocean、Sunset、Lavender、Blush、Forest、Mono)打印效果好,适合商务买家。", + "is a full dark sheet — popular with students and creators, less so for printing.": "是全深色表格——深受学生和创作者喜爱,但不太适合打印。", + "Keep column names short (1–2 words) so headers stay readable on phones.": "列名要短(1–2 个词),这样在手机上表头也清晰可读。", + "Put 4–6 realistic sample rows in every template: an empty sheet does not sell.": "每个模板都放 4–6 行真实的示例数据:空表格卖不出去。", + "The share card in": "在", + "Affiliate › Content kit": "推广联盟 › 推广素材包", + "uses the listing’s theme automatically, so your social posts match your products.": "中的分享卡片会自动使用商品的主题,让你的社交帖子与产品风格一致。", + "Generic templates (basic budget, to-do list) compete with free versions everywhere. Charge for": "通用模板(基础预算、待办清单)到处都有免费版本。要收费,就做", + "specific systems": "具体的系统", + "that save a professional real time.": ",为专业人士节省真正的时间。", + "Free:": "免费:", + "one simple, useful template to build your audience and reviews.": "一个简单实用的模板,用来积累受众和评价。", + "Entry ($3–$7):": "入门($3–$7):", + "personal-life systems — habits, meals, travel, study.": "个人生活系统——习惯、饮食、旅行、学习。", + "Pro ($9–$19):": "专业($9–$19):", + "business systems — invoices, inventory, CRM, rental P&L, pricing calculators.": "商业系统——发票、库存、客户管理、租赁损益、定价计算器。", + "Bundles:": "组合套装:", + "list a bundle at roughly the price of 2 items to lift the average order.": "以大约 2 件商品的价格上架一个套装,提高客单价。", + "Local pricing:": "本地定价:", + "list in the buyer’s currency. In Indonesia, round, familiar prices (Rp 29.000, Rp 49.000, Rp 99.000) read better than converted dollar amounts.": "用买家的货币标价。在中国,整齐、熟悉的价格(¥19、¥39、¥99)比换算出的美元金额更好卖。", + "Mint keeps a platform fee (shown in your Sell dashboard) and pays affiliates the commission you choose, only on sales they actually referred.": "Mint 收取平台费(显示在你的出售后台中),并只就推广者真正带来的销售,按你设定的比例支付佣金。", + "Sellers choose a commission (0–50%) when publishing. 0% means no affiliates.": "卖家在发布时选择佣金比例(0–50%)。0% 表示不开放推广。", + "Any logged-in user opens a listing and taps": "任何已登录用户打开商品并点击", + ". The link looks like": "。链接形如", + "When a visitor arrives through the link, the referral is remembered on their device for": "访客通过链接进入后,推广关系会在其设备上记住", + "30 days": "30 天", + "and the click is counted.": ",同时记录一次点击。", + "If they buy, the affiliate earns": "如果他们购买,推广者获得", + "price × commission": "价格 × 佣金比例", + ". Self-referrals and seller-referrals earn nothing.": "。自己推广自己或卖家自推不计佣金。", + "Clicks, attributed sales and earnings appear in your Affiliate dashboard; the seller sees the same sale with the commission deducted.": "点击、归因销售和收入会显示在你的推广者后台;卖家会看到同一笔销售并扣除佣金。", + "Tip for sellers:": "给卖家的建议:", + "25–35% gives creators a reason to make content about your template. You still keep the sale you would not otherwise have had.": "25–35% 能让创作者有动力为你的模板做内容。这些销售本来就不会有,你依然赚到了。", + "Templates sell when people": "模板好卖,是因为人们", + "see the result": "看到了效果", + ". Use the Content kit on any listing to get ready-made copy plus a themed share card, then post on this cadence:": "。在任何商品上使用推广素材包,获取现成文案和带主题的分享卡片,然后按这个节奏发布:", + "Day 1 — short video (TikTok / Reels / Shorts):": "第 1 天——短视频(抖音 / TikTok / Reels / Shorts):", + "hook (“stop rebuilding this every month”), 8-second screen recording of totals updating, CTA.": "开场钩子(“别再每个月重做这个了”),8 秒录屏展示合计自动更新,最后号召行动。", + "Day 2 — carousel or LinkedIn post:": "第 2 天——图文轮播或 LinkedIn 帖子:", + "the problem, 3 bullets of what the sheet does, link.": "痛点,3 条表格能做什么,附上链接。", + "Day 3 — Pinterest pin:": "第 3 天——小红书 / Pinterest 图钉:", + "share card + keyword-rich title (“freelance invoice tracker google sheets”).": "分享卡片 + 富含关键词的标题(“自由职业发票追踪 Google 表格”)。", + "Day 5 — blog / SEO post:": "第 5 天——博客 / SEO 文章:", + "use the outline from the kit; answer the question people search for.": "使用素材包里的大纲;回答人们正在搜索的问题。", + "Day 7 — WhatsApp / community share:": "第 7 天——微信 / 社群分享:", + "personal recommendation with your affiliate link.": "附上你的推广链接,做一次个人推荐。", + "Always disclose affiliate links where required (for example “#affiliate” or “I earn a commission”). Track which channel works in your Affiliate dashboard and double down.": "按要求始终披露推广链接(例如“#广告”或“我会获得佣金”)。在推广者后台跟踪哪个渠道有效,然后加倍投入。", + "Mint is live.": "Mint 已上线。", + "Accounts, listings, orders and affiliate links are stored on Mint’s servers, so they work on every device. Mint never holds your money.": "账户、商品、订单和推广链接保存在 Mint 的服务器上,所以在所有设备上都能用。Mint 从不经手你的钱。", + "Option 1 — automatic (recommended).": "方式一——自动收款(推荐)。", + "Under": "在", + "Sell → Get paid automatically": "出售 → 自动收款", + ", connect your own Midtrans, Xendit or Stripe account with its secret key. Buyers then pay on that secure checkout (QRIS, e-wallets, bank transfer, cards); Mint confirms the payment directly with the provider and the file unlocks in seconds. Nothing to confirm by hand, and the money lands in your account. Try it first with a sandbox / test key.": "中,用密钥连接你自己的 Midtrans、Xendit 或 Stripe 账户。买家在其安全结账页面付款(二维码、电子钱包、银行转账、银行卡);Mint 直接向支付服务商确认付款,文件几秒内解锁。无需手动确认,钱直接进入你的账户。可先用沙盒 / 测试密钥试用。", + "Option 2 — payment link.": "方式二——付款链接。", + "Add your own link when you publish (Lynk.id, Saweria, Trakteer, PayPal, Gumroad…):": "发布时添加你自己的链接(Lynk.id、Saweria、Trakteer、PayPal、Gumroad…):", + "A buyer clicks": "买家点击", + "Buy": "购买", + ", gets an order reference like": ",获得类似", + "and pays you on your link with that reference in the note.": "的订单编号,并通过你的链接付款,在备注中填写该编号。", + "You get a notification and see the order under": "你会收到通知,并在以下位置看到订单:", + "Sell → Orders to confirm": "出售 → 待确认订单", + ". Tap": "。点击", + "and the buyer can download right away.": ",买家即可立即下载。", + "Affiliates:": "推广者:", + "if an affiliate referred the sale, Mint shows the commission you owe and their payout details. Pay them, then tap": "如果销售由推广者带来,Mint 会显示你应付的佣金和他们的收款信息。付款后点击", + "— they get notified.": "——他们会收到通知。", + "Notifications:": "通知:", + "switch them on under": "在以下位置开启:", + "Account → Notifications": "账户 → 通知", + "(Chrome, Edge, Firefox, Android, and iPhone home-screen apps on iOS 16.4+). Free templates unlock instantly.": "(Chrome、Edge、Firefox、Android,以及 iOS 16.4+ 上的 iPhone 主屏幕应用)。免费模板会立即解锁。", + "Android:": "Android:", + ", open it and allow installs from your browser (Android asks once). Or in Chrome tap ⋮ →": ",打开它并允许从浏览器安装(Android 只会询问一次)。或在 Chrome 中点 ⋮ →", + "iPhone / iPad:": "iPhone / iPad:", + "open Mint in": "在以下浏览器中打开 Mint:", + ", tap": ",点按", + ". It opens full-screen with its own icon. (An App Store version needs an Apple developer account, so it isn’t there yet.)": "。它会全屏打开,并有自己的图标。(App Store 版本需要 Apple 开发者账户,所以暂未上架。)", + "Same Mint, same account.": "同一个 Mint,同一个账户。", + "The apps load the live site, so new features arrive without updating, and your drafts, library, sales and affiliate links follow you between phone and computer.": "应用加载的是在线网站,新功能无需更新即可获得;你的草稿、模板库、销售和推广链接会在手机和电脑之间同步。", + "Downloads on the phone:": "手机上下载:", + "in the Android app,": "在 Android 应用中,", + "opens the share sheet — save to Files or Drive, or open it straight in Excel or Google Sheets.": "会打开分享面板——保存到文件或云端硬盘,或直接在 Excel 或 Google 表格中打开。", + "Badges:": "角标:", + "a red number on": "红色数字出现在", + "means orders to confirm or commissions to pay; on": "上,表示有待确认的订单或待付的佣金;出现在", + "it means an order still waiting for your payment.": "上,表示有订单仍在等待你付款。" + }; + + var ES = { + "🛍️ Browse": "🛍️ Explorar", + "🏷️ Sell": "🏷️ Vender", + "🤝 Earn": "🤝 Gana comisiones", + "Help": "Ayuda", + "Marketplace": "Mercado", + "💰 Use in my budget": "💰 Usar en mi presupuesto", + "📈 Use as my investing target": "📈 Usar como mi objetivo de inversión", + "Budget": "Presupuesto", + "Your shared budgets": "Tus presupuestos compartidos", + "Create": "Crear", + "Market": "Mercado", + "Library": "Biblioteca", + "Sell": "Vender", + "Affiliate": "Afiliados", + "Guides": "Guías", + "Log in": "Iniciar sesión", + "Log out": "Cerrar sesión", + "Account": "Cuenta", + "Skip to content": "Saltar al contenido", + "Light / dark": "Claro / oscuro", + "Toggle light or dark interface": "Cambiar entre tema claro y oscuro", + "Loading Mint…": "Cargando Mint…", + "Loading…": "Cargando…", + "Mint · buyers pay sellers directly ·": "Mint · los compradores pagan directo al vendedor ·", + "Get the app": "Descarga la app", + "Privacy": "Privacidad", + "Terms": "Términos", + "· made by": "· hecho por", + "Main": "Principal", + "Live": "En vivo", + "Offline": "Sin conexión", + "Language": "Idioma", + "Prompt a spreadsheet template.": "Pide una plantilla de hoja de cálculo.", + "Tweak it. Sell it.": "Ajústala. Véndela.", + "Describe what you need in English or Bahasa Indonesia. Mint builds a themed Excel / Google Sheets template with live formulas, dropdowns and a dashboard — then publish it to the market, or let affiliates sell it for you.": "Describe lo que necesitas en español, inglés o indonesio. Mint crea una plantilla de Excel / Google Sheets con tema, fórmulas en vivo, listas desplegables y un panel; luego publícala en el mercado o deja que los afiliados la vendan por ti.", + "Prompt": "Pide", + "“Inventory for my online shop, green” → a working template in a second.": "“Inventario para mi tienda online, verde” → una plantilla lista en un segundo.", + "Tweak": "Ajusta", + "Edit with words (“add column Supplier”) or by hand. Pick a theme.": "Edita con palabras (“añade la columna Proveedor”) o a mano. Elige un tema.", + "Publish with a price and affiliate %, get a content kit, track sales.": "Publica con precio y % de afiliado, recibe un kit de contenido y sigue tus ventas.", + "Fresh in the market": "Novedades en el mercado", + "Browse all →": "Ver todo →", + "Creator guides": "Guías para creadores", + "All guides →": "Todas las guías →", + "← All guides": "← Todas las guías", + "Earn without making templates": "Gana sin crear plantillas", + "Join the affiliate program: share any listing with an “Earn %” badge and get paid commission on every sale you refer.": "Únete al programa de afiliados: comparte cualquier anuncio con la insignia “Gana %” y cobra comisión por cada venta que generes.", + "How it works": "Cómo funciona", + "How it works →": "Cómo funciona →", + "No listings yet.": "Aún no hay anuncios.", + "Make, theme, price, promote and sell spreadsheet templates.": "Crea, diseña, pon precio, promociona y vende plantillas de hoja de cálculo.", + "Create a template": "Crear una plantilla", + "Describe your template": "Describe tu plantilla", + "e.g. Freelance invoice tracker in rupiah with notes, ocean theme": "p. ej. Control de facturas freelance en pesos con notas, tema océano", + "Use my AI": "Usar mi IA", + "Designed by an AI model; the quick generator is used if AI is busy": "Diseñada por un modelo de IA; si la IA está ocupada se usa el generador rápido", + "Mint AI": "Mint AI", + "✨ Generate": "✨ Generar", + "Generating…": "Generando…", + "…or start from a blueprint": "…o empieza desde un modelo", + "Freelance invoice tracker with notes": "Control de facturas freelance con notas", + "Monthly budget in rupiah, pastel pink": "Presupuesto mensual en rupias, rosa pastel", + "Inventory for my online shop, green": "Inventario para mi tienda online, verde", + "Content calendar for TikTok and Instagram": "Calendario de contenido para TikTok e Instagram", + "Airbnb host profit tracker": "Control de ganancias para anfitriones de Airbnb", + "Describe the template you want first": "Primero describe la plantilla que quieres", + "Designed by Mint AI. Tweak anything below — or ask in words.": "Diseñada por Mint AI. Ajusta lo que quieras abajo, o pídelo con palabras.", + "AI returned too few columns": "La IA devolvió muy pocas columnas", + "Tweak with words": "Ajusta con palabras", + "Type a change and press Apply.": "Escribe un cambio y pulsa Aplicar.", + "Apply": "Aplicar", + "Theme": "Tema", + "Details": "Detalles", + "Title": "Título", + "Description": "Descripción", + "Category": "Categoría", + "Currency": "Moneda", + "💾 Save draft": "💾 Guardar borrador", + "🚀 Publish to market": "🚀 Publicar en el mercado", + "+ New template": "+ Nueva plantilla", + "Saved draft": "Borrador guardado", + "Unsaved": "Sin guardar", + "· changes auto-save on this device": "· los cambios se guardan solos en este dispositivo", + "+ Add row": "+ Añadir fila", + "Columns": "Columnas", + "Dashboard cards": "Tarjetas del panel", + "Colour rules": "Reglas de color", + "Name": "Nombre", + "Type": "Tipo", + "Options / formula": "Opciones / fórmula", + "Use [Column Name]": "Usa [Nombre de columna]", + "Result format": "Formato del resultado", + "Column name": "Nombre de columna", + "Column type": "Tipo de columna", + "Move left": "Mover a la izquierda", + "Move right": "Mover a la derecha", + "Delete column": "Eliminar columna", + "New column name": "Nombre de la nueva columna", + "Add column": "Añadir columna", + "Card label": "Etiqueta de la tarjeta", + "Count when equal to": "Contar cuando sea igual a", + "equals": "es igual a", + "Remove card": "Quitar tarjeta", + "+ Add card": "+ Añadir tarjeta", + "Value": "Valor", + "Remove rule": "Quitar regla", + "+ Add rule": "+ Añadir regla", + "Formula:": "Fórmula:", + "Formula problems:": "Problemas en la fórmula:", + "Formula included in the full template": "Fórmula incluida en la plantilla completa", + "Delete row": "Eliminar fila", + "Draft saved to your account": "Borrador guardado en tu cuenta", + "Start a new template? Unsaved changes to this one stay only if you saved the draft.": "¿Empezar una plantilla nueva? Los cambios sin guardar de esta solo se conservan si guardaste el borrador.", + "Log in to save drafts and publish": "Inicia sesión para guardar borradores y publicar", + "Downloaded .xlsx — opens in Excel and Google Sheets": ".xlsx descargado: se abre en Excel y Google Sheets", + "Copied": "Copiado", + "Something went wrong": "Algo salió mal", + "Save or open": "Guardar o abrir", + "Yes": "Sí", + "No": "No", + "Template market": "Mercado de plantillas", + "Search templates…": "Buscar plantillas…", + "Search": "Buscar", + "All categories": "Todas las categorías", + "Sort": "Ordenar", + "Newest": "Más recientes", + "Best selling": "Más vendidas", + "Top rated": "Mejor valoradas", + "Price: low to high": "Precio: de menor a mayor", + "Price: high to low": "Precio: de mayor a menor", + "Free only": "Solo gratis", + "No templates match.": "Ninguna plantilla coincide.", + "Create the first one": "Crea la primera", + "Free": "Gratis", + "New": "Nuevo", + "Earn": "Gana", + "Earn %": "Gana %", + "No ratings yet": "Aún sin valoraciones", + "← Market": "← Mercado", + "by": "por", + "Live preview": "Vista previa en vivo", + "🔒 Preview — columns marked 🔒 show sample results only. The formulas, dropdown logic and dashboard come with the file after purchase.": "🔒 Vista previa: las columnas con 🔒 solo muestran resultados de ejemplo. Las fórmulas, la lógica de las listas y el panel vienen con el archivo tras la compra.", + "Reviews": "Reseñas", + "No reviews yet.": "Aún no hay reseñas.", + "Rating": "Valoración", + "Rate this template": "Valora esta plantilla", + "What did it help with?": "¿En qué te ayudó?", + "Post review": "Publicar reseña", + "Reported — thanks, we’ll take a look": "Denunciada: gracias, la revisaremos", + "⚠ Report this template": "⚠ Denunciar esta plantilla", + "This is your listing.": "Este es tu anuncio.", + "📣 Content kit": "📣 Kit de contenido", + "Content kit": "Kit de contenido", + "✔ In your library": "✔ En tu biblioteca", + "⬇ Download .xlsx": "⬇ Descargar .xlsx", + "Download .xlsx": "Descargar .xlsx", + "— waiting for payment": "— esperando el pago", + "Pay now ↗": "Pagar ahora ↗", + "I’ve paid — check now": "Ya pagué: comprobar ahora", + "Cancel order": "Cancelar pedido", + "Got a coupon? Re-order at the lower price": "¿Tienes un cupón? Vuelve a pedir al precio rebajado", + "Have a coupon?": "¿Tienes un cupón?", + "Coupon code": "Código de cupón", + "Put": "Pon", + "in the payment note.": "en la nota del pago.", + "The seller confirms → it unlocks in your library.": "El vendedor confirma → se desbloquea en tu biblioteca.", + "seller’s checkout": "la página de pago del vendedor", + "Get it free": "Obtener gratis", + "You’ll pay on": "Pagarás en", + "You pay the seller directly on their checkout (QRIS, e-wallet, card…). Your order reference unlocks the template once the seller confirms. Your name and email are shared with the seller for this order.": "Pagas directamente al vendedor en su página de pago (QR, billetera digital, tarjeta…). La referencia de tu pedido desbloquea la plantilla cuando el vendedor confirma. Tu nombre y correo se comparten con el vendedor para este pedido.", + "Offline — connect to buy.": "Sin conexión: conéctate para comprar.", + "Get affiliate link": "Obtener enlace de afiliado", + "Your affiliate link": "Tu enlace de afiliado", + "Copy link": "Copiar enlace", + "Copy code": "Copiar código", + "Log in to get this template": "Inicia sesión para obtener esta plantilla", + "Already in your library": "Ya está en tu biblioteca", + "Added to your library 🎉": "Añadida a tu biblioteca 🎉", + "Checking…": "Comprobando…", + "Payment confirmed — it’s in your library 🎉": "Pago confirmado: ya está en tu biblioteca 🎉", + "Not paid yet — finish on the checkout page, then check again": "Aún no pagado: termina en la página de pago y vuelve a comprobar", + "Log in to report a template": "Inicia sesión para denunciar una plantilla", + "What’s wrong with this template? (copied, misleading, broken, spam, offensive…)": "¿Qué le pasa a esta plantilla? (copiada, engañosa, rota, spam, ofensiva…)", + "Thanks — report sent": "Gracias: denuncia enviada", + "Cancel this order? Only do this if you haven’t paid.": "¿Cancelar este pedido? Hazlo solo si aún no has pagado.", + "Order cancelled": "Pedido cancelado", + "Log in to become an affiliate": "Inicia sesión para ser afiliado", + "Thanks for the review": "Gracias por tu reseña", + "Not found": "No encontrado", + "Back to market": "Volver al mercado", + "Log in to use a coupon": "Inicia sesión para usar un cupón", + "Your library": "Tu biblioteca", + "Templates you buy or claim appear here.": "Las plantillas que compres o consigas aparecen aquí.", + "Orders": "Pedidos", + "waiting for seller": "esperando al vendedor", + "Pay ↗": "Pagar ↗", + "Check payment": "Comprobar pago", + "View": "Ver", + "Paid already? Instant-checkout orders unlock automatically (or tap Check payment); for payment-link orders the seller confirms using the reference.": "¿Ya pagaste? Los pedidos con pago instantáneo se desbloquean solos (o toca Comprobar pago); en los pedidos con enlace de pago el vendedor confirma con la referencia.", + "Nothing here yet.": "Aún no hay nada aquí.", + "Browse the market": "Explora el mercado", + "Copy into the Studio for personal edits": "Copiar al Estudio para editarla a tu gusto", + "Customize": "Personalizar", + "Purchased templates are licensed for your own use. Re-selling someone else’s template is not allowed.": "Las plantillas compradas son solo para tu propio uso. No está permitido revender la plantilla de otra persona.", + "Payment confirmed 🎉": "Pago confirmado 🎉", + "Not paid yet": "Aún no pagado", + "Sell templates": "Vender plantillas", + "Log in to save drafts, publish and track sales.": "Inicia sesión para guardar borradores, publicar y seguir tus ventas.", + "Seller dashboard": "Panel del vendedor", + "Gross": "Bruto", + "Affiliate payouts": "Pagos a afiliados", + "Your earnings": "Tus ganancias", + "Sales": "Ventas", + "Orders to confirm": "Pedidos por confirmar", + "Check your payment app for the reference in the payment note, then confirm. Confirmed buyers can download immediately.": "Busca la referencia en la nota del pago en tu app de pagos y luego confirma. Los compradores confirmados pueden descargar al instante.", + "Payment received": "Pago recibido", + "Not paid": "No pagado", + "Last 30 days": "Últimos 30 días", + "views count once per visitor per hour": "las visitas cuentan una vez por visitante y hora", + "Views": "Visitas", + "Conversion": "Conversión", + "Earned": "Ganado", + "Coupons": "Cupones", + "Discount codes for launches, followers or bundles. Buyers type the code or open your coupon link; affiliate commission is paid on the discounted price.": "Códigos de descuento para lanzamientos, seguidores o paquetes. Los compradores escriben el código o abren tu enlace de cupón; la comisión de afiliado se paga sobre el precio rebajado.", + "All your templates": "Todas tus plantillas", + "Pause": "Pausar", + "Resume": "Reanudar", + "Delete": "Eliminar", + "New coupon": "Nuevo cupón", + "Code": "Código", + "Discount %": "Descuento %", + "Applies to": "Se aplica a", + "All my paid templates": "Todas mis plantillas de pago", + "Max uses (0 = unlimited)": "Usos máximos (0 = ilimitado)", + "Expires after days (0 = never)": "Caduca tras días (0 = nunca)", + "Create coupon": "Crear cupón", + "Coupons work on paid templates — publish one first.": "Los cupones funcionan con plantillas de pago: publica una primero.", + "Affiliate commissions": "Comisiones de afiliados", + "Pay affiliates to the details they gave, then mark it paid.": "Paga a los afiliados con los datos que dieron y luego márcalo como pagado.", + "affiliate hasn’t added payout details yet": "el afiliado aún no añadió sus datos de cobro", + "Mark paid": "Marcar como pagado", + "Listings": "Anuncios", + "Unpublish": "Despublicar", + "Republish": "Volver a publicar", + "Save": "Guardar", + "No listings yet — publish a draft below.": "Aún no hay anuncios: publica un borrador abajo.", + "Drafts": "Borradores", + "Publish": "Publicar", + "No saved drafts.": "No hay borradores guardados.", + "Recent sales": "Ventas recientes", + "No sales yet. Share your listing with the content kit.": "Aún no hay ventas. Comparte tu anuncio con el kit de contenido.", + "Turn off automatic payments? Listings without a payment link stop accepting new orders.": "¿Desactivar los pagos automáticos? Los anuncios sin enlace de pago dejan de aceptar pedidos nuevos.", + "Automatic payments turned off": "Pagos automáticos desactivados", + "Delete this coupon? Orders that used it keep their price.": "¿Eliminar este cupón? Los pedidos que lo usaron mantienen su precio.", + "Coupon deleted": "Cupón eliminado", + "Coupon updated": "Cupón actualizado", + "Mark this order as not paid? The buyer can order again.": "¿Marcar este pedido como no pagado? El comprador puede volver a pedir.", + "Confirmed — the buyer can download now": "Confirmado: el comprador ya puede descargar", + "Order rejected": "Pedido rechazado", + "Commission marked paid": "Comisión marcada como pagada", + "Delete this draft?": "¿Eliminar este borrador?", + "Checking the key…": "Comprobando la clave…", + "Connect": "Conectar", + "Listing updated": "Anuncio actualizado", + "test mode": "modo de prueba", + "Disconnect": "Desconectar", + "⚡ Get paid automatically": "⚡ Cobra automáticamente", + "— QRIS, e-wallets, VA and cards; files unlock the moment buyers pay": "— QR, billeteras, cuentas virtuales y tarjetas; los archivos se desbloquean en cuanto pagan", + "Connect your own payment account. Buyers pay on its secure checkout, Mint confirms the payment directly with the provider and unlocks the template instantly. The money goes to you, not to Mint.": "Conecta tu propia cuenta de pagos. Los compradores pagan en su página segura, Mint confirma el pago directamente con el proveedor y desbloquea la plantilla al instante. El dinero va para ti, no para Mint.", + "Provider": "Proveedor", + "(most currencies)": "(la mayoría de monedas)", + "Try it first with a sandbox / test key — Mint shows “test mode” until you switch to a live key.": "Pruébalo primero con una clave sandbox / de prueba: Mint muestra “modo de prueba” hasta que cambies a una clave real.", + "and unlocks the file instantly — nothing to confirm by hand. Money goes straight to your account.": "y desbloquea el archivo al instante, sin confirmar nada a mano. El dinero va directo a tu cuenta.", + "; other listings keep using your payment link.": "; los demás anuncios siguen usando tu enlace de pago.", + "· stored encrypted, used only to create checkouts and read their status.": "· se guarda cifrada y solo se usa para crear pagos y leer su estado.", + "live": "real", + "hidden": "oculto", + "flagged": "marcado", + "removed": "eliminado", + "active": "activo", + "paused": "en pausa", + "expired": "caducado", + "owed": "pendiente", + "paid": "pagado", + "Log in to publish templates.": "Inicia sesión para publicar plantillas.", + "Draft not found.": "No se encontró el borrador.", + "Tags (comma separated)": "Etiquetas (separadas por comas)", + "Your payment link": "Tu enlace de pago", + "(required for paid templates — or turn on automatic payments under Sell)": "(obligatorio para plantillas de pago, o activa los pagos automáticos en Vender)", + "Buyers pay you directly there and add their order reference; you confirm in your dashboard and they get the file. Mint never holds your money.": "Los compradores te pagan directamente allí y añaden la referencia del pedido; tú confirmas en tu panel y reciben el archivo. Mint nunca retiene tu dinero.", + "Platform fee": "Comisión de la plataforma", + "Buyer preview": "Vista del comprador", + "Published! 🎉": "¡Publicada! 🎉", + "Affiliate program": "Programa de afiliados", + "Log in, open any listing with an “Earn %” badge and get your link.": "Inicia sesión, abre cualquier anuncio con la insignia “Gana %” y obtén tu enlace.", + "Affiliate dashboard": "Panel de afiliado", + "Where should sellers pay you?": "¿Dónde deben pagarte los vendedores?", + "Shown only to sellers who owe you commission. E.g. “BCA 1234567 a.n. Your Name”, “GoPay 0812…” or a PayPal email.": "Solo se muestra a los vendedores que te deben comisión. P. ej. “BBVA 1234 a nombre de Tu Nombre”, “Mercado Pago …” o un correo de PayPal.", + "Bank / e-wallet / PayPal": "Banco / billetera / PayPal", + "Save payout details": "Guardar datos de cobro", + "Links": "Enlaces", + "Clicks": "Clics", + "Referred sales": "Ventas referidas", + "No links yet. Find templates with an": "Aún no hay enlaces. Busca plantillas con la insignia", + "Find templates to promote": "Buscar plantillas para promocionar", + "Payout details saved": "Datos de cobro guardados", + "Ready-to-post copy with": "Texto listo para publicar con", + "your affiliate link": "tu enlace de afiliado", + "the listing link": "el enlace del anuncio", + "and a themed share card. Disclose affiliate links where required.": "y una tarjeta para compartir con tema. Indica que son enlaces de afiliado cuando sea obligatorio.", + "Promo copy": "Texto promocional", + "Copy text": "Copiar texto", + "Share card preview": "Vista previa de la tarjeta", + "⬇ Download share card (PNG)": "⬇ Descargar tarjeta (PNG)", + "TikTok / Reels script": "Guion para TikTok / Reels", + "Blog outline (SEO)": "Esquema de blog (SEO)", + "Email": "Correo", + "Password": "Contraseña", + "Forgot password?": "¿Olvidaste tu contraseña?", + "Create account": "Crear cuenta", + "Password (8+ characters)": "Contraseña (8+ caracteres)", + "Mint is offline right now — this account only lives in this browser until the connection is back.": "Mint está sin conexión: esta cuenta solo vive en este navegador hasta que vuelva la conexión.", + "Your account works on every device. Passwords are hashed; we never see them.": "Tu cuenta funciona en todos tus dispositivos. Las contraseñas se guardan con hash; nunca las vemos.", + "Reset password": "Restablecer contraseña", + "Use the recovery code you saved when you created your account (MINT-XXXX-XXXX-XXXX). Without it the account can’t be recovered — Mint stores no other way to prove it’s you.": "Usa el código de recuperación que guardaste al crear tu cuenta (MINT-XXXX-XXXX-XXXX). Sin él no se puede recuperar la cuenta: Mint no guarda otra forma de comprobar que eres tú.", + "Recovery code": "Código de recuperación", + "New password (8+ characters)": "Nueva contraseña (8+ caracteres)", + "Reset and log in": "Restablecer e iniciar sesión", + "Back to log in": "Volver a iniciar sesión", + "Your recovery code": "Tu código de recuperación", + "🔑 Save your recovery code": "🔑 Guarda tu código de recuperación", + "Copy": "Copiar", + "Save as file": "Guardar como archivo", + "I saved it somewhere safe": "Lo guardé en un lugar seguro", + "Done": "Listo", + "If you ever forget your password, this code is the only way back into your account. Keep it in your notes or password manager.": "Si alguna vez olvidas tu contraseña, este código es la única forma de volver a tu cuenta. Guárdalo en tus notas o en tu gestor de contraseñas.", + "Password changed and other devices signed out. Your old recovery code is used up — here is the new one.": "Contraseña cambiada y se cerró la sesión en otros dispositivos. Tu código de recuperación anterior ya no sirve: aquí tienes el nuevo.", + "Close": "Cerrar", + "Log in or create an account to buy, sell and earn as an affiliate.": "Inicia sesión o crea una cuenta para comprar, vender y ganar como afiliado.", + "Offline — changes stay in this browser": "Sin conexión: los cambios se quedan en este navegador", + "Clear offline data": "Borrar datos sin conexión", + "Profile & payouts": "Perfil y cobros", + "Display name": "Nombre visible", + "Affiliate payout details": "Datos de cobro de afiliado", + "📲 Mint on your phone": "📲 Mint en tu teléfono", + "Android app, iPhone home-screen app, or install from your browser.": "App de Android, app en la pantalla de inicio del iPhone o instálala desde tu navegador.", + "Advanced: your own AI model": "Avanzado: tu propio modelo de IA", + "Mint AI is built in. If you prefer your own OpenAI-compatible model, add it here — the key stays in this browser and is sent only to that endpoint.": "Mint AI viene incluida. Si prefieres tu propio modelo compatible con OpenAI, añádelo aquí: la clave se queda en este navegador y solo se envía a ese endpoint.", + "Save AI settings": "Guardar ajustes de IA", + "AI settings saved": "Ajustes de IA guardados", + "Saved": "Guardado", + "Erase the offline data stored in this browser?": "¿Borrar los datos sin conexión guardados en este navegador?", + "🔔 Notifications": "🔔 Notificaciones", + "New orders to confirm, payments received, templates unlocked and commissions paid.": "Pedidos nuevos por confirmar, pagos recibidos, plantillas desbloqueadas y comisiones pagadas.", + "Checking this device…": "Comprobando este dispositivo…", + "Email me about orders, payments and commissions": "Avísame por correo de pedidos, pagos y comisiones", + "Email notifications will appear here once Mint’s email sender is set up.": "Las notificaciones por correo aparecerán aquí cuando el envío de correos de Mint esté configurado.", + "Notifications are blocked for Mint in this browser’s site settings.": "Las notificaciones de Mint están bloqueadas en los ajustes del sitio de este navegador.", + "✔ On for this device.": "✔ Activadas en este dispositivo.", + "Turn off": "Desactivar", + "Turn on notifications on this device": "Activar notificaciones en este dispositivo", + "Notifications were not allowed": "No se permitieron las notificaciones", + "Notifications on — a test notification is on its way": "Notificaciones activadas: va en camino una de prueba", + "Notifications off for this device": "Notificaciones desactivadas en este dispositivo", + "Email notifications on": "Notificaciones por correo activadas", + "Email notifications off": "Notificaciones por correo desactivadas", + "Phone notifications aren’t available inside the Android app yet. Open Mint in Chrome (or install it from Chrome) and switch them on there.": "Las notificaciones aún no están disponibles dentro de la app de Android. Abre Mint en Chrome (o instálala desde Chrome) y actívalas allí.", + "Push notifications aren’t switched on for this Mint server yet.": "Las notificaciones push aún no están activadas en este servidor de Mint.", + "This browser can’t show notifications. On iPhone, add Mint to your Home Screen first (iOS 16.4+), then turn them on from the Home Screen app.": "Este navegador no puede mostrar notificaciones. En iPhone, primero añade Mint a tu pantalla de inicio (iOS 16.4+) y actívalas desde esa app.", + "You have a recovery code. Lost it? Make a new one — the old one stops working.": "Ya tienes un código de recuperación. ¿Lo perdiste? Crea uno nuevo: el anterior dejará de funcionar.", + "You don’t have a recovery code yet. Make one now so you can reset a forgotten password.": "Aún no tienes código de recuperación. Créalo ahora para poder restablecer una contraseña olvidada.", + "Change password": "Cambiar contraseña", + "Current password": "Contraseña actual", + "Your other devices are signed out.": "Se cerró la sesión en tus otros dispositivos.", + "New recovery code": "Nuevo código de recuperación", + "Delete account": "Eliminar cuenta", + "Removes your login, drafts, affiliate links and payout details and takes your listings off the market.": "Elimina tu acceso, borradores, enlaces de afiliado y datos de cobro, y retira tus anuncios del mercado.", + "Buyers keep templates they already paid for and order records stay for their bookkeeping. This can’t be undone.": "Los compradores conservan las plantillas que ya pagaron y los registros de pedidos se mantienen para su contabilidad. No se puede deshacer.", + "Type DELETE to confirm": "Escribe DELETE para confirmar", + "Delete my account": "Eliminar mi cuenta", + "Password changed — other devices signed out": "Contraseña cambiada: se cerró la sesión en otros dispositivos", + "Your previous recovery code no longer works. Save this new one.": "Tu código de recuperación anterior ya no funciona. Guarda este nuevo.", + "Your account was deleted": "Tu cuenta fue eliminada", + "Connected to Mint": "Conectado a Mint", + "Finance": "Finanzas", + "Business": "Negocios", + "Productivity": "Productividad", + "Lifestyle": "Estilo de vida", + "Creator": "Creadores", + "Health": "Salud", + "Education": "Educación", + "Events": "Eventos", + "Other": "Otros", + "Install Mint": "Instalar Mint", + "badge.": ".", + "Edit": "Editar", + "Secret / server key": "Clave secreta / de servidor", + "API key": "Clave API", + "Midtrans — QRIS, GoPay, ShopeePay, OVO, bank transfer (VA), cards": "Midtrans: QRIS, GoPay, ShopeePay, OVO, transferencia bancaria (VA), tarjetas", + "Xendit — QRIS, e-wallets, bank transfer (VA), retail outlets, cards": "Xendit: QRIS, billeteras, transferencia bancaria (VA), tiendas, tarjetas", + "Stripe — cards, Apple Pay, Google Pay, local methods Stripe enables for you": "Stripe: tarjetas, Apple Pay, Google Pay y los métodos locales que Stripe te habilite", + "Views per day for the last 30 days, dots mark days with sales": "Visitas por día en los últimos 30 días; los puntos marcan días con ventas", + "BCA 1234567 a.n. Name · GoPay 0812… · PayPal email": "BBVA 1234 a nombre de Tu Nombre · Mercado Pago … · correo de PayPal", + "download": "descargar", + "Can’t reach Mint — working offline in this browser": "No se puede conectar con Mint: trabajando sin conexión en este navegador", + "📲 You’re using the Mint app": "📲 Estás usando la app de Mint", + "It always loads the latest version of Mint, so there’s nothing to update by hand.": "Siempre carga la última versión de Mint, así que no hay nada que actualizar a mano.", + "Back to Mint": "Volver a Mint", + "📲 Get the Mint app": "📲 Descarga la app de Mint", + "One account everywhere: web, Android and iPhone. The apps load the live Mint, so new features arrive without updating.": "Una cuenta en todas partes: web, Android y iPhone. Las apps cargan Mint en vivo, así que las novedades llegan sin actualizar.", + "⬇ Download the Android app (APK)": "⬇ Descargar la app de Android (APK)", + "Open the downloaded": "Abre el archivo descargado", + "Allow installs from your browser when Android asks (one time).": "Permite instalar desde tu navegador cuando Android lo pida (una sola vez).", + "Open Mint from your home screen. Same account and templates as the website.": "Abre Mint desde tu pantalla de inicio. La misma cuenta y plantillas que en la web.", + "Or install straight from Chrome:": "O instálala directamente desde Chrome:", + "Install from Chrome": "Instalar desde Chrome", + "Prefer no APK? In Chrome open the ⋮ menu →": "¿Prefieres sin APK? En Chrome abre el menú ⋮ →", + "Install app": "Instalar app", + "Add to Home screen": "Añadir a pantalla de inicio", + "Open": "Abrir", + "Tap": "Toca", + "Share": "Compartir", + "(the square with the arrow) →": "(el cuadrado con la flecha) →", + "Add to Home Screen": "Añadir a pantalla de inicio", + "Add": "Añadir", + "Open Mint from the home screen — it runs full-screen with its own icon.": "Abre Mint desde la pantalla de inicio: se abre a pantalla completa con su propio icono.", + "Not in the App Store yet (that needs an Apple developer account). The home-screen app is the same Mint with the same account.": "Aún no está en la App Store (requiere una cuenta de desarrollador de Apple). La app de la pantalla de inicio es el mismo Mint con la misma cuenta.", + "💻 Computer": "💻 Ordenador", + "Chrome or Edge: click the install icon in the address bar (or menu →": "Chrome o Edge: haz clic en el icono de instalar en la barra de direcciones (o menú →", + "). Everything also works right here in the browser.": "). Todo funciona también aquí mismo en el navegador.", + "Installed 🎉": "Instalada 🎉", + "Can’t reach Mint right now — check your connection": "No se puede conectar con Mint ahora: revisa tu conexión", + "Please log in": "Inicia sesión", + "Log in first": "Primero inicia sesión", + "Enter a valid email": "Escribe un correo válido", + "Name is required": "El nombre es obligatorio", + "Password must be at least 8 characters": "La contraseña debe tener al menos 8 caracteres", + "An account with this email already exists": "Ya existe una cuenta con este correo", + "Wrong email or password": "Correo o contraseña incorrectos", + "Password is wrong": "La contraseña es incorrecta", + "Listing not found": "Anuncio no encontrado", + "Title is required": "El título es obligatorio", + "Description is required": "La descripción es obligatoria", + "Price must be 0 or more": "El precio debe ser 0 o más", + "Affiliate commission must be 0–50%": "La comisión de afiliado debe estar entre 0 y 50%", + "Payment link must start with https://": "El enlace de pago debe empezar por https://", + "You can’t buy your own template": "No puedes comprar tu propia plantilla", + "Only buyers can review": "Solo los compradores pueden reseñar", + "Rating must be 1–5": "La valoración debe ser de 1 a 5", + "This seller doesn’t offer affiliate commission": "Este vendedor no ofrece comisión de afiliado", + "This template doesn’t offer affiliate commission": "Esta plantilla no ofrece comisión de afiliado", + "This seller hasn’t set up payments yet": "Este vendedor aún no ha configurado los pagos", + "Coupons need a connection to Mint": "Los cupones necesitan conexión con Mint", + "Orders need a connection to Mint": "Los pedidos necesitan conexión con Mint", + "Editing listings needs a connection to Mint": "Editar anuncios necesita conexión con Mint", + "Mint AI needs a connection": "Mint AI necesita conexión", + "Mint is offline right now — try again when it shows Live": "Mint está sin conexión: vuelve a intentarlo cuando aparezca En vivo", + "That coupon code isn’t valid for this template": "Ese código de cupón no es válido para esta plantilla", + "That coupon has expired": "Ese cupón ha caducado", + "That coupon has been fully used": "Ese cupón ya se usó por completo", + "Enter a coupon code": "Escribe un código de cupón", + "This template is already free": "Esta plantilla ya es gratis", + "Too many coupon attempts — wait a few minutes": "Demasiados intentos de cupón: espera unos minutos", + "Discount must be 5–90%": "El descuento debe ser del 5 al 90%", + "Too many requests — try again later": "Demasiadas solicitudes: inténtalo más tarde", + "Too many orders — try again later": "Demasiados pedidos: inténtalo más tarde", + "Create a template in 2 minutes": "Crea una plantilla en 2 minutos", + "Describe it, tweak it with words, check the preview, export.": "Descríbela, ajústala con palabras, revisa la vista previa y exporta.", + "Themes & branding": "Temas y marca", + "Look consistent across every template you sell.": "Mantén un estilo coherente en todas las plantillas que vendes.", + "Pricing that sells": "Precios que venden", + "Free lead magnets, paid niche systems, bundles.": "Imanes gratuitos, sistemas de nicho de pago y paquetes.", + "How the affiliate program works": "Cómo funciona el programa de afiliados", + "Anyone can promote any template and earn commission.": "Cualquiera puede promocionar cualquier plantilla y ganar comisión.", + "Content marketing playbook": "Manual de marketing de contenidos", + "Turn one template into a week of posts.": "Convierte una plantilla en una semana de publicaciones.", + "How payments work": "Cómo funcionan los pagos", + "How buying works on Mint, and how you get paid.": "Cómo se compra en Mint y cómo te pagan.", + "Install Mint on your phone": "Instala Mint en tu teléfono", + "Android app, iPhone home-screen app, same account everywhere.": "App de Android, app en la pantalla de inicio del iPhone, la misma cuenta en todas partes.", + "1. Describe the job, not the spreadsheet.": "1. Describe la tarea, no la hoja de cálculo.", + "“Invoice tracker for freelancers in rupiah, with notes” works better than “a table with 6 columns”. Mint picks the closest blueprint, then applies your currency, theme words (pastel, dark, minimal, green…) and extra columns (priority, owner, notes, deadline, status).": "“Control de facturas para freelancers en pesos, con notas” funciona mejor que “una tabla con 6 columnas”. Mint elige el modelo más parecido y aplica tu moneda, palabras de tema (pastel, oscuro, minimalista, verde…) y columnas extra (prioridad, responsable, notas, fecha límite, estado).", + "2. Tweak with plain commands": "2. Ajusta con órdenes sencillas", + "— one per line, English or Bahasa Indonesia:": "— una por línea, en inglés o indonesio:", + "(formulas use [Column Name])": "(las fórmulas usan [Nombre de columna])", + "3. Fine-tune by hand.": "3. Afina a mano.", + "Every cell, column type, dropdown option, formula, dashboard card and colour rule is editable in the Studio.": "Cada celda, tipo de columna, opción de lista, fórmula, tarjeta del panel y regla de color se puede editar en el Estudio.", + "4. Export.": "4. Exporta.", + "The .xlsx has live formulas, dropdowns, colour rules, a frozen header, 200 ready rows and a Dashboard tab. It opens in Excel and in Google Sheets (File › Import).": "El .xlsx trae fórmulas en vivo, listas desplegables, reglas de color, encabezado fijo, 200 filas listas y una pestaña de Panel. Se abre en Excel y en Google Sheets (Archivo › Importar).", + "Buyers judge templates by the thumbnail. Pick": "Los compradores juzgan las plantillas por la miniatura. Elige", + "one signature theme": "un tema distintivo", + "for your shop (for example Blush for a lifestyle brand, Midnight for tech, Mono for business) and use it on every listing so your products are recognisable in the market grid.": "para tu tienda (por ejemplo Blush para una marca de estilo de vida, Midnight para tecnología, Mono para negocios) y úsalo en cada anuncio para que tus productos se reconozcan en el mercado.", + "Light themes": "Los temas claros", + "(Mint, Ocean, Sunset, Lavender, Blush, Forest, Mono) print well and suit business buyers.": "(Mint, Ocean, Sunset, Lavender, Blush, Forest, Mono) se imprimen bien y encajan con compradores de empresa.", + "is a full dark sheet — popular with students and creators, less so for printing.": "es una hoja totalmente oscura: popular entre estudiantes y creadores, menos para imprimir.", + "Keep column names short (1–2 words) so headers stay readable on phones.": "Usa nombres de columna cortos (1–2 palabras) para que los encabezados se lean bien en el móvil.", + "Put 4–6 realistic sample rows in every template: an empty sheet does not sell.": "Pon 4–6 filas de ejemplo realistas en cada plantilla: una hoja vacía no vende.", + "The share card in": "La tarjeta para compartir en", + "Affiliate › Content kit": "Afiliados › Kit de contenido", + "uses the listing’s theme automatically, so your social posts match your products.": "usa el tema del anuncio automáticamente, así tus publicaciones combinan con tus productos.", + "Generic templates (basic budget, to-do list) compete with free versions everywhere. Charge for": "Las plantillas genéricas (presupuesto básico, lista de tareas) compiten con versiones gratis en todas partes. Cobra por", + "specific systems": "sistemas específicos", + "that save a professional real time.": "que ahorran tiempo real a un profesional.", + "Free:": "Gratis:", + "one simple, useful template to build your audience and reviews.": "una plantilla sencilla y útil para ganar audiencia y reseñas.", + "Entry ($3–$7):": "Básico ($3–$7):", + "personal-life systems — habits, meals, travel, study.": "sistemas personales: hábitos, comidas, viajes, estudio.", + "Pro ($9–$19):": "Pro ($9–$19):", + "business systems — invoices, inventory, CRM, rental P&L, pricing calculators.": "sistemas de negocio: facturas, inventario, CRM, resultados de alquileres, calculadoras de precios.", + "Bundles:": "Paquetes:", + "list a bundle at roughly the price of 2 items to lift the average order.": "publica un paquete a un precio de unas 2 plantillas para subir el pedido medio.", + "Local pricing:": "Precios locales:", + "list in the buyer’s currency. In Indonesia, round, familiar prices (Rp 29.000, Rp 49.000, Rp 99.000) read better than converted dollar amounts.": "pon el precio en la moneda del comprador. Precios redondos y conocidos (por ejemplo $49, $99, $199 MXN) funcionan mejor que montos convertidos desde dólares.", + "Mint keeps a platform fee (shown in your Sell dashboard) and pays affiliates the commission you choose, only on sales they actually referred.": "Mint cobra una comisión de plataforma (visible en tu panel de Vender) y paga a los afiliados la comisión que elijas, solo por las ventas que realmente generen.", + "Sellers choose a commission (0–50%) when publishing. 0% means no affiliates.": "Los vendedores eligen una comisión (0–50%) al publicar. 0% significa sin afiliados.", + "Any logged-in user opens a listing and taps": "Cualquier usuario con sesión abre un anuncio y toca", + ". The link looks like": ". El enlace se ve así:", + "When a visitor arrives through the link, the referral is remembered on their device for": "Cuando un visitante llega por el enlace, la referencia se recuerda en su dispositivo durante", + "30 days": "30 días", + "and the click is counted.": "y se cuenta el clic.", + "If they buy, the affiliate earns": "Si compran, el afiliado gana", + "price × commission": "precio × comisión", + ". Self-referrals and seller-referrals earn nothing.": ". Las autorreferencias y las del propio vendedor no ganan nada.", + "Clicks, attributed sales and earnings appear in your Affiliate dashboard; the seller sees the same sale with the commission deducted.": "Clics, ventas atribuidas y ganancias aparecen en tu panel de afiliado; el vendedor ve la misma venta con la comisión descontada.", + "Tip for sellers:": "Consejo para vendedores:", + "25–35% gives creators a reason to make content about your template. You still keep the sale you would not otherwise have had.": "un 25–35% da a los creadores motivos para hacer contenido sobre tu plantilla. Igual te quedas con una venta que de otro modo no tendrías.", + "Templates sell when people": "Las plantillas se venden cuando la gente", + "see the result": "ve el resultado", + ". Use the Content kit on any listing to get ready-made copy plus a themed share card, then post on this cadence:": ". Usa el Kit de contenido de cualquier anuncio para obtener textos listos y una tarjeta con tema, y publica con este ritmo:", + "Day 1 — short video (TikTok / Reels / Shorts):": "Día 1 — video corto (TikTok / Reels / Shorts):", + "hook (“stop rebuilding this every month”), 8-second screen recording of totals updating, CTA.": "gancho (“deja de rehacer esto cada mes”), 8 segundos de grabación de pantalla con los totales actualizándose y una llamada a la acción.", + "Day 2 — carousel or LinkedIn post:": "Día 2 — carrusel o publicación en LinkedIn:", + "the problem, 3 bullets of what the sheet does, link.": "el problema, 3 puntos de lo que hace la hoja y el enlace.", + "Day 3 — Pinterest pin:": "Día 3 — pin de Pinterest:", + "share card + keyword-rich title (“freelance invoice tracker google sheets”).": "tarjeta para compartir + título con palabras clave (“control de facturas freelance google sheets”).", + "Day 5 — blog / SEO post:": "Día 5 — artículo de blog / SEO:", + "use the outline from the kit; answer the question people search for.": "usa el esquema del kit; responde la pregunta que la gente busca.", + "Day 7 — WhatsApp / community share:": "Día 7 — WhatsApp / comunidad:", + "personal recommendation with your affiliate link.": "recomendación personal con tu enlace de afiliado.", + "Always disclose affiliate links where required (for example “#affiliate” or “I earn a commission”). Track which channel works in your Affiliate dashboard and double down.": "Indica siempre los enlaces de afiliado cuando sea obligatorio (por ejemplo “#afiliado” o “gano una comisión”). Sigue en tu panel qué canal funciona y apuesta por él.", + "Mint is live.": "Mint está en vivo.", + "Accounts, listings, orders and affiliate links are stored on Mint’s servers, so they work on every device. Mint never holds your money.": "Cuentas, anuncios, pedidos y enlaces de afiliado se guardan en los servidores de Mint, así que funcionan en todos tus dispositivos. Mint nunca retiene tu dinero.", + "Option 1 — automatic (recommended).": "Opción 1 — automática (recomendada).", + "Under": "En", + "Sell → Get paid automatically": "Vender → Cobra automáticamente", + ", connect your own Midtrans, Xendit or Stripe account with its secret key. Buyers then pay on that secure checkout (QRIS, e-wallets, bank transfer, cards); Mint confirms the payment directly with the provider and the file unlocks in seconds. Nothing to confirm by hand, and the money lands in your account. Try it first with a sandbox / test key.": ", conecta tu propia cuenta de Midtrans, Xendit o Stripe con su clave secreta. Los compradores pagan en esa página segura (QR, billeteras, transferencia, tarjetas); Mint confirma el pago directamente con el proveedor y el archivo se desbloquea en segundos. Nada que confirmar a mano y el dinero llega a tu cuenta. Pruébalo primero con una clave sandbox / de prueba.", + "Option 2 — payment link.": "Opción 2 — enlace de pago.", + "Add your own link when you publish (Lynk.id, Saweria, Trakteer, PayPal, Gumroad…):": "Añade tu propio enlace al publicar (PayPal, Gumroad, Mercado Pago, Lynk.id…):", + "A buyer clicks": "El comprador pulsa", + "Buy": "Comprar", + ", gets an order reference like": ", recibe una referencia de pedido como", + "and pays you on your link with that reference in the note.": "y te paga en tu enlace con esa referencia en la nota.", + "You get a notification and see the order under": "Recibes un aviso y ves el pedido en", + "Sell → Orders to confirm": "Vender → Pedidos por confirmar", + ". Tap": ". Toca", + "and the buyer can download right away.": "y el comprador puede descargar al momento.", + "Affiliates:": "Afiliados:", + "if an affiliate referred the sale, Mint shows the commission you owe and their payout details. Pay them, then tap": "si un afiliado generó la venta, Mint muestra la comisión que debes y sus datos de cobro. Págale y toca", + "— they get notified.": ": le llega un aviso.", + "Notifications:": "Notificaciones:", + "switch them on under": "actívalas en", + "Account → Notifications": "Cuenta → Notificaciones", + "(Chrome, Edge, Firefox, Android, and iPhone home-screen apps on iOS 16.4+). Free templates unlock instantly.": "(Chrome, Edge, Firefox, Android y apps de pantalla de inicio en iPhone con iOS 16.4+). Las plantillas gratis se desbloquean al instante.", + "Android:": "Android:", + ", open it and allow installs from your browser (Android asks once). Or in Chrome tap ⋮ →": ", ábrelo y permite instalar desde tu navegador (Android lo pide una vez). O en Chrome toca ⋮ →", + "iPhone / iPad:": "iPhone / iPad:", + "open Mint in": "abre Mint en", + ", tap": ", toca", + ". It opens full-screen with its own icon. (An App Store version needs an Apple developer account, so it isn’t there yet.)": ". Se abre a pantalla completa con su propio icono. (Una versión en la App Store necesita cuenta de desarrollador de Apple, así que aún no está.)", + "Same Mint, same account.": "El mismo Mint, la misma cuenta.", + "The apps load the live site, so new features arrive without updating, and your drafts, library, sales and affiliate links follow you between phone and computer.": "Las apps cargan el sitio en vivo, así que las novedades llegan sin actualizar, y tus borradores, biblioteca, ventas y enlaces de afiliado te siguen entre teléfono y ordenador.", + "Downloads on the phone:": "Descargas en el teléfono:", + "in the Android app,": "en la app de Android,", + "opens the share sheet — save to Files or Drive, or open it straight in Excel or Google Sheets.": "abre el menú de compartir: guárdalo en Archivos o Drive, o ábrelo directamente en Excel o Google Sheets.", + "Badges:": "Insignias:", + "a red number on": "un número rojo en", + "means orders to confirm or commissions to pay; on": "significa pedidos por confirmar o comisiones por pagar; en", + "it means an order still waiting for your payment.": "significa que un pedido aún espera tu pago." + }; + + // Whole-text patterns (same order and captures as the Indonesian RULES in i18n.js). + var RULES_ZH = [ + [/^Buy — (.+)$/, "购买 — $1"], + [/^Order (M-[A-Z0-9]{6})$/, "订单 $1"], + [/^Order (M-[A-Z0-9]{6}) created — finish paying on the checkout; it unlocks automatically$/, "订单 $1 已创建——在结账页面完成付款后会自动解锁"], + [/^Order (M-[A-Z0-9]{6}) created — pay on the seller’s checkout and add the reference$/, "订单 $1 已创建——请在卖家的结账页面付款并填写订单编号"], + [/^New order (M-[A-Z0-9]{6}) at the coupon price$/, "已按优惠价生成新订单 $1"], + [/^Pay (.+?) on the seller’s secure checkout\. The template unlocks automatically a few seconds after you pay\.$/, "在卖家的安全结账页面支付 $1。付款几秒后模板会自动解锁。"], + [/^Pay (.+?) on the seller’s checkout\.$/, "在卖家的结账页面支付 $1。"], + [/^Pay on (.+) ↗$/, "在 $1 付款 ↗"], + [/^Copy reference (.+)$/, "复制订单编号 $1"], + [/^Earn (\d+)% promoting this$/, "推广此模板可赚 $1%"], + [/^(.+) per sale you refer \(30-day attribution\)\.$/, "你带来的每笔销售可得 $1(30 天归因)。"], + [/^Includes (\d+) columns, (\d+) dashboard cards, (\d+) colour rules, dropdowns and 200 ready rows\. Works in Excel & Google Sheets\.$/, + "包含 $1 列、$2 张仪表盘卡片、$3 条颜色规则、下拉菜单和 200 行空白行。适用于 Excel 和 Google 表格。"], + [/^✔ (\S+): (\d+)% off — (.+) instead of (.+)$/, "✔ $1:优惠 $2%——$3(原价 $4)"], + [/^✔ Coupon (.+)$/, "✔ 优惠码 $1"], + [/^Coupon (\S+) created$/, "优惠码 $1 已创建"], + [/^Replace your unpaid order with one at (.+)\? Only do this if you haven’t paid yet\.$/, "用 $1 的价格替换你未付款的订单?仅在尚未付款时这样做。"], + [/^Sales \((\w+)\)$/, "销售额($1)"], + [/^Earned \((\w+)\)$/, "已赚取($1)"], + [/^Platform fee \((.+)\)$/, "平台费($1)"], + [/^Price \((\w+)\)$/, "价格($1)"], + [/^Welcome, (.+)$/, "欢迎,$1"], + [/^(\d+) AI generations left today\.$/, "今天还可使用 AI 生成 $1 次。"], + [/^Publish “(.+)”$/, "发布“$1”"], + [/^Opened draft “(.+)”\.?$/, "已打开草稿“$1”。"], + [/^Started from the “(.+)” blueprint\.$/, "已从“$1”蓝本开始。"], + [/^Added formula column “(.+)” — edit its formula below\.$/, "已添加公式列“$1”——在下方编辑公式。"], + [/^Added column “(.+)” \((\w+)\)\.$/, "已添加列“$1”($2)。"], + [/^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。"], + [/^Added a (\w+) card for “(.+)”\.$/, "已为“$2”添加 $1 卡片。"], + [/^Highlight rule added on “(.+)”\.$/, "已在“$1”上添加高亮规则。"], + [/^Didn’t understand “(.+)”\. Try: (.+)$/, "没听懂“$1”。试试:$2"], + [/^(.+) connected — orders now unlock automatically$/, "$1 已连接——订单现在会自动解锁"] + ]; + var RULES_ES = [ + [/^Buy — (.+)$/, "Comprar — $1"], + [/^Order (M-[A-Z0-9]{6})$/, "Pedido $1"], + [/^Order (M-[A-Z0-9]{6}) created — finish paying on the checkout; it unlocks automatically$/, "Pedido $1 creado: termina de pagar en la página de pago; se desbloquea solo"], + [/^Order (M-[A-Z0-9]{6}) created — pay on the seller’s checkout and add the reference$/, "Pedido $1 creado: paga en la página del vendedor y añade la referencia"], + [/^New order (M-[A-Z0-9]{6}) at the coupon price$/, "Nuevo pedido $1 al precio con cupón"], + [/^Pay (.+?) on the seller’s secure checkout\. The template unlocks automatically a few seconds after you pay\.$/, "Paga $1 en la página segura del vendedor. La plantilla se desbloquea sola unos segundos después de pagar."], + [/^Pay (.+?) on the seller’s checkout\.$/, "Paga $1 en la página de pago del vendedor."], + [/^Pay on (.+) ↗$/, "Pagar en $1 ↗"], + [/^Copy reference (.+)$/, "Copiar referencia $1"], + [/^Earn (\d+)% promoting this$/, "Gana $1% promocionándola"], + [/^(.+) per sale you refer \(30-day attribution\)\.$/, "$1 por cada venta que generes (atribución de 30 días)."], + [/^Includes (\d+) columns, (\d+) dashboard cards, (\d+) colour rules, dropdowns and 200 ready rows\. Works in Excel & Google Sheets\.$/, + "Incluye $1 columnas, $2 tarjetas de panel, $3 reglas de color, listas desplegables y 200 filas listas. Funciona en Excel y Google Sheets."], + [/^✔ (\S+): (\d+)% off — (.+) instead of (.+)$/, "✔ $1: $2% de descuento — $3 en vez de $4"], + [/^✔ Coupon (.+)$/, "✔ Cupón $1"], + [/^Coupon (\S+) created$/, "Cupón $1 creado"], + [/^Replace your unpaid order with one at (.+)\? Only do this if you haven’t paid yet\.$/, "¿Reemplazar tu pedido sin pagar por uno a $1? Hazlo solo si aún no has pagado."], + [/^Sales \((\w+)\)$/, "Ventas ($1)"], + [/^Earned \((\w+)\)$/, "Ganado ($1)"], + [/^Platform fee \((.+)\)$/, "Comisión de la plataforma ($1)"], + [/^Price \((\w+)\)$/, "Precio ($1)"], + [/^Welcome, (.+)$/, "Hola, $1"], + [/^(\d+) AI generations left today\.$/, "Te quedan $1 generaciones con IA hoy."], + [/^Publish “(.+)”$/, "Publicar “$1”"], + [/^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 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."], + [/^Added a (\w+) card for “(.+)”\.$/, "Tarjeta $1 añadida para “$2”."], + [/^Highlight rule added on “(.+)”\.$/, "Regla de resaltado añadida en “$1”."], + [/^Didn’t understand “(.+)”\. Try: (.+)$/, "No entendí “$1”. Prueba: $2"], + [/^(.+) connected — orders now unlock automatically$/, "$1 conectado: los pedidos ahora se desbloquean solos"] + ]; + + var CATEGORY_ZH = { Finance: "理财", Business: "商业", Productivity: "效率", Lifestyle: "生活", Creator: "创作者", Health: "健康", Education: "教育", Events: "活动", Other: "其他" }; + var CATEGORY_ES = { Finance: "Finanzas", Business: "Negocios", Productivity: "Productividad", Lifestyle: "Estilo de vida", Creator: "Creadores", Health: "Salud", Education: "Educación", Events: "Eventos", Other: "Otros" }; + + function categoryRule(map) { + return [/(^|· )(Finance|Business|Productivity|Lifestyle|Creator|Health|Education|Events|Other)\b(?= ·|$)/g, function (all, lead, cat) { + return lead + map[cat]; + }]; + } + + var INLINE_ZH = [ + [/\b(\d+) sold\b/g, "已售 $1"], + [/\b(\d+) views\b/g, "$1 次浏览"], + [/([\d.]+)% conversion\b/g, "转化率 $1%"], + [/\b(\d+)% off\b/g, "优惠 $1%"], + [/\b(\d+) columns\b/g, "$1 列"], + [/\b(\d+) clicks\b/g, "$1 次点击"], + [/ · edited /g, " · 编辑于 "], + [/ · affiliate (\d+)%/g, " · 推广佣金 $1%"], + [/ · net /g, " · 净额 "], + [/ · via affiliate\b/g, " · 来自推广"], + [/ · coupon /g, " · 优惠码 "], + [/ · used (\d+)/g, " · 已用 $1"], + [/\((\d+) paid\)/g, "(已付 $1)"], + [/ · until /g, " · 截至 "], + [/ · ended /g, " · 已结束 "], + [/ · pay to: /g, " · 付款至:"], + [/ · earned /g, " · 已赚 "], + [/ · paid out /g, " · 已支付 "], + [/\bawaiting payment\)/g, "等待付款)"], + [/^All your templates/, "你的所有模板"], + [/\bConnected to Mint · platform fee\b/g, "已连接到 Mint · 平台费"], + [/ · Mint AI on\b/g, " · Mint AI 已开启"], + [/\(sandbox keys start with ([^)]+)\)/g, "(沙盒密钥以 $1 开头)"], + [/secret key with Money-in write permission/g, "具有 Money-in 写入权限的密钥"], + categoryRule(CATEGORY_ZH) + ]; + var INLINE_ES = [ + [/\b(\d+) sold\b/g, "$1 vendidas"], + [/\b(\d+) views\b/g, "$1 visitas"], + [/([\d.]+)% conversion\b/g, "$1% de conversión"], + [/\b(\d+)% off\b/g, "$1% de descuento"], + [/\b(\d+) columns\b/g, "$1 columnas"], + [/\b(\d+) clicks\b/g, "$1 clics"], + [/ · edited /g, " · editada "], + [/ · affiliate (\d+)%/g, " · afiliado $1%"], + [/ · net /g, " · neto "], + [/ · via affiliate\b/g, " · vía afiliado"], + [/ · coupon /g, " · cupón "], + [/ · used (\d+)/g, " · usado $1"], + [/\((\d+) paid\)/g, "($1 pagados)"], + [/ · until /g, " · hasta "], + [/ · ended /g, " · terminó "], + [/ · pay to: /g, " · pagar a: "], + [/ · earned /g, " · ganado "], + [/ · paid out /g, " · pagado "], + [/\bawaiting payment\)/g, "esperando el pago)"], + [/^All your templates/, "Todas tus plantillas"], + [/\bConnected to Mint · platform fee\b/g, "Conectado a Mint · comisión de la plataforma"], + [/ · Mint AI on\b/g, " · Mint AI activa"], + [/\(sandbox keys start with ([^)]+)\)/g, "(las claves sandbox empiezan por $1)"], + [/secret key with Money-in write permission/g, "clave secreta con permiso de escritura Money-in"], + categoryRule(CATEGORY_ES) + ]; + + root.MintTemplatesPacks = { + zh: { name: "简体中文", short: "中文", phrases: ZH, rules: RULES_ZH, inline: INLINE_ZH }, + es: { name: "Español", short: "ES", phrases: ES, rules: RULES_ES, inline: INLINE_ES } + }; +})(typeof window !== "undefined" ? window : this); diff --git a/apps/mint/web/js/i18n.js b/apps/mint/web/js/i18n.js index d08dc796..5507c914 100644 --- a/apps/mint/web/js/i18n.js +++ b/apps/mint/web/js/i18n.js @@ -10,9 +10,17 @@ "use strict"; // One language for all of Mint (en / id / zh / es), chosen on the first visit (js/locale.js). - // Templates is translated into Indonesian; Chinese and Spanish show it in English. + // Indonesian lives below; Chinese and Spanish come from js/i18n-more.js (loaded first). var KEY = "mint.lang"; var LANGS = { en: "English", id: "Bahasa Indonesia" }; + var MORE = root.MintTemplatesPacks || {}; + Object.keys(MORE).forEach(function (code) { + LANGS[code] = MORE[code].name; + }); + var SHORT = { en: "EN", id: "ID", zh: "中文", es: "ES" }; + var ORDER = ["en", "id", "zh", "es"].filter(function (code) { + return !!LANGS[code]; + }); // ---------------------------------------------------------------- exact phrases var ID = { @@ -744,10 +752,21 @@ }] ]; - var FRAGMENTS = Object.keys(ID).filter(function (k) { - return k.indexOf(" ") !== -1 && k.length >= 12; - }).sort(function (a, b) { - return b.length - a.length; + function fragmentsOf(dict) { + return Object.keys(dict).filter(function (k) { + return k.indexOf(" ") !== -1 && k.length >= 12; + }).sort(function (a, b) { + return b.length - a.length; + }); + } + + // One pack per language: exact phrases, whole-text rules, in-text substitutions, long fragments. + var PACKS = { id: { phrases: ID, rules: RULES, inline: INLINE } }; + Object.keys(MORE).forEach(function (code) { + PACKS[code] = MORE[code]; + }); + Object.keys(PACKS).forEach(function (code) { + PACKS[code].fragments = fragmentsOf(PACKS[code].phrases); }); // ---------------------------------------------------------------- state @@ -755,19 +774,29 @@ try { var saved = localStorage.getItem(KEY); if (saved) { - return saved === "id" ? "id" : "en"; + return LANGS[saved] ? saved : "en"; } } catch (err) { /* storage blocked */ } var nav = (root.navigator && (root.navigator.language || "")) || ""; - return /^(id|ms)\b/i.test(nav) ? "id" : "en"; + if (/^(id|ms|in)\b/i.test(nav)) { + return "id"; + } + if (/^zh\b/i.test(nav) && LANGS.zh) { + return "zh"; + } + if (/^es\b/i.test(nav) && LANGS.es) { + return "es"; + } + return "en"; } var current = detect(); function translate(text) { - if (current === "en" || !text) { + var pack = PACKS[current]; + if (current === "en" || !pack || !text) { return text; } var lead = text.match(/^\s*/)[0]; @@ -776,22 +805,22 @@ if (!core || !/[A-Za-z]/.test(core)) { return text; } - if (ID[core]) { - return lead + ID[core] + trail; + if (pack.phrases[core]) { + return lead + pack.phrases[core] + trail; } - for (var i = 0; i < RULES.length; i += 1) { - if (RULES[i][0].test(core)) { - return lead + core.replace(RULES[i][0], RULES[i][1]) + trail; + for (var i = 0; i < pack.rules.length; i += 1) { + if (pack.rules[i][0].test(core)) { + return lead + core.replace(pack.rules[i][0], pack.rules[i][1]) + trail; } } var out = core; - for (var f = 0; f < FRAGMENTS.length; f += 1) { - if (out.indexOf(FRAGMENTS[f]) !== -1) { - out = out.split(FRAGMENTS[f]).join(ID[FRAGMENTS[f]]); + for (var f = 0; f < pack.fragments.length; f += 1) { + if (out.indexOf(pack.fragments[f]) !== -1) { + out = out.split(pack.fragments[f]).join(pack.phrases[pack.fragments[f]]); } } - for (var j = 0; j < INLINE.length; j += 1) { - out = out.replace(INLINE[j][0], INLINE[j][1]); + for (var j = 0; j < pack.inline.length; j += 1) { + out = out.replace(pack.inline[j][0], pack.inline[j][1]); } return lead + out + trail; } @@ -942,7 +971,7 @@ b.setAttribute("translate", "no"); host.insertBefore(b, host.firstChild.nextSibling); b.addEventListener("click", function () { - setLang(current === "id" ? "en" : "id"); + setLang(ORDER[(ORDER.indexOf(current) + 1) % ORDER.length]); }); label(); } @@ -950,8 +979,9 @@ function label() { var b = document.getElementById("langBtn"); if (b) { - b.textContent = current === "id" ? "ID" : "EN"; - var hint = current === "id" ? "Ganti bahasa ke English" : "Switch language to Bahasa Indonesia"; + b.textContent = SHORT[current] || "EN"; + var next = ORDER[(ORDER.indexOf(current) + 1) % ORDER.length]; + var hint = "Language: " + LANGS[current] + " → " + LANGS[next]; b.title = hint; b.setAttribute("aria-label", hint); } diff --git a/apps/mint/web/mobile.html b/apps/mint/web/mobile.html index e03f1076..e16bfb92 100644 --- a/apps/mint/web/mobile.html +++ b/apps/mint/web/mobile.html @@ -79,7 +79,8 @@ - + + diff --git a/apps/mint/web/sw.js b/apps/mint/web/sw.js index 666e76b5..17a11e3b 100644 --- a/apps/mint/web/sw.js +++ b/apps/mint/web/sw.js @@ -3,7 +3,7 @@ var CACHE = "mint-v3.4.1"; var SHELL = [ "./", "index.html", "app.html", "web.html", "mobile.html", "privacy.html", "terms.html", "delete-account.html", "app.css", - "js/locale.js", "js/mint-cloud.js", "js/core.js", "js/xlsx.js", "js/guides.js", "js/store.js", "js/i18n.js", "js/app.js", + "js/locale.js", "js/mint-cloud.js", "js/core.js", "js/xlsx.js", "js/guides.js", "js/store.js", "js/i18n-more.js", "js/i18n.js", "js/app.js", "data/seed.json", "manifest.webmanifest", "icons/app-icon.svg", "icons/icon-192.png", "icons/icon-512.png", "icons/apple-touch-icon.png" ]; diff --git a/apps/mint/web/web.html b/apps/mint/web/web.html index 9f619a02..08a7d53a 100644 --- a/apps/mint/web/web.html +++ b/apps/mint/web/web.html @@ -79,7 +79,8 @@ - + + From 9679278a742403b81eef4026d5094ffa3ccc2891 Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 09:51:52 +0700 Subject: [PATCH 3/6] Mint 3.5 (wip): Privacy and Terms in Indonesian, Chinese and Spanish with a language switcher --- apps/mint/web/privacy.html | 245 ++++++++++++++++++++++++++++++++++++- apps/mint/web/terms.html | 158 +++++++++++++++++++++++- 2 files changed, 401 insertions(+), 2 deletions(-) diff --git a/apps/mint/web/privacy.html b/apps/mint/web/privacy.html index be1393df..0480dc49 100644 --- a/apps/mint/web/privacy.html +++ b/apps/mint/web/privacy.html @@ -11,11 +11,21 @@ .legal { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; line-height: 1.65; } .legal h2 { margin-top: 28px; } .legal li { margin: 4px 0; } + .legal-langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } + .legal-langs button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #d6dbe1); background: transparent; color: inherit; cursor: pointer; } + .legal-langs button[aria-pressed="true"] { background: var(--accent, #0f9d76); border-color: var(--accent, #0f9d76); color: #fff; }
-

← Back to Mint

+

← Back to Mint

+ +

Privacy

Last updated 27 October 2026. Plain-language policy written for Mint with Indonesia’s Personal Data Protection Law (UU No. 27 Tahun 2022) in mind; not yet reviewed by a lawyer.

@@ -77,6 +87,239 @@

Children

Changes

Material changes are announced in the app before they take effect. The date at the top shows the latest version.

+
+ + +
+ diff --git a/apps/mint/web/terms.html b/apps/mint/web/terms.html index c244f353..d3b6aec7 100644 --- a/apps/mint/web/terms.html +++ b/apps/mint/web/terms.html @@ -11,11 +11,21 @@ .legal { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; line-height: 1.65; } .legal h2 { margin-top: 28px; } .legal li { margin: 4px 0; } + .legal-langs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; } + .legal-langs button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line, #d6dbe1); background: transparent; color: inherit; cursor: pointer; } + .legal-langs button[aria-pressed="true"] { background: var(--accent, #0f9d76); border-color: var(--accent, #0f9d76); color: #fff; }
-

← Back to Mint

+

← Back to Mint

+ +

Terms

Last updated 27 October 2026. Plain-language summary written for Mint; not reviewed by a lawyer.

What Mint is

@@ -48,6 +58,152 @@

No warranty

Governing law

These terms are governed by the laws of the Republic of Indonesia.

Questions or requests: juwen12006@gmail.com.

+
+ + +
+ From e4ffa245059e047241b25324fd89c098c865c8d4 Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 10:01:20 +0700 Subject: [PATCH 4/6] Mint 3.5 (wip): .xlsx tab names, header and tips follow the user's language (en/id/zh/es) --- apps/mint/web/js/xlsx.js | 54 ++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/apps/mint/web/js/xlsx.js b/apps/mint/web/js/xlsx.js index 81960a81..e8474f91 100644 --- a/apps/mint/web/js/xlsx.js +++ b/apps/mint/web/js/xlsx.js @@ -224,16 +224,55 @@ return ""; } + // ------------------------------------------------------------------ workbook labels + // Mint 3.5: the fixed words in the workbook (tab names, the Dashboard header and tips) follow the user's + // language. Formulas reach the data tab through sheetRef(dataName), so a translated tab name stays valid. + var LABELS = { + en: { + data: "Data", dashboard: "Dashboard", metric: "Metric", value: "Value", + how: "How to use: add rows on the \u201c{data}\u201d tab \u2014 calculated columns, colours and this dashboard update automatically.", + dropdown: "Dropdown columns only accept listed values. Dates use yyyy-mm-dd.", + works: "Works in Microsoft Excel and Google Sheets (File \u203a Import). ", made: "Made with Mint." + }, + id: { + data: "Data", dashboard: "Dasbor", metric: "Metrik", value: "Nilai", + how: "Cara pakai: tambahkan baris di tab \u201c{data}\u201d \u2014 kolom hitungan, warna, dan dasbor ini ikut diperbarui otomatis.", + dropdown: "Kolom dropdown hanya menerima nilai yang tersedia. Tanggal memakai format yyyy-mm-dd.", + works: "Bisa dibuka di Microsoft Excel dan Google Sheets (File \u203a Impor). ", made: "Dibuat dengan Mint." + }, + zh: { + data: "数据", dashboard: "仪表盘", metric: "指标", value: "数值", + how: "使用方法:在\u201c{data}\u201d工作表中添加行——计算列、颜色和此仪表盘会自动更新。", + dropdown: "下拉列只接受列表中的值。日期格式为 yyyy-mm-dd。", + works: "适用于 Microsoft Excel 和 Google 表格(文件 \u203a 导入)。", made: "由 Mint 制作。" + }, + es: { + data: "Datos", dashboard: "Panel", metric: "Métrica", value: "Valor", + how: "Cómo usarla: añade filas en la pestaña \u201c{data}\u201d; las columnas calculadas, los colores y este panel se actualizan solos.", + dropdown: "Las columnas desplegables solo aceptan los valores de la lista. Las fechas usan yyyy-mm-dd.", + works: "Funciona en Microsoft Excel y Google Sheets (Archivo \u203a Importar). ", made: "Hecho con Mint." + } + }; + + function labelsFor(options) { + var lang = options.lang; + if (!lang && root.MintI18n && typeof root.MintI18n.lang === "function") { + lang = root.MintI18n.lang(); + } + return LABELS[lang] || LABELS.en; + } + // ------------------------------------------------------------------ build function build(rawSpec, options) { options = options || {}; + var L = labelsFor(options); var spec = Core.normalize(rawSpec); var theme = Core.themeById(spec.theme); var styles = new StyleBook(theme, spec.currency); var cols = spec.sheet.columns; var dataRows = spec.sheet.rows; var lastRow = 1 + Math.max(PREPARED_ROWS, dataRows.length + 50); - var dataName = "Data"; + var dataName = L.data; var letters = {}; cols.forEach(function (c, i) { letters[c.name.toLowerCase()] = colLetter(i); @@ -363,9 +402,9 @@ var labelStyle = styles.xf(0, 3, 1, 0, false); var dashRows = []; dashRows.push("" + strCell("B1", spec.title, titleStyle) + ""); - dashRows.push("" + strCell("B2", spec.description || "Dashboard", noteStyle) + ""); + dashRows.push("" + strCell("B2", spec.description || L.dashboard, noteStyle) + ""); var rowIndex = 4; - dashRows.push("" + strCell("B4", "Metric", headerStyle) + strCell("C4", "Value", headerStyle) + ""); + dashRows.push("" + strCell("B4", L.metric, headerStyle) + strCell("C4", L.value, headerStyle) + ""); spec.summary.forEach(function (s) { var letter = letters[String(s.column).toLowerCase()]; if (!letter) { @@ -395,9 +434,9 @@ }); rowIndex += 2; var tips = [ - "How to use: add rows on the \u201c" + dataName + "\u201d tab \u2014 calculated columns, colours and this dashboard update automatically.", - "Dropdown columns only accept listed values. Dates use yyyy-mm-dd.", - "Works in Microsoft Excel and Google Sheets (File \u203a Import). " + (options.footer || "Made with Mint.") + L.how.replace("{data}", dataName), + L.dropdown, + L.works + (options.footer || L.made) ]; tips.forEach(function (tip) { dashRows.push("" + strCell("B" + rowIndex, tip, noteStyle) + ""); @@ -417,7 +456,7 @@ var workbook = "\n" + "" + "" + - "" + + "" + "" + "" + ""; @@ -497,6 +536,7 @@ root.MintXlsx = { build: build, + labels: LABELS, toCsv: toCsv, base64: base64, crc32: crc32, From a45e3e84042319cc50b5e11c25dab122f733e3dc Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 10:11:02 +0700 Subject: [PATCH 5/6] Mint 3.5 (wip): desktop app bundles Mint and opens it offline on first launch; offline budgets move online later --- .github/workflows/mint-apps.yml | 2 + apps/mint/desktop/README.md | 5 +- apps/mint/desktop/mint.spec | 4 +- apps/mint/desktop/mint_app.py | 148 +++++++++++++++++++++++++++++++- apps/mint/desktop/smoke_test.py | 9 +- 5 files changed, 161 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mint-apps.yml b/.github/workflows/mint-apps.yml index 1f5049e0..384368d6 100644 --- a/.github/workflows/mint-apps.yml +++ b/.github/workflows/mint-apps.yml @@ -79,6 +79,8 @@ jobs: run: python apps/mint/desktop/build.py --require-installer - name: Open the built app and check its window shows this commit's Mint run: python apps/mint/desktop/smoke_test.py --built --local-site + - name: With no connection, the built app opens the Mint bundled inside it + run: python apps/mint/desktop/smoke_test.py --built --offline - name: Install with Mint-Windows-Setup.exe, run it, uninstall it if: runner.os == 'Windows' shell: pwsh diff --git a/apps/mint/desktop/README.md b/apps/mint/desktop/README.md index 72dcdca2..d49990d3 100644 --- a/apps/mint/desktop/README.md +++ b/apps/mint/desktop/README.md @@ -9,8 +9,9 @@ The desktop app is Mint (Budget and Templates) in its own window instead of a br - Exports (.xlsx, CSV, JSON backups, result cards) save to the Downloads folder; links to other sites open in the default browser. - Opening Mint again brings the open window to the front; `Mint --stop` closes it. -- The first time it opens without internet it shows an offline page with **Try again**; after that the - site's own offline cache keeps budgets available offline. +- Without internet, even the very first time, the window opens the copy of Mint bundled inside the app + (served on `127.0.0.1:47821`). Budgets started there move into the online Mint automatically the next + time the app opens with a connection; budgets that already exist online are never overwritten. - Updates to Mint itself arrive through the website, so the desktop app rarely needs reinstalling. ## Build diff --git a/apps/mint/desktop/mint.spec b/apps/mint/desktop/mint.spec index d9e6d2ac..500b95cf 100644 --- a/apps/mint/desktop/mint.spec +++ b/apps/mint/desktop/mint.spec @@ -26,7 +26,9 @@ else: a = Analysis( # noqa: F821 [os.path.join(DESKTOP, "mint_app.py")], pathex=[DESKTOP], - datas=[(os.path.join(DESKTOP, "offline.html"), ".")], + # offline.html for the rare case without a bundled copy, and the Mint web app itself (web/) so the + # window also works offline the very first time it opens. + datas=[(os.path.join(DESKTOP, "offline.html"), "."), (os.path.join(os.path.dirname(DESKTOP), "web"), "web")], hiddenimports=HIDDEN, excludes=EXCLUDES, ) diff --git a/apps/mint/desktop/mint_app.py b/apps/mint/desktop/mint_app.py index ebc5273e..461683ff 100644 --- a/apps/mint/desktop/mint_app.py +++ b/apps/mint/desktop/mint_app.py @@ -4,7 +4,9 @@ macOS the system WebKit (WKWebView), through pywebview The window opens https://juw12.github.io/projects/mint/ and keeps its browser data (budgets, language, -region, sign-in) in a per-user folder, so everything is still there the next time Mint opens. Downloads +region, sign-in) in a per-user folder, so everything is still there the next time Mint opens. With no +connection the window opens the copy of Mint bundled with the app (served on a loopback port), so even the +very first open works offline; budgets started there move into the online Mint the next time it connects. Downloads (.xlsx, CSV, backups, result cards) are allowed and land in the usual Downloads folder; links to other sites open in the default browser. Without WebView2 Mint opens in the default browser instead. @@ -14,7 +16,9 @@ loaded and then close itself; MINT_DESKTOP_URL overrides the address. """ +import functools import hmac +import http.server import json import os import secrets @@ -34,6 +38,8 @@ LIGHT_BACKGROUND = "#f6f7f5" DARK_BACKGROUND = "#0b0d0c" CONTROL_FILE = "window.json" +OFFLINE_FILE = "offline-origin.json" +LOCAL_PORT = 47821 # fixed, so offline budgets keep one browser origin between opens SIZE_FILE = "window-size.json" TEST_TIMEOUT = 60 PAGE_SCRIPT = ( @@ -144,6 +150,100 @@ def online(url, timeout=6): return False +# ------------------------------------------------------- the bundled offline copy +def bundled_site(): + """Folder of the Mint web app shipped inside the app (or this checkout's web/), or None.""" + for folder in (os.path.join(here(), "web"), os.path.join(os.path.dirname(here()), "web")): + if os.path.isfile(os.path.join(folder, "budget", "index.html")): + return folder + return None + + +class _QuietHandler(http.server.SimpleHTTPRequestHandler): + extensions_map = dict(http.server.SimpleHTTPRequestHandler.extensions_map, + **{".js": "text/javascript", ".webmanifest": "application/manifest+json", ".json": "application/json"}) + + def log_message(self, *args): + pass + + +class LocalSite: + """Serves the bundled Mint on 127.0.0.1 so the window works without a connection.""" + + def __init__(self, folder, port=LOCAL_PORT): + handler = functools.partial(_QuietHandler, directory=folder) + try: + self.server = http.server.ThreadingHTTPServer(("127.0.0.1", port), handler) + except OSError: + self.server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), handler) + threading.Thread(target=self.server.serve_forever, name="mint-local-site", daemon=True).start() + self.origin = "http://127.0.0.1:%d" % self.server.server_address[1] + + def url(self): + return self.origin + "/budget/?desktop=offline" + + def close(self): + try: + self.server.shutdown() + self.server.server_close() + except OSError: + pass + + +# Budgets made while offline live under the loopback origin. Next time Mint is online the window opens that +# origin once, reads its mint.* storage, then loads the live site and adds anything it doesn't have yet. +DUMP_SCRIPT = ( + "JSON.stringify(Object.keys(localStorage).filter(function (k) { return k.indexOf('mint.') === 0; })" + ".reduce(function (o, k) { o[k] = localStorage.getItem(k); return o; }, {}))" +) +MERGE_SCRIPT = """(function (dump) { + var added = 0; + Object.keys(dump).forEach(function (key) { + if (key === 'mint.budget.books') { + var mine = []; + var theirs = []; + try { mine = JSON.parse(localStorage.getItem(key) || '[]') || []; } catch (e) {} + try { theirs = JSON.parse(dump[key] || '[]') || []; } catch (e) {} + theirs.forEach(function (book) { + if (book && book.id && !mine.some(function (m) { return m && m.id === book.id; })) { + mine.push(book); + added += 1; + } + }); + localStorage.setItem(key, JSON.stringify(mine)); + } else if (localStorage.getItem(key) === null) { + localStorage.setItem(key, dump[key]); + added += 1; + } + }); + return added; +})(%s)""" + + +def read_offline_marker(folder): + try: + with open(os.path.join(folder, OFFLINE_FILE), encoding="utf-8") as handle: + return json.load(handle) + except (OSError, ValueError): + return None + + +def write_offline_marker(folder, origin): + try: + os.makedirs(folder, exist_ok=True) + with open(os.path.join(folder, OFFLINE_FILE), "w", encoding="utf-8") as handle: + json.dump({"origin": origin, "since": int(time.time())}, handle) + except OSError: + pass + + +def clear_offline_marker(folder): + try: + os.remove(os.path.join(folder, OFFLINE_FILE)) + except OSError: + pass + + def offline_page(): path = os.path.join(here(), "offline.html") return "file:///" + path.replace("\\", "/").lstrip("/") if os.path.isfile(path) else None @@ -333,7 +433,29 @@ def run_window(url, folder, report_path): webview.settings["ALLOW_DOWNLOADS"] = True webview.settings["OPEN_EXTERNAL_LINKS_IN_BROWSER"] = True - start_url = url if (report_path or online(url)) else (offline_page() or url) + force_offline = os.environ.get("MINT_FORCE_OFFLINE") == "1" + is_online = not force_offline and (bool(report_path) or online(url)) + site_folder = bundled_site() + local = None + marker = read_offline_marker(folder) + plan = {"move": None} + if not is_online and site_folder: + local = LocalSite(site_folder) + if not report_path: + write_offline_marker(folder, local.origin) + start_url = local.url() + elif is_online and marker and site_folder and not report_path: + # Bring budgets made offline into the online Mint: open the loopback origin first, then the live site. + local = LocalSite(site_folder) + if local.origin == marker.get("origin"): + plan["move"] = "read" + start_url = local.origin + "/budget/?desktop=moving" + else: + local.close() + local = None + start_url = url + else: + start_url = url if is_online else (offline_page() or url) width, height = fit_size(saved_size(folder), screen_work_area()) window = webview.create_window( TITLE, @@ -375,7 +497,27 @@ def self_test(): write_report(report_path, method="window", toolkit=renderer, runtime=runtime, **page) window.destroy() + def move_offline_budgets(): + try: + if plan["move"] == "read": + plan["dump"] = window.evaluate_js(DUMP_SCRIPT) or "{}" + plan["move"] = "write" + window.load_url(url) + elif plan["move"] == "write": + plan["move"] = None + added = window.evaluate_js(MERGE_SCRIPT % plan.get("dump", "{}")) + clear_offline_marker(folder) + log("moved %s offline item(s) into the online Mint" % added) + if added: + window.evaluate_js("location.reload()") + except Exception as error: + plan["move"] = None + log("moving offline budgets failed: %s" % error) + def on_loaded(): + if plan["move"]: + threading.Thread(target=move_offline_budgets, name="mint-move-offline", daemon=True).start() + return if report_path and not state["tested"]: state["tested"] = True threading.Thread(target=self_test, name="mint-window-test", daemon=True).start() @@ -394,6 +536,8 @@ def on_loaded(): return False finally: control.close() + if local: + local.close() return True diff --git a/apps/mint/desktop/smoke_test.py b/apps/mint/desktop/smoke_test.py index 167c5b5e..183d5d4f 100644 --- a/apps/mint/desktop/smoke_test.py +++ b/apps/mint/desktop/smoke_test.py @@ -4,6 +4,7 @@ python apps/mint/desktop/smoke_test.py --built the app in dist/ (after build.py) python apps/mint/desktop/smoke_test.py PATH/TO/Mint.exe an installed copy add --local-site to serve this checkout's site (scripts/build_site.py) instead of the live one + add --offline to pretend there is no connection: the window must open the Mint bundled with the app The app runs with MINT_WINDOW_TEST set, so it writes a report once the page has loaded and closes itself. Passes when the page is Mint, the language & region screen script is loaded (a fresh profile @@ -47,15 +48,19 @@ def main(): parser.add_argument("app", nargs="?", help="the Mint program to open") parser.add_argument("--built", action="store_true", help="open the app in dist/") parser.add_argument("--local-site", action="store_true", help="serve this checkout's site instead of the live one") + parser.add_argument("--offline", action="store_true", help="no connection: expect the bundled copy of Mint") args = parser.parse_args() app = built_app() if args.built or not args.app else args.app if not os.path.isfile(app): raise SystemExit("Not found: %s" % app) - url = serve_site() if args.local_site else LIVE_URL + url = serve_site() if args.local_site and not args.offline else LIVE_URL folder = tempfile.mkdtemp(prefix="mint-smoke-") report = os.path.join(folder, "report.json") env = dict(os.environ, MINT_WINDOW_TEST=report, MINT_DESKTOP_URL=url) + if args.offline: + env["MINT_FORCE_OFFLINE"] = "1" + url = "http://127.0.0.1:" print("Opening %s on %s" % (app, url), flush=True) started = time.time() process = subprocess.Popen([app], env=env) @@ -81,7 +86,7 @@ def main(): problems.append("the language & region script did not load") if not result.get("storage"): problems.append("the page cannot store data") - if args.local_site and not result.get("gate"): + if (args.local_site or args.offline) and not result.get("gate"): problems.append("a fresh profile did not get the language & region question") if problems: raise SystemExit("FAILED: " + "; ".join(problems)) From 5e54549a04157fd3813fc63086d253af9bb3dc43 Mon Sep 17 00:00:00 2001 From: juwpegatron Date: Mon, 9 Nov 2026 10:35:27 +0700 Subject: [PATCH 6/6] Mint 3.5: version bump, release notes in 4 languages, README Limits now lists only account/payment/person items --- apps/mint/README.md | 64 +++++++++++++++++++------------ apps/mint/cloud/src/index.js | 2 +- apps/mint/desktop/mint.spec | 2 +- apps/mint/desktop/mint_app.py | 2 +- apps/mint/web/budget/js/core.js | 2 +- apps/mint/web/budget/sw.js | 2 +- apps/mint/web/budget/version.json | 40 ++++++++++--------- apps/mint/web/sw.js | 2 +- 8 files changed, 68 insertions(+), 48 deletions(-) diff --git a/apps/mint/README.md b/apps/mint/README.md index 99516550..f44b52d6 100644 --- a/apps/mint/README.md +++ b/apps/mint/README.md @@ -99,10 +99,27 @@ API `https://mint-api.juw12.workers.dev/api/health` `?demo=1`, `demo.html`, `tests.html` and `get.html` never stop at the question. - **Shared settings.** Light / Dark / System lives in `mint.theme` and both halves follow it, even in a tab that is already open. Both halves read the one `mint.lang`; Templates is translated into - Indonesian, so Chinese and Spanish show Templates in English. + Indonesian, Chinese and Spanish too. - **Two service workers.** `web/budget/sw.js` (scope `budget/`, caches `mint-budget-v…`) and `web/sw.js` (scope `mint/`, caches `mint-v…`). Each deletes only its own old caches. +## Mint 3.5: live prices, four languages everywhere, offline desktop + +- **Live prices.** Invest has a **Refresh prices** button and refreshes by itself (at most every 4 hours) when you + open it. IDX tickers (BBCA, TLKM), US stocks, crypto and gold per gram come from the Worker's `/api/quote` + (Yahoo Finance with CoinGecko for crypto and gold, cached 15 minutes). A price you type yourself stays put until + you press Refresh. +- **Your data stays put.** Budget asks the browser to keep its storage (`navigator.storage.persist`), Settings shows + whether it did and when you last backed up, and a quiet reminder suggests a backup when a big book has none in 30 + days (only if you are not signed in to sync). +- **Templates in Chinese and Spanish.** The language button cycles English, Indonesian, 中文 and Español, and every + phrase, rule and category is translated. +- **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. +- **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. + ## Mint 3.4: one app for budgets, voice, investing and selling - **Voice everywhere (3.3).** Add transaction and Invest both have a mic. Mint uses Tally's parser @@ -160,7 +177,7 @@ API `https://mint-api.juw12.workers.dev/api/health` | **Warnings** | Alert at a configurable threshold (default 80%), when a limit is over, and when the current pace will overspend before month end. Shown as toasts, in the bell and (optionally) as browser notifications, including for edits made by other people. Quick-add shows "this brings Groceries to 86%" before you save. | | **Tips** | Persona-aware tips: one per day, sometimes after adding a transaction, and on demand. | | **Goals** | Savings goals with progress rings and the monthly amount needed to reach the target date. | -| **Invest** | Holdings (units × price), allocation vs. a target (presets or custom), drift and the trades needed to rebalance, and a compound-growth projection with sliders. Prices are entered manually. **Say a trade** (mic or typing) adds or sells a holding: "beli 10 lot BBCA di 9000", "0.5 bitcoin harga 900 juta", "jual 2 lot TLKM"; buys average the cost, Undo is one tap. | +| **Invest** | Holdings (units × price), allocation vs. a target (presets or custom), drift and the trades needed to rebalance, and a compound-growth projection with sliders. Prices refresh from live market data (IDX and US stocks, crypto, gold per gram), or type your own. **Say a trade** (mic or typing) adds or sells a holding: "beli 10 lot BBCA di 9000", "0.5 bitcoin harga 900 juta", "jual 2 lot TLKM"; buys average the cost, Undo is one tap. | | **Look & feel** | Light, Dark or System theme in one tap from the top bar (the new theme grows out of the button), with live previews in **Settings → Appearance**. Motion is calm: rings, bars and figures animate when a page or month opens, never on every edit, and *reduce motion* turns it off. | | **Phone layout** | One tidy header row and a tab bar with a big **+** in the middle. **More** holds theme, language, Goals, Invest, You, Share, Settings and Templates. Dialogs open as bottom sheets you can drag down to close; toasts can be swiped away and never cover an open sheet. | | **Keyboard** | `N` add · `T` theme · `1`–`8` pages · `/` search the sheet · `?` lists every shortcut. | @@ -383,25 +400,24 @@ Deploy the API: `cd apps/mint/cloud && npx wrangler deploy` (after `npx wrangler ## Limits -- Budget is not a bank: it never connects to your accounts. Tips and plans are general guidance, not financial - advice; investment prices are manual. Data is only as durable as your browser storage plus whoever you share with, - so use **Settings → Backup** for a JSON export. Budget translations were written with AI assistance and have not - had a native-speaker review. -- Templates speaks English and Indonesian only. Strings missing from its dictionary (and server error messages not - listed there) fall back to English; the legal pages and the downloaded .xlsx / sheet contents stay in English. -- The desktop apps are not code-signed or notarized (SmartScreen / Gatekeeper ask once). They need an internet - connection the first time they open; after that Budget also works offline. -- Automatic payments use each seller's own provider account (no platform money flow, so no - payment licence needed); they were tested against local provider mocks and the real APIs' - key validation, not with a real paid transaction. Mint collecting a fee automatically would - need a marketplace product (Xendit xenPlatform / Midtrans split / Stripe Connect). -- Email needs a Resend API key + verified sender domain; until then notifications are Web Push - + in-app badges. Push doesn't work inside the Android WebView app (use Chrome / installed PWA). -- iPhone: no App Store build (needs the Apple Developer Program and Xcode); the Add to Home - Screen PWA is the iPhone app. The Android APK is sideloaded, not on Google Play; neither is the - Microsoft Store or Mac App Store. -- Privacy and Terms pages are plain-language summaries, not lawyer-reviewed. -- Everything in Templates lives in one Durable Object. That is fine for thousands of users and - listings, but would need sharding at real scale. -- The .xlsx files are verified with openpyxl plus an independent recalculation, by a - real-browser download, and in desktop Excel (all 14 seed templates, 104/104 values match). +What is left needs an account, a payment or a person rather than code: + +- **Not a bank.** Mint never connects to your accounts, and tips and plans are general guidance, not financial + advice. Live prices are delayed market data (Yahoo Finance, CoinGecko); gold uses the world spot price, not a + dealer's buy-back price such as Antam's, so you can still type your own. +- **Translations** in Indonesian, Chinese and Spanish (app, Templates, legal pages, spreadsheets) were written with + AI assistance and still want a native-speaker review. +- **Privacy and Terms** are plain-language summaries, not lawyer-reviewed. +- **Code signing.** The desktop apps are not code-signed or notarized, so SmartScreen and Gatekeeper ask once. + Signing needs a paid certificate and an Apple Developer account. +- **Stores.** There is no App Store, Google Play, Microsoft Store or Mac App Store listing yet (each needs a + developer account). On iPhone, Add to Home Screen installs the PWA; the Android APK is sideloaded. +- **Android push.** The Android app shows alerts inside the app (badge, banner and vibration); system push while it + is closed needs a Firebase Cloud Messaging project. Chrome and the installed PWA get Web Push today. +- **Email** needs a Resend API key and a verified sender domain; until then notifications are Web Push and in-app. +- **Payments.** Automatic payments use each seller's own provider account (no platform money flow, so no payment + licence). They were tested against provider mocks and the real APIs' key validation, not with a real paid + transaction. Mint taking a fee automatically would need a marketplace product (Xendit xenPlatform, Midtrans + split or Stripe Connect). +- **Scale.** Templates keeps everything in one SQLite-backed Durable Object, which is fine for thousands of users + and listings; it would be sharded by user before it got near its limits. diff --git a/apps/mint/cloud/src/index.js b/apps/mint/cloud/src/index.js index cdc54540..e9b4d279 100644 --- a/apps/mint/cloud/src/index.js +++ b/apps/mint/cloud/src/index.js @@ -24,7 +24,7 @@ const Core = globalThis.MintCore; const Budget = globalThis.MintBudget; const APP = "mint"; -const VERSION = "3.2.0"; +const VERSION = "3.5.0"; const APP_URL_DEFAULT = "https://juw12.github.io/projects/mint/app.html"; const ORDER_EXPIRY_DAYS = 14; const REPORT_HIDE_THRESHOLD = 5; diff --git a/apps/mint/desktop/mint.spec b/apps/mint/desktop/mint.spec index 500b95cf..1e5160cd 100644 --- a/apps/mint/desktop/mint.spec +++ b/apps/mint/desktop/mint.spec @@ -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.2.0") +VERSION = os.environ.get("MINT_VERSION", "3.5.0") VERSION_FILE = os.environ.get("MINT_VERSION_FILE") or None ICON = os.environ.get("MINT_ICON") or None IS_WIN = sys.platform == "win32" diff --git a/apps/mint/desktop/mint_app.py b/apps/mint/desktop/mint_app.py index 461683ff..e1ae503b 100644 --- a/apps/mint/desktop/mint_app.py +++ b/apps/mint/desktop/mint_app.py @@ -30,7 +30,7 @@ import urllib.request import webbrowser -VERSION = "3.2.0" +VERSION = "3.5.0" TITLE = "Mint" APP_URL = os.environ.get("MINT_DESKTOP_URL") or "https://juw12.github.io/projects/mint/" DEFAULT_SIZE = (1280, 860) diff --git a/apps/mint/web/budget/js/core.js b/apps/mint/web/budget/js/core.js index 72042cb4..5584299a 100644 --- a/apps/mint/web/budget/js/core.js +++ b/apps/mint/web/budget/js/core.js @@ -8,7 +8,7 @@ (function (root) { 'use strict'; const K = (root.MintBudget = root.MintBudget || {}); - K.VERSION = '3.4.1'; + K.VERSION = '3.5.0'; /** Compare dotted versions numerically: 1, 0 or -1 ("1.10.0" is newer than "1.9.9"). */ K.compareVersions = function (a, b) { diff --git a/apps/mint/web/budget/sw.js b/apps/mint/web/budget/sw.js index 1e36bd14..14da620a 100644 --- a/apps/mint/web/budget/sw.js +++ b/apps/mint/web/budget/sw.js @@ -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-v14'; +const CACHE = 'mint-budget-v15'; // 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)/; diff --git a/apps/mint/web/budget/version.json b/apps/mint/web/budget/version.json index d59da1a9..54de0dd6 100644 --- a/apps/mint/web/budget/version.json +++ b/apps/mint/web/budget/version.json @@ -1,30 +1,34 @@ { - "version": "3.4.1", - "released": "2026-11-08", + "version": "3.5.0", + "released": "2026-11-09", "notes": { "en": [ - "Phones: the Invest page and its sheets now fit the screen (the rebalance table scrolls on its own).", - "Seller mode: the Marketplace is for browsing and buying; turn on Seller mode in Settings (like opening a shop) to generate, sell and earn referral commission.", - "Say a trade in Invest: “beli 10 lot BBCA di 9000” or “bought 0.5 bitcoin at 900 juta”. Buys update your average cost, sells reduce the holding, with Undo.", - "Coming from Tally? Mint finds your Tally expenses on this device and brings them in with one tap." + "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": [ - "Ponsel: halaman Investasi dan lembarnya kini pas di layar (tabel rebalancing bisa digeser sendiri).", - "Mode Penjual: Marketplace untuk melihat dan membeli; nyalakan Mode Penjual di Pengaturan (seperti buka toko) untuk membuat, menjual, dan dapat komisi referral.", - "Ucapkan transaksi di Investasi: “beli 10 lot BBCA di 9000” atau “beli 0.5 bitcoin harga 900 juta”. Beli memperbarui harga rata-rata, jual mengurangi aset, bisa Batal.", - "Dari Tally? Mint menemukan pengeluaran Tally di perangkat ini dan memindahkannya dengan satu ketukan." + "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": [ - "手机:投资页面及其弹出面板现在适配屏幕(再平衡表格可单独横向滚动)。", - "卖家模式:市场默认只用于浏览和购买;在设置中开启卖家模式(就像开店),即可生成、出售模板并赚取推荐佣金。", - "在投资里说出交易:“买 10 手 BBCA 9000”或“bought 0.5 bitcoin at 900 juta”。买入更新平均成本,卖出减少持仓,可撤销。", - "从 Tally 来?Mint 会找到本设备上的 Tally 支出,一键导入。" + "投资页实时价格:股票和 ETF(印尼与美股)、加密货币和黄金按市场价更新。随时点“刷新价格”;你手动填写的价格会保留到你刷新为止。", + "Mint 会请求浏览器保留数据,显示上次备份时间,并在预算有了足够记录后提醒你同步或备份。", + "模板和市场现在也支持中文和西班牙语,下载的 .xlsx 文件的工作表名称和提示也使用你的语言。", + "隐私政策和条款现提供印尼语、中文和西班牙语版本。", + "桌面应用:即使第一次打开时没有网络也能使用;离线创建的预算会在联网后自动同步。" ], "es": [ - "Móviles: la página Invertir y sus paneles ya caben en la pantalla (la tabla de reequilibrio se desplaza sola).", - "Modo vendedor: el Marketplace es para mirar y comprar; activa el Modo vendedor en Ajustes (como abrir una tienda) para generar, vender y ganar comisión por referidos.", - "Di una operación en Invertir: “bought 5 AAPL at 190”. Las compras actualizan tu coste medio y las ventas reducen la posición, con Deshacer.", - "¿Vienes de Tally? Mint encuentra tus gastos de Tally en este dispositivo y los trae con un toque." + "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." ] } } diff --git a/apps/mint/web/sw.js b/apps/mint/web/sw.js index 17a11e3b..2c2b8eb1 100644 --- a/apps/mint/web/sw.js +++ b/apps/mint/web/sw.js @@ -1,6 +1,6 @@ /* Mint Templates service worker — app shell cache. API calls (api/...) always go to the network. * Mint Budget (budget/) has its own worker with the narrower scope budget/, so it is not cached here. */ -var CACHE = "mint-v3.4.1"; +var CACHE = "mint-v3.5.0"; var SHELL = [ "./", "index.html", "app.html", "web.html", "mobile.html", "privacy.html", "terms.html", "delete-account.html", "app.css", "js/locale.js", "js/mint-cloud.js", "js/core.js", "js/xlsx.js", "js/guides.js", "js/store.js", "js/i18n-more.js", "js/i18n.js", "js/app.js",
SymbolNameClassCurrencyQtyAvg costPriceValueGain
' + esc(fmt(h.value)) + '' + (h.pl >= 0 ? '+' : '') + esc(fmt(h.pl, true)) + ' ' + (h.plPct * 100).toFixed(1) + '%