Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/librecodecoop/l10n_override
https://github.com/librecodecoop/l10n_override
l10n nextcloud nextcloud-app nextcloud-apps
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/librecodecoop/l10n_override
- Owner: LibreCodeCoop
- License: agpl-3.0
- Created: 2023-07-31T22:04:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-24T23:26:04.000Z (10 months ago)
- Last Synced: 2024-12-17T08:09:08.929Z (6 days ago)
- Topics: l10n, nextcloud, nextcloud-app, nextcloud-apps
- Language: PHP
- Homepage:
- Size: 164 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Override Translation
Override app translation
## Instructions
For now only have the command line version with the follow commands:
```
occ l10n-override:add
occ l10n-override:list
occ l10n-override:delete
```## Use case
In your Nextcloud instance, you will use a special code as login, on the Nextcloud login screen the phrase "Account name or email" no longer makes sense, so you will need to change it to "Your code".
How does this app works and how to change this text?
In Nextcloud is possible to overwrite translations, page templates and much more using the theme feature. For this you will need to use a theme. Nextcloud themes work like this: when loading an X file, will first checks if exists a version of this file in the theme folder, if not, then it will load the original app file.
So we'll define the default theme to store the overwritten files:
```
occ config:system:set theme --value default
```
This command will create the folder `themes/default` and set the name of current theme as `default` at the `config/config.php` file as a system setting.Identify who this phrase belongs to in your Nextcloud by going to the root folder of your Nextcloud and executing the command:
```
find . -name l10n -type d -exec grep -R "Account name or email" {} \;
```
You should find some occurrences of this phrase in several languages. Example:
```
./core/l10n/mk.js: "Account name or email" : "Корисничко име или е-пошта",
```
The files found will be inside a folder called `l10n`, before `l10n` you will find the name of the "app" that has this sentence (ex.: core, lib, themes, settings, calendar, etc). In this example, the root directory is `core`.Let's say you want to change the phrase in Portuguese, then in the grep command you should find files `core/l10n/pt_BR.json` and `core/l10n/pt_BR.js`. The code of the language "Brazilian Portuguese" is `pt_BR`.
Given the information above, to change this phrase in Portuguese to "Your code" execute:
```
occ l10n-override default core "Account name or email" "Seu código" pt_BR
```### Changing a text form English to English
To do this you will need to use `en` as language code:
```
occ l10n-override default core "Account name or email" "Your code" en
```## Notes
* Only is possible to add a translation to core, lib or to an enabled app