[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Re: Antwort: Multilingual site



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 at eng.auth.gr]
>> *Sent:* 19 May 2015 10:40
>> *To:* John Salter
>> *Cc:* eprints-tech at 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 at ecs.soton.ac.uk
>>     <mailto:eprints-tech-bounces at ecs.soton.ac.uk>
>>     [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of
>>     *George Mamalakis
>>     *Sent:* 15 May 2015 14:26
>>     *To:* eprints-tech at ecs.soton.ac.uk
>>     <mailto:eprints-tech at 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 at ecs.soton.ac.uk
>>         <mailto:eprints-tech-bounces at ecs.soton.ac.uk>
>>         [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of
>>         *George Mamalakis
>>         *Sent:* 15 May 2015 13:13
>>         *To:* eprints-tech at ecs.soton.ac.uk
>>         <mailto:eprints-tech at 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 at id.uzh.ch
>>         <mailto:martin.braendle at 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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20150520/5c10cf95/attachment-0001.html