Problem with translation

cancel
Showing results for 
Search instead for 
Did you mean: 
akafortes
Active Member II

Problem with translation

Jump to solution

Hello,

does anyone have any experience with how the translation of Alfresco works?

Let me explain my situation and the problem I'm having.

I have downloaded the Greek translation from Alfresco language packs nightly builds.

Thanks to Axel Faust, from an older question I had (Changing the Alfresco Share language), I was able to apply the translation.

Then Ι changed my browser's locale to see if the translation was OK.

It was generally in a good state but a few things were missing, for example in the Header menu.

Alfresco_header

"Home", "My Files", "Shared Files", "Sites", "Tasks" are not translated. So I decided to unpack the JARs and make the chages myself. The translationed text is written in Unicode format.

Looking around the files I found out that the labels for the Header menu appeared in many different files and I don't know why it's that way, but nevertheless, all the labels for the header menu that I could find were translated and in unicode format. For example:

header.sites.label=\u0394\u03b9\u03ba\u03c4\u03c5\u03b1\u03ba\u03bf\u03af \u03a4\u03cc\u03c0\u03bf\u03b9
header.sites.description=\u0394\u03b9\u03ba\u03c4\u03c5\u03b1\u03ba\u03bf\u03af \u03a4\u03cc\u03c0\u03bf\u03b9‍‍

I have looked in almost all files looking for "Home" or "Sites" to see if I can find it somewhere that is not converted in Unicode, or not tranlated at all, but I couldn't find it which confuses me even more.

Why isn't the translated text being applied?

Am I missing something with how the translation is supposed to work?
Does the whole implementation have to be translated for it to work properly? (There are many parts that are still in English, in the translation files)

Please help!

1 Solution

Accepted Solutions
akafortes
Active Member II

Re: Problem with translation

Jump to solution

After searching around for quite a bit I found out that for the Aikau translations to work properly you have to specify the Aikau verion you use in Alfresco, in the translation packages. 

Unfortunatelly I can no longer locate the source of that information, sorry.

For example if you use aikau-1.0.101.3 in your Alfresco, then inside the translation JAR you must have a 1.0.101.3 folder under aikau, like the following

share-el/META-INF/js/aikau/1.0.101.3/‍‍

"share-el" is the unpacked JAR from the greek translation package I downloaded, for the translation of share ui.

Checking the translation package I got, I saw that the Aikau version translated was 1.0.101.3.

From this post How replace new aikau version with old aikau version and thanks to the answers of Axel Faust‌ and Dave Draper‌ I found out what I had to do make the translation work.

I checked the following path

/opt/alfresco/tomcat/webapps/share/WEB-INF/lib‍/‍

There I found out that my Alfresco installation had 1.0.101.10 version of Aikau.

So I downloaded aikau-1.0.101.3.jar from the Maven repository link provided by Dave Draper‌ and as Axel Faust suggested, replaced the existing aikau version. I restarted the server and the translation was applied.

I know it's not a good practice to downgrade but at least this way I don't have to mess with building the translation packages on my own.

Thanks again for your answers and your time everyone Smiley Happy

View solution in original post

8 Replies
afaust
Master

Re: Problem with translation

Jump to solution

Which files specifically did you end up customising / overriding? As far as I can see, header.sites.label is managed via the slingshot resource bundle and it should be sufficient for you to provide a slingshot_et.properties in webapps/share/WEB-INF/classes/alfresco/messages/ (or customise the existing one from the language pack)

akafortes
Active Member II

Re: Problem with translation

Jump to solution

Hello again Axel Smiley Happy

for example, for the "sites" I have found, in the translation JAR for share, the following two files:

share-el\alfresco\site-webscripts\org\alfresco\share\imports\share-header.lib_el.properties‍
share-el\alfresco\messages\slingshot_el.properties‍‍‍‍

In "slingshot_el.properties", as you said, I found the "header.sites.label" and "header.sites.description" which are both translated and converted to Unicode.
In "share-header.lib_el.properties‍", I found "header.menu.sites.label", again translated and converted to Unicode.

EDIT : I forgot to mention that both of these properties have the same translation.

afaust
Master

Re: Problem with translation

Jump to solution

Ah, right. The share-header translations are relevant for the new Aikau-based header (Alfresco 4.2+) and the slingshot ones are more for the legacy header. Still safe to adapt both of them.

akafortes
Active Member II

Re: Problem with translation

Jump to solution

Thank you for your answer Axel,

the problem is that I have both values translated and converted in Unicode, as they are supposed to be converted and I still don't get the translated values on the site.

Is it possible that there is something wrong in some other file of the translation package(or even those files) and that is stopping the rest of the translation of being applied?

douglascrp
Advanced II

Re: Problem with translation

Jump to solution

I believe you will have to follow the link below in order to have a new language inside Share using Aikau.

Additional Language Pack Support · Alfresco/Aikau Wiki · GitHub 

And it will be worth reading this about alfresco 5.0d header menu translations  

akafortes
Active Member II

Re: Problem with translation

Jump to solution

Hello Douglas, thank you for your answer. 

What I've been doing so far in order to translate missing strings was to download the nightly builds of the translation packages,browse the properties files in these JARs and translate something that was missing.

I'm using Total Commander which allows me to browse the packed JAR files and after editing on of the files in the JAR, Total Commander asks me if I want to repack the JAR.

I've used this method and it worked fine in other instances where I had to translate strings in Alfresco, without any problem.

Do I have to do something differently for Aikau to work properly?

douglascrp
Advanced II

Re: Problem with translation

Jump to solution

Yes, for Aikau you have to do something different, but well documented at Additional Language Pack Support · Alfresco/Aikau Wiki · GitHub 

akafortes
Active Member II

Re: Problem with translation

Jump to solution

After searching around for quite a bit I found out that for the Aikau translations to work properly you have to specify the Aikau verion you use in Alfresco, in the translation packages. 

Unfortunatelly I can no longer locate the source of that information, sorry.

For example if you use aikau-1.0.101.3 in your Alfresco, then inside the translation JAR you must have a 1.0.101.3 folder under aikau, like the following

share-el/META-INF/js/aikau/1.0.101.3/‍‍

"share-el" is the unpacked JAR from the greek translation package I downloaded, for the translation of share ui.

Checking the translation package I got, I saw that the Aikau version translated was 1.0.101.3.

From this post How replace new aikau version with old aikau version and thanks to the answers of Axel Faust‌ and Dave Draper‌ I found out what I had to do make the translation work.

I checked the following path

/opt/alfresco/tomcat/webapps/share/WEB-INF/lib‍/‍

There I found out that my Alfresco installation had 1.0.101.10 version of Aikau.

So I downloaded aikau-1.0.101.3.jar from the Maven repository link provided by Dave Draper‌ and as Axel Faust suggested, replaced the existing aikau version. I restarted the server and the translation was applied.

I know it's not a good practice to downgrade but at least this way I don't have to mess with building the translation packages on my own.

Thanks again for your answers and your time everyone Smiley Happy