Addresses #155, Localize strings
- Fixed flex/overflow issues with search dialog
- Localized "Name:" in search dialog
- Disabled hover color for disabled clicky buttons with CSS3 not() selector and removed "unclicky" class
- Item.setField() stores dates in a multipart format beginning with an SQL date followed by the user's entry, so "November 3, 2006" becomes "2006-11-03 November 3, 2006" -- date field entries are parsed with Zotero.Date.strToDate() if not already in multipart format
- Item.getField() returns just the user part unless passed the new second parameter, _unformatted_, which returns the field directly from DB without processing (e.g. the full multipart string)
- Added SQLite triggers on the itemData table to enforce multipart format even if the table is modified outside the API
- Migration step to update existing dates
- Indicator next to date field to show what we've parsed and a tooltip over the date field to show the SQL date -- though I'm not sure how well the abbreviation part will localize (i.e. can you abbreviate 'month' in Chinese?)
One obvious problem is how to handle date ranges when sorting or searching, which may end up rendering this whole method fairly useless (though I guess the multipart format could begin with two SQL dates instead of just one, at the cost of some storage space...).
Other changes:
- Utilities.lpad() handling for undefined value parameter
- new Zotero.Date methods: strToMultipart(), isMultipart(), multipartToSQL(), multipartToStr(), isSQLDate(), sqlHasYear(), sqlHasMonth, sqlHasDay getLocaleDateOrder() (the last one unused for now)
- try/catch around manual itemData INSERT execute() statements in Item.save()
Localizing some remaining hard-coded strings and get rid of programmatically added colons
Also added .zero strings for various count properties, since plural logic from English won't apply to all languages
(The current repo system is a bit flawed in that translators need to be inserted with CURRENT_TIMESTAMP but scrapers.sql can't be, so scrapers.sql needs to be updated with the repo timestamp after the fact to prevent new installs from unnecessarily grabbing the changed scrapers (or they need to be post-dated to a timestamp after the UTC time of their repository insert but preferably not by more than 24 hours). Suffice it to say, we'll have a more automated solution for this in the future.)
Client-side updates
(Note that translator updates were broken anyway, since the translator table was changed and the update mechanism wasn't, so that's fixed now too, and <=1.0.0b2.r1 won't be served updates via the repository.)
We already copy to an interim temp file on shutdown--just try to open it before overwriting old backup file
Still wish there was a way to detect corruption while Zotero was still open and pretending to write to the DB, but I don't know of one (other than making a copy of the DB and trying to open it, but as far as I can tell we can't release the file handle on it to then delete it or check again later)...will keep working on it.
closes#348, OpenURL should use only relevant parts of dates
closes#354, Error saving History Cooperative article
closes#356, Embedded Dublin Core scraper incorrectly saves web pages as item type "book"
closes#355, PubMed translator problem
closes#368, RIS/Endnote export hijack doesn't go into active collection
fixes an issue with quotation marks in bibliographies exported as RTF
fixes an issue with bibliographies and non-English locales
- Catch errors trying to display missing files and display message to user
- Switch to persistent descriptors rather than relative paths for attachment paths -- this will fix attachments on networked drives (which, at least on Windows, were not working and apparently in some cases breaking entire Zotero installs), but since WebBrowserPersist.saveDocument() is asynchronous and file.persistentDescriptor can't be set on Macs before the file exists, Attachments.importFromDocument() no longer returns the id of the new attachment, so translate.js had to be changed accordingly
- Try to convert relative descriptors to persistent ones with migration step (and later on access, if persistent fails)
- Added Zotero.WebProgressFinishListener(onDone)
Next step would be to throw up a file dialog to let the user locate the missing file
Use speaker icon for radio broadcast, though it should really be a radio or a transmitter (that doesn't look like an RSS feed, unlike all the ones I saw on famfamfam)
XUL spellcheck code is on Bugzilla but doesn't look like it'll make 2.0, so we'll copy-and-paste. (And even when it is checked in it might not work with our timed-textarea (which itself is a slightly modified version of Mozilla's timed-textarea) anyway.)
Seems to work, though Firefox did crash once while I was testing it...