Quantcast

locale data in style file

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

locale data in style file

Carles Pina
Hello,

I have a question for Rintze and Sebastian but I think that it's
interesting enough to be asked here in the list. Sorry for the length
of it, I wanted to explain all the problem...

I'm debugging a locales problem... and Frank and I are reading the
specification differently.

I'll explain using an example which I hope that will be clearer.

Let's say that we have vancouver.csl, which has:
  <locale xml:lang="en">
    <date form="text" delimiter=" ">
      <date-part name="year"/>
      <date-part name="month" form="short" strip-periods="true"/>
      <date-part name="day"/>
    </date>
    <terms>
      <term name="presented at">presented at</term>
      <term name="retrieved">available</term>
      <term name="section" form="short">sect.</term>
    </terms>
  </locale>

(and similar for "fr" and "de")

I instantiate citeproc-js indicating that I want to use es-ES

At the moment for, in vancouver.csl in the bibliography I have:
            <text term="retrieved" text-case="capitalize-first"/>
            <text term="from"/>

The output is:
a) "retrieved" term is translated as "available" (using the in-style
locale translation)
b) "from" term is translated as "a partir de" (from locales-esES.xml)

(so it says "available a partir de")

I expected all in Spanish. My logic was:
-try to use the in-style locale in Spanish for the term
-if not available try to localize the term using locale-es-ES.xml
-if not available there: use the default in-style locale
-else the locale-{default}.xml
(step number 3 would be optional but perhaps nice to have)

Basically, I expect that I could overwrite the locales-es-ES.xml in
the in-style locale section, based on each term (not all the es-ES
terms but only a set of terms).

The spec says:
http://citationstyles.org/downloads/specification.html#locale
"
Localization data, by default drawn from the "locales-xx-XX.xml"
locale files, may be redefined or supplemented with cs:locale
elements, which should be placed directly after the cs:info element.
"

Do you agree that this should happen? Or something else? (e.g. use the
default in-style translation before trying to use locale-es-ES?)

Thank you!

--
Carles Pina | Software Engineer
http://www.mendeley.com/profiles/Carles-Pina/

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

rmzelle
Administrator
That doesn't seem right. Did you see
http://citationstyles.org/downloads/specification.html#locale-fallback
?

It's my understanding that the following sequence should be followed
in retrieving the term translations:

1) term definitions in the style with xml:lang="es-ES"
2) term definitions in the style with xml:lang="es"
3) term definitions in the style without xml:lang
4) term definitions in locales-es-ES.xml
5) term definitions in locales-en-US.xml

Since 1-3 don't exist in vancouver.csl, the style should use the
translations from locales-es-ES.xml.

Rintze

On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]> wrote:

> Let's say that we have vancouver.csl, which has:
>   <locale xml:lang="en">
>     <date form="text" delimiter=" ">
>       <date-part name="year"/>
>       <date-part name="month" form="short" strip-periods="true"/>
>       <date-part name="day"/>
>     </date>
>     <terms>
>       <term name="presented at">presented at</term>
>       <term name="retrieved">available</term>
>       <term name="section" form="short">sect.</term>
>     </terms>
>   </locale>
>
> (and similar for "fr" and "de")
>
> I instantiate citeproc-js indicating that I want to use es-ES
>
> At the moment for, in vancouver.csl in the bibliography I have:
>             <text term="retrieved" text-case="capitalize-first"/>
>             <text term="from"/>
>
> The output is:
> a) "retrieved" term is translated as "available" (using the in-style
> locale translation)
> b) "from" term is translated as "a partir de" (from locales-esES.xml)
>
> (so it says "available a partir de")
>
> Do you agree that this should happen? Or something else? (e.g. use the
> default in-style translation before trying to use locale-es-ES?)

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

Sebastian Karcher
yup, what Rintze says.
Carles, are you saying that you're getting the "available a partir de" with citeproc-js? I tested this in Zotero (set to es-ES) and get the correct(-ish, but that's a different topic) "recuperado a partir de"

On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]> wrote:
That doesn't seem right. Did you see
http://citationstyles.org/downloads/specification.html#locale-fallback
?

It's my understanding that the following sequence should be followed
in retrieving the term translations:

1) term definitions in the style with xml:lang="es-ES"
2) term definitions in the style with xml:lang="es"
3) term definitions in the style without xml:lang
4) term definitions in locales-es-ES.xml
5) term definitions in locales-en-US.xml

Since 1-3 don't exist in vancouver.csl, the style should use the
translations from locales-es-ES.xml.

Rintze

On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]> wrote:
> Let's say that we have vancouver.csl, which has:
>   <locale xml:lang="en">
>     <date form="text" delimiter=" ">
>       <date-part name="year"/>
>       <date-part name="month" form="short" strip-periods="true"/>
>       <date-part name="day"/>
>     </date>
>     <terms>
>       <term name="presented at">presented at</term>
>       <term name="retrieved">available</term>
>       <term name="section" form="short">sect.</term>
>     </terms>
>   </locale>
>
> (and similar for "fr" and "de")
>
> I instantiate citeproc-js indicating that I want to use es-ES
>
> At the moment for, in vancouver.csl in the bibliography I have:
>             <text term="retrieved" text-case="capitalize-first"/>
>             <text term="from"/>
>
> The output is:
> a) "retrieved" term is translated as "available" (using the in-style
> locale translation)
> b) "from" term is translated as "a partir de" (from locales-esES.xml)
>
> (so it says "available a partir de")
>
> Do you agree that this should happen? Or something else? (e.g. use the
> default in-style translation before trying to use locale-es-ES?)

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel



--
Sebastian Karcher, PhD
Department of Political Science
Northwestern University

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

fbennett
Thanks for the feedback, all. I was in a rush out the door this
morning, and told Carles that it looked right (which it doesn't, of
course - I missed the forced locale of es-ES) and suggested he contact
the list.

I'll take a closer look in the hours.

Frank


On Fri, Jan 23, 2015 at 12:01 PM, Sebastian Karcher
<[hidden email]> wrote:

> yup, what Rintze says.
> Carles, are you saying that you're getting the "available a partir de" with
> citeproc-js? I tested this in Zotero (set to es-ES) and get the
> correct(-ish, but that's a different topic) "recuperado a partir de"
>
> On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]>
> wrote:
>>
>> That doesn't seem right. Did you see
>> http://citationstyles.org/downloads/specification.html#locale-fallback
>> ?
>>
>> It's my understanding that the following sequence should be followed
>> in retrieving the term translations:
>>
>> 1) term definitions in the style with xml:lang="es-ES"
>> 2) term definitions in the style with xml:lang="es"
>> 3) term definitions in the style without xml:lang
>> 4) term definitions in locales-es-ES.xml
>> 5) term definitions in locales-en-US.xml
>>
>> Since 1-3 don't exist in vancouver.csl, the style should use the
>> translations from locales-es-ES.xml.
>>
>> Rintze
>>
>> On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]>
>> wrote:
>> > Let's say that we have vancouver.csl, which has:
>> >   <locale xml:lang="en">
>> >     <date form="text" delimiter=" ">
>> >       <date-part name="year"/>
>> >       <date-part name="month" form="short" strip-periods="true"/>
>> >       <date-part name="day"/>
>> >     </date>
>> >     <terms>
>> >       <term name="presented at">presented at</term>
>> >       <term name="retrieved">available</term>
>> >       <term name="section" form="short">sect.</term>
>> >     </terms>
>> >   </locale>
>> >
>> > (and similar for "fr" and "de")
>> >
>> > I instantiate citeproc-js indicating that I want to use es-ES
>> >
>> > At the moment for, in vancouver.csl in the bibliography I have:
>> >             <text term="retrieved" text-case="capitalize-first"/>
>> >             <text term="from"/>
>> >
>> > The output is:
>> > a) "retrieved" term is translated as "available" (using the in-style
>> > locale translation)
>> > b) "from" term is translated as "a partir de" (from locales-esES.xml)
>> >
>> > (so it says "available a partir de")
>> >
>> > Do you agree that this should happen? Or something else? (e.g. use the
>> > default in-style translation before trying to use locale-es-ES?)
>>
>>
>> ------------------------------------------------------------------------------
>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>> GigeNET is offering a free month of service with a new server in Ashburn.
>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>> http://p.sf.net/sfu/gigenet
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>
>
>
>
> --
> Sebastian Karcher, PhD
> Department of Political Science
> Northwestern University
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

Carles Pina
Cool that we are on the same page regarding this issue.

I'm testing it with citeproc.js 1.0.543 (yesterday with 1.0.470
aprox.) and I have the problem.

Frank: I'll write a small test and send it to you.

Thank you all,

On 23 January 2015 at 04:37, Frank Bennett <[hidden email]> wrote:

> Thanks for the feedback, all. I was in a rush out the door this
> morning, and told Carles that it looked right (which it doesn't, of
> course - I missed the forced locale of es-ES) and suggested he contact
> the list.
>
> I'll take a closer look in the hours.
>
> Frank
>
>
> On Fri, Jan 23, 2015 at 12:01 PM, Sebastian Karcher
> <[hidden email]> wrote:
>> yup, what Rintze says.
>> Carles, are you saying that you're getting the "available a partir de" with
>> citeproc-js? I tested this in Zotero (set to es-ES) and get the
>> correct(-ish, but that's a different topic) "recuperado a partir de"
>>
>> On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]>
>> wrote:
>>>
>>> That doesn't seem right. Did you see
>>> http://citationstyles.org/downloads/specification.html#locale-fallback
>>> ?
>>>
>>> It's my understanding that the following sequence should be followed
>>> in retrieving the term translations:
>>>
>>> 1) term definitions in the style with xml:lang="es-ES"
>>> 2) term definitions in the style with xml:lang="es"
>>> 3) term definitions in the style without xml:lang
>>> 4) term definitions in locales-es-ES.xml
>>> 5) term definitions in locales-en-US.xml
>>>
>>> Since 1-3 don't exist in vancouver.csl, the style should use the
>>> translations from locales-es-ES.xml.
>>>
>>> Rintze
>>>
>>> On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]>
>>> wrote:
>>> > Let's say that we have vancouver.csl, which has:
>>> >   <locale xml:lang="en">
>>> >     <date form="text" delimiter=" ">
>>> >       <date-part name="year"/>
>>> >       <date-part name="month" form="short" strip-periods="true"/>
>>> >       <date-part name="day"/>
>>> >     </date>
>>> >     <terms>
>>> >       <term name="presented at">presented at</term>
>>> >       <term name="retrieved">available</term>
>>> >       <term name="section" form="short">sect.</term>
>>> >     </terms>
>>> >   </locale>
>>> >
>>> > (and similar for "fr" and "de")
>>> >
>>> > I instantiate citeproc-js indicating that I want to use es-ES
>>> >
>>> > At the moment for, in vancouver.csl in the bibliography I have:
>>> >             <text term="retrieved" text-case="capitalize-first"/>
>>> >             <text term="from"/>
>>> >
>>> > The output is:
>>> > a) "retrieved" term is translated as "available" (using the in-style
>>> > locale translation)
>>> > b) "from" term is translated as "a partir de" (from locales-esES.xml)
>>> >
>>> > (so it says "available a partir de")
>>> >
>>> > Do you agree that this should happen? Or something else? (e.g. use the
>>> > default in-style translation before trying to use locale-es-ES?)
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>> http://p.sf.net/sfu/gigenet
>>> _______________________________________________
>>> xbiblio-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>
>>
>>
>>
>> --
>> Sebastian Karcher, PhD
>> Department of Political Science
>> Northwestern University
>>
>> ------------------------------------------------------------------------------
>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>> GigeNET is offering a free month of service with a new server in Ashburn.
>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>> http://p.sf.net/sfu/gigenet
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel



--
Carles Pina | Software Engineer
http://www.mendeley.com/profiles/Carles-Pina/

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

Carles Pina
Ha! using a minimal citeproc-js test I can't reproduce the problem...
I'll test with the same document and other things. Anyway, seems like
a weird Mendeley <-> citeproc-js integration problem.

On 23 January 2015 at 12:28, Carles Pina <[hidden email]> wrote:

> Cool that we are on the same page regarding this issue.
>
> I'm testing it with citeproc.js 1.0.543 (yesterday with 1.0.470
> aprox.) and I have the problem.
>
> Frank: I'll write a small test and send it to you.
>
> Thank you all,
>
> On 23 January 2015 at 04:37, Frank Bennett <[hidden email]> wrote:
>> Thanks for the feedback, all. I was in a rush out the door this
>> morning, and told Carles that it looked right (which it doesn't, of
>> course - I missed the forced locale of es-ES) and suggested he contact
>> the list.
>>
>> I'll take a closer look in the hours.
>>
>> Frank
>>
>>
>> On Fri, Jan 23, 2015 at 12:01 PM, Sebastian Karcher
>> <[hidden email]> wrote:
>>> yup, what Rintze says.
>>> Carles, are you saying that you're getting the "available a partir de" with
>>> citeproc-js? I tested this in Zotero (set to es-ES) and get the
>>> correct(-ish, but that's a different topic) "recuperado a partir de"
>>>
>>> On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]>
>>> wrote:
>>>>
>>>> That doesn't seem right. Did you see
>>>> http://citationstyles.org/downloads/specification.html#locale-fallback
>>>> ?
>>>>
>>>> It's my understanding that the following sequence should be followed
>>>> in retrieving the term translations:
>>>>
>>>> 1) term definitions in the style with xml:lang="es-ES"
>>>> 2) term definitions in the style with xml:lang="es"
>>>> 3) term definitions in the style without xml:lang
>>>> 4) term definitions in locales-es-ES.xml
>>>> 5) term definitions in locales-en-US.xml
>>>>
>>>> Since 1-3 don't exist in vancouver.csl, the style should use the
>>>> translations from locales-es-ES.xml.
>>>>
>>>> Rintze
>>>>
>>>> On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]>
>>>> wrote:
>>>> > Let's say that we have vancouver.csl, which has:
>>>> >   <locale xml:lang="en">
>>>> >     <date form="text" delimiter=" ">
>>>> >       <date-part name="year"/>
>>>> >       <date-part name="month" form="short" strip-periods="true"/>
>>>> >       <date-part name="day"/>
>>>> >     </date>
>>>> >     <terms>
>>>> >       <term name="presented at">presented at</term>
>>>> >       <term name="retrieved">available</term>
>>>> >       <term name="section" form="short">sect.</term>
>>>> >     </terms>
>>>> >   </locale>
>>>> >
>>>> > (and similar for "fr" and "de")
>>>> >
>>>> > I instantiate citeproc-js indicating that I want to use es-ES
>>>> >
>>>> > At the moment for, in vancouver.csl in the bibliography I have:
>>>> >             <text term="retrieved" text-case="capitalize-first"/>
>>>> >             <text term="from"/>
>>>> >
>>>> > The output is:
>>>> > a) "retrieved" term is translated as "available" (using the in-style
>>>> > locale translation)
>>>> > b) "from" term is translated as "a partir de" (from locales-esES.xml)
>>>> >
>>>> > (so it says "available a partir de")
>>>> >
>>>> > Do you agree that this should happen? Or something else? (e.g. use the
>>>> > default in-style translation before trying to use locale-es-ES?)
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>> http://p.sf.net/sfu/gigenet
>>>> _______________________________________________
>>>> xbiblio-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>
>>>
>>>
>>>
>>> --
>>> Sebastian Karcher, PhD
>>> Department of Political Science
>>> Northwestern University
>>>
>>> ------------------------------------------------------------------------------
>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>> http://p.sf.net/sfu/gigenet
>>> _______________________________________________
>>> xbiblio-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>> GigeNET is offering a free month of service with a new server in Ashburn.
>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>> http://p.sf.net/sfu/gigenet
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>
>
>
> --
> Carles Pina | Software Engineer
> http://www.mendeley.com/profiles/Carles-Pina/
>
> Mendeley Limited | London, UK | www.mendeley.com
> Registered in England and Wales | Company Number 6419015



--
Carles Pina | Software Engineer
http://www.mendeley.com/profiles/Carles-Pina/

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

Carles Pina
Today (well, yesterday now) I prepared a simple case to reproduce the
problem and Frank quickly traced it down to xmldom.js, fixed in the
latest citeproc-js:
https://bitbucket.org/fbennett/citeproc-js/src/789b5a8a2d694c6afd4073161e4d5941b695e2be/CHANGES.txt?at=default

Once more: thanks Frank!

On 23 January 2015 at 12:39, Carles Pina <[hidden email]> wrote:

> Ha! using a minimal citeproc-js test I can't reproduce the problem...
> I'll test with the same document and other things. Anyway, seems like
> a weird Mendeley <-> citeproc-js integration problem.
>
> On 23 January 2015 at 12:28, Carles Pina <[hidden email]> wrote:
>> Cool that we are on the same page regarding this issue.
>>
>> I'm testing it with citeproc.js 1.0.543 (yesterday with 1.0.470
>> aprox.) and I have the problem.
>>
>> Frank: I'll write a small test and send it to you.
>>
>> Thank you all,
>>
>> On 23 January 2015 at 04:37, Frank Bennett <[hidden email]> wrote:
>>> Thanks for the feedback, all. I was in a rush out the door this
>>> morning, and told Carles that it looked right (which it doesn't, of
>>> course - I missed the forced locale of es-ES) and suggested he contact
>>> the list.
>>>
>>> I'll take a closer look in the hours.
>>>
>>> Frank
>>>
>>>
>>> On Fri, Jan 23, 2015 at 12:01 PM, Sebastian Karcher
>>> <[hidden email]> wrote:
>>>> yup, what Rintze says.
>>>> Carles, are you saying that you're getting the "available a partir de" with
>>>> citeproc-js? I tested this in Zotero (set to es-ES) and get the
>>>> correct(-ish, but that's a different topic) "recuperado a partir de"
>>>>
>>>> On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]>
>>>> wrote:
>>>>>
>>>>> That doesn't seem right. Did you see
>>>>> http://citationstyles.org/downloads/specification.html#locale-fallback
>>>>> ?
>>>>>
>>>>> It's my understanding that the following sequence should be followed
>>>>> in retrieving the term translations:
>>>>>
>>>>> 1) term definitions in the style with xml:lang="es-ES"
>>>>> 2) term definitions in the style with xml:lang="es"
>>>>> 3) term definitions in the style without xml:lang
>>>>> 4) term definitions in locales-es-ES.xml
>>>>> 5) term definitions in locales-en-US.xml
>>>>>
>>>>> Since 1-3 don't exist in vancouver.csl, the style should use the
>>>>> translations from locales-es-ES.xml.
>>>>>
>>>>> Rintze
>>>>>
>>>>> On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]>
>>>>> wrote:
>>>>> > Let's say that we have vancouver.csl, which has:
>>>>> >   <locale xml:lang="en">
>>>>> >     <date form="text" delimiter=" ">
>>>>> >       <date-part name="year"/>
>>>>> >       <date-part name="month" form="short" strip-periods="true"/>
>>>>> >       <date-part name="day"/>
>>>>> >     </date>
>>>>> >     <terms>
>>>>> >       <term name="presented at">presented at</term>
>>>>> >       <term name="retrieved">available</term>
>>>>> >       <term name="section" form="short">sect.</term>
>>>>> >     </terms>
>>>>> >   </locale>
>>>>> >
>>>>> > (and similar for "fr" and "de")
>>>>> >
>>>>> > I instantiate citeproc-js indicating that I want to use es-ES
>>>>> >
>>>>> > At the moment for, in vancouver.csl in the bibliography I have:
>>>>> >             <text term="retrieved" text-case="capitalize-first"/>
>>>>> >             <text term="from"/>
>>>>> >
>>>>> > The output is:
>>>>> > a) "retrieved" term is translated as "available" (using the in-style
>>>>> > locale translation)
>>>>> > b) "from" term is translated as "a partir de" (from locales-esES.xml)
>>>>> >
>>>>> > (so it says "available a partir de")
>>>>> >
>>>>> > Do you agree that this should happen? Or something else? (e.g. use the
>>>>> > default in-style translation before trying to use locale-es-ES?)
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>>> http://p.sf.net/sfu/gigenet
>>>>> _______________________________________________
>>>>> xbiblio-devel mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sebastian Karcher, PhD
>>>> Department of Political Science
>>>> Northwestern University
>>>>
>>>> ------------------------------------------------------------------------------
>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>> http://p.sf.net/sfu/gigenet
>>>> _______________________________________________
>>>> xbiblio-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>> http://p.sf.net/sfu/gigenet
>>> _______________________________________________
>>> xbiblio-devel mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>
>>
>>
>> --
>> Carles Pina | Software Engineer
>> http://www.mendeley.com/profiles/Carles-Pina/
>>
>> Mendeley Limited | London, UK | www.mendeley.com
>> Registered in England and Wales | Company Number 6419015
>
>
>
> --
> Carles Pina | Software Engineer
> http://www.mendeley.com/profiles/Carles-Pina/
>
> Mendeley Limited | London, UK | www.mendeley.com
> Registered in England and Wales | Company Number 6419015



--
Carles Pina | Software Engineer
http://www.mendeley.com/profiles/Carles-Pina/

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: locale data in style file

fbennett
On Sat, Jan 24, 2015 at 9:34 AM, Carles Pina <[hidden email]> wrote:
> Today (well, yesterday now) I prepared a simple case to reproduce the
> problem and Frank quickly traced it down to xmldom.js, fixed in the
> latest citeproc-js:
> https://bitbucket.org/fbennett/citeproc-js/src/789b5a8a2d694c6afd4073161e4d5941b695e2be/CHANGES.txt?at=default
>
> Once more: thanks Frank!

Something to go with the humble pie on my plate. :-)

>
> On 23 January 2015 at 12:39, Carles Pina <[hidden email]> wrote:
>> Ha! using a minimal citeproc-js test I can't reproduce the problem...
>> I'll test with the same document and other things. Anyway, seems like
>> a weird Mendeley <-> citeproc-js integration problem.
>>
>> On 23 January 2015 at 12:28, Carles Pina <[hidden email]> wrote:
>>> Cool that we are on the same page regarding this issue.
>>>
>>> I'm testing it with citeproc.js 1.0.543 (yesterday with 1.0.470
>>> aprox.) and I have the problem.
>>>
>>> Frank: I'll write a small test and send it to you.
>>>
>>> Thank you all,
>>>
>>> On 23 January 2015 at 04:37, Frank Bennett <[hidden email]> wrote:
>>>> Thanks for the feedback, all. I was in a rush out the door this
>>>> morning, and told Carles that it looked right (which it doesn't, of
>>>> course - I missed the forced locale of es-ES) and suggested he contact
>>>> the list.
>>>>
>>>> I'll take a closer look in the hours.
>>>>
>>>> Frank
>>>>
>>>>
>>>> On Fri, Jan 23, 2015 at 12:01 PM, Sebastian Karcher
>>>> <[hidden email]> wrote:
>>>>> yup, what Rintze says.
>>>>> Carles, are you saying that you're getting the "available a partir de" with
>>>>> citeproc-js? I tested this in Zotero (set to es-ES) and get the
>>>>> correct(-ish, but that's a different topic) "recuperado a partir de"
>>>>>
>>>>> On Thu, Jan 22, 2015 at 7:11 PM, Rintze Zelle <[hidden email]>
>>>>> wrote:
>>>>>>
>>>>>> That doesn't seem right. Did you see
>>>>>> http://citationstyles.org/downloads/specification.html#locale-fallback
>>>>>> ?
>>>>>>
>>>>>> It's my understanding that the following sequence should be followed
>>>>>> in retrieving the term translations:
>>>>>>
>>>>>> 1) term definitions in the style with xml:lang="es-ES"
>>>>>> 2) term definitions in the style with xml:lang="es"
>>>>>> 3) term definitions in the style without xml:lang
>>>>>> 4) term definitions in locales-es-ES.xml
>>>>>> 5) term definitions in locales-en-US.xml
>>>>>>
>>>>>> Since 1-3 don't exist in vancouver.csl, the style should use the
>>>>>> translations from locales-es-ES.xml.
>>>>>>
>>>>>> Rintze
>>>>>>
>>>>>> On Thu, Jan 22, 2015 at 6:01 PM, Carles Pina <[hidden email]>
>>>>>> wrote:
>>>>>> > Let's say that we have vancouver.csl, which has:
>>>>>> >   <locale xml:lang="en">
>>>>>> >     <date form="text" delimiter=" ">
>>>>>> >       <date-part name="year"/>
>>>>>> >       <date-part name="month" form="short" strip-periods="true"/>
>>>>>> >       <date-part name="day"/>
>>>>>> >     </date>
>>>>>> >     <terms>
>>>>>> >       <term name="presented at">presented at</term>
>>>>>> >       <term name="retrieved">available</term>
>>>>>> >       <term name="section" form="short">sect.</term>
>>>>>> >     </terms>
>>>>>> >   </locale>
>>>>>> >
>>>>>> > (and similar for "fr" and "de")
>>>>>> >
>>>>>> > I instantiate citeproc-js indicating that I want to use es-ES
>>>>>> >
>>>>>> > At the moment for, in vancouver.csl in the bibliography I have:
>>>>>> >             <text term="retrieved" text-case="capitalize-first"/>
>>>>>> >             <text term="from"/>
>>>>>> >
>>>>>> > The output is:
>>>>>> > a) "retrieved" term is translated as "available" (using the in-style
>>>>>> > locale translation)
>>>>>> > b) "from" term is translated as "a partir de" (from locales-esES.xml)
>>>>>> >
>>>>>> > (so it says "available a partir de")
>>>>>> >
>>>>>> > Do you agree that this should happen? Or something else? (e.g. use the
>>>>>> > default in-style translation before trying to use locale-es-ES?)
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>>>> http://p.sf.net/sfu/gigenet
>>>>>> _______________________________________________
>>>>>> xbiblio-devel mailing list
>>>>>> [hidden email]
>>>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sebastian Karcher, PhD
>>>>> Department of Political Science
>>>>> Northwestern University
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>>> http://p.sf.net/sfu/gigenet
>>>>> _______________________________________________
>>>>> xbiblio-devel mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
>>>> GigeNET is offering a free month of service with a new server in Ashburn.
>>>> Choose from 2 high performing configs, both with 100TB of bandwidth.
>>>> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
>>>> http://p.sf.net/sfu/gigenet
>>>> _______________________________________________
>>>> xbiblio-devel mailing list
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>>
>>>
>>>
>>> --
>>> Carles Pina | Software Engineer
>>> http://www.mendeley.com/profiles/Carles-Pina/
>>>
>>> Mendeley Limited | London, UK | www.mendeley.com
>>> Registered in England and Wales | Company Number 6419015
>>
>>
>>
>> --
>> Carles Pina | Software Engineer
>> http://www.mendeley.com/profiles/Carles-Pina/
>>
>> Mendeley Limited | London, UK | www.mendeley.com
>> Registered in England and Wales | Company Number 6419015
>
>
>
> --
> Carles Pina | Software Engineer
> http://www.mendeley.com/profiles/Carles-Pina/
>
> Mendeley Limited | London, UK | www.mendeley.com
> Registered in England and Wales | Company Number 6419015
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Loading...