Language Files Upload Problem CP11

trhosting.net

Well-Known Member
Mar 7, 2006
153
1
168
Turkey
Hi,

When we upload a language file to the server, WHM names it like "c:\languages\turkish-utf8".

How can we rename them to turkish-utf8?
If we cannot, then it is shown as "c:\languages\turkish-utf8" on both WHM and cPanel.

I tried to manually rename it from shell but i always get access denied error.
I don't want to use web interface to edit language files. It is very slow interface. I want to edit the files and then send them to server.
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,255
60
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Language handling is a mess!

Wow! I cannot believe this problem is still happenning. I started today my work to enhance and translate completely the x3 spanish template. When you edit online, WHM makes a good work saving the file. The only thing I must criticize is that even knowing that the file must use 8859 enconding set, WHM don't encode the special chars (with PHP we'd talk about "htmlentities" command). After discovering that, I downloaded the template file, encoded locally the special chars that we have in spanish lang, and tried to upload :( Then, I had the same problem I found reported in this thread:
Code:
Installed D:\spanish at /usr/local/cpanel/base/frontend/x3/lang/[B]D:\spanish[/B]
WHM is not treating well the path of the file.
Of course I repaired the problem after some headaches using:
Code:
cp D:\\spanish spa
rm -f "D:\\spanish"
rm -f spanish
mv spa spanish
(I finally decided to write a script to run this every time I upload a new spanish file)

BTW, after uploading the file, if I open again the WHM language editor I can see that some of my corrections are decoded and others are not :confused::confused::confused::eek:

Something strange is happening with the language handling tool, boys. I'd love to heard some solution from yours. I must recognize I am surprised to see the same problem unanswered almost one year ago. Is this something hard to repair?

Also, what is the /usr/local/cpanel/base/frontend/x3/lang/spanish.local file for? I noted that this was updated when I save the work on WHM editor. There is also one file at /usr/local/cpanel/lang/spanish2 that claims to be the spanish template for Root Language File :confused:, but its lastmod date is a bit oldie...
Code:
-rw-r--r--  1 root root 58K Jul 28  2007 /usr/local/cpanel/lang/spanish2
Is it deprecated? I think so :D
And there are more lost spanish lang files I'm afraid to investigate....


For those who want to check this on your own, I submit the file, which adds a great extension to spanish version of x3 template.

De paso disfrútenlo aquellos que sean hispanoparlantes del foro, estoy tratando de completar la traducción, así que asi quieren probarlo, adelante, y me cuentan que les parece ;) Incorpora unas 400 correcciones de estilo y sintaxis, así como también las secciones incompletas en la pantalla de Email Authentication del cPanel.
 

Attachments

Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
Do you have access to a machine running EDGE? We've changed some of the language loading functionality in EDGE that may resolve some of the issues you reported here. I'm not certain about the matter of giving the file name a windows drive letter (e.g. d:), that's simply weird.

Of note, on my test machines, there is no spanish2 file.
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,255
60
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Do you have access to a machine running EDGE? We've changed some of the language loading functionality in EDGE that may resolve some of the issues you reported here. I'm not certain about the matter of giving the file name a windows drive letter (e.g. d:), that's simply weird.
ok, giving the file name a windows drive letter seems to be a bad assignment of the name when the upload is done. Some part of the validation process may be wrong. IN FACT, I've noted that actually you can upload almost any kind of file without extension and WHM will say it's ok. May the upload script lacks of a strong verify routine?

Of note, on my test machines, there is no spanish2 file.
cool. I deleted that file since its date is before I had adquired the vps.

This lead me to another questions:

1) When updating cPanel, does these language files also upgrade from cPanel servers? will I lose my translation work?

2) what is /usr/local/cpanel/lang/spanish file for? I've noted that that file is labeled as the Root Language File and has similar variable names than /usr/local/cpanel/base/frontend/x3/lang/spanish.

3) What is /usr/local/cpanel/base/frontend/x3/lang/spanish.local file for? I've noted that this file is updated whenever I save /usr/local/cpanel/base/frontend/x3/lang/spanish in the editor.

All I want with these questions is to understand how languages are managed in cPanel, in order to do a cool spanish translation.

Thank you.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,608
77
308
cPanel Access Level
Root Administrator
ok, giving the file name a windows drive letter seems to be a bad assignment of the name when the upload is done. Some part of the validation process may be wrong. IN FACT, I've noted that actually you can upload almost any kind of file without extension and WHM will say it's ok. May the upload script lacks of a strong verify routine?
Are you creating your files on a Windows machine?


cool. I deleted that file since its date is before I had adquired the vps.

This lead me to another questions:

1) When updating cPanel, does these language files also upgrade from cPanel servers? will I lose my translation work?
In general, files we distribute are over-written during a upcp if:

1 . We distribute a new version
2. The local file differs from the one on the update server

2) what is /usr/local/cpanel/lang/spanish file for? I've noted that that file is labeled as the Root Language File and has similar variable names than /usr/local/cpanel/base/frontend/x3/lang/spanish.
I don't recall off-hand. The language system is not my forte.

3) What is /usr/local/cpanel/base/frontend/x3/lang/spanish.local file for? I've noted that this file is updated whenever I save /usr/local/cpanel/base/frontend/x3/lang/spanish in the editor.
Files that end in .local are assumed to be something put in place by an administrator and are not touched (this goes beyond the Language system). .local files over ride what we provide.

Hence spanish.local will be used in lieu of spanish.

There is still some fall through to our language files. If the .local version does not include the value for a specific language key (for example, a newly added key), then the version from what we distribute will be used. If there is not a value in either version, then the English version is used.

All I want with these questions is to understand how languages are managed in cPanel, in order to do a cool spanish translation.

Thank you.
 

Kent Brockman

Well-Known Member
PartnerNOC
Jan 20, 2008
1,255
60
178
Buenos Aires, Argentina
cPanel Access Level
Root Administrator
Are you creating your files on a Windows machine?
Yes, I do. Although I am routinely accustomed to work with files without extension, so this won't be a problem to me. Is there anything I should be aware of when editing lang files on a Windows based system?


In general, files we distribute are over-written during a upcp if:

1 . We distribute a new version
2. The local file differs from the one on the update server

I don't recall off-hand. The language system is not my forte.
ok, is there anybody else at the cPanel team for whom the lang system be his forte, in order to give me some more advise?



Files that end in .local are assumed to be something put in place by an administrator and are not touched (this goes beyond the Language system). .local files over ride what we provide.

Hence spanish.local will be used in lieu of spanish.

There is still some fall through to our language files. If the .local version does not include the value for a specific language key (for example, a newly added key), then the version from what we distribute will be used. If there is not a value in either version, then the English version is used.

I have almost completely translated/corrected the spanish lang file. How can I do to send it to cPanel for analyisis and deployment before future updates kill my enhancements? The spanish version actually being installed at cPanel is simply terrific. Unpleasant is the correct word. I have corrected about 1600 entries and the works will continue since I need a decent spanish version to be offered to my customers. At the same time, all the other spanish admins will benefit with this version :)

And one more question: How do you deal with new lang strings coming in future releases? how is this integrated with the existing lang files?
 

AlexV.

Well-Known Member
Jun 15, 2006
212
1
168
Kent:

They are manually uploaded and synchronized.

This is where the language files live within our update servers:
http://httpupdate.cpanel.net/cpanelsync/EDGE/x3/lang/

Feel free to open a ticket or facilitate the improved language file to one of us and we can forward it to the person in charge of updating those files.
 
Last edited: