From 37e5f8d167723fc9220423158720e698345e0bec Mon Sep 17 00:00:00 2001 From: mmattel Date: Thu, 20 Apr 2023 14:34:25 +0200 Subject: [PATCH] [docs-only] Note that we only support language but not language_territory (web frontend) --- services/notifications/README.md | 7 ++++--- services/userlog/README.md | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/services/notifications/README.md b/services/notifications/README.md index 755cdf191..ddf6f8a03 100644 --- a/services/notifications/README.md +++ b/services/notifications/README.md @@ -49,11 +49,12 @@ the `NOTIFICATIONS_TRANSLATION_PATH` environment variable needs to point to a ba The language code pattern is composed of `language[_territory]` where `language` is the base language and `_territory` is optional and defines a country. -For example, for the language `de_DE`, one needs to place the corresponding translation files to `{NOTIFICATIONS_TRANSLATION_PATH}/de_DE/LC_MESSAGES/translations.po`. +For example, for the language `de`, one needs to place the corresponding translation files to `{NOTIFICATIONS_TRANSLATION_PATH}/de/LC_MESSAGES/translations.po`. + +Important: For the time being, the embedded ownCloud Web frontent only supports the main language-code but does not handle any territory. When strings are available in the language-code `language_territory`, the web frontend does not see it as it only requests `language`. As impact, any translations made must exist in the requested `language` to avoid a fallback to the default. ### Translation Rules -* If a requested language code is not available, the service tries to fall back to the base language if available. -For example, if `de_DE` is not available, the service tries to fall back to translations in the `de` folder. +* If a requested language code is not available, the service tries to fall back to the base language if available. For example, if the requested language-code `de_DE` is not available, the service tries to fall back to translations in the `de` folder. * If the base language `de` is also not available, the service falls back to the system's default English (`en`), which is the source of the texts provided by the code. diff --git a/services/userlog/README.md b/services/userlog/README.md index f8cc6fed9..d2ae335c6 100644 --- a/services/userlog/README.md +++ b/services/userlog/README.md @@ -44,9 +44,12 @@ The `userlog` service has embedded translations sourced via transifex to provide The language code pattern is composed of `language[_territory]` where `language` is the base language and `_territory` is optional and defines a country. -For example, for the language `de_DE`, one needs to place the corresponding translation files to `{USERLOG_TRANSLATION_PATH}/de_DE/LC_MESSAGES/userlog.po`. +For example, for the language `de`, one needs to place the corresponding translation files to `{USERLOG_TRANSLATION_PATH}/de_DE/LC_MESSAGES/userlog.po`. + +Important: For the time being, the embedded ownCloud Web frontent only supports the main language-code but does not handle any territory. When strings are available in the language-code `language_territory`, the web frontend does not see it as it only requests `language`. As impact, any translations made must exist in the requested `language` to avoid a fallback to the default. ### Translation Rules -* If a requested language code is not available, the service tries to fall back to the base language if available. For example, if `de_DE` is not available, the service tries to fall back to translations in the `de` folder. -* If the base language `de` is also not available, the service falls back to the system's default English (`en`), which is the source of the texts provided by the code. +* If a requested language code is not available, the service tries to fall back to the base language if available. For example, if the requested language-code `de_DE` is not available, the service tries to fall back to translations in the `de` folder. +* If the base language `de` is also not available, the service falls back to the system's default English (`en`), +which is the source of the texts provided by the code.