[mlz] bugs with multi-locale citation

Hi,

I've followed zotero's development off and on for a few years, but never used it for the lack of multi-language support and citation styles suitable for legal writing. Hence I'm very happy to finally get to try MLZ.

I'm currently developing a citation style for Chinese (traditional, Taiwan) law publication, which I'll be happy to contribute back when done (more accurately, in a usable state). When doing that, however, I think I found a bug in MLZ's citation processing.

Symptoms:
When a locale-specific layout is added to the <bibliography> element, the "suffix" ("!", e.g.) specified therein is not used for bibliographic entries of the language (zh, e.g.); the suffix defined for the default locale (".", e.g.) is used instead. Moreover, all Chinese notes (citations) will now end with "!", ignoring the suffix defined for zh-locale layout inside the <citation> element. (Before the new zh-layout inside <bibliography>, the suffix defined for zh-layout inside <citation> did work.)

Steps to reproduce:
1. Copy a standard mlz style. (I copied mlz-amlaw.csl to mlz-amlaw-mod.csl.)
2. Open the new style, and change the name and id for the style.
3. Duplicate the <layout></layout> segment inside the <citation></citation> section, above the original. (MLZ rules require that default layout must stay last.)
4. Made two changes to the <layout ...> line, and leave everything else unchanged:
a) add an "locale" attribute.
b) change the suffix.

In my test, I took the following original (from mlz-amlaw.csl):

<layout delimiter="; " suffix=".">

and changed it into

<layout locale="zh" delimiter="; " suffix="#">

5. Repeat step 3 and 4 for the <layout></layout> segment inside the <bibliography></bibliography> section, except this time use a different suffix.

In my trial, I took the following original:

<layout suffix=".">

and changed it into

<layout locale="zh" suffix="!">

6. Now, after restarting Firefox/MLZ, change at least one item's language to the new locale (zh in my case).

7. Select that item, and open MLZ's "CSL Preview" window/tab, and click "Refresh."

8. Check the result under the modified style.

Here's what I got with my test:

MLZ American Law Style Modified
Sagers Christopher L., Antitrust (Wolters Kluwer Law & Business 2011)!

Sagers Christopher L., Antitrust (Wolters Kluwer Law & Business 2011).

(Note the difference at the end.)


I'm using Firefox 24 on a Mac (OS 10.8.5), MLZ version 4.0m394. To eliminate all possible complications, I tested on an empty Firefox profile with no addons other than MLZ and "Abbreviations for Zotero" installed.

The test style (mlz-amlaw-mod.csl) is available at
http://www.forza.tw/mlz-amlaw-mod.csl.gz
  • Thanks for this detailed report. I'll take a look, and should be able to respond soon.
  • I can reproduce the fault here.
  • edited October 6, 2013
    I've fixed this, I think. If you update MLZ, the suffixes should be applied correctly. Thanks for calling attention to this issue.
  • Wow, that's fast. Many thanks! Indeed the issue I mentioned has been fixed.

    There seems to be a small regression, however, for now the test mlz-amlaw-mod.csl no longer produces citation entries in "CSL Preview", only bibliographic entries. The same applies to my work-in-progress mlz-twlaw.csl.

    When trying to insert a new citation in a new Word document, I got the following error message if I select either mlz-amlaw-mod.csl or mlz-twlaw.csl:

    Zotero experienced an error updating your document.

    print is not defined
  • Ouch, that was careless. I've put up a corrected release.
  • Confirmed. Thanks!
Sign In or Register to comment.