Locale Editor - Translating to Portuguese adds backslashes

Jul 20, 2016
6
0
1
Portugal
cPanel Access Level
Root Administrator
Hi all,

I've been trying to make a full translation of WHM and cPanel to standard Portuguese.
First I've tried to download the XML and translate the file locally then upload. Right after the upload all looks OK, but overnight something happens that adds backslashes to the translated text (eg. "Anfitriões adicionais\\ que enviam e-mail") and in other cases the translation is reverted to it's original key, in English.

I've tried to use the Editor in WHM, but the result is just the same. Has this happened to anyone before? How can I resolve this?

Best Regards,
João Clérigo
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Hello,

Which version of cPanel & WHM are you seeing this on?

Also, which locale are you modifying (e.g. pt_pt)?
 
Jul 20, 2016
6
0
1
Portugal
cPanel Access Level
Root Administrator
Hello,

currently using CLOUDLINUX 6.8 x86_64 – WHM 56.0 (build 28).
Locale pt_pt.

In XML header:
<file datatype="plaintext" original="cPanel Locale Export" source-language="en" target-language="pt">

In the locale Editor:
Portuguese (português)

Best Regards,
João Clérigo
 
Jul 20, 2016
6
0
1
Portugal
cPanel Access Level
Root Administrator
Hi again,

just to add a note that, for each day that is passes is keeps adding slashes:
"Anfitriões adicionais\\\\ que enviam e-mail para os seus domínios (A):"

It started with one, two, now four, I guess tomorrow will be eight...

Best Regards,
João Clérigo
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

Would you mind opening a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 
Jul 20, 2016
6
0
1
Portugal
cPanel Access Level
Root Administrator
Hello,

support has reached me and they managed to trace and replicate the problem.

The cPanel support followed these steps for replicating the issue on a test server:

-Setup a 11.56 server with CloudLinux and install/initialize cagefs.
-Open "WHM >> Locales >> Edit a Locale" and select the standard Portuguese locale in the Locale Editor.
-Find this field: 'Warning: cPanel is unable to verify that this server is an authoritative nameserver for “[_1]”.'
-Copy this into the "Custom Field" value for this field.
-Observe that this updated your "/var/cpanel/locale.local/pt.yaml" file:

===================================
# cat /var/cpanel/locale.local/pt.yaml
---
"CPU Usage": 'Uso da CPU'
"Entry Processes": 'Processos de entrada'
"I/O Usage": 'Uso E/S'
"Number of Processes": 'Numero de processos'
"Physical Memory Usage": 'Uso de memória física'
"Resource Usage": 'Uso da Recursos'
"Select PHP Version": 'Selecionar PHP Versão'
"Virtual Memory Usage": 'Uso de memoria virtual'
"Warning: cPanel is unable to verify that this server is an authoritative nameserver for “[_1]”.": 'Warning: cPanel is unable to verify that this server is an authoritative nameserver for “[_1]”.'
"collapse stats": 'recolhe estatísticas'
"expand stats": 'expande estatísticas'
"inodes": 'Uso de arquivo'
===================================

-Run "/scripts/postupcp"
-Check the yaml file:

===================================
# cat /var/cpanel/locale.local/pt.yaml
"CPU Usage": "Uso da CPU"
"Entry Processes": "Processos de entrada"
"I/O Usage": "Uso E/S"
"Number of Processes": "Numero de processos"
"Physical Memory Usage": "Uso de memória física"
"Resource Usage": "Uso da Recursos"
"Select PHP Version": "Selecionar PHP Versão"
"Virtual Memory Usage": "Uso de memoria virtual"
"Warning: cPanel is unable to verify that this server is an authoritative nameserver for “[_1]”.": "Warning:\\ cPanel is unable to verify that this server is an authoritative nameserver for\\ “[_1]”."
"collapse stats": "recolhe estatísticas"
"expand stats": "expande estatísticas"
"inodes": "Uso de arquivo"
===================================

-Load the locale in a cPanel account as see that it is formatted as:

===================================
Warning:\\ cPanel is unable to verify that this server is an authoritative nameserver for\\ “[_1]”.
===================================

The support has filed a case with their developers regarding this issue, ID CPANEL-7700.
cPanel support told me that this a very specific bug in CloudLinux scripts and that there is a high likelihood that the developers will deem this an issue that they need to resolve.

I've opened a ticket also in Cloudlinux, with these results. #UUT-326-87752.

Best Regards,
João Clérigo
 

Attachments

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
I've opened a ticket also in Cloudlinux, with these results. #UUT-326-87752.
I'm happy to see our support team was able to determine the cause of the problem. Feel free to update this thread with the outcome of your support request with CloudLinux.

Thank you.
 
Jul 20, 2016
6
0
1
Portugal
cPanel Access Level
Root Administrator
Hello,

Cloudlinux reply:

--
Hello,

I was able to reproduce the issue on our test server. It looks like it goes to "/usr/share/l.v.e-manager/cpanel/utils/merge_locales.py" file. I have create bugreport to our developers about it. I worry we have no nice solution for this case however as a draft workaround you may want to modify postupcp script so it copy /var/cpanel/locale.local/pt.yaml at the begining then restore it after l.v.e-manager_postupcp_hook.sh executed.

Thanks for bringing attention to this.
--

Best Regards,
João Clérigo