EPrints Technical Mailing List Archive

Message: #04267


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Multilingual site


Hi George 
I Have already translated Eprints 3.3.13 in Greek. The old translation from Elisavet was for my library's server back in 2008. If you want the files I can send you a tar.gz with all translations. I was planning to pack them up and make the epm file to upload it to bazaar but I haven't find free time to do it.
Kostas

Στις Παρασκευή, 22 Μαΐου 2015, ο χρήστης George Mamalakis <mamalos@eng.auth.gr> έγραψε:
Hi Adam!

First of all, I have to admit that I am very glad knowing that your team
wishes to get involved in this venture! Wrt to your repository comment,
our team has access to all needed resources (servers, etc.) to move on,
but if you feel it would help if we performed the translation on one of
your sites (to be accessible from community members for example?), then
I have no reason to decline your offer.

On the other hand, the part I thing you could really be helpful to us,
is in helping us understand (either via this list, or privately -in
order not to flood the list with questions/answers-) what exactly needs
to be done in order to generate a translation package. For example, you
could shed some light on the questions I asked in my previous mail, for
a start. When this will be established, our team will immediately start
the translation process.

After the translation will be completed, I'll post the procedure we
followed on eprints' wiki so others can follow.

Thanks again for your interest and I am looking forward to moving on
with this project!

--
George Mamalakis

IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
PhD (Aristotle Univ. of Thessaloniki),
MSc (Imperial College of London)

School of Electrical and Computer Engineering
Aristotle University of Thessaloniki

phone number : +30 (2310) 994379




On 22/05/2015 04:51 μμ, Field A.N. wrote:
>       Community led translation packs are something that has been on my to-do list of things support since I started in my community lead role.  I would be eager to get involved in moving forwards with this.
>
>       Firstly, though the phrases are stored in multiple files, there is actually only one list of phrases.  All of these will need to be translated, but it might work better to translate an instance of a repository so all phrases can be seen in context.  Or so I imagine -- I've never translated anything before.
>
>       Please let me know how I can help with this.  At the very least I can offer you a repository to do the translating on, but I can also offer technical insight on any questions you may have.
>
> --
> Adam Field
> Business Relationship Manager and Community Lead
> EPrints Services
> +44 (0)23 8059 8814
>
>
>
>
>
> On 20 May 2015, at 15:43, George Mamalakis wrote:
>
>> We have decided to update Eprints' Greek translation and publish it as a bazaar package. The current translation includes lots of phrases-files, a few more than the Spanish translation. Similarly, Eprints' translation wiki (http://wiki.eprints.org/w/How_to_translate_eprints#List_of_files_to_Translate) mentions many phrases-files that need to be translated. On the other hand, the list provided by the wiki is not valid for v.3.3.14, where only a few phrases-files exist, namely:
>>
>> lib/lang/en/phrases/bazaar.xml
>> lib/lang/en/phrases/xapian_warning.xml
>> lib/lang/en/phrases/system.xml
>>
>> and:
>>
>> lib/defaultcfg/lang/en/phrases/local.xml
>> lib/defaultcfg/lang/en/phrases/zz_webcfg.xml
>>
>> Static files on the other hand have been increased in number (a bit):
>>
>> lib/defaultcfg/lang/en/static/policies.xpage
>> lib/defaultcfg/lang/en/static/vlit.xpage
>> lib/defaultcfg/lang/en/static/error401.xpage
>> lib/defaultcfg/lang/en/static/help
>> lib/defaultcfg/lang/en/static/help/index.xpage
>> lib/defaultcfg/lang/en/static/index.xpage
>> lib/defaultcfg/lang/en/static/contact.xpage
>> lib/defaultcfg/lang/en/static/information.xpage
>>
>> That said, what should we do in order to provide a new Greek translation? Just translate the files listed in the newest version? And if so, how can we take advantage of the already Greek translated phrases-files (is there an pattern we can follow, or we'll just have to concatenate all previous phrases-files into system.xml and translate whatever is missing)?
>>
>> Thanks again!
>>
>> On 19/05/2015 01:09 μμ, George Mamalakis wrote:
>>> John thanks for your prompt answer!
>>>
>>> Just before you answered I had managed to install Greek language pack "correctly", meaning this time I copied the translation files in cfg directory (both for phrases and static), I regenerated everything, and now the Greek Home page appears as it should!
>>>
>>> Thanks for all your help...I've no idea what I did differently this time, but since it worked I think I'm fine (plus I've learned a few things wrt to eprints translation).
>>>
>>> Cheers!
>>>
>>> George.
>>>
>>> On 19/05/2015 01:02 μμ, John Salter wrote:
>>>> Hi George,
>>>> I’ll start with (hopefully) the easier one (2):
>>>> To get the flags working, install this: http://bazaar.eprints.org/224/
>>>> The lang_ES.png is the image used for the bazaar package itself.
>>>>
>>>> It looks like the Spanish language pack doesn’t include any of the ‘static’ files e.g.
>>>> lang/en/static/index.xpage (English homepage)
>>>> lang/es/static (doesn’t exist).
>>>>
>>>> The static pages are generated from these .xpage files.
>>>>
>>>> I’d start by (on your local machine – as it’s tricky to do this on demoprints) copy the ~/lib/lang/en/static directory to ~/lib/lang/es/static
>>>> Make some obvious edits in the index.xpage
>>>> Try accessing the Spanish homepage again.
>>>> If this works, it shows that there are elements missing from the Spanish pack – that you will want to include in the Greek version!
>>>>
>>>> Cheers,
>>>> John
>>>>
>>>>
>>>> From: George Mamalakis [mailto:mamalos@eng.auth.gr]
>>>> Sent: 19 May 2015 10:40
>>>> To: John Salter
>>>> Cc: eprints-tech@ecs.soton.ac.uk
>>>> Subject: Re: [EP-tech] Re: Antwort: Multilingual site
>>>>
>>>> Hi John,
>>>>
>>>> I've followed your suggestion on installing the Spanish language pack from the Bazaar, both on my machine and on the demoprints site. On both systems I faced the same problems:
>>>>
>>>> 1) Spanish Home page (Inicio in the Spanish menu) returns a 404 error. This time, though, I see that even though (in my localsite) I've run bin/generate_static mysitename, archives/mysitename/html/es/index.* files have not been generated (which I suppose has to do with the Spanish translation not having translated it?).
>>>>
>>>> 2) Spanish flag and "eliminate cookies" image won't show on the menu bar, since eprints is looking for an images/flats/es.png file whereas the plugin creates a lang_ES.png file. I assume this problem can be easily resolved by copying lang_ES.png to the correct location with the correct filename?
>>>>
>>>> Thanks again for the time and help,
>>>>
>>>> George.
>>>>
>>>> On 15/05/2015 06:35 μμ, John Salter wrote:
>>>> Hi,
>>>> I think that everything that is needed is in the Bazaar example I linked to – and possibly some of your steps have stopped things working!?
>>>> - new versions of EPrints already have a ‘set_lang’ script in cgi (I wonder if you’ve copied an older version over the top of this current version (see: https://github.com/eprints/eprints/blob/3.3/cgi/set_lang for the current one).
>>>>
>>>> I’ve just enabled the Spanish language pack on http://demoprints.eprints.org/ (you can create an admin account on there, and install things :o).
>>>> The link to change languages appears without doing anything to the templates.
>>>>
>>>> So maybe start by reverting your change to set_lang   and see how that helps.
>>>>
>>>> Cheers,
>>>> John
>>>>
>>>>
>>>>
>>>> From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of George Mamalakis
>>>> Sent: 15 May 2015 14:26
>>>> To: eprints-tech@ecs.soton.ac.uk
>>>> Subject: [EP-tech] Re: Antwort: Multilingual site
>>>>
>>>> John Hi,
>>>>
>>>> Yes I've included el in the specific variable. To make things easier for you, I'll repost what I've posted in stackoverflow:
>>>>
>>>> "I have downloaded and unzipped the greek translation (for an earlier version, 3.0, from the official site) on the folders that seemed appropriate, I have placed the set_lang script in the cgi folder and changed the template to use it, I have changed languages.pl to include 'el' as well, I have re-generated statics and now the html folder contains my Greek index.html, I have restarted apache"
>>>>
>>>> Thank you for prompting me on the Spanish Language Pack, I'll see what changes I'll have to still make in order to complete the Greek translation. But before that, I hope I'll manage to see the translated site :).
>>>>
>>>> As far as the plugin is concerned: apart from copying the set_lang script on the cgi folder and adding appropriate content in the template to use it (by calling cgi/set_lang?langid=el) is there something else that needs to be done?
>>>>
>>>> Otherwise: as far as the core system is concerned. How does it know that it is "ready" to start servicing a multilingual site? Is it enough to add an additional language in $c->{languages} (of ~/archives/ARCHIVEID/cfg/cfg.d/languages.pl) and copy the translation file in the cfg/lang/XX folder? Or does it need something additional that I am missing?
>>>>
>>>> Thanks again for your time and help!
>>>>
>>>> On 15/05/2015 03:51 μμ, John Salter wrote:
>>>> Hi George,
>>>> Have you added anything to ~/archives/ARCHIVEID/cfg/cfg.d/languages.pl?
>>>> By default it’s something like:
>>>> $c->{defaultlanguage} = 'en';
>>>> $c->{languages} = [ 'en' ];
>>>>
>>>> You should add the new language in  the second option e.g.:
>>>> $c->{languages} = [ 'en', 'el' ];
>>>>
>>>> The newer way of doing things is shown in this EPrints Bazaar package (unfortunately for Spanish, not Greek): http://bazaar.eprints.org/227/ . In the file x_lang_es.pl, it achieves the same thing with:
>>>> push @{$c->{languages}},'es';
>>>>
>>>> I’d take this Bazaar package as a base for how to do things – e.g. which files would need to be translated.
>>>> Many of the phrases would exist in the 3.0 translation you’ve installed – but some won’t.
>>>>
>>>> Let me know if that gets you any further down the path – and we can go from there!
>>>>
>>>> Cheers,
>>>> John
>>>>
>>>> PS I don’t have any real experience of working with multi-lingual repositories – but have tried to learn bits!
>>>>
>>>>
>>>> From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of George Mamalakis
>>>> Sent: 15 May 2015 13:13
>>>> To: eprints-tech@ecs.soton.ac.uk
>>>> Subject: [EP-tech] Re: Antwort: Multilingual site
>>>>
>>>> Martin, hi and thanks for your answer!
>>>>
>>>> I have generated static, the html folder of my deposit has been populated with the correct html files (I've looked into their content), and when I select the Greek language through an href (on an image), as I said, it displays the "language has changed" page in Greek, but when I click on any link (menu, whatever) the content served is in English.
>>>>
>>>> I have used Chrome, Firefox and Opera and it won't work in any of them.
>>>>
>>>> I have to re-inform you that I installed the Greek translation (which is for a previous version of eprints, 3.0) without using any guide, which means that I just copied the folders contained in the zip file where it seemed appropriate (./lib/defaultcfg and ./lib/lang in the eprints folder, and cfg/lang/el in the specific archive). As I read in eprints' documentation regarding previous versions (<3), a few stuff needed to be done in order to install translations, that didn't seem "compatible" with my version. Maybe I am missing something here...
>>>>
>>>> If not, then I am not sure what part of eprints' core functionality fails and doesn't load the language correctly or if the problem is related to the set_lang script.
>>>>
>>>> Thanks again for your answer!
>>>>
>>>> PS. I wasn't sure about the activity of this list, so a few hours ago (before receiving your answer) I started an analogous question in stackoverflow: http://stackoverflow.com/questions/30254057/eprints-multilingual-site
>>>>
>>>> On 15/05/2015 11:03 πμ, martin.braendle@id.uzh.ch wrote:
>>>> Hi,
>>>>
>>>> two questions come to my mind:
>>>>
>>>> - did you run bin/generate_static  your_repo --prune    ?
>>>> - which browser did you use to test? Safari sends a slightly different Accept-Language token in the HTTP header, which is not properly recognized by Repository.pm.
>>>>
>>>> A possible patch is:
>>>>
>>>> Modified: trunk/src/core/perl_lib/EPrints/Repository.pm
>>>> ===================================================================
>>>> --- trunk/src/core/perl_lib/EPrints/Repository.pm 2014-08-12 12:23:41 UTC (rev 857)
>>>> +++ trunk/src/core/perl_lib/EPrints/Repository.pm 2014-09-10 13:00:28 UTC (rev 858)
>>>> @@ -2264,6 +2264,8 @@
>>>> foreach my $browser_lang ( split( /, */, $accept_language ) )
>>>> {
>>>> $browser_lang =~ s/;.*$//;
>>>> + # UZH CHANGE ZORA-274 fix for Safari browser 2014/08/15/mb
>>>> + $browser_lang =~ s/-.*$//;
>>>> push @prefs, $browser_lang;
>>>> }
>>>> }
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Martin
>>>>
>>>> --
>>>> Dr. Martin Brändle
>>>> Zentrale Informatik
>>>> Universität Zürich
>>>> Winterthurerstr. 190
>>>> CH-8057 Zürich
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> George Mamalakis
>>>>
>>>> IT and Security Officer,
>>>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>>>> PhD (Aristotle Univ. of Thessaloniki),
>>>> MSc (Imperial College of London)
>>>>
>>>> School of Electrical and Computer Engineering
>>>> Aristotle University of Thessaloniki
>>>>
>>>> phone number : +30 (2310) 994379
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** Archive: http://www.eprints.org/tech.php/
>>>> *** EPrints community wiki: http://wiki.eprints.org/
>>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> George Mamalakis
>>>>
>>>> IT and Security Officer,
>>>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>>>> PhD (Aristotle Univ. of Thessaloniki),
>>>> MSc (Imperial College of London)
>>>>
>>>> School of Electrical and Computer Engineering
>>>> Aristotle University of Thessaloniki
>>>>
>>>> phone number : +30 (2310) 994379
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>> *** Archive: http://www.eprints.org/tech.php/
>>>> *** EPrints community wiki: http://wiki.eprints.org/
>>>> *** EPrints developers Forum: http://forum.eprints.org/
>>>>
>>>>
>>>>
>>>> --
>>>> George Mamalakis
>>>>
>>>> IT and Security Officer,
>>>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>>>> PhD (Aristotle Univ. of Thessaloniki),
>>>> MSc (Imperial College of London)
>>>>
>>>> School of Electrical and Computer Engineering
>>>> Aristotle University of Thessaloniki
>>>>
>>>> phone number : +30 (2310) 994379
>>>>
>>>>
>>>
>>> --
>>> George Mamalakis
>>>
>>> IT and Security Officer,
>>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>>> PhD (Aristotle Univ. of Thessaloniki),
>>> MSc (Imperial College of London)
>>>
>>> School of Electrical and Computer Engineering
>>> Aristotle University of Thessaloniki
>>>
>>> phone number : +30 (2310) 994379
>>>
>>>
>>>
>>>
>>>
>>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>>>
>>> *** Archive:
>>> http://www.eprints.org/tech.php/
>>>
>>> *** EPrints community wiki:
>>> http://wiki.eprints.org/
>>>
>>> *** EPrints developers Forum:
>>> http://forum.eprints.org/
>>
>> --
>> George Mamalakis
>>
>> IT and Security Officer,
>> Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki),
>> PhD (Aristotle Univ. of Thessaloniki),
>> MSc (Imperial College of London)
>>
>> School of Electrical and Computer Engineering
>> Aristotle University of Thessaloniki
>>
>> phone number : +30 (2310) 994379
>>
>>
>>
>> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive: http://www.eprints.org/tech.php/
>> *** EPrints community wiki: http://wiki.eprints.org/
>> *** EPrints developers Forum: http://forum.eprints.org/
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
>

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/