-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from owncloud/activitylog_translations
Default locale for the activity log service
- Loading branch information
Showing
5 changed files
with
40 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
modules/ROOT/partials/deployment/services/translations.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// to be included by a service | ||
|
||
== Translations | ||
|
||
The `{service_name}` service has embedded translations sourced via transifex to provide a basic set of translated languages. These embedded translations are available for all deployment scenarios. In addition, the service supports custom translations, though it is currently not possible to just add custom translations to embedded ones. If custom translations are configured, the embedded ones are not used. To configure custom translations, the `{envvar_name}` environment variable needs to point to a base folder that will contain the translation files. This path must be available from all instances of the userlog service, a shared storage is recommended. Translation files must be of type https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html#PO-Files[.po] or https://www.gnu.org/software/gettext/manual/html_node/Binaries.html[.mo]. For each language, the filename needs to be `{service_name}.po` (or `{service_name}.mo`) and stored in a folder structure defining the language code. In general the path/name pattern for a translation file needs to be: | ||
|
||
[source,plaintext,subs="attributes+"] | ||
---- | ||
{{envvar_name}}/\{language-code\}/LC_MESSAGES/{service_name}.po | ||
---- | ||
|
||
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`, one needs to place the corresponding translation files to | ||
|
||
[source,plaintext,subs="attributes+"] | ||
---- | ||
{{envvar_name}}//de/LC_MESSAGES/{service_name}.po | ||
---- | ||
|
||
{empty} + | ||
|
||
IMPORTANT: For the time being, the embedded ownCloud Web frontend 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`. In consequence, 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 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. | ||
|
||
=== Default Language | ||
|
||
The default language can be defined via the `OCIS_DEFAULT_LANGUAGE` environment variable. See the xref:{s-path}/settings.adoc#default-language[settings] service for a detailed description. |
1 change: 0 additions & 1 deletion
1
modules/ROOT/partials/deployment/services/webui_language_code.adoc
This file was deleted.
Oops, something went wrong.