Commit graph

2494 commits

Author SHA1 Message Date
Gina Häußge
da58b14124 Display a message when no additional language packs are installed 2015-06-02 14:41:56 +02:00
Gina Häußge
02b7085543 Merge branch 'dev/translationsAsPackages' into devel
Conflicts:
	src/octoprint/server/__init__.py
2015-06-02 13:58:40 +02:00
Gina Häußge
fb85b228f0 Merge branch 'dev/translationsAsPackages' of github.com:foosel/OctoPrint into dev/translationsAsPackages
Conflicts:
	src/octoprint/server/__init__.py
	src/octoprint/server/util/flask.py
	src/octoprint/server/views.py
2015-06-02 13:46:10 +02:00
Gina Häußge
52dd2ad7ac Management dialog for language packs
Allows managing language packs of core OctoPrint and plugins.
2015-06-02 13:39:10 +02:00
Gina Häußge
5904d01bff Unbundled translations, added new tools to bundle and pack translations
The only translation that is going to be bundled with OctoPrint for now will be .de, if at all. The reason simply being that this is the only translation I can update myself and hence guarantee a good user experience for.

setup.py now offers two new commands, babel_bundle and babel_pack, with which translations for plugins and core OctoPrint can be automatically bundled or packed as language packs once compiled. This should make sharing translations quite easy in the future.
2015-06-02 13:38:08 +02:00
Gina Häußge
7f8a3849c7 Adjusted messages.js compilation, debugged new i18n handling and added logging 2015-06-02 13:31:41 +02:00
Gina Häußge
106b21f288 New hook for specifying custom template types
TODO: documentation
2015-06-01 11:41:54 +02:00
Gina Häußge
e8c37287fe Forgot a dependency for the bundled plugin manager
Thanks to @Salandora for the heads-up
2015-05-31 11:10:40 +02:00
Gina Häußge
449dd4301e Allow translations to be stored in ~/.octoprint
That is the first step towards downloadable (and separately managed) translation packages, decoupled from the software's release cycle and source control. Since it will be impossible to properly maintain all languages concurrently with OctoPrint's releases, decoupling that will hopefully increase the user experience through preventing broken translations (or stalling releases due to having to wait for the translations to be updated).
2015-05-29 19:44:11 +02:00
Gina Häußge
baf2a77e18 Updated German translation 2015-05-29 18:49:20 +02:00
Gina Häußge
ab1d28bb27 Removed some outdated code from the cura settings dialog 2015-05-29 18:48:58 +02:00
Gina Häußge
71319942d9 Fix: Don't have plugin i18n paths overwrite the core i18n path
Stopped translations bundled with OctoPrint to work
2015-05-29 18:23:16 +02:00
Gina Häußge
ff9765f668 Fixed font size in plugin manager's repository options 2015-05-29 16:46:22 +02:00
Gina Häußge
caef322b65 The Plugin Manager is now bundled with OctoPrint 2015-05-29 16:31:43 +02:00
Gina Häußge
a42868d7eb Allow marking plugins as uninstalled
Sometimes they will still get discovered by python even though their packages have since been uninstalled.
This will also lead to them being reloaded after an uninstall and a subsequent plugin reload.

Marking them as uninstalled and not handing out uninstalled plugins when collecting them solves this.
2015-05-29 16:25:18 +02:00
Gina Häußge
0143911fe1 Added an EditorConfig file
See http://editorconfig.org/
2015-05-29 11:58:36 +02:00
Gina Häußge
f2192ba232 Fix: Re-open detected serial port with specified baudrate
The serial port was previously kept open from the Stk500 initialization, which defaults to 115200 baud.

Closes #892
2015-05-29 11:36:36 +02:00
Gina Häußge
1a80aa854f Fix: "gcode" var was not properly parsed for queuing and queued command phases
Thanks @C-o-r-E for the heads-up
2015-05-28 20:20:51 +02:00
Gina Häußge
42e32487da Merge branch 'devel' of github.com:foosel/OctoPrint into devel 2015-05-28 19:17:26 +02:00
Gina Häußge
1e3f75c852 Merge branch 'rotate90' of https://github.com/markwal/OctoPrint into pr/markwal/rotate90
Conflicts:
	src/octoprint/static/css/octoprint.css
	src/octoprint/static/less/octoprint.less
2015-05-28 19:14:02 +02:00
Gina Häußge
1e65335173 Merge pull request #914 from aerickson/scripts_set_priority
scripts: init and default files now specify a process priority.
2015-05-28 17:59:27 +02:00
Gina Häußge
61af59cca1 New hooks for command processing in comm layer
Added phase specific hooks for queuing, queued, sending and sent phases of a command ("octoprint.comm.protocol.gcode.<phase>"). Removed old queuing phase hook and declared as obsolete hook in plugin manager to prevent plugins that depend on it from being enabled.

Adding those new hooks also necessitated refactoring the whole command processing, made it more modular and added phase specific handler functions that allow handling all blocking commands centrally for example.
2015-05-28 17:06:24 +02:00
Gina Häußge
1458503561 Logging for the virtual printer... 2015-05-28 17:03:03 +02:00
Gina Häußge
046fffdd14 Fixed a deadlock in the communication layer when pausing via M0
Using reentrant locks to allow sending of additional commands
2015-05-28 16:10:48 +02:00
Andrew Erickson
3aa04448ff scripts: init and default files now specify a process priority.
default to priority of 18 (nicelevel of -2).
2015-05-28 05:04:58 -07:00
Gina Häußge
2cfa3d9218 Refuse to enable plugins that utilize obsolete hooks
Since it cannot be reliably determined by the system if a hook is essential for a plugin's functionality or not, it makes more sense to just disable plugins that utilize obsolete hooks then risk running half working plugins.
2015-05-28 12:56:42 +02:00
Mark Walker
a294fb4e8b Use a namespace for the jquery event so it will be less likely to stomp
on another event handler that may be added elsewhere.
2015-05-27 23:11:33 -07:00
Gina Häußge
ceb0e29da3 Changed existing octoprint.server.http.* hooks to prefix routes with /plugin/<identifier>/
This will hopefully prevent conflicting routes between multiple plugins from being registered and also ensures a more consistent behaviour compared to BlueprintPlugin mixins.

 Thanks to @Salandora for bringing this up.
2015-05-27 14:30:41 +02:00
Gina Häußge
3823216319 Some new styles for forms usable by plugins 2015-05-27 13:36:33 +02:00
Gina Häußge
3ac2d5dd34 Fixed Z-Timelapse for Z changes on `G1` moves
Solves #909
2015-05-26 18:46:50 +02:00
Gina Häußge
5a89cc6a2a [doc] Added example for the octoprint.server.http.routes hook 2015-05-26 14:29:22 +02:00
Gina Häußge
5c2a9ce5db Allow downloading all uploaded files, not just gcode and stl
Hidden files (starting with .) will produce a 404. This also excludes .metadata.yaml from being downloadable. The alternative of adding all extensions defined by plugins to the regex dynamically was not chosen since that would necessitate to make plugins implementing the "octoprint.filemanager.extension_tree" hook restart needing plugins in the lifecycle management for a minimal gain in perceived security.

Solves #897
2015-05-26 13:55:04 +02:00
Gina Häußge
2317d0cf27 Documentation for new hook "octoprint.server.http.routes" 2015-05-26 13:16:57 +02:00
Gina Häußge
ad054338b5 More/fixed documentation on the octoprint.server.util module 2015-05-26 13:16:01 +02:00
Mark Walker
42f06d5147 Request issue #895: Rotate webcam image
Added a setting to allow -90 degree rotation. Combined with fliph and
flipv, I think this means every one of the 8 major orientations is covered
(2^3). 0, 90, 180, 270 times 2 (mirror image in each rotation). I chose
-90 instead of 90 because that keeps the upper left corner pinned to the
same spot.
The extra ms-transforms aren't for this issue exactly but allowed me to
test my changes in ie. I've tested Chrome, Firefox and IE11. I don't
have Safari handy, but if it breaks it *should* be only when this is
enabled.
2015-05-24 17:02:32 -07:00
Gina Häußge
7263fb74a9 Merge pull request #901 from markwal/handleErrorsShortform
Only eat two characters when the error indicator is '!!'
2015-05-21 19:04:23 +02:00
Gina Häußge
e8ca6709b9 New hook "octoprint.server.http.routes" to extend static tornado routes through plugins
TODO: docs

Thanks @Salandora
2015-05-21 18:07:15 +02:00
Mark Walker
50c95e439d Only eat two characters when the error indicator is '!!' 2015-05-20 20:06:24 -07:00
Gina Häußge
fa57f160dc Log cancelled prints only once
Thanks to @imrahil for the headsup
2015-05-13 14:00:12 +02:00
Gina Häußge
45cda586d2 Fix: Make pip install -e . work properly by linking to ./src, not ./ 2015-05-13 08:37:36 +02:00
Gina Häußge
24a020a5f0 Added "plugins" extra to OctoPrint
Installs dependencies necessary/recommended for plugin development. At the moment that is only cookiecutter.
2015-05-12 21:38:04 +02:00
Gina Häußge
37ee1d6780 octoprint.setuptools => octoprint_setuptools (own package)
Otherwise we get import issues during build since the octoprint module depends on the dependencies already being present what they obviously can't be at the beginning of setup.
2015-05-12 20:36:38 +02:00
Gina Häußge
9e9189727f Removed javascript babel files superseded by new central i18n js template 2015-05-12 17:38:22 +02:00
Gina Häußge
05fd4fbc8a Some final touches to the new setuptools submodule
CleanCommand should never touch .git subfolders. Plugin CleanCommand should remove plugin's egg-info files
2015-05-12 17:34:00 +02:00
Gina Häußge
95062747ef Extracted setuptools related things into reusable package
Babel related commands and the Clean command for setup.py are not reusable by plugins as well. Also added a factory method for plugin setup parameters.
2015-05-12 17:20:31 +02:00
Gina Häußge
6465e2dc2f Don't try to include a i18n js file when g.locale is not set 2015-05-12 13:54:36 +02:00
Gina Häußge
074d7a017e Wrapped some texts in translation brackets 2015-05-12 12:22:26 +02:00
Gina Häußge
739a185d1b Logging for flask view caching 2015-05-12 12:22:10 +02:00
Gina Häußge
9f54985ce5 Also support client side translations for plugins 2015-05-12 11:58:48 +02:00
Gina Häußge
b908ff5821 Enhanced flask-babel to also allow plugins to provide translated strings
This way plugins can maintain their own translations of their UIs. Some monkey patching was necessary, not the cleanest solution but it should work.
2015-05-11 18:44:30 +02:00