inukshuk / citeproc-ruby

A Citation Style Language (CSL) Cite Processor
101 stars 22 forks source link

Locale declarations in style .csl files #29

Closed darshanbib closed 9 years ago

darshanbib commented 9 years ago

Based on the BibTeX standard, page numbers should be separated by a --.

The CSL file that covers BibTeX does not specify this. Theoretically, the way to fix this is to apply a locale definition to the bibtex.csl file:

<locale>
    <terms>
      <term name="page-range-delimiter">--</term>
    </terms>
</locale>

However, citeproc-ruby doesn't seem to pick this local locale tag, and seems to continue to rely on the locale file. According to the 1.0.1 docs, the order of operations for choosing locale is to [let the style doc override the general locale definition](http://docs.citationstyles.org/en/latest/specification.html#locale.

Is this a known issue, or am I doing something incorrect?

inukshuk commented 9 years ago

Thanks for reporting!

I've never enabled that feature in the processor, although locale merging was already implemented. I've now enabled it in version 1.1.0 so your example should be supported now (as you can see here).

inukshuk commented 9 years ago

Please note that I haven't yet enabled reverse merging of the default region and the default locale; like I said, locale merging was already implemented, but I would like to add more tests to make sure it works as expected in some of the more complex cases (ordinals, gendered terms etc.). But this shouldn't be an issue, because IIRC all the locales from the CSL repository contain all terms anyway (this would only come into play if you work with your own partial locale files).

darshanbib commented 9 years ago

Will try this out. Thank you very much!