OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS2.2 font size settings do not work in fr_CA locale

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

OJS2.2 font size settings do not work in fr_CA locale

Postby zharel » Sat Jan 12, 2008 11:18 am

Hi, the new font size settings work nicely in the en_US locale, and fail to work in the fr_CA locale. Checking the java script .../plugins/blocks/fontSize/sizer.js noticed it is locale independent. But I found the reason looking at the HTML source of a typical page: The titles of the fontSize style sheets in French do not match the argument of the invocations of setFontSize in the side bar:

Here is a clip from the HTML head:

Code: Select all
<!-- Add stylesheets for the font sizer -->
<link rel="alternate stylesheet" title="Petit" href=".../plugins/blocks/fontSize/small.css" type="text/css" />
<link rel="stylesheet" title="Moyen" href=".../plugins/blocks/fontSize/medium.css" type="text/css" />
<link rel="alternate stylesheet" title="Large" href=".../plugins/blocks/fontSize/large.css" type="text/css" />


And now to a clip from the sidebar:

Code: Select all
<a href="#" onclick="setFontSize('Petite');" class="icon"><img src=".../plugins/blocks/fontSize/small.gif" alt="Petit" /></a>&nbsp;
<a href="#" onclick="setFontSize('Moyenne');" class="icon"><img src=".../plugins/blocks/fontSize/medium.gif" alt="Moyen" /></a>&nbsp;
<a href="#" onclick="setFontSize('Grande');" class="icon"><img src=".../plugins/blocks/fontSize/large.gif" alt="Large" /></a>


You see the difference Petit vs. Petite, Moyen vs. Moyenne, Large vs. Grande. This "gender" difference makes all the troubles :wink:

Best,

Zvi
--
Zvi Har’El
Founding Editor
Verniana—Jules Verne Studies/Étude Jules Verne
JV.Gilead.org.il/studies
ISSN 1565-8872
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: OJS2.2 font size settings do not work in fr_CA locale

Postby zharel » Sat Jan 12, 2008 12:15 pm

Here is a patch which fixes the problem:

Code: Select all
--- plugins/blocks/fontSize/locale/fr_CA/locale.xml.~20071210192350~    2007-12-10 21:23:50.000000000 +0200
+++ plugins/blocks/fontSize/locale/fr_CA/locale.xml     2008-01-12 21:10:15.000000000 +0200
@@ -16,7 +16,7 @@
        <message key="plugins.block.fontSize.displayName">Bloc de taille de la police de caractères</message>
        <message key="plugins.block.fontSize.description">Ce plugiciel offre la taille de police de caractères dans l'encadré latéral.</message>
        <message key="plugins.block.fontSize.title">Taille de la police de caractères</message>
-       <message key="plugins.block.fontSize.small.alt">Petite</message>
-       <message key="plugins.block.fontSize.medium.alt">Moyenne</message>
-       <message key="plugins.block.fontSize.large.alt">Grande</message>
+       <message key="plugins.block.fontSize.small.alt">Petit</message>
+       <message key="plugins.block.fontSize.medium.alt">Moyen</message>
+       <message key="plugins.block.fontSize.large.alt">Large</message>
 </locale>
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: OJS2.2 font size settings do not work in fr_CA locale

Postby jmacgreg » Sat Jan 12, 2008 2:31 pm

Hi Zvi,

Many thanks for the patch! I'll make sure it gets submitted.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OJS2.2 font size settings do not work in fr_CA locale

Postby zharel » Sun Jan 13, 2008 2:03 pm

A patch is also needed for the Spanish locale:

Code: Select all
--- /usr/local/src/build/ojs-2.2/plugins/blocks/fontSize/locale/es_ES/locale.xml   2007-12-10 21:23:50.000000000 +0200
+++ /home/rl/www/JulesVerne/studies/plugins/blocks/fontSize/locale/es_ES/locale.xml   2008-01-13 22:57:14.000000000 +0200
@@ -17,6 +17,6 @@
    <message key="plugins.block.fontSize.description">Este Complemento modifica el tamaño de fuente de la barra lateral.</message>
    <message key="plugins.block.fontSize.title">Tamaño de Fuente</message>
    <message key="plugins.block.fontSize.small.alt">Pequeño</message>
-   <message key="plugins.block.fontSize.medium.alt">Mediano</message>
+   <message key="plugins.block.fontSize.medium.alt">Medio</message>
    <message key="plugins.block.fontSize.large.alt">Grande</message>
 </locale>


All the best,

Zvi.
zharel
 
Posts: 29
Joined: Tue Oct 30, 2007 10:00 am
Location: Haifa, Israel

Re: OJS2.2 font size settings do not work in fr_CA locale

Postby jmacgreg » Sun Jan 13, 2008 7:06 pm

Hi Zvi,

I posted the original fr_CA as a bug, and one of our developers took it on. Michael actually came up with a different solution, which you can see here (includes a patch):

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=3221

I'll let him know about the Spanish error as well.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 15 guests