* Load translations for Javascript in page template
* Normalise language codes to gettext format with underscores
* .mo files need to be under LC_MESSAGES as well
* remove unused JS code
* Normalise result in test
* Fix for opening files on Py 2
* Fix location of I18N directory
* Add translation files to package_data
This avoids making lots of HTTP requests as we rapidly change the favicon
between the 'notebook' (idle) and 'busy' icons. Now it should be no more
than one per second in the most pathological case.
Closes gh-2673
without this, it is not possible to select any text using the mouse in
the contents of the modal. For example: editing the notebook metadata
JSON you end up just moving the whole box around instead of being able
to select a portion of the JSON using the mouse.
- Cookie-authenticated API requests must use set X-XSRFToken header
- add utils.ajax for making ajax requests, adding xsrf header from default location
See https://bugs.jquery.com/ticket/9841. In our case, the OutputArea was triggering a ‘resize’ event on its element, which was bubbling up and causing this handler to execute every time an output was appended. This was a pretty big drain on output areas that quickly changed (like for interact widgets), presumably since this function involves a DOM read to get heights.
The only real fix is an errant `+` on the final replacement, which would end up skipping sequential replacements.
- leaves trailing `\r` on the text, if there is one
- use groups to avoid unnecessary replace calls (no change)
- includes test
rather than throwing handler errors in the call to `.trigger()`
Extensions can register buggy event handlers.
These should not be able to cause failures in the event-triggering code paths.
This should fix several avenues where extensions (or other bugs) could prevent a notebook from loading.