locale data in style file

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:







presented at
available
sect.

(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:

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

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

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

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”

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

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,

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.

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!

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. :slight_smile: