Import "Date" in English

Hi,

After updating Firefox to 4.0 (and zotero to 2.1 at the same time, maybe...), zotero start to import date information in Japanese. Before update, zotero import information about month correctly in English (ex. April), but now it import in Japanese. This is only a subtle problem, but still annoying to me. I had already changed general.useragent.locale and extensions.zotero.export.bibliographyLocale to en-US which didn't help.
Does anybody knows how to solve the problem?

zotero 2.1.6 on firefox 4.0. Windows 7 64bit, Japanese

Thanks
Ikeda
«1
  • So dates you enter in plain-text in the date field are only parsed correctly when you enter them in Japanese? I believe that Zotero is supposed to parse them correctly in your current locale (ja-JP) and in English (and I'm hoping that this list will soon expand to cover as many locales as people might need).
  • No. It works perfect when I enter in plain-text both in Japanese and English.
    The problem happens when I save an item to zotero from online source. In default Japanese setting, zotero automatically translate 'and' in creator field (when there are two creators) and 'month' in date field into Japanese, which is annoying to me. Previously, both fields are imported in English, but somehow, now zotero import date field in Japanese.

    Sorry for poor English, but as you know, I'm Japanese......
  • In that case we need some example URLs of pages that show this issue with the dates.

    The creators are separated by the "and" term in the user interface language-- it's not yet possible to use the language of the item to determine the language of the "and" term in the interface.

    You can control the language of such terms in generated bibliographies and in the word processor plugins.
  • ベネット@名古屋大学です。

    個人として、日本におけるZoteroの普及を目指していますので、できれば日本人の研究者が抵抗を感じるところを整理されるようにしたいと思います。まず、問題を確認するために、この「勝手自動変更」の現象の表すリンク先を教えてください。

    (下手な日本語ですみません!)
  • Thanks everyone.

    I just tested to save a letter from latest Science.
    http://www.sciencemag.org/content/332/6028/427.summary
    The result is the same. It imports Date field as "4月 22 , 2011" instead of "April 22, 2011".
    This doesn't happen before update. I know that this is not really a big problem as I can modify manually or change in the word processor plugins. It's just not annoying to me because of the inconsistency with previous items in my library.

    Hi Bennett,

    I'm not sure how many Japanese people care about this problem. When I use zotero (for scientific research and/or writing), all of my items are written in English and I always try to think in English. So I don't want to see Japanese letters in my library. By the way, I lived in Aichi until very recently.
  • Not sure when that changed, but it seems that Zotero is formatting the date to match the locale when it imports RIS-formatted citations, like Science and many other sites. This a purely cosmetic issue, and you shouldn't keep seeing it in new citations if you change Zotero's locale to en-US. Switching locales will not reformat the citations you have already saved.

    For those who care, this is because RIS.js is calling Zotero.Utilities.formatDate() with the date pieces pulled from RIS.
  • I'm not sure how many Japanese people care about this problem.
    It's a big country. :)
  • @ajlyon + development team: I'm not sure how the imported data is stored in the DB, but it would be best if the date submitted for parsing is always forced to the en-US locale. The citeproc-js parser would stumble over the date seen by ikeda_t.
  • Don't we want to be able to do parsing in many/all locales? This is something we need to work out as EDTF wraps up and we look at moving to a new parser. Anyway-- not a discussion for the forums, I suppose.
  • edited April 21, 2011
    The problem is that "4月 22 , 2011" is not a valid Japanese date string: the ordering is wrong, and year/month/day suffixes should be appended to every element, as "2011年4月 22日" (or "平成23年4月 22日" in the Imperial year form). I can see dealing with that complexity when building display/output strings, but if we can avoid it in downloaded data it would simplify things.
  • Thanks ajlyon,
    Could you tell me which locale should I change to en-US? I have already changed "general.useragent.locale" and "extensions.zotero.export.bibliographyLocale" in firefox config to en-US, which did not help.

    and if zotero can import date field in "2011年4月 22日" format, many Japanese will be comfortable about that, I believe......
  • @ikeda_t: probably the simplest solution is to install Quick Locale Switcher, and set the Firefox interface locale to en-US (you need to dig into the QLS options to set that up, it doesn't set the UI locale by default).
  • See also http://www.zotero.org/support/supported_languages#switching_languages
  • Well, Quick Locale Switcher doesn't help and changing "general.useragent.locale" to en-US neither. Strange......
  • This is apparently a bug in Zotero's formatDate function, which is just being very naive about date formatting across locales.

    I'm going to just stop using formatDate in RIS and enter YYYY-MM-DD instead, since that's locale-independent.
  • Please go to http://github.com/ajlyon/zotero-bits/raw/master/RIS.js and save the file to the translators directory of your Zotero data directory (http://www.zotero.org/support/zotero_data).

    It should start working again. If this works for you, please post here so that I can submit this change to be pushed to all users.
  • Now I have "Could Not Save Item" error. something wrong?
  • Probably. I'll do some real testing this time.
  • Try again--

    Please go to http://github.com/ajlyon/zotero-bits/raw/master/RIS.js and save the file to the translators directory of your Zotero data directory (http://www.zotero.org/support/zotero_data).

    It should start working again. If this works for you, please post here so that I can submit this change to be pushed to all users.
  • Still an error occurred...
  • Please paste the RIS that triggers the error.
  • edited April 22, 2011
    deleted
  • edited April 22, 2011
    deleted
  • edited April 22, 2011
    deleted
  • No, not that. I need the RIS file that you're trying to import. It should be downloadable from the journal website through something like "export citation".
  • I just send you an e-mail with RIS file. Please check.
  • Try installing from Github. There was an unrelated broken piece in the version I had sent before, it seems.
  • Now it works! Zotero saved date as "2011-04-22".
    Although I still prefer to save as "April 22, 2011" since all my previous items are saved in that format, this looks quite good and most Japanese users will be happy with this, I believe.
  • That's essentially the change I was making, since it looks like we don't have a good way to save dates in a locale-independent manner. It's bad practice to save them in the current locale, in part because we weren't doing it right, and in part because it won't work well if people sync/share their dates. That leaves only all-numeric dates, but 04-06-2011 is ambiguous if we don't know the locale that created it.

    So I hope this proves to be reliable enough... There are other places in the RIS code and elsewhere where we need similar changes to be made.
  • And I still don't know why Zotero was adding Japanese components to your date even after you changed your locale settings. Yet another reason to avoid that bit of code.

This is an old discussion that has not been active in a long time. Instead of commenting here, you should start a new discussion. If you think the content of this discussion is still relevant, you can link to it from your new discussion.