Add new language

Ľudovít Lučenič

Active Member
Sep 12, 2018
7
0
41
42
Bernolákovo
www.arinas.net
Hello,
I have had some success aroung adding a new language (Slovak) into PVE web application. However, I am not sure of the correct procedure to do so for PBS. I have seen that using the pve-lang-sk.js as pbs-lang-sk.js and putting it into /usr/share/pbs-i18n makes Slovak translations accessible in PBS web application. Anyway, it is not possible to choose Slovak language as the Default language under Configuration > Other > Gerenal settings because of the following error.
parameter verification errors
default-lang: value 'sk' is not defined in the enumeration.

I have found the enum Translation defined in src/config/node.rs, but I cannot locate this resource anywhere in the installed PBS's resources.
Please, is there an option to extend the enumeration without (re)compilation and what is the correct procedure for addind support for a new language for PBS?
Thank you in advance,
Ľudovít
 
Hi,

is there an option to extend the enumeration without (re)compilation
Unfortunately, that is not possible w/o recompilation AFAIK.

what is the correct procedure for addind support for a new language for PBS?
Normally by directly contributing the translation such that it can be included in a future update/release :)

While we do not have specific instructions for the Backup Server, the guide as written for PVE should work for the Backup Server too: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#translation
 
Hi, thank you for the explanation. One thing thou stays unclear for me: how do I create a 'sk'-specific javascript file for PBS and/or for PVE? Should I just use the current .pot files for each product and use the compilation procedure: make p{ve,bs,mg}-lang-sk.js, once I have the translations in .po file ready? But there seem to be just once set of language .po files per language in proxmox-i18n git project, not one for PVE, one for PBS...

Thank you very much in advance for a couple of hints.
Ľudovíť
 
Hi,

you basically just need to follow the documentation I already linked, esp. this section: Translating with git
There is just one .po file per language, which holds all translatable strings across all products.

So you clone the proxmox-i18n repository and run a make init-sk.po inside the cloned repository.
This will produce a sk.po file, which you can then edit using your favorite text editor :)

You don't have to translate all strings in one go of course, untranslated strings will simply default to the original English string.

As for contributing the resulting file upstream, please see Sending the translation.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!