Commit graph

587 commits

Author SHA1 Message Date
Dan Stillman
27cb099c82 Allow asynchronous item saving in import translators
This allows for imported items to be saved individually instead of being
saved in a batch after processing the entire imported file (which for
large imports would hang the UI, even if the actual saving was
asynchronous). This also fixes the progress meter during asynchronous
saves.

To take advantage of this, import translators will need to return a
promise when available (using the native Promise object) from doImport()
and wait for optional promises from item.complete().

The logic here can probably be streamlined further. (E.g., we might be
able to say that item.complete() always returns a promise.) It's
complicated by the fact that, at the moment, Promise isn't available in
child sandboxes, though this can probably be fixed.

Tests forthcoming, but they require a translator that supports this,
which needs to be committed separately.

View with -w for a cleaner diff.
2017-02-08 14:56:44 -05:00
Dan Stillman
0b9b758029 Don't localize "OpenURL" 2017-02-02 02:01:06 -05:00
Dan Stillman
13442198db Update locales from Transifex 2017-01-24 03:48:43 -05:00
Dan Stillman
cfa15a3e3c Rename "Full Sync" to "Reset Data Sync History", and don't start sync
This allows generating debug output for full sync of a single library.

Also clarify some dialog text
2017-01-24 03:38:21 -05:00
Dan Stillman
dcd1da70af Merge new English strings 2017-01-19 17:21:58 -05:00
Dan Stillman
cc516005c0 "Import"/"Import from Clipboard" shortcut key changes
- Add Cmd/Ctrl-Shift-I for "Import…"
- Cmd/Ctrl-Shift-V apparently pastes without formatting, so don't override it.
  Instead, add a shortcut key to the menu option, defaulting to
  Cmd-Option-Shift-I/Ctrl-Alt-Shift-I
- The I in both is now localizable
2017-01-19 15:28:27 -05:00
Dan Stillman
3d83f5ff70 Update locales from Transifex 2017-01-15 15:45:47 -05:00
Dan Stillman
e5ba7612bc About pane updates
- Make version copyable
- Include "What's new" link to changelog
- Update some links and descriptions

To-do:

- Replace dev credits with a nice statement like in the Firefox About pane
2017-01-15 15:29:02 -05:00
Dan Stillman
cbcfb6b92e Fix missing Options menu on Windows/Linux 2017-01-10 21:44:03 -05:00
Dan Stillman
fb7592bb53 Update locales from Transifex 2017-01-09 04:53:15 -05:00
Dan Stillman
9fbdc77cac Update Edit menu strings in non-English locales
Remove localizations in standalone.dtd and replace with editMenuOverlay.dtd
files from the Mozilla language packs

Also remove some other unused strings
2017-01-09 03:08:38 -05:00
Dan Stillman
5dbe677f25 Fix localization of Edit menu 2017-01-09 03:08:37 -05:00
Dan Stillman
eba72399c1 Update locales from Transifex 2017-01-06 03:42:20 -05:00
Dan Stillman
eeee937310 Update French locale from Transifex 2016-12-26 19:18:54 -05:00
Dan Stillman
bd9501218e Apply UI font size change immediately
And change "Changes take effect in new windows" to "Changes take effect
after restart"

(The note font size still requires a restart, as do the shortcut keys in
the Advaned pane.)
2016-12-22 06:58:02 -05:00
Dan Stillman
3b6b6aa36b Remove tab mode
Closes #1135
2016-12-21 05:11:21 -05:00
Dan Stillman
d19d90a33c Update locales from Transifex 2016-12-17 09:00:19 -05:00
Dan Stillman
e34bf4d5cb Prompt to try manual data dir migration again if Firefox is open 2016-12-17 07:42:03 -05:00
Dan Stillman
426c767a43 Update locales from Transifex 2016-12-14 02:23:29 -05:00
Dan Stillman
0be67dbda5 Don't allow data dir migration via prefs if directory exists
And treat an existing non-empty directory as a failure during the
migration, since it should now never happen

Also suggest manually moving on Windows if more than 100 attachments
2016-12-14 02:14:56 -05:00
Dan Stillman
93cfc229f9 A little typographical cleanup 2016-12-13 20:35:30 -05:00
Dan Stillman
32ae3ee74d Remove extra space in string 2016-12-13 20:29:17 -05:00
Dan Stillman
b940890535 Update locales from Transifex 2016-12-13 09:12:22 -05:00
Adomas Ven
d6d4e4b33e Saner feed database management (#1131)
* Mark feedItems read in a single batch SQL update
* Automatically remove old feed items
* User-facing preference globally and per-feed for feed item expiration
2016-12-13 09:07:43 -05:00
Dan Stillman
3f32523709 Updates locales from Transifex 2016-12-12 04:14:22 -05:00
Dan Stillman
60ed6d447e Show "Loading…" in Quick Copy drop-down before list is loaded
Styles and translators have to be loaded before the list is displayed,
so there can be a delay if the prefs are opened right at startup.
2016-12-12 02:05:17 -05:00
Dan Stillman
d781f9c3d4 Update locales from Transifex 2016-12-11 02:30:35 -05:00
Dan Stillman
78b1d2ee35 Import translation improvements
- Don't block the UI with a progress meter during imports. Instead, show
  a popup in the bottom right when the import is done that shows how
  many items were saved.
- Fix hang when importing some files
- Fix various problems with asynchronous operations/transactions
    - Use the save queue for imports instead of creating concurrent
      transactions that can time out
    - Wait for the save to finish before returning from the translate()
      promise. All save modes now use the save queue, so code that
      handled the non-save-queue process can probably be removed.
    - Serialize child attachments instead of running them concurrently.
      This might make multi-attachment saves a little slower, since they
      can't download at the same time, but it avoids problems with
      concurrent transactions. We might be able to improve this to allow
      concurrent downloads, or allow concurrent saves for a limited
      number of items (e.g., from web saving) if not for larger imports.
- Change collection handling during import, since UI is now active
  - Select the root collection at the beginning of the import
  - Assign items and collections to the root during the import instead
    of at the end
  - Don't select other collections
- Change a few ItemSaver functions to use promises and remove
  unnecessary callbacks. (This includes some connector code that needs
  to be tested.)
- Change some `parentID` variables in ItemSaver to `parentItemID` for
  clarity, since collections are now handled in more places

To-do:

- Save items in smaller batches instead of doing all in the same
  transaction
- Show progress meter in a bottom-right popup during the import
2016-12-11 02:30:34 -05:00
Dan Stillman
abff9e39ad Remove "do not interrupt" from migration message
It would be good for people not to kill the process indiscriminately, but the
migration will theoretically pick up where it left off, so it shouldn't be too
big a deal.
2016-12-06 05:02:59 -05:00
Dan Stillman
6900a5ccf8 Removed unnecessary localized string for style installation error
Would only be used for an external request that didn't pass along a
filename or origin, so "null" (or whatever it shows up as) is fine
2016-11-30 21:23:09 -05:00
Adomas Venčkauskas
45c944e731 Fix server_connector tests broken in 69ab4b0b
Don't display error prompt in standalone when style install fails.
Fixes an import bug when import input is invalid.
2016-11-30 14:58:43 +02:00
Dan Stillman
c2033ef5a1 Clearer status message during data dir migration 2016-11-22 03:20:54 -05:00
Dan Stillman
aaa20f4317 Update non-English strings 2016-11-22 02:33:05 -05:00
Dan Stillman
ef3e098586 Migrate data directory automatically on macOS and Linux
If data directory is within the profile directory and we can move the
subdirectories instantaneously with /bin/mv, just do it silently at startup.
2016-11-22 02:33:05 -05:00
Dan Stillman
fb1e87a2da Update non-English locales 2016-11-21 05:19:18 -05:00
Dan Stillman
98e3a9addf Allow immediate retry on partial data dir migration failure
A common cause of this on Windows will likely be open attachment files,
so suggest closing those and make retrying the default action.
2016-11-21 05:19:18 -05:00
Dan Stillman
efde92f1ee Merge new English strings 2016-11-19 17:09:13 -05:00
Dan Stillman
0f5d2fea82 "Migrate Data Directory…" -> "Migrate To New Default Location…" 2016-11-16 23:04:22 -05:00
Dan Stillman
65a39417bf Closes #1112, Show "Upgrading database…" message 2016-11-16 12:41:49 -05:00
Dan Stillman
71524d9087 Update locales from Transifex 2016-11-16 01:13:06 -05:00
Dan Stillman
4863670104 Display "Migration in progress — do not interrupt…" during migration
Would be nice to have a determinate progress meter on Windows, but that
will require enumerating all files, which maybe would just make things
slower. Might be safer, though, by discouraging people from
force-quitting.
2016-11-16 01:07:26 -05:00
Dan Stillman
d52d5aeb6c Update locales from Transifex 2016-11-13 15:18:21 -05:00
Dan Stillman
79700969e1 Data directory migration
This adds a new button to the Advanced prefs to migrate the data directory to
$HOME/Zotero. The button only appears if the data directory is set to the
default location within a profile directory (including the other program from
the one running, even though that's technically stored as a custom data
directory).

On Mac/Linux, directories within the data directory are moved with /bin/mv.  On
Windows, or if that fails, they're copied recursively using OS.File.move()
(which annoyingly doesn't reliably support directory moving). The former should
be instantaneous on most systems (unless the data directory or 'storage' were
on a different filesystem from $HOME).

If the database fails to transfer, migration fails and the data directory
setting remains on the old directory. If the database transfers but other files
fail, the data directory setting is updated. In both cases, the user is
encouraged to migrate remaining files manually with a button that reveals the
directories and quits the program.

This isn't yet tested on Linux or Windows, and migration isn't yet suggested
automatically.

Adds Zotero.File.reveal(), Zotero.File.directoryIsEmpty(), and
Zotero.File.moveDirectory().
2016-11-13 04:55:51 -05:00
Dan Stillman
b22850efed Update data dir prefs for new default location
- Show "Default (<path>)" for default option unless set to profile directory
- Don't try to restart on selection if location hasn't changed
2016-11-12 16:44:34 -05:00
Dan Stillman
f2163b3433 New data directory handling
- Use $HOME/Zotero if zotero.sqlite exists, and set it as a custom data
  directory so that 4.0 uses it if loaded (resulting in a
  newer-db-version error instead of an empty database)
- Don't prompt whether to use data directory from the other version's
  profile directory (i.e., Firefox or Standalone) -- just do it
2016-11-12 16:44:34 -05:00
Dan Stillman
2a4c2a66c6 Update locales from Transifex 2016-10-15 16:16:18 -04:00
Dan Stillman
f0aafe4c21 Update locales from Transifex 2016-10-09 01:07:49 -04:00
Dan Stillman
30f2ecd75a Move most item field search conditions into submenu
This could be extended to address #118/#145, but for now it makes some of the
more common search conditions (Creator, Collection, etc.) more prominent.
2016-10-09 01:02:44 -04:00
Dan Stillman
3fac25a463 Tweak empty library warning message 2016-10-04 02:59:53 -04:00
Dan Stillman
302e31ebff Update locales from Transifex 2016-10-03 13:49:58 -04:00