Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Translation batch #1 #4408

Merged
merged 5 commits into from
Feb 19, 2025

Conversation

lelemm
Copy link
Contributor

@lelemm lelemm commented Feb 19, 2025

More translations.
I'm dedicating some time to zero out all "old" strings that are not translated yet.

As far as I saw, I will do this in three batches.
This PR
The next one will focus on rules and schedules
The last will focus on dates (the one I started already)

@actual-github-bot actual-github-bot bot changed the title Translation batch #1 [WIP] Translation batch #1 Feb 19, 2025
Copy link

netlify bot commented Feb 19, 2025

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit f5925a4
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/67b662186e08d30008b41cea
😎 Deploy Preview https://deploy-preview-4408.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Feb 19, 2025

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
17 6.94 MB → 6.94 MB (+2.65 kB) +0.04%
Changeset
File Δ Size
src/components/budget/envelope/budgetsummary/TotalsList.tsx 📈 +388 B (+9.28%) 4.08 kB → 4.46 kB
src/components/settings/Export.tsx 📈 +181 B (+7.95%) 2.22 kB → 2.4 kB
src/components/reports/reports/Spending.tsx 📈 +588 B (+2.91%) 19.76 kB → 20.33 kB
src/components/reports/ReportSidebar.tsx 📈 +536 B (+2.76%) 18.95 kB → 19.48 kB
src/components/modals/manager/ImportModal.tsx 📈 +90 B (+2.00%) 4.4 kB → 4.49 kB
src/components/mobile/MobileNavTabs.tsx 📈 +58 B (+1.08%) 5.26 kB → 5.32 kB
src/components/mobile/accounts/AccountTransactions.tsx 📈 +65 B (+0.81%) 7.8 kB → 7.87 kB
src/components/mobile/transactions/TransactionList.tsx 📈 +86 B (+0.52%) 16.07 kB → 16.15 kB
src/components/mobile/transactions/TransactionListItem.tsx 📈 +37 B (+0.52%) 7 kB → 7.04 kB
src/components/mobile/transactions/TransactionEdit.jsx 📈 +170 B (+0.49%) 33.97 kB → 34.13 kB
src/components/reports/reports/CustomReport.tsx 📈 +86 B (+0.36%) 23.5 kB → 23.59 kB
src/components/transactions/TransactionsTable.jsx 📈 +172 B (+0.25%) 68.28 kB → 68.45 kB
src/components/modals/CategoryMenuModal.tsx 📈 +12 B (+0.22%) 5.43 kB → 5.44 kB
src/components/mobile/budget/BudgetTable.jsx 📈 +118 B (+0.21%) 54.59 kB → 54.7 kB
src/components/budget/SidebarCategory.tsx 📈 +12 B (+0.21%) 5.63 kB → 5.64 kB
src/components/accounts/Account.tsx 📈 +98 B (+0.21%) 46.45 kB → 46.54 kB
src/components/modals/CreateLocalAccountModal.tsx 📈 +6 B (+0.08%) 7.26 kB → 7.27 kB
src/components/mobile/accounts/Accounts.tsx 📈 +6 B (+0.07%) 8.57 kB → 8.58 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
static/js/index.js 4.31 MB → 4.31 MB (+1.18 kB) +0.03%
static/js/ReportRouter.js 1.59 MB → 1.59 MB (+1.18 kB) +0.07%
static/js/narrow.js 85.57 kB → 85.76 kB (+189 B) +0.22%
static/js/wide.js 102.8 kB → 102.9 kB (+98 B) +0.09%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/en-GB.js 99.42 kB 0%
static/js/fr.js 72.19 kB 0%
static/js/nl.js 98.54 kB 0%
static/js/de.js 111.72 kB 0%
static/js/en.js 100.65 kB 0%
static/js/workbox-window.prod.es5.js 5.69 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.5 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 122.29 kB 0%
static/js/pt-BR.js 106.43 kB 0%
static/js/uk.js 111.11 kB 0%
static/js/useAccountPreviewTransactions.js 1.69 kB 0%
static/js/AppliedFilters.js 10.52 kB 0%

Copy link
Contributor

github-actions bot commented Feb 19, 2025

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.33 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.js 1.33 MB 0%

@lelemm lelemm changed the title [WIP] Translation batch #1 [WIP] 📚 Translation batch #1 Feb 19, 2025
@lelemm lelemm changed the title [WIP] 📚 Translation batch #1 📚 Translation batch #1 Feb 19, 2025
Copy link
Contributor

coderabbitai bot commented Feb 19, 2025

Walkthrough

This pull request introduces extensive internationalization updates across various components in the desktop and mobile clients. The changes systematically replace hardcoded text strings with translatable elements by integrating the Trans component and the t() function from the react-i18next library. Modifications include updating labels, menu items, placeholders, tooltips, and notifications across components such as Account, SidebarCategory, TotalsList, MobileNavTabs, AccountTransactions, Accounts, BudgetTable, TransactionEdit, TransactionList, TransactionListItem, CategoryMenuModal, CreateLocalAccountModal, ImportModal, ReportSidebar, CustomReport, Spending, Export, and TransactionsTable. These updates do not alter the overall functionality of the components but enhance the localization support, ensuring that text can be rendered in different languages according to user preferences.

Possibly related PRs

Suggested labels

:sparkles: Merged

Suggested reviewers

  • MikesGlitch

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1b8cc8 and f5925a4.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/4408.md is excluded by !**/*.md
📒 Files selected for processing (6)
  • packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx (2 hunks)
  • packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx (3 hunks)
  • packages/desktop-client/src/components/mobile/accounts/Accounts.tsx (2 hunks)
  • packages/desktop-client/src/components/reports/ReportSidebar.tsx (3 hunks)
  • packages/desktop-client/src/components/reports/reports/Spending.tsx (5 hunks)
  • packages/desktop-client/src/components/settings/Export.tsx (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • packages/desktop-client/src/components/settings/Export.tsx
  • packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx
  • packages/desktop-client/src/components/mobile/accounts/Accounts.tsx
  • packages/desktop-client/src/components/reports/reports/Spending.tsx
  • packages/desktop-client/src/components/reports/ReportSidebar.tsx
  • packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Visual regression
  • GitHub Check: Functional

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (2)
packages/desktop-client/src/components/modals/manager/ImportModal.tsx (1)

16-23: 🛠️ Refactor suggestion

Internationalize error messages.

The error messages in the getErrorMessage function are hardcoded and not internationalized. For consistency with the rest of the translation effort, these messages should use the translation function.

Apply this diff to internationalize the error messages:

 function getErrorMessage(error: 'not-ynab4' | boolean) {
   switch (error) {
     case 'not-ynab4':
-      return 'This file is not valid. Please select a .ynab4 file';
+      return t('This file is not valid. Please select a .ynab4 file');
     default:
-      return 'An unknown error occurred while importing. Please report this as a new issue on GitHub.';
+      return t('An unknown error occurred while importing. Please report this as a new issue on GitHub.');
   }
 }
packages/desktop-client/src/components/reports/ReportSidebar.tsx (1)

522-522: 🛠️ Refactor suggestion

Add translations for date range labels.

The "From:" and "To:" labels in the date range selector should be translated using the t() function.

-                From:
+                {t('From:')}
-                To:
+                {t('To:')}

Also applies to: 554-554

🧹 Nitpick comments (10)
packages/desktop-client/src/components/reports/reports/Spending.tsx (1)

479-486: Consider consolidating similar translation keys.

The spending labels use translation with interpolation, which is good. However, there are multiple similar translation keys that could be consolidated:

  1. Spent {{monthYearFormatted}} {{MTD}} is used twice
  2. Spent Average {{monthYearFormatted}} {{MTD}} follows a similar pattern

Consider consolidating these into a single translation key with an additional parameter:

-{t('Spent {{monthYearFormatted}} {{MTD}}', {
+{t('{{type}} {{monthYearFormatted}} {{MTD}}', {
+  type: isAverage ? t('Spent Average') : t('Spent'),
   monthYearFormatted: monthUtils.format(compare, 'MMM, yyyy'),
   MTD: compare === monthUtils.currentMonth(),
 })}

This approach:

  1. Reduces the number of translation keys
  2. Makes it easier for translators to maintain consistency
  3. Follows the DRY principle

Also applies to: 505-511, 531-531, 551-557

packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (1)

753-754: Consider using consistent translation method.

While the translation implementation is correct, there's an inconsistency in the approach:

  • Some text uses <Trans> component (e.g., "Select account", "Add transaction")
  • Some text uses t() function (here with "New Transaction" and "Transaction")

Consider using one consistent method throughout the file for better maintainability.

packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (1)

321-324: Improve plural handling using i18n.

The plural form text should use proper internationalization to handle pluralization across different languages.

Apply this diff to improve plural handling:

-          <Text style={styles.mediumText}>
-            {selectedTransactions.size}{' '}
-            {isMoreThanOne ? 'transactions' : 'transaction'} selected
-          </Text>
+          <Text style={styles.mediumText}>
+            <Trans
+              count={selectedTransactions.size}
+            >
+              {{ count: selectedTransactions.size }} transaction selected
+            </Trans>
+          </Text>
packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (1)

491-497: Consider using structured translation keys.

While the current implementation works, consider using a more structured approach for translation keys. This helps with maintainability and makes it easier to track translations.

Example approach:

-            message: t(
-              `Covered {{toCategoryName}} overspending from {{fromCategoryName}}.`,
-              {
-                toCategoryName: category.name,
-                fromCategoryName: categoriesById[fromCategoryId].name,
-              },
-            ),
+            message: t(
+              'budget.category.cover_overspending',
+              {
+                toCategoryName: category.name,
+                fromCategoryName: categoriesById[fromCategoryId].name,
+              },
+            ),
packages/desktop-client/src/components/reports/ReportSidebar.tsx (1)

384-400: Consider reusing the translated text to avoid duplication.

The tooltip text is a slight variation of the menu item text, which could lead to inconsistencies in translations. Consider reusing the translated text to maintain consistency.

-                  text: t('Include current {{reportOptionRangeType}}', {
+                  const includeCurrentText = t('Include current {{reportOptionRangeType}}', {
                     reportOptionRangeType: (
                       ReportOptions.dateRangeType.get(
                         customReportItems.dateRange,
                       ) || ''
                     ).toLowerCase(),
-                  }),
+                  });
+                  text: includeCurrentText,
                   tooltip: t(
-                    'Include current {{reportOptionRangeType}} in live range',
+                    '{{text}} in live range',
                     {
-                      reportOptionRangeType: (
-                        ReportOptions.dateRangeType.get(
-                          customReportItems.dateRange,
-                        ) || ''
-                      ).toLowerCase(),
+                      text: includeCurrentText,
                     },
                   ),
packages/desktop-client/src/components/mobile/MobileNavTabs.tsx (2)

95-95: Consider template literals for "Soon" suffix.

While the translation implementation is correct, consider using template literals for tabs with the "Soon" suffix to allow more flexible translations in different languages where the word order might vary.

Example for Schedules:

-      name: t('Schedules (Soon)'),
+      name: t('{{name}} (Soon)', { name: t('Schedules') }),

Also applies to: 101-101, 107-107, 113-113, 119-119, 125-125, 131-131, 137-137


198-214: Add translation for navigation ARIA label.

The navigation role is set but its accessibility label could be translated.

     <animated.div
-      role="navigation"
+      role="navigation"
+      aria-label={t('Mobile navigation')}
       {...bind()}
packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx (1)

8-8: Use t() interpolation instead of template literal.

While the translation implementation works, using t()'s built-in interpolation would be more idiomatic.

-      searchPlaceholder={`${t('Search')} ${accountName}`}
+      searchPlaceholder={t('Search {{accountName}}', { accountName })}

Also applies to: 234-234, 345-345

packages/desktop-client/src/components/reports/reports/CustomReport.tsx (1)

711-713: Simplify nested Trans components.

The nested Trans components are unnecessary here and the space after the colon could be part of the translation string.

-                <Text>
-                  <Trans>Custom Report:</Trans>
-                </Text>{' '}
+                <Text>
+                  <Trans>Custom Report: </Trans>
+                </Text>
packages/desktop-client/src/components/settings/Export.tsx (1)

62-67: Consider using translation keys for technical terms.

While the Trans component usage is correct, consider extracting technical terms like "db.sqlite", "metadata.json", and "Import file" into separate translation keys. This allows translators to handle these terms consistently across different languages and contexts.

Example refactor:

<Trans>
-  <strong>Export</strong> your data as a zip file containing{' '}
-  <code>db.sqlite</code> and <code>metadata.json</code> files. It can be
-  imported into another Actual instance by closing an open file (if
-  any), then clicking the "Import file" button, then choosing "Actual."
+  <strong>{t('export')}</strong> {t('export.instructions.part1')}{' '}
+  <code>{t('technical.dbfile')}</code> {t('and')} <code>{t('technical.metafile')}</code> {t('export.instructions.part2')}
+  {t('export.instructions.part3')} "{t('button.import_file')}" {t('export.instructions.part4')}
</Trans>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04b5bdc and e1b8cc8.

⛔ Files ignored due to path filters (1)
  • upcoming-release-notes/4408.md is excluded by !**/*.md
📒 Files selected for processing (18)
  • packages/desktop-client/src/components/accounts/Account.tsx (1 hunks)
  • packages/desktop-client/src/components/budget/SidebarCategory.tsx (1 hunks)
  • packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx (2 hunks)
  • packages/desktop-client/src/components/mobile/MobileNavTabs.tsx (3 hunks)
  • packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx (3 hunks)
  • packages/desktop-client/src/components/mobile/accounts/Accounts.tsx (1 hunks)
  • packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (2 hunks)
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (4 hunks)
  • packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (2 hunks)
  • packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx (3 hunks)
  • packages/desktop-client/src/components/modals/CategoryMenuModal.tsx (2 hunks)
  • packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx (2 hunks)
  • packages/desktop-client/src/components/modals/manager/ImportModal.tsx (1 hunks)
  • packages/desktop-client/src/components/reports/ReportSidebar.tsx (2 hunks)
  • packages/desktop-client/src/components/reports/reports/CustomReport.tsx (1 hunks)
  • packages/desktop-client/src/components/reports/reports/Spending.tsx (5 hunks)
  • packages/desktop-client/src/components/settings/Export.tsx (2 hunks)
  • packages/desktop-client/src/components/transactions/TransactionsTable.jsx (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/desktop-client/src/components/accounts/Account.tsx
🧰 Additional context used
🧠 Learnings (4)
packages/desktop-client/src/components/mobile/accounts/Accounts.tsx (2)
Learnt from: joel-jeremy
PR: actualbudget/actual#3685
File: packages/desktop-client/src/components/accounts/Account.tsx:655-665
Timestamp: 2024-11-10T16:45:31.225Z
Learning: The Account component in 'packages/desktop-client/src/components/accounts/Account.tsx' is being rewritten in a separate PR.
Learnt from: qedi-r
PR: actualbudget/actual#3527
File: packages/desktop-client/src/components/accounts/Header.jsx:0-0
Timestamp: 2024-11-10T16:45:25.627Z
Learning: In the Actual Budget project, importing `t` directly from 'i18next' is acceptable and commonly used in the codebase.
packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx (2)
Learnt from: qedi-r
PR: actualbudget/actual#3527
File: packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx:47-47
Timestamp: 2024-11-10T16:45:25.627Z
Learning: Validating balance is outside the scope in `CreateLocalAccountModal.tsx`.
Learnt from: qedi-r
PR: actualbudget/actual#3527
File: packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx:32-33
Timestamp: 2024-11-10T16:45:31.225Z
Learning: In this codebase, account name uniqueness checks are case-sensitive, allowing account names that differ only by case.
packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (1)
Learnt from: matt-fidd
PR: actualbudget/actual#4181
File: packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx:252-254
Timestamp: 2025-01-18T20:08:55.203Z
Learning: Notification messages in BudgetTable.jsx will be translated in a separate PR to handle all translations together, as there are multiple messages to go through.
packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (1)
Learnt from: MatissJanis
PR: actualbudget/actual#3570
File: packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx:83-90
Timestamp: 2024-11-10T16:45:25.627Z
Learning: In the `Transaction` component in `Transaction.tsx`, both `rawTransaction` and `transaction` should be included in the dependency arrays of `useMemo` hooks, even though `transaction` derives from `rawTransaction`.
🔇 Additional comments (25)
packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx (1)

7-7: LGTM! Clean internationalization implementation.

The changes correctly implement internationalization for the "(No payee)" string using react-i18next, aligning with the PR's translation objectives.

Also applies to: 54-54, 191-191

packages/desktop-client/src/components/transactions/TransactionsTable.jsx (3)

13-13: LGTM!

The Trans component is correctly imported alongside the existing useTranslation import from react-i18next.


1810-1810: LGTM!

The "Cancel" button label is correctly wrapped with the Trans component to enable internationalization.


1830-1830: LGTM!

The "Add" button label is correctly wrapped with the Trans component to enable internationalization.

packages/desktop-client/src/components/reports/reports/Spending.tsx (5)

1-2: LGTM! Proper i18n setup.

The file correctly imports and sets up the required internationalization hooks from react-i18next.


156-157: LGTM! Notification message properly translated.

The notification message is correctly wrapped with the translation function.


185-185: LGTM! Title translation properly implemented.

The default title is correctly wrapped with the translation function in both places where it's used.

Also applies to: 191-191


243-244: LGTM! Mode labels properly translated.

The 'Live' and 'Static' mode labels are correctly wrapped with the translation function.


282-283: LGTM! Comparison mode labels properly translated.

The 'Budgeted' and 'Average spent' labels are correctly wrapped with the translation function.

packages/desktop-client/src/components/mobile/transactions/TransactionEdit.jsx (3)

10-10: LGTM!

The import of translation utilities is correctly placed and both imported items are used in the code.


239-239: LGTM!

The hardcoded text is correctly wrapped in the Trans component for translation.


257-257: LGTM!

The hardcoded text is correctly wrapped in the Trans component for translation.

packages/desktop-client/src/components/modals/manager/ImportModal.tsx (2)

25-61: LGTM! Good internationalization practices.

The component demonstrates good internationalization practices:

  • Proper usage of the useTranslation hook
  • Correct application of the t function for the modal title

69-97: LGTM! Comprehensive text content internationalization.

All text content is properly wrapped with the Trans component, ensuring complete internationalization coverage:

  • Main instruction text
  • YNAB4 description
  • nYNAB description
  • Actual description
packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx (2)

10-10: LGTM! Import added correctly.

The Trans component is imported alongside useTranslation, maintaining good import organization.


152-154: LGTM! Text internationalized correctly.

The "No transactions" text is properly wrapped with the Trans component, enabling translation support.

packages/desktop-client/src/components/mobile/budget/BudgetTable.jsx (1)

491-497: LGTM! Well-structured translation implementation.

The hardcoded message has been properly replaced with a translatable template using the t function, with correct parameter substitution and dependency array update.

Also applies to: 511-511

packages/desktop-client/src/components/reports/ReportSidebar.tsx (2)

1-67: LGTM! Well-structured imports and type definitions.

The imports are properly organized, and the necessary translation hook is included.


98-98: LGTM! Translation hook is properly initialized.

The useTranslation hook is correctly initialized at the component level.

packages/desktop-client/src/components/budget/envelope/budgetsummary/TotalsList.tsx (1)

124-137: LGTM! Internationalization is correctly implemented.

The text strings are properly wrapped in Trans components, and the dynamic variable prevMonthName is correctly passed using object syntax.

packages/desktop-client/src/components/budget/SidebarCategory.tsx (1)

127-132: LGTM! Menu items are correctly internationalized.

The menu items are properly translated using the t() function, including the conditional show/hide text.

packages/desktop-client/src/components/modals/CategoryMenuModal.tsx (1)

119-121: LGTM! Menu items and notes are correctly internationalized.

The menu items and notes fallback text are properly translated using the t() function.

Also applies to: 204-205, 211-212

packages/desktop-client/src/components/modals/CreateLocalAccountModal.tsx (1)

89-89: LGTM! Form labels and error messages are correctly internationalized.

The form labels and error messages are properly translated using the t() function. Note that account name uniqueness checks remain case-sensitive, allowing account names that differ only by case.

Also applies to: 164-164, 182-182

packages/desktop-client/src/components/mobile/MobileNavTabs.tsx (1)

8-8: LGTM: Translation hook properly imported and initialized.

The useTranslation hook is correctly imported and initialized.

Also applies to: 41-41

packages/desktop-client/src/components/settings/Export.tsx (1)

2-2: LGTM!

The Trans component import is correctly added alongside useTranslation to handle complex text blocks with HTML elements.

lelemm and others added 2 commits February 19, 2025 17:40
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@lelemm
Copy link
Contributor Author

lelemm commented Feb 19, 2025

ty for the promptly review. I will change these stuff today ;)

@lelemm lelemm requested a review from jfdoming February 19, 2025 23:08
Copy link
Contributor

@jfdoming jfdoming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for working on this! 💯

@jfdoming jfdoming merged commit 1cc2da1 into actualbudget:master Feb 19, 2025
21 checks passed
lelemm added a commit to lagoom-br/actual that referenced this pull request Feb 20, 2025
* 🐛  Fix Initializing the connection to the local database hang (actualbudget#4375)

* fix initializing to the local db

* release notes

* Add percentage adjustments to schedule templates (actualbudget#4098) (actualbudget#4257)

* add percentage adjustments to schedule templates

* update release note

* remove unecessary parentheses

* Update packages/loot-core/src/server/budget/goalsSchedule.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* PR comments addressed

* Linting fixes

* Updated error handling, added tests

* Linting fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Custom mapping and import settings for bank sync providers (actualbudget#4253)

* barebones UI

* add saving and prefs

* add last sync functionality

* use mapping for synced transactions

* note

* jest -u

* Update VRT

* Coderabbit

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add new fields

* rename migration, newer in master

* lint

* coderabbit

* update snapshots

* GoCardless handlers fallback and notes

* expose new fields from SimpleFIN

* update tests

* update instructions on GoCardless handlers

* lint

* feedback

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Add fallback value for payeename: 'undefined' - CBC Bank (actualbudget#4384)

* Add fallback value for payename: 'undefined'

* docs: add release note

* Add fallback value for payename: 'undefined' (for negative amounts)

* [TypeScript] Convert test page models to TS (actualbudget#4218)

* Dummy commit

* Delete js snapshots

* Move extended expect and test to fixtures

* Fix wrong commit

* Update VRT

* Dummy commit to run GH actions

* Convert test page models to TS

* Release notes

* Fix typecheck errors

* New page models to TS

* Fix typecheck error

* Fix page name

* Put awaits on getTableTotals

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* rename two migrations to realign with convention (actualbudget#4343)

* Updating sync server package name to @actual-app/sync-server (actualbudget#4370)

* updating sync server to have a consistent package name

* release notes

* Add today button on mobile budget page (actualbudget#4380)

* feat: today button on mobile budget page

Jumps to the current month

* add release note

* cleaner onCurrentMonth

* Update VRT

* use SvgCalendar from icons/v2

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Development mode for sync server (React Fast Refresh on port 5006) (actualbudget#4372)

* devmode for sync server

* removed pluggy from this version

* md

* code review

* changed how open browser

* missed this

* linter

* trigger actions

* 🐛 Fix: Error rate limit at user directory page (actualbudget#4397)

* Error rate limit

* md

* 🐛 Fix new proxy middleware dependency missing on prod build (actualbudget#4400)

* fix new proxy middleware not installed on prod build

* release notes

* Remove deprecated imports for several components (actualbudget#4385)

* don't unbudget goals

* lint

* Fixes actualbudget#4069 : Ignore CSV inOutMode during OFX imports (actualbudget#4382)

* Ignore inOutMode during OFX imports

* Add release notes

---------

Co-authored-by: youngcw <calebyoung94@gmail.com>

* fix tooltip translation (actualbudget#4402)

* [TypeScript] Make `db.runQuery` generic to make it easy to type DB query results (actualbudget#4247)

* Make runQuery generic to make it easy to type DB query results.

* Release notes

* typo

* update mapping data for existing synced transactions and always show direction dropdown (actualbudget#4403)

* update sync mapping data for existing transactions on sync

* show payment direction dropdown regardless of sample data

* note

* ignore changes in raw_synced_data

* Fix top-level types of `send` function (actualbudget#4145)

* Add release notes

* Fix types of `send` function

* Fix `send` types in a number of places

* PR feedback

* Foundations for the budget automations UI (actualbudget#4308)

* Foundations for the budget automations UI

* Coderabbit

* Fix react-hooks/exhaustive-deps error on useSelected.tsx (actualbudget#4258)

* Fix react-hooks/exhaustive-deps error on useSelected.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on usePayees.ts (actualbudget#4260)

* Fix react-hooks/exhaustive-deps error on usePayees.ts

* Rename

* Release notes

* Fix react-hooks/exhaustive-deps error on useAccounts.ts (actualbudget#4262)

* Fix react-hooks/exhaustive-deps error on useAccounts.ts

* Release notes

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx (actualbudget#4273)

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx

* Release notes

* [WIP] BANKS_WITH_LIMITED_HISTORY constant update (actualbudget#4388)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx (actualbudget#4259)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx

* Remove comment in eslint config

* Release notes

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx (actualbudget#4268)

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx

* Release notes

* Fix lint

* Fix react-hooks/exhaustive-deps error on table.tsx (actualbudget#4274)

* Fix react-hooks/exhaustive-deps error on table.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on useCategories.ts (actualbudget#4261)

* Fix react-hooks/exhaustive-deps error on useCategories.ts

* Release notes

* 👷 Typescript: Improving typing of asyncStorage (global-store.json) (actualbudget#4369)

* typing globalprefs

* adding release notes

* unneeded partial

* removing prop that crept in

* 📚 Translation batch #1 (actualbudget#4408)

* Translation batch

* md

* Update packages/desktop-client/src/components/settings/Export.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix code review from coderabbit

* code review

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix currencyToAmount incorrectly converting input (actualbudget#4383)

* fix: ensure currencyToAmount works regardless of the configured number format

* chore: linting

* docs: add release note

* test: ensure correct amount is entered for debit when adding split transactions

* chore: rename variable thousandsSep to thousandsSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename variable decimalSep to decimalSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename decimalSep and thousandsSep variables to decimalSeparator and thousandsSeparator

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* useDisplayPayee hook to unify payee names in mobile and desktop. (actualbudget#4213)

* useDisplayPayee hook to unify payee logic in mobile and desktop

* Release notes

* Fix typecheck errors

* Fix test

* Update test

* Revert (No payee) color

* Fix tests

* VRT

* Fix category transactions

* Fix lint and VRT

* Update VRT

* Translate

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract transaction related server handlers from `main.ts` to `server/transactions/app.ts` (actualbudget#4221)

* Move transaction related handlers to server/transactions folder and use the new convention

* Fix lint and typecheck

* Release notes

* Update handler names

* Move get-earliest-transaction

* Update release notes

* Fix tests

* Fix types

* Fix lint

* Update snapshot

* Remove duplicate parse-file.ts

* Fix lint

* 🐛 Fix `On budget` / `Off budget` underline with translated languages (actualbudget#4417)

* Fix `On budget` / `Off budget` underline

* md

* ajuste para o merge

---------

Co-authored-by: Michael Clark <5285928+MikesGlitch@users.noreply.github.com>
Co-authored-by: Matt Farrell <10377148+MattFaz@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Michotte <55855805+MMichotte@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
Co-authored-by: Adam Stück <adam@adast.dk>
Co-authored-by: Alberto Cortina Eduarte <albertocortina96@gmail.com>
Co-authored-by: Gabriel J. Michael <gabriel.j.michael@gmail.com>
Co-authored-by: Julian Dominguez-Schatz <julian.dominguezschatz@gmail.com>
Co-authored-by: Michał Gołąb <23549913+michalgolab@users.noreply.github.com>
Co-authored-by: Antoine Taillard <an.taillard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants