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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions src/viewer/app/i18n/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,4 +780,88 @@ export const RU: Record<string, string> = {
'pending: not paid yet': 'ожидается: ещё не выплачен',
'Found: {n}': 'Найдено: {n}',
'Found in the account: {n}': 'Найдено в счёте: {n}',
// Fidelity Taxes (ui/Taxes.tsx) and Settings -> Taxes (ui/TaxSettings.tsx)
'Fidelity Taxes': 'Налоги Fidelity',
'The shown accounts are retirement or tax-free accounts: they add nothing to the tax of the year': 'Показаны только пенсионные счета или счета без налога: к налогу за год они ничего не добавляют',
'Update the script to {version} and open Fidelity Positions once': 'Обновите скрипт до {version} и один раз откройте Fidelity Positions',
"Fidelity's tax summary of {year} has none of the shown accounts yet: open Fidelity Positions once": 'В налоговой сводке Fidelity за {year} пока нет показанных счетов: один раз откройте Fidelity Positions',
'Tax year': 'Налоговый год',
'Tax added by the investments': 'Налог от инвестиций',
'Room before the next rate': 'Запас до следующей ставки',
'Foreign tax paid is over {limit}: the credit is counted up to {limit}, more needs Form 1116': 'Иностранный налог больше {limit}: зачёт посчитан до {limit}, для большего нужна форма 1116',
'Wages and investment income are over {limit}: the {rate} net investment income tax may apply, it is not counted here': 'Зарплата и инвестиционный доход больше {limit}: может добавиться налог {rate} на чистый инвестиционный доход, здесь он не посчитан',
'YTD as of {day}, before the 1099s; an estimate, not tax advice': 'С начала года на {day}, до форм 1099; оценка, не налоговая консультация',
'Federal': 'Федеральный',
'With the investments minus without them, after a foreign tax credit of {credit}': 'Налог с инвестициями минус налог без них, после зачёта иностранного налога {credit}',
'With the investments minus without them': 'Налог с инвестициями минус налог без них',
'New Jersey': 'Нью-Джерси',
'With the investments minus without them; New Jersey has no lower rate for dividends or gains and no foreign tax credit': 'Налог с инвестициями минус налог без них; в Нью-Джерси нет пониженной ставки для дивидендов и прибыли и нет зачёта иностранного налога',
'Effective rate': 'Эффективная ставка',
'The tax added divided by the investment income the federal return counts': 'Добавленный налог, делённый на инвестиционный доход, который учитывает федеральная декларация',
'Ordinary rate': 'Обычная ставка',
'The federal rate of the next dollar of ordinary income: interest, non-qualified dividends, short-term gains': 'Федеральная ставка следующего доллара обычного дохода: проценты, неквалифицированные дивиденды, краткосрочная прибыль',
'Qualified rate': 'Ставка квалиф.',
'The federal rate of the next dollar of qualified dividends and long-term gains': 'Федеральная ставка следующего доллара квалифицированных дивидендов и долгосрочной прибыли',
'New Jersey rate': 'Ставка Нью-Джерси',
'The New Jersey rate of the next dollar of any investment income': 'Ставка Нью-Джерси для следующего доллара любого инвестиционного дохода',
'Federal and New Jersey together, at the brackets the household is in now': 'Федеральный налог и Нью-Джерси вместе, по ступеням, в которых семья сейчас',
'One more dollar of short-term gain costs {pct}': 'Ещё один доллар краткосрочной прибыли стоит {pct}',
'The app has no {year} rules yet: counted with those of {rules}': 'Правил {year} года в приложении пока нет: посчитано по правилам {rules}',
'Ordinary income before {rate}': 'Обычный доход до ставки {rate}',
'Already in the {rate} bracket': 'Уже в ступени {rate}',
'Ordinary taxable income (wages after the deduction, interest, non-qualified dividends, short-term gains) left before {line}, where each dollar starts to pay {rate}': 'Сколько обычного облагаемого дохода (зарплата после вычета, проценты, неквалифицированные дивиденды, краткосрочная прибыль) осталось до {line}, где каждый доллар начинает платить {rate}',
'Qualified dividends and long-term gains at 0%': 'Квалиф. дивиденды и долгосрочная прибыль по 0%',
'Qualified dividends and long-term gains already pay {rate}': 'Квалиф. дивиденды и долгосрочная прибыль уже платят {rate}',
'Total taxable income left before {line}: up to it qualified dividends and long-term gains pay 0%, above it {rate}': 'Сколько всего облагаемого дохода осталось до {line}: до этой суммы квалифицированные дивиденды и долгосрочная прибыль платят 0%, выше - {rate}',
'New Jersey before {rate}': 'Нью-Джерси до ставки {rate}',
'New Jersey: already at its top rate': 'Нью-Джерси: уже высшая ставка',
'New Jersey taxable income left before {line}, where its rate goes up to {rate}': 'Сколько облагаемого дохода Нью-Джерси осталось до {line}, где ставка поднимается до {rate}',
'{left} left': 'осталось {left}',
'Ordinary dividends': 'Обычные дивиденды',
'1099-DIV box 1a: qualified and non-qualified together': '1099-DIV поле 1a: квалифицированные и неквалифицированные вместе',
'1099-DIV box 1b: taxed at 0, 15 or 20% federally, as ordinary income by New Jersey': '1099-DIV поле 1b: федеральный налог 0, 15 или 20%, Нью-Джерси облагает как обычный доход',
'Only when the shares were held more than 60 days of the 121 around the ex-date': 'Только если бумаги были на счёте больше 60 дней из 121 вокруг экс-даты',
'Non-qualified': 'Неквалиф.',
'Taxed as ordinary income': 'Облагаются как обычный доход',
'Capital gain distributions': 'Распределения прироста капитала',
'1099-DIV box 2a: long-term, whatever the holding period': '1099-DIV поле 2a: долгосрочные при любом сроке владения',
'1099-INT box 1: ordinary income, federal and New Jersey': '1099-INT поле 1: обычный доход, федеральный и Нью-Джерси',
'Treasury interest': 'Проценты казначейских бумаг',
'1099-INT box 3: U.S. Treasury interest, federal only': '1099-INT поле 3: проценты по бумагам Казначейства США, только федеральный налог',
'Not taxed by New Jersey': 'Нью-Джерси не облагает',
'Other income': 'Прочий доход',
'1099-MISC boxes 2, 3, 8 and 1099-OID boxes 1, 8: ordinary income': '1099-MISC поля 2, 3, 8 и 1099-OID поля 1, 8: обычный доход',
'Realized short-term': 'Реализованная краткосрочная',
'Sold within a year: ordinary income': 'Продано в течение года: обычный доход',
'Realized long-term': 'Реализованная долгосрочная',
'Sold after more than a year: 0, 15 or 20% federally': 'Продано больше чем через год: федеральный налог 0, 15 или 20%',
'A net loss: up to {limit} a year federally, the rest carries over; none for New Jersey': 'Чистый убыток: федерально до {limit} в год, остаток переносится; в Нью-Джерси не учитывается',
'Foreign tax paid': 'Уплаченный иностранный налог',
'1099-DIV box 7 and 1099-INT box 6': '1099-DIV поле 7 и 1099-INT поле 6',
'A federal credit only: up to {limit} with no Form 1116': 'Зачёт только федеральный: до {limit} без формы 1116',
'Federal tax withheld': 'Удержанный федеральный налог',
'Already paid toward the federal tax': 'Уже уплачено в счёт федерального налога',
'Margin interest paid': 'Уплаченные проценты по марже',
'Deductible only when itemizing; not counted here': 'Вычитаются только при постатейном вычете; здесь не учтены',
'Section 199A dividends': 'Дивиденды по разделу 199A',
'1099-DIV box 5: part of the ordinary dividends; its deduction is not counted here': '1099-DIV поле 5: часть обычных дивидендов; их вычет здесь не учтён',
'Line': 'Строка',
'Taxes': 'Налоги',
'Standard': 'Стандартный',
'Itemized': 'Постатейный',
'Filing': 'Декларация',
'Married filing jointly, New Jersey': 'Супруги совместно, Нью-Джерси',
'The only filing status and state the Taxes page counts for now': 'Пока страница налогов считает только для этого статуса и штата',
'Gross wages': 'Зарплата брутто',
'Wages of the household for the year, both of you, before anything is taken out. Default {amount}: your own estimate; the ADP pay statements replace it later': 'Зарплата семьи за год, обоих супругов, до всех удержаний. По умолчанию {amount}: ваша оценка; позже её заменят расчётные листы ADP',
'Pre-tax 401(k)': '401(k) до налогов',
'Your pre-tax 401(k) contributions of the year: they lower the federal and New Jersey wages. Default 0': 'Ваши взносы в 401(k) до налогов за год: уменьшают зарплату для федерального налога и Нью-Джерси. По умолчанию 0',
'Other pre-tax': 'Прочее до налогов',
'Health, dental, HSA, FSA and commuter money taken before tax: lowers the federal wages only, New Jersey taxes it. Default 0': 'Медицина, стоматология, HSA, FSA и проезд до налогов: уменьшают только федеральную зарплату, Нью-Джерси их облагает. По умолчанию 0',
'NJ dependents': 'Иждивенцы NJ',
'Children and other dependents: {each} each off New Jersey taxable income; left out federally (the child tax credit lowers the bill, not what the investments add). Default {n}: your children': 'Дети и другие иждивенцы: по {each} с облагаемого дохода Нью-Джерси; в федеральном расчёте не учтены (налоговый кредит на детей уменьшает итог, а не то, что добавляют инвестиции). По умолчанию {n}: ваши дети',
'Deduction': 'Вычет',
'Federal: the standard deduction of {year} is {amount}, or your itemized total. Default standard': 'Федеральный: стандартный вычет {year} года {amount} или ваша постатейная сумма. По умолчанию стандартный',
'Itemized total': 'Постатейная сумма',
'Mortgage interest, state and property taxes up to the cap, gifts to charity: the total of Schedule A': 'Проценты по ипотеке, налоги штата и на недвижимость до лимита, пожертвования: итог Schedule A',
};
7 changes: 7 additions & 0 deletions src/viewer/app/prefs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,10 @@ test('the positions sort starts by Market cap, largest first; a sort saved befor
expect(load(JSON.stringify({ sort: { key: 'x', dir: 2 }, columnsV: COLUMNS_V })).sort).toEqual({ key: 'marketCap', dir: -1 });
expect(load(JSON.stringify({ columnsV: 8 })).columnsV).toBe(COLUMNS_V);
});

test('the tax year of Fidelity Taxes: a four-digit year, else the newest one', () => {
expect(load('{"taxYear":"2025"}').taxYear).toBe('2025');
expect(load('{"taxYear":"25"}').taxYear).toBe('');
expect(load('{"taxYear":2025}').taxYear).toBe('');
expect(load('{"tab":"taxes"}').tab).toBe('taxes');
});
10 changes: 7 additions & 3 deletions src/viewer/app/prefs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import { asAdpHidden, type AdpSourceChip } from './adp-sources';
import { INCOME_SPANS, SPANS, asSpans, type Span } from './spans';
import { ACCOUNT_SORTS, DEFAULT_DIV_SORTS, asDivSize, asDivSorts, asDivWhen, asDivWindow, asKind, asPastWindow, type AccountSort, type DivSize, type DivSort, type DivWhen, type DivWindow, type Kind, type PastWindow } from './derive';

// the pages, the Fidelity ones first; the ADP 401k page shows once its history is there (owner 2026-11-30)
export const MAIN_TABS = ['summary', 'positions', 'activity', 'reports', 'adpSummary', 'adpActivity'] as const;
// the pages, the Fidelity ones first; the ADP 401k page shows once its history is there (owner 2026-11-30), Fidelity
// Taxes once Fidelity's tax summary has a year (owner 2026-12-03)
export const MAIN_TABS = ['summary', 'positions', 'activity', 'reports', 'taxes', 'adpSummary', 'adpActivity'] as const;
export type MainTab = (typeof MAIN_TABS)[number];
// the reports of the Fidelity Reports page (owner 2026-12-01: Watchlist, then Dividends)
export const REPORTS = ['watchlist', 'investments', 'dividends', 'drips'] as const;
Expand Down Expand Up @@ -75,9 +76,11 @@ export interface Prefs {
noticesAt: NoticeCorner;
// the symbol whose Fundamentals window is open ('' none): a reload opens it again (app/fundamentals.ts reopens)
fundamentalsOpen: string;
// the tax year of the Fidelity Taxes page ('' = the newest Fidelity has; app/taxes-page.ts shownYear)
taxYear: string;
}

export const DEFAULT_PREFS: Prefs = { scope: 'all', tab: 'summary', sort: { key: 'marketCap', dir: -1 }, search: '', filters: {}, types: {}, hidden: DEFAULT_HIDDEN.slice(), columnsV: 9, columns: [], period: '1Y', views: {}, moversBy: 'pct', moversOf: 'all', incomeOf: 'all', incomeSpans: INCOME_SPANS.slice(), dividendsOf: 'all', activityPeriod: 'All', dividendsSort: DEFAULT_DIV_SORTS.slice(), dividendsSize: 'payout', dividendsWindow: 'DTM', dividendsWhen: 'upcoming', dividendsPastWindow: 'MTD', accountSort: 'mine', accountOrder: [], groupOrder: [], collapsed: [], merge: false, reportOf: { watchlist: 'all', investments: 'all', dividends: 'all', drips: 'all' }, reportTax: { watchlist: 'all', investments: 'all', dividends: 'all', drips: 'all' }, report: 'watchlist', adpHidden: [], adpContribSpans: SPANS.slice(), adpIncomeSpans: SPANS.slice(), adpPeriod: '1Y', adpActivityPeriod: asActivityPeriod(undefined), fundamentalsView: 'page', fundamentalsIntervals: ['D'], fundamentalsBefore: [], fundamentalsSplit: {}, noticesAt: 'top-right', fundamentalsOpen: '' };
export const DEFAULT_PREFS: Prefs = { scope: 'all', tab: 'summary', sort: { key: 'marketCap', dir: -1 }, search: '', filters: {}, types: {}, hidden: DEFAULT_HIDDEN.slice(), columnsV: 9, columns: [], period: '1Y', views: {}, moversBy: 'pct', moversOf: 'all', incomeOf: 'all', incomeSpans: INCOME_SPANS.slice(), dividendsOf: 'all', activityPeriod: 'All', dividendsSort: DEFAULT_DIV_SORTS.slice(), dividendsSize: 'payout', dividendsWindow: 'DTM', dividendsWhen: 'upcoming', dividendsPastWindow: 'MTD', accountSort: 'mine', accountOrder: [], groupOrder: [], collapsed: [], merge: false, reportOf: { watchlist: 'all', investments: 'all', dividends: 'all', drips: 'all' }, reportTax: { watchlist: 'all', investments: 'all', dividends: 'all', drips: 'all' }, report: 'watchlist', adpHidden: [], adpContribSpans: SPANS.slice(), adpIncomeSpans: SPANS.slice(), adpPeriod: '1Y', adpActivityPeriod: asActivityPeriod(undefined), fundamentalsView: 'page', fundamentalsIntervals: ['D'], fundamentalsBefore: [], fundamentalsSplit: {}, noticesAt: 'top-right', fundamentalsOpen: '', taxYear: '' };
const KEY = 'accounts.prefs';

export function loadPrefs(storage: Pick<Storage, 'getItem'> | undefined = globalThis.localStorage): Prefs {
Expand Down Expand Up @@ -131,6 +134,7 @@ export function loadPrefs(storage: Pick<Storage, 'getItem'> | undefined = global
fundamentalsSplit: asSplits(p.fundamentalsSplit),
noticesAt: asNoticeCorner(p.noticesAt),
fundamentalsOpen: typeof p.fundamentalsOpen === 'string' ? p.fundamentalsOpen.slice(0, 24) : '',
taxYear: typeof p.taxYear === 'string' && /^\d{4}$/.test(p.taxYear) ? p.taxYear : '',
};
} catch {
return DEFAULT_PREFS;
Expand Down
Loading