Localization PT_BR - Brazilian Portuguese

The UI shows the Portuguese option, however when selecting it the UI is not translated.
I looked in one of the threads and found a link to openboxes/grails-app/i18n/messages_pt.properties. This file is in English, so I imagine we don’t have the UI translated to Portuguese yet.
If I translate, can I import it into the system or do I have to wait for a new version?
Thanks

That is correct. We don’t have a Portuguese translation yet but would love a contribution. And yes you could upload the translation to your system as you are working on the translations.

1 Like

Ok, so let’s work on it.

Sounds good. Let me know if you need any assistance. There are a few threads in this discussion forum that highlight ways to do the translation, but we could also schedule time to discuss the process to make sure it’s clear.

Hi,
I saw a video using google translate but I won’t use it, sometimes it makes a weird translation that doesn’t match what we use here. I’ve already made a copy of the file and I’m going to start translating the 2100 lines (ouch :slight_smile: ). The next steps, on how to embed this file in the system, I will probably need help.
I keep you informed.

In time,
do I have to use some special notation for special characters?
example:
access.accessDenied.label=Acesso Negado
no.access.label=Sem acesso
access.accessDenied.message=Acesso para ação {0} não foi permitida para usuário {1}. \r\nFavor entrar em contato com o administrador {2}.

I saw a video using google translate but I won’t use it, sometimes it makes a weird translation that doesn’t match what we use here.

I recommend using Google Translate to provide a baseline to get you started. But you’re absolutely correct. Google Translate can be wrong more often than not.

I’ve already made a copy of the file and I’m going to start translating the 2100 lines (ouch :slight_smile: ). The next steps, on how to embed this file in the system, I will probably need help.

Yeah there’s a lot there. Copy the messages.properties file into messages_pt_BR.properties to make sure you have all the translation keys.

In the application, there are different mechanisms at work with the translations so you may see some inconsistencies / bugs / missing translations. We are currently working on a way to smooth out the process so let’s definitely keep in touch.

Edit: Fixed name of i18n properties file.

As far as I remember, you should not need to do anything on your end. If you’re not seeing characters displayed properly it’s likely a configuration issue on the server-side.

Where do I have to copy the translated file for? opt/tomcat/.grails???

When I said “configuration issue on the server-side” I was referring to a command line argument we might need to set in Tomcat in order for the special characters to be rendered properly.

As for where the i18n message properties file need to go … they’ll need to be included in the WAR file at deploy time. There’s no place (that I’m aware of) that you can copy them on the server.

That’s not entirely true as the files exist under the following directory after deploying the WAR file to Tomcat.

/opt/tomcat/webapps/openboxes/WEB-INF/grails-app/i18n

However, these files will be overwritten after every new deployment so it’s not a good idea to edit them at runtime.

You can also add / import custom translations into the database. Unfortunately, these translations only work for the non-React features. We’ll probably get it working with the React features in an upcoming version but I don’t want to overpromise.

So I think the best bet is to take a create a new file (messages_pt_BR.properties) copied from messages.properties and slowly work your way through. When you’re finished we can commit the file to Github and include it in the next release.

If you want to take a more iterative approach (i.e. feature by feature) then we can try to figure something out.

I copied the file to the folder and it works. I agree that it’s a point of attention for when I do a new deploy.
I started the translation by writing normally, (eg show history = mostrar histórico) but Tomcat doesn’t display the characters (ó) correctly. So I thought of using UTF-8 encoding directly in the translation (eg mostrar hist&#243rico) and that made the screen update correctly.
Once I have the file fully translated, I’ll send it to you. Yesterday I did the translations up to line 800.

I started the translation by writing normally, (eg show history = mostrar histórico) but Tomcat doesn’t display the characters (ó) correctly.

I would still recommend using the character as typed by your keyboard. I’ll try to figure out what we need to do to get Tomcat to display those accented characters properly.

Yesterday I did the translations up to line 800.

Oh wow, that’s really great progress.

Hi Justin, I finally finished the translation.
Do you want me to paste it here or send it by email?
If you prefer by email, pls indicate the address.
regards

Yeah, if you can upload it here that would be great. If not, you can send it to support@openboxes.com.

I’ve added a ticket to track the work required for supporting Portuguese locale / language.