From c24e50398dce86ded31af2c54bd0d8c6e6516b28 Mon Sep 17 00:00:00 2001 From: Adam Daley Date: Sat, 7 Nov 2026 18:12:26 +0000 Subject: [PATCH] Prepare separate module Crowdin configuration --- README.md | 19 +++++++++++++++++++ crowdin.example.yml | 15 +++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 crowdin.example.yml diff --git a/README.md b/README.md index f8e4076..dea0144 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,25 @@ Branding/ [`manifest.schema.json`](./manifest.schema.json); every package is validated against it (plus semantic checks in `tools/validate.php`) by CI. +## Translations + +Module translations will use a separate **FOSSBilling Modules** Crowdin project, starting with Branding and Cookieconsent. The inactive [configuration example](./crowdin.example.yml) keeps each module's template and translations together: + +```text +Branding/locale/branding.pot +Branding/locale//LC_MESSAGES/branding.po +Cookieconsent/locale/cookieconsent.pot +Cookieconsent/locale//LC_MESSAGES/cookieconsent.po +``` + +Use the existing [translation tooling](https://github.com/FOSSBilling/FOSSBilling/blob/main/tools/i18n/README.md) to extract, validate and compile translations. + +The example needs `CROWDIN_MODULES_PROJECT_ID` and `CROWDIN_MODULES_PERSONAL_TOKEN` for the separate Modules project. Existing core project 4 remains owned by `FOSSBilling/locale`. + +Before activation, create the Modules project, review source and target languages, translator access and shared translation memory, and import and validate the existing translations. Carry out that one-time migration directly. PO imports do not preserve Crowdin approval state or full history; retain the original project for attribution and review imports before approval. + +The example is not read by a workflow. Installing it as `crowdin.yml`, connecting Crowdin and enabling synchronization are separate activation steps. Module releases and publication remain separate from this configuration preparation. + ## Releasing Tag the release `-v` (e.g. `branding-v0.8.9`, version diff --git a/crowdin.example.yml b/crowdin.example.yml new file mode 100644 index 0000000..0cb56f3 --- /dev/null +++ b/crowdin.example.yml @@ -0,0 +1,15 @@ +# Install in FOSSBilling/modules after review, using the separate Modules project. +# Supply its project ID and token through the environment. +project_id_env: CROWDIN_MODULES_PROJECT_ID +api_token_env: CROWDIN_MODULES_PERSONAL_TOKEN +base_url: https://fossbilling.api.crowdin.com +base_path: . +preserve_hierarchy: true +files: + - source: /Branding/locale/branding.pot + translation: /Branding/locale/%locale_with_underscore%/LC_MESSAGES/branding.po + - source: /Cookieconsent/locale/cookieconsent.pot + translation: /Cookieconsent/locale/%locale_with_underscore%/LC_MESSAGES/cookieconsent.po +pull_request_title: '[Automated] Module translations' +pull_request_labels: + - crowdin