Wssilva

Registered
Apr 16, 2002
2
0
301
Greetings [[all]]

I am working on a translation of the CPanel 4.7 English HTML templates into Brazilian language, in order to write a working, suitable Portuguese version of the program interface. However I am not sure if I should translate every English sentence of every page, due to some of them being open expressions which will receive the outputs of the respective background scripts. As Portuguese sentences would have different words of different lengths, I fear the outputs would be simply printed in absurd places over the Portuguese, translated expressions. I don't have the scripts and not being a programmer, even if I had them I would not dare to adjust print commands at my own risk.

Am I right on this topic, or it would be fine to translate every English sentence of any HTML template?

Is there some other way of getting a Portuguese customization to CPanel 4.7?

Thank you in advance,

Walzi
 

Juanra

Well-Known Member
Sep 22, 2001
777
0
316
Spain
You can place the cpanel tags wherever it makes sense in your language. Most tags will output normal HTML (others do actions) embedded in yours so you needn't worry about it appearing in strange places.

We translated to Spanish as much as we could, every string in English was translated to Spanish. The problem is that some parts are not translatable as of now from the theme templates (in particular all messages in the File Manager), but that's a bug already marked as assigned at cpanel's bugzilla.
 

Wssilva

Registered
Apr 16, 2002
2
0
301
Thanks for replying.

Just as an example:

The English file reads:
-----------------------------------------------------------------------------
Update directory permissions

User permissions updated
The user can now access the directory using the password .
------------------------------------------------------------------------------

The embbeded output will probably be entered in the last sentence, printing 'username' between 'user' and 'can', 'dirname' between 'directory' and 'using', and finally the password string after 'password' and before the final dot.

However in Portuguese, that sentence would be like:

O usuário pode agora acessar o diretório usando a senha .

Now, if the output is printed counting the number of characters from the beginning of the expression to its initial position, it will start printing 'username' in the 9th character - what means there will be no space between 'usuário' (user) and 'username'. Some other printings may even break a Portuguese word in two.

How did you solve this for your Spanish translation? Am I skipping some important insight?

Thank you very much.

Walzi
 

Juanra

Well-Known Member
Sep 22, 2001
777
0
316
Spain
If

The user &cpanel print=&$FORM{'user'}&& can now access the directory using the password &cpanel print=&$FORM{'pass'}&&.

yields:

The user Peter can now access the directory using the password Pan.

this

O usuário &cpanel print=&$FORM{'user'}&& pode agora acessar o diretório usando a senha &cpanel print=&$FORM{'pass'}&&.

will yield:

O usuário Peter pode agora acessar o diretório usando a senha Pan.

The tags are simply replaced by the corresponding text. You could as well use:

&b&&cpanel print=&$FORM{'pass'}&&&/b& is now &b&&cpanel print=&$FORM{'user'}&&&/b&'s password.