Commit graph

8439 commits

Author SHA1 Message Date
Dan Stillman
e7d0e282e7 Fix some locale detection bugs after 513f7d6555
- When upgrading from Fx52, don't show "Automatic" for
  a manually selected locale.
- Make sure Zotero.locale is always set to a known language tag
- Fix inconsistencies between Zotero.Locale.availableLocales and
  chrome.manifest
2019-10-26 01:27:14 -04:00
Dan Stillman
5779b60418 Update new item type MRU menu for global schema
And fix a Zotero 5 regression in which the MRU menu wasn't updated when
changing the item type after using the new-item keyboard shortcut
2019-10-25 15:22:54 -04:00
Dan Stillman
c3fd958ed7 Fix keyboard shortcuts
Regression from 54b268fe01
2019-10-25 15:18:28 -04:00
Dan Stillman
d8508415b9 Update French locale 'issue' search condition hack for global schema 2019-10-25 13:43:29 -04:00
Dan Stillman
742d7793d1 Fx60: Fix keyboard handling in items list
nsIDOMWindowUtils::sendKeyEvent() was removed
2019-10-24 14:57:09 -04:00
Dan Stillman
ba15c2b53e Fx60: Mostly fix autocomplete
There's still a bug when autocompleting tags where the value remains in
the new text field.
2019-10-24 04:45:45 -04:00
Dan Stillman
81b1adcfd9 Restore reopening of closed collection and item panes on startup
When we added the View menu pane options in 3aeef69ad3, we removed
automatic reopening of the panes on startup, since the View menu is more
discoverable than the narrow collapsed splitters. Unfortunately we're
now getting many reports of people not knowing where their panes are.
It turns out the View menu pane options in 5.0.76 are actually broken,
so it's not a great test, but enough people are doing this by accident
and enough of them don't seem to be finding the View menu options
(broken or otherwise) that I think it's better to return to reopening
the panes. We can always add a hidden pref to change that behavior, but
no one has complained in years, so it's probably not necessary.
2019-10-24 01:44:47 -04:00
Dan Stillman
52fd91950d Fix deleted item fields reappearing on sync
This was a regression from 4b60c6ca27. The original plan for introducing
new fields was to have them save to the sync cache even if they weren't
supported by the current Zotero version and process them on upgrade, and
so I changed `DataObjectUtilities.patch()` to omit fields that didn't
exist locally when patching the sync cache JSON so they wouldn't be
wiped on the server. That caused this bug where locally deleted fields
were restored on every sync. It's also no longer necessary now that
we decided to just reject unknown fields from saving, so we can just
revert to the previous behavior of blanking out locally missing fields
(with the tweak that fields that are already false or empty in the base
version can be omitted).
2019-10-24 01:22:00 -04:00
Dan Stillman
513f7d6555 Fx60: Fix localization
Also fixes #1690 (at least on Catalina), and possibly other things

general.useragent.locale and intl.locale.matchOS are no longer used.
2019-10-23 19:08:13 -04:00
Dan Stillman
0061ffeb56 Fix Collection Pane and Item Pane toggles in View → Layout 2019-10-23 18:16:43 -04:00
Dan Stillman
df69f99d19 Force Lucida Grande in Quick Format dialog
Follow-up to 86d924df9e

See zotero/zotero-standalone-build@ed5d5efcc for details.
2019-10-21 23:00:19 -04:00
Dan Stillman
b94be726bd Update locales from Transifex 2019-10-21 22:38:38 -04:00
Dan Stillman
d4f682aa88 Merge branch 'fx60' 2019-10-21 21:44:01 -04:00
Dan Stillman
956813ac1f Fix "err is undefined" on 200 response for nonexistent WebDAV file
Fixes #1741
2019-10-20 15:03:18 -04:00
Dan Stillman
dee902c32c Fx60: Remove built_in_addons.json
Moved to zotero-standalone-build in
zotero/zotero-standalone-build@6bab158ea
2019-10-19 15:49:27 -04:00
Dan Stillman
02eef477ff Update locales from Transifex and merge new English strings 2019-10-19 02:53:08 -04:00
Dan Stillman
944ff3485d File-not-found dialog improvements
- Include file path
- Show separate message for linked files mentioning Linked Attachment
  Base Directory
- Link to separate support page for linked files
2019-10-18 23:33:40 -04:00
Dan Stillman
eef25677bf Skip invalid on-demand download attempt if not yet synced
This could happen if an account was set up for syncing but Zotero was
pointed at a new DB and then you double-clicked on a missing attachment.
2019-10-18 18:08:42 -04:00
Dan Stillman
1710eb1c4b Don't store unknown/invalid fields in Extra in non-strict mode
And fix a couple things for if we turn it back on

This code came along with the type/field handling overhaul, but I think
it was originally intended for handling unknown fields during sync
before we decided on strict mode, so it wasn't finished and causes
various problems [1]. It could still be useful for preserving fields
from translators before they're available on items, but the better fix
there is just to add the missing fields, so I'm not sure if we'll end up
needing it.

[1] https://groups.google.com/d/msg/zotero-dev/a1IPUJ2m_3s/hfmdK2P3BwAJ
2019-10-18 03:37:24 -04:00
Adomas Venčkauskas
5913c53509 Proper fix to citation dialog artefacting on macOS. Closes #1720 2019-10-14 13:06:17 +03:00
Adomas Venčkauskas
a7ddb09615 Fix quick format reference panel extra space on Windows 2019-10-14 11:55:15 +03:00
Adomas Venčkauskas
371cef4035 Fx60: Fix quick format dialog artefacting on macOS. Closes #1720 2019-10-14 11:53:21 +03:00
Dan Stillman
6b2c3f2488 Friendlier error message for HTTP timeout, in case it's exposed
This should overridden in checkError() with a localized string,
but for now use a nicer default message.
2019-10-14 01:46:32 -04:00
Dan Stillman
1fe3b6df22 Update locales from Transifex 2019-10-14 01:40:19 -04:00
Dan Stillman
b4121ee6bc Don't show error icon when file sync is cancelled 2019-10-14 01:28:11 -04:00
Dan Stillman
42d570e623 Remove timeout for file sync uploads
Regression from 50b65b3010, and a proper fix a9c10309f7
2019-10-14 00:52:03 -04:00
Dan Stillman
da690a45b1 Make sync upload timeout 60 seconds, not 60 milliseconds 2019-10-10 20:07:55 -04:00
Dan Stillman
af2b6207b2 Decrease batch size and increase HTTP timeout for sync uploads
Some write requests are taking > 30 seconds
2019-10-10 19:15:58 -04:00
Dan Stillman
89672ed0a4 Fix "c1 is undefined" sync CR error 2019-10-09 18:29:04 -04:00
Dan Stillman
4e63cfd40e Update submodules 2019-10-08 01:10:34 -04:00
Dan Stillman
220c9e7cbb Update locales from Transifex 2019-10-08 00:54:04 -04:00
Dan Stillman
efdc4bae19 Fx60: Fix parsing of some default preferences for extensions 2019-10-02 04:56:29 -04:00
Dan Stillman
01e988f07d Don't hard-code 'url' fieldID 2019-09-30 04:43:31 -04:00
Dan Stillman
a9c10309f7 Detect TimeoutException during ZFS S3 upload
We're not currently setting a timeout, so this shouldn't happen, but
someone [1] is getting a timeout error with undefined ms and
NS_BINDING_ABORTED from the channel. It also happened during a /fulltext
upload, so it's not limited to S3, but this fix should give a more
helpful error message for such errors during file syncing.

[1] https://forums.zotero.org/discussion/79286/
2019-09-29 04:18:03 -04:00
Dan Stillman
cf9e5f62f1 Fix test failure due to missing yield 2019-09-29 03:03:38 -04:00
Dan Stillman
8aeb6f7fe4 Mark fields as changed when migrating Extra fields
We're not migrating fields yet, but when we do, I think marking them as
changed will be the safer option. We'll just have to make sure that
conflicts without differences are resolved automatically on all
platforms.
2019-09-28 06:58:54 -04:00
Dan Stillman
96caed8453 More concise version of f827f1e04 2019-09-28 06:12:26 -04:00
Dan Stillman
f827f1e049 Fix error if no colored tags (regression from b310ccb04) 2019-09-27 13:48:28 -04:00
Dan Stillman
b310ccb04e Fix broken tag selector due to leading/trailing whitespace in colored tags
And sanitize colored tags in DB at startup
2019-09-25 17:33:36 -04:00
Dan Stillman
ac255634c5 Fix tag selection in read-only libraries
Reactification mistakenly disabled tag selection instead of just
disabling the context menu options.
2019-09-23 20:09:26 -04:00
Dan Stillman
86d924df9e Force Lucida Grande in Quick Format on non-Retina Macs for Catalina 2019-09-23 03:39:06 -04:00
Dan Stillman
5723683b3b Fix "attachmentSyncedModificationTime must be a number" sync error
https://forums.zotero.org/discussion/79011/zotero-error-report
2019-09-21 01:59:09 -04:00
Dan Stillman
4b7cdddb4a Change apply-to-all checkbox text for some conflicts
Say "Use the [local|remote] version for all remaining conflicts" for
everything instead of saying "Use [local|remote] fields for all
remaining conflicts" for some conflicts.

This also fixes a test failure after 54343c49fb.
2019-09-21 01:35:36 -04:00
Dan Stillman
54b268fe01 Add global parameter to Zotero.Prefs.registerObserver()
This allows Zotero.Prefs to be used instead of Services.prefs for pref
observing in plugins.

Zotero.Prefs.prefBranch was replaced by Zotero.Prefs.rootBranch.
2019-09-20 04:29:02 -04:00
Dan Stillman
82ce5d9742 Fx60: Read in default preferences for extensions
Default prefs are no longer read automatically, so we need to do it
manually. Preferences may not be read before extensions load, so they
should wait for Zotero.Schema.schemaUpdatePromise or
Zotero.uiReadyPromise before initializing.
2019-09-20 04:28:49 -04:00
Dan Stillman
72234e0cb2 Additional debugging for file sync error
"attachmentSyncedModificationTime must be a number"
2019-09-17 17:54:13 -04:00
Dan Stillman
7bcec02326 Remove code to prompt for Firefox extension updates on startup error
And change button from "Check for Update" to "Check for Updates"
2019-09-16 02:27:22 -04:00
Dan Stillman
4b60c6ca27 Type/field handling overhaul
This changes the way item types, item fields, creator types, and CSL
mappings are defined and handled, in preparation for updated types and
fields.

Instead of being predefined in SQL files or code, type/field info is
read from a bundled JSON file shared with other parts of the Zotero
ecosystem [1], referred to as the "global schema". Updates to the
bundled schema file are automatically applied to the database at first
run, allowing changes to be made consistently across apps.

When syncing, invalid JSON properties are now rejected instead of being
ignored and processed later, which will allow for schema changes to be
made without causing problems in existing clients. We considered many
alternative approaches, but this approach is by far the simplest,
safest, and most transparent to the user.

For now, there are no actual changes to types and fields, since we'll
first need to do a sync cut-off for earlier versions that don't reject
invalid properties.

For third-party code, the main change is that type and field IDs should
no longer be hard-coded, since they may not be consistent in new
installs. For example, code should use `Zotero.ItemTypes.getID('note')`
instead of hard-coding `1`.

[1] https://github.com/zotero/zotero-schema
2019-09-16 02:27:22 -04:00
Dan Stillman
d394db61e5 Change 'dontCache' option to 'noCache' in HTTP.request() 2019-09-16 01:28:57 -04:00
Dan Stillman
ddf2a6a116 Don't mock HTTP requests for resource:// or chrome:// URLs 2019-09-16 01:28:35 -04:00