Skip to content

Commit

Permalink
Marked files for translation (#3444)
Browse files Browse the repository at this point in the history
* marked files for translation

* added release note

* fixed linting warnings

* 🐛 fix account filters being overridden (#3441)

* :electron: Reduce package size  (#3443)

* reduce package size of all packages

* release notes

* Update beforePackHook.ts

* [Maintenance] Cleanup react aria packages and dedupe (#3450)

* Cleanup react aria packages and dedupe

* Release notes

* ♻️ (synced-prefs) moving the prefs from metadata.json to the db (#3423)

* :electron: Restart server silently when adding self signed cert and add some logs (#3431)

* restart server silently on add self signed cert and add some logging

* release notes

* fix name

* updating names to be more specific

* removing setloading

* feedback

* ♻️ (synced-prefs) move budget type to synced prefs (#3427)

* update synced account balance in db if available (#3452)

* 🐛 (synced-prefs) fix bulk-reading not working in import modal (#3460)

* fix: csv import deduplication (#3456)

* ✨ release simplefin as a first-party feature (#3459)

Closes #2272

* Do not allow renaming to an empty category or group name (#3463)

* Do not allow renaming to an emoty category or group name

* Release notes

* [Mobile] Fix #3214 - Pull down to refresh triggering clicks on budget cells (#3374)

* Fix #3214

* Fix rollover indicator

* VRT

* Fix typecheck error

* VRT

* Release notes

* VRT

* Update style

* Fix budgeted

* VRT

* VRT

* Revert VRT

* VRT

* Fix style

* Revert usePreviewTransactions

* Fix error

* Fix reports form submit handlers (#3462)

* Fix form submit handlers

* Release notes

* :electron: Remove some old updater code (#3468)

* remove some old updater code

* remove old updater logic

* CSV import e2e tests (#3467)

* Fix React Aria Button hover styles  (#3453)

* Fiox hover styles and use className instead of inline to prepare for future css migration

* Release notes

* Cleanup

* Update edit rule hover style

* Undoable auto transfer notes + auto notes for cover (#3411)

* Undo auto transfer notes + auto notes for cover

* Release notes

* Fix notes

* Fix notes undo

* Do not show clicked category on transfer or cover menus

* Fix typecheck error

* typecheck

* Fix removeCategoriesFromGroups

* 🐛 (reports) deleting custom report should remove it from the dashboard (#3469)

* Revert "CSV import e2e tests (#3467)" (#3474)

This reverts commit 5e12d40.

* ♻️ (synced-prefs) separate metadata and local prefs out (#3458)

* :electron: Replace deprecated file protocol registration (#3475)

* replace deprecated file handler in electron

* release notes

* types eh

* types

* update sql regexp to default to empty string when field is null (#3480)

* ♻️ rename report/rollover budget to tracking/envelope (#3483)

* 🐛 (import) fix csv import checkboxes not working (#3478)

* Update tooltip and themes with better visibility (#3298)

* Update tooltip and themes with better visibility

* Rename merge request # into release notes

* rename release note

* update VRT

* tweak light theme

* dont put border on autocomplete menus

* update VRT

* tweak popover style

* simplify

* update VRT

* update VRT

---------

Co-authored-by: Dustin Conlon <dustin@dustinconlon.com>
Co-authored-by: Dustin Conlon <58367364+VoltaicGRiD@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* fix modals on mobile BudgetTable (#3487)

* Fix privacy filter (#3472)

* Fix privacy filter

* Release notes

* Coderabbit suggestion

* VRT

* VRT

* Revert VRT

* VRT

* VRT

* VRT

* VRT

* Delete VRT

* VRT

* Revert VRT

* 🐛 fix custom reports crashing when opening table (#3484)

* 🧪 (tests) adding custom report e2e tests (#3493)

* ✨ (dashboards) ability to save filters & timeframes on spending widgets (#3432)

* marked files for translation

* Revert ":bug: fix account filters being overridden (#3441)"

This reverts commit 7336bad.

* Revert "Revert ":bug: fix account filters being overridden (#3441)""

This reverts commit 5cbadc4.

* Revert changes due to failed rebase

* removed import of t

* fixed lint warning

* added PayeeTableRow.tsx

* needed changes

* bugfix: pluralization

* variables adjustments

* removed doubled trans

---------

Co-authored-by: Matiss Janis Aboltins <matiss@mja.lv>
Co-authored-by: Michael Clark <5285928+MikesGlitch@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: Koen van Staveren <koenvanstaveren@hotmail.com>
Co-authored-by: Ryan Bianchi <1435081+qedi-r@users.noreply.github.com>
Co-authored-by: Robert Dyer <rdyer@unl.edu>
Co-authored-by: Dustin Conlon <dustin@dustinconlon.com>
Co-authored-by: Dustin Conlon <58367364+VoltaicGRiD@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Tim <hello@timsmart.co>
  • Loading branch information
12 people authored Oct 3, 2024
1 parent 9b7a79a commit 3f85aed
Show file tree
Hide file tree
Showing 22 changed files with 216 additions and 114 deletions.
7 changes: 5 additions & 2 deletions packages/desktop-client/src/components/BankSyncStatus.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { Trans } from 'react-i18next';
import { useSelector } from 'react-redux';
import { useTransition, animated } from 'react-spring';

Expand All @@ -15,6 +16,7 @@ export function BankSyncStatus() {
(state: State) => state.account.accountsSyncing,
);
const accountsSyncingCount = accountsSyncing.length;
const count = accountsSyncingCount;

const transitions = useTransition(
accountsSyncingCount > 0 ? 'syncing' : null,
Expand Down Expand Up @@ -58,8 +60,9 @@ export function BankSyncStatus() {
iconStyle={{ color: theme.pillTextSelected }}
/>
<Text style={{ marginLeft: 5 }}>
Syncing... {accountsSyncingCount} account
{accountsSyncingCount > 1 && 's'} remaining
<Trans count={accountsSyncingCount}>
Syncing... {{ count }} accounts remaining
</Trans>
</Text>
</View>
</animated.div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useMemo, useState } from 'react';
import { Trans, useTranslation } from 'react-i18next';

import { type CategoryEntity } from 'loot-core/src/types/models';

Expand All @@ -22,6 +23,8 @@ export function CoverMenu({
onSubmit,
onClose,
}: CoverMenuProps) {
const { t } = useTranslation();

const { grouped: originalCategoryGroups } = useCategories();

const [fromCategoryId, setFromCategoryId] = useState<string | null>(null);
Expand All @@ -44,7 +47,9 @@ export function CoverMenu({
}
return (
<View style={{ padding: 10 }}>
<View style={{ marginBottom: 5 }}>Cover from category:</View>
<View style={{ marginBottom: 5 }}>
<Trans>Cover from category:</Trans>
</View>

<InitialFocus>
{node => (
Expand All @@ -56,7 +61,7 @@ export function CoverMenu({
inputProps={{
inputRef: node,
onEnter: event => !event.defaultPrevented && submit(),
placeholder: '(none)',
placeholder: t('(none)'),
}}
showHiddenCategories={false}
/>
Expand All @@ -77,7 +82,7 @@ export function CoverMenu({
}}
onPress={submit}
>
Transfer
<Trans>Transfer</Trans>
</Button>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { type ComponentProps, memo, useRef, useState } from 'react';
import { useTranslation, Trans } from 'react-i18next';

import { css } from 'glamor';

Expand Down Expand Up @@ -74,7 +75,9 @@ export const BudgetTotalsMonth = memo(function BudgetTotalsMonth() {
}}
>
<View style={headerLabelStyle}>
<Text style={{ color: theme.tableHeaderText }}>Budgeted</Text>
<Text style={{ color: theme.tableHeaderText }}>
<Trans>Budgeted</Trans>
</Text>
<EnvelopeCellValue
binding={envelopeBudget.totalBudgeted}
type="financial"
Expand Down Expand Up @@ -112,7 +115,9 @@ export function IncomeHeaderMonth() {
paddingRight: 10,
}}
>
<View style={{ flex: 1, textAlign: 'right' }}>Received</View>
<View style={{ flex: 1, textAlign: 'right' }}>
<Trans>Received</Trans>
</View>
</Row>
);
}
Expand Down Expand Up @@ -191,6 +196,8 @@ export const ExpenseCategoryMonth = memo(function ExpenseCategoryMonth({
onBudgetAction,
onShowActivity,
}: ExpenseCategoryMonthProps) {
const { t } = useTranslation();

const budgetMenuTriggerRef = useRef(null);
const balanceMenuTriggerRef = useRef(null);
const [budgetMenuOpen, setBudgetMenuOpen] = useState(false);
Expand Down Expand Up @@ -268,7 +275,7 @@ export const ExpenseCategoryMonth = memo(function ExpenseCategoryMonth({
category: category.id,
});
showUndoNotification({
message: `Budget set to last month’s budget.`,
message: t(`Budget set to last month’s budget.`),
});
}}
onSetMonthsAverage={numberOfMonths => {
Expand All @@ -284,15 +291,18 @@ export const ExpenseCategoryMonth = memo(function ExpenseCategoryMonth({
category: category.id,
});
showUndoNotification({
message: `Budget set to ${numberOfMonths}-month average.`,
message: t(
'Budget set to {{numberOfMonths}}-month average.',
{ numberOfMonths },
),
});
}}
onApplyBudgetTemplate={() => {
onMenuAction(month, 'apply-single-category-template', {
category: category.id,
});
showUndoNotification({
message: `Budget template applied.`,
message: t(`Budget template applied.`),
});
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, {
useEffect,
type ChangeEvent,
} from 'react';
import { Trans } from 'react-i18next';

import { useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider';
import { evalArithmetic } from 'loot-core/src/shared/arithmetic';
Expand Down Expand Up @@ -47,7 +48,9 @@ export function HoldMenu({ onSubmit, onClose }: HoldMenuProps) {

return (
<View style={{ padding: 10 }}>
<View style={{ marginBottom: 5 }}>Hold this amount:</View>
<View style={{ marginBottom: 5 }}>
<Trans>Hold this amount:</Trans>
</View>
<View>
<InitialFocus>
<Input
Expand All @@ -74,7 +77,7 @@ export function HoldMenu({ onSubmit, onClose }: HoldMenuProps) {
}}
onPress={() => submit(amount)}
>
Hold
<Trans>Hold</Trans>
</Button>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useMemo, useState } from 'react';
import { Trans } from 'react-i18next';

import { evalArithmetic } from 'loot-core/src/shared/arithmetic';
import { integerToCurrency, amountToInteger } from 'loot-core/src/shared/util';
Expand Down Expand Up @@ -55,7 +56,9 @@ export function TransferMenu({

return (
<View style={{ padding: 10 }}>
<View style={{ marginBottom: 5 }}>Transfer this amount:</View>
<View style={{ marginBottom: 5 }}>
<Trans>Transfer this amount:</Trans>
</View>
<View>
<InitialFocus>
<Input
Expand Down Expand Up @@ -95,7 +98,7 @@ export function TransferMenu({
}}
onPress={() => _onSubmit(amount, toCategoryId)}
>
Transfer
<Trans>Transfer</Trans>
</Button>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { type ComponentPropsWithoutRef } from 'react';
import { useTranslation } from 'react-i18next';

import { useFeatureFlag } from '../../../../hooks/useFeatureFlag';
import { Menu } from '../../../common/Menu';
Expand All @@ -25,6 +26,8 @@ export function BudgetMonthMenu({
onEndOfMonthCleanup,
...props
}: BudgetMonthMenuProps) {
const { t } = useTranslation();

const isGoalTemplatesEnabled = useFeatureFlag('goalTemplatesEnabled');
return (
<Menu
Expand Down Expand Up @@ -55,29 +58,29 @@ export function BudgetMonthMenu({
}
}}
items={[
{ name: 'copy-last', text: 'Copy last month’s budget' },
{ name: 'set-zero', text: 'Set budgets to zero' },
{ name: 'copy-last', text: t('Copy last month’s budget') },
{ name: 'set-zero', text: t('Set budgets to zero') },
{
name: 'set-3-avg',
text: 'Set budgets to 3 month average',
text: t('Set budgets to 3 month average'),
},
...(isGoalTemplatesEnabled
? [
{
name: 'check-templates',
text: 'Check templates',
text: t('Check templates'),
},
{
name: 'apply-goal-template',
text: 'Apply budget template',
text: t('Apply budget template'),
},
{
name: 'overwrite-goal-template',
text: 'Overwrite with budget template',
text: t('Overwrite with budget template'),
},
{
name: 'cleanup-goal-template',
text: 'End of month cleanup',
text: t('End of month cleanup'),
},
]
: []),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { type ComponentPropsWithoutRef } from 'react';
import { useTranslation } from 'react-i18next';

import { envelopeBudget } from 'loot-core/client/queries';

Expand All @@ -21,34 +22,36 @@ export function ToBudgetMenu({
onResetHoldBuffer,
...props
}: ToBudgetMenuProps) {
const { t } = useTranslation();

const toBudget = useEnvelopeSheetValue(envelopeBudget.toBudget) ?? 0;
const forNextMonth = useEnvelopeSheetValue(envelopeBudget.forNextMonth);
const items = [
...(toBudget > 0
? [
{
name: 'transfer',
text: 'Move to a category',
text: t('Move to a category'),
},
{
name: 'buffer',
text: 'Hold for next month',
text: t('Hold for next month'),
},
]
: []),
...(toBudget < 0
? [
{
name: 'cover',
text: 'Cover from a category',
text: t('Cover from a category'),
},
]
: []),
...(forNextMonth > 0
? [
{
name: 'reset-buffer',
text: 'Reset next month’s buffer',
text: t('Reset next month’s buffer'),
},
]
: []),
Expand Down Expand Up @@ -81,7 +84,7 @@ export function ToBudgetMenu({
: [
{
name: 'none',
text: 'No actions available',
text: t('No actions available'),
disabled: true,
},
]
Expand Down
8 changes: 5 additions & 3 deletions packages/desktop-client/src/components/budget/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// @ts-strict-ignore
import { t } from 'i18next';

import { type useSpreadsheet } from 'loot-core/src/client/SpreadsheetProvider';
import { send } from 'loot-core/src/platform/client/fetch';
import * as monthUtils from 'loot-core/src/shared/months';
Expand All @@ -18,15 +20,15 @@ export function addToBeBudgetedGroup(groups: CategoryGroupEntity[]) {
return [
{
id: 'to-be-budgeted',
name: 'To Be Budgeted',
name: t('To Be Budgeted'),
categories: [
{
id: 'to-be-budgeted',
name: 'To Be Budgeted',
name: t('To Be Budgeted'),
cat_group: 'to-be-budgeted',
group: {
id: 'to-be-budgeted',
name: 'To Be Budgeted',
name: t('To Be Budgeted'),
},
},
],
Expand Down
11 changes: 7 additions & 4 deletions packages/desktop-client/src/components/manager/ServerURL.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { Trans } from 'react-i18next';

import { Link } from '../common/Link';
import { Text } from '../common/Text';
Expand All @@ -23,15 +24,17 @@ export function ServerURL() {
>
<Text>
{url ? (
<>
<Trans>
Using server: <strong>{url}</strong>
</>
</Trans>
) : (
<strong>No server configured</strong>
<Trans>
<strong>No server configured</strong>
</Trans>
)}
</Text>
<Link variant="internal" to="/config-server" style={{ marginLeft: 15 }}>
Change
<Trans>Change</Trans>
</Link>
</View>
);
Expand Down
Loading

0 comments on commit 3f85aed

Please sign in to comment.