Skip to content

A local-first personal finance app

Update translation docs (#610)

Julian Dominguez-Schatz4fd70cab8f2a
diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt
index 7246d8f617..646ae0bd81 100644
--- a/.github/actions/spelling/expect.txt
+++ b/.github/actions/spelling/expect.txt
@@ -1,6 +1,7 @@
ABNAMRO
ABNANL
Activo
+Anglais
AESUDEF
ALZEY
BANKA
diff --git a/docs/contributing/i18n.md b/docs/contributing/i18n.md
index c9104e25d6..ee8a08402c 100644
--- a/docs/contributing/i18n.md
+++ b/docs/contributing/i18n.md
@@ -2,17 +2,27 @@
Are you interested in bringing Actual to a broader audience by translating and localizing the app into new languages? Great! This guide will show you how to get started. Adding translations can be a great first step into contributing to open-source software.
-:::warning Community translations
+## Translating existing strings
-Currently, Actual Budget **is not yet ready** to receive community translations.
+Actual uses [Weblate](https://hosted.weblate.org/projects/actualbudget/actual) to manage all translations. In particular, we use Weblate's "suggestions" system to maintain high-quality translations.
+
+:::note Pull Requests
+
+We do not accept GitHub Pull Requests modifying translation files—any PRs in the translations repository will be automatically closed.
:::
-## Current Status
+### Suggesting a new translation
+
+To suggest a translation for a language you are familiar with, just find a string you'd like to translate, fill in a translation, and hit "Suggest." This will then give others the opportunity to vote on the most accurate translation. Check out the [Weblate docs](https://docs.weblate.org/en/latest/user/translating.html) for more details.
+
+Please only fill in translations that you are confident in, and be sure to include the same formatting markers as the English text (example: `<1>English</1>` -> `<1>Anglais</1>`).
+
+### Voting on existing suggestions
-Actual is currently being prepared for internationalization (i18n). This means that initially everything in the app was English, but we're slowly marking all texts for translation.
+To help vote on high-quality strings, click on "Strings with suggestions" from a language page, and use the thumbs-up or thumbs-down icons to vote. If you click thumbs-down, it's always helpful to provide a reason so that the original translator can improve.
-## Marking for Translation
+## Marking new strings for translation
Developing translated software requires that every text shown to the user passes through a translation function. Actual uses [i18next](https://www.i18next.com/) to achieve this goal.
@@ -38,7 +48,7 @@ import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t } = useTranslation();
- return <p>{t('Hello World')}</p>;
+ return <button aria-label={t('Hello World')} />;
}
```
@@ -48,7 +58,7 @@ At runtime, it will select the translation from the currently active locale. You
const withPlaceholder = t('Welcome home, {{name}}!', { name: 'Anita' });
```
-For [pluralalization](https://www.i18next.com/translation-function/plurals), please use the plural form for the default text. The placeholder variable **must** be named `count`:
+For [pluralization](https://www.i18next.com/translation-function/plurals), please use the plural form for the default text. The placeholder variable **must** be named `count`:
```javascript
const manyItems = t('You selected {{count}} items', { count: 4 });
@@ -58,7 +68,7 @@ i18next will take care of proper pluralization rules in the currently active lan
### `<Trans>` Component
-When translating text with simple HTML tags or other React components, you will need to use the [`<Trans>` component](https://react.i18next.com/latest/trans-component).
+When translating text with simple HTML tags or other React components, we ask that you use the [`<Trans>` component](https://react.i18next.com/latest/trans-component).
```javascript
import { Trans } from 'react-i18next';