From e96b3b11d0e32fcfac4f34c9ff11c99697d85a9b Mon Sep 17 00:00:00 2001 From: Julian Dominguez-Schatz Date: Sat, 11 Jan 2025 14:06:47 -0500 Subject: [PATCH 1/2] Update translation docs --- docs/contributing/i18n.md | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/docs/contributing/i18n.md b/docs/contributing/i18n.md index c9104e25d..ee8a08402 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>Anglais`). + +### 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

{t('Hello World')}

; + return