CloudBeaver localization
Not all localization comes from the Cloudbeaver source code. Some of it comes from the backend side. So, if you want to, for example, to change or create localization for database objects, you need to do it in another repository, at https://github.com/dbeaver/dbeaver. Here is a guide to how you can contribute to DBeaver's localization https://github.com/dbeaver/dbeaver/wiki/Localization. To create or improve localization for the Cloudbeaver interface, follow these steps:
Note: The images below are taken from Fork. You can use another application to create pull-requests.
- Open https://github.com/dbeaver/cloudbeaver and fork repository
- Clone the forked repository https://github.com/.../cloudbeaver to your local system.
- Create a new branch from devel branch (name it, for example, italian-localization).
- Go to the local repository and find the localization files you want to translate.
In Cloudbeaver, all translatable resources are located in the locales folder. The path to the folder is [package-name]\src\locales\[locale-code].ts
.
Create a copy of en.ts
file in the package you want to change the localization in and name it [locale-code].ts
(e.g. it.ts
for Italian)
Example: ../repository_name/webapp/packages/core-localization/src/locales
- Open the created file and translate the tokens to your language. Change EN on
[locale-code]
in the top of the fileexport const defaultENLocale
=>export const defaultITLocale
.
Here is the structure of the language tokens: ['token-name', 'token-value']
. You only need to change the second part: 'token-value'
. For example, if you wanted to translate the Loading... token, which is ['ui_processing_loading', 'Loading...']
, it would look like this: ['ui_processing_loading', 'Caricamento in corso...']
.
Find localization service (
LocalizationService.ts
or similar service name) in same package you just created localization file. Then register new locale analogously to other ones in the file. Use[locale-code]
for this switch caseOpen the branch changes and stage them
- Commit the changes
- Push to origin
Go to Github and press Compare & pull request in your repository
Write a description and create pull request
Here is Github instruction. You can use different IDEs to create pull requests.