diff --git a/.gitignore b/.gitignore index f58f8f83fc..2c2eb30106 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,6 @@ src Read the Docs config.rst +/.project +/.pydevproject + diff --git a/bower.json b/bower.json index 98bcbc2fc0..52ca303be6 100644 --- a/bower.json +++ b/bower.json @@ -9,6 +9,7 @@ "es6-promise": "~1.0", "font-awesome": "components/font-awesome#~4.7.0", "google-caja": "5669", + "jed": "~1.1.1", "jquery": "components/jquery#~2.0", "jquery-typeahead": "~2.0.0", "jquery-ui": "components/jqueryui#~1.10", @@ -19,6 +20,8 @@ "preact-compat": "https://unpkg.com/preact-compat@^3.14.3/dist/preact-compat.min.js", "proptypes": "https://unpkg.com/proptypes@^0.14.4/index.js", "requirejs": "~2.1", + "requirejs-text": "~2.0.15", + "requirejs-plugins": "~1.0.3", "text-encoding": "~0.1", "underscore": "components/underscore#~1.8.3", "xterm.js": "sourcelair/xterm.js#~2.8.1" diff --git a/notebook/i18n/README.md b/notebook/i18n/README.md new file mode 100644 index 0000000000..e439142574 --- /dev/null +++ b/notebook/i18n/README.md @@ -0,0 +1,122 @@ +# Implementation Notes for Internationalization of Jupyter Notebook + +This is a prototype implementation of i18n features for Jupyter notebook, and should not +yet be considered ready for production use. I have tried to focus on the public user +interfaces in the notebook for the first cut, while leaving much of the console messages +behind, as their usefulness in a translated environment is questionable at best. + +### Using a prototype translated version + +In order to use this preliminary version, you need to do things after installing the +notebook as normal: + +1. Set the LANG environment variable in your shell to "xx_XX" or just "xx". +where "xx" is the language code you're wanting to run in. If you're +running on Windows, I've found the easiest way to do this is to use Windows PowerShell, +and run the command: + +`${Env:LANG} = "xx_XX"` + +2. Set the preferred language for web pages in your browser to YourLanguage (xx). At the moment, +it has to be first in the list. + +3. Run the `jupyter notebook` command to start the notebook. + +### Message extraction: + +I have split out the translatable material for the notebook into 3 POT, as follows: + +notebook/i18n/notebook.pot - Console and startup messages, basically anything that is + produced by Python code. + +notebook/i18n/nbui.pot - User interface strings, as extracted from the Jinja2 templates + in notebook/templates/*.html + +noteook/i18n/nbjs.pot - JavaScript strings and dialogs, which contain much of the visible + user interface for Jupyter notebook. + +To extract the messages from the source code whenever new material is added, use the +`pybabel` command to extract messages from the source code as follows: +( assuming you are in the base directory for Jupyter notebook ) + +`pybabel extract -F notebook/i18n/babel_notebook.cfg -o notebook/i18n/notebook.pot --no-wrap --project Jupyter .` +`pybabel extract -F notebook/i18n/babel_nbui.cfg -o notebook/i18n/nbui.pot --no-wrap --project Jupyter .` +`pybabel extract -F notebook/i18n/babel_nbjs.cfg -o notebook/i18n/nbjs.pot --no-wrap --project Jupyter .` + +(Note: there is a '.' at the end of these commands, and it has to be there...) + +After this is complete you have 3 POT files that you can give to a translator for your favorite language. +Babel's documentation has instructions on how to integrate this into your setup.py so that eventually +we can just do: + +`setup.py extract_messages` + +I hope to get this working at some point in the near future. + +### Post translation procedures + +After the source material has been translated, you should have 3 PO files with the same base names +as the POT files above. Put them in `notebook/i18n/${LANG}/LC_MESSAGES`, where ${LANG} is the language +code for your desired language ( i.e. German = "de", Japanese = "ja", etc. ). The first 2 files then +need to be converted from PO to MO format for use at runtime. There are many different ways to do +this, but pybabel has an option to do this as follows: + +`pybabel compile -D notebook -f -l ${LANG} -i notebook/i18n/${LANG}/LC_MESSAGES/notebook.po -o notebook/i18n/${LANG}/notebook.mo` + +`pybabel compile -D nbui -f -l ${LANG} -i notebook/i18n/${LANG}/LC_MESSAGES/nbui.po -o notebook/i18n/${LANG}/nbui.mo` + +The nbjs.po needs to be converted to JSON for use within the JavaScript code. I'm using po2json for this, as follows: + +`po2json -p -F -f jed1.x -d nbjs notebook/i18n/${LANG}/LC_MESSAGES/nbjs.po notebook/i18n/${LANG}/LC_MESSAGES/nbjs.json` + +The conversions from PO to MO probably can and should be done during setup.py. + +When new languages get added, their language codes should be added to notebook/i18n/nbjs.json +under the "supported_languages" element. + +### Tips for Jupyter developers + +The biggest "mistake" I found while doing i18n enablement was the habit of constructing UI messages +from English "piece parts". For example, code like: + + +`var msg = "Enter a new " + type + "name:"` + +where "type" is either "file", "directory", or "notebook".... + +is problematic when doing translations, because the surrounding text may need to vary +depending on the inserted word. In this case, you need to switch it and use complete phrases, +as follows: + +```javascript +var rename_msg = function (type) { + switch(type) { + case 'file': return _("Enter a new file name:"); + case 'directory': return _("Enter a new directory name:"); + case 'notebook': return _("Enter a new notebook name:"); + default: return _("Enter a new name:"); + } +} +``` + +Also you need to remember that adding an "s" or "es" to an English word to +create the plural form doesn't translate well. Some languages have as many as 5 or 6 different +plural forms for differing numbers, so using an API such as ngettext() is necessary in order +to handle these cases properly. + +### Known issues + +1. Right now there are two different places where the desired language is set. At startup time, the Jupyter console's messages pay attention to the setting of the ${LANG} environment variable +as set in the shell at startup time. Unfortunately, this is also the time where the Jinja2 +environment is set up, which means that the template stuff will always come from this setting. +We really want to be paying attention to the browser's settings for the stuff that happens in the +browser, so we need to be able to retrieve this information after the browser is started and somehow +communicate this back to Jinja2. So far, I haven't yet figured out how to do this, which means that if the ${LANG} at startup doesn't match the browser's settings, you could potentially get a mix +of languages in the UI ( never a good thing ). + +2. We will need to decide if console messages should be translatable, and enable them if desired. +3. The keyboard shorcut editor was implemented after the i18n work was completed, so that portion +does not have translation support at this time. + +Any questions or comments please let me know @JCEmmons on github (emmo@us.ibm.com) + diff --git a/notebook/i18n/babel_nbjs.cfg b/notebook/i18n/babel_nbjs.cfg new file mode 100644 index 0000000000..492f24773b --- /dev/null +++ b/notebook/i18n/babel_nbjs.cfg @@ -0,0 +1,11 @@ +[javascript: notebook/static/base/js/*.js] +extract_messages = $._, i18n.msg._ + +[javascript: notebook/static/notebook/js/*.js] +extract_messages = $._, i18n.msg._ + +[javascript: notebook/static/notebook/js/celltoolbarpresets/*.js] +extract_messages = $._, i18n.msg._ + +[javascript: notebook/static/tree/js/*.js] +extract_messages = $._, i18n.msg._ diff --git a/notebook/i18n/babel_nbui.cfg b/notebook/i18n/babel_nbui.cfg new file mode 100644 index 0000000000..271554a8aa --- /dev/null +++ b/notebook/i18n/babel_nbui.cfg @@ -0,0 +1,4 @@ +[jinja2: notebook/templates/**.html] + encoding = utf-8 +[extractors] + jinja2 = jinja2.ext:babel_extract diff --git a/notebook/i18n/babel_notebook.cfg b/notebook/i18n/babel_notebook.cfg new file mode 100644 index 0000000000..d4e3cf9b7b --- /dev/null +++ b/notebook/i18n/babel_notebook.cfg @@ -0,0 +1,2 @@ +[python: notebook/*.py] +[python: notebook/services/contents/*.py] diff --git a/notebook/i18n/nbjs.json b/notebook/i18n/nbjs.json new file mode 100644 index 0000000000..d12cecdca2 --- /dev/null +++ b/notebook/i18n/nbjs.json @@ -0,0 +1,12 @@ +{ + "domain": "nbjs", + "supported_languages": [ + ], + "locale_data": { + "nbjs": { + "": { + "domain": "nbjs" + } + } + } +} diff --git a/notebook/i18n/nbjs.pot b/notebook/i18n/nbjs.pot new file mode 100644 index 0000000000..babef41908 --- /dev/null +++ b/notebook/i18n/nbjs.pot @@ -0,0 +1,1927 @@ +# Translations template for Jupyter. +# Copyright (C) 2017 ORGANIZATION +# This file is distributed under the same license as the Jupyter project. +# FIRST AUTHOR , 2017. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Jupyter VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-06-27 14:04-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.3.4\n" + +#: notebook/static/base/js/dialog.js:161 +msgid "Manually edit the JSON below to manipulate the metadata for this cell." +msgstr "" + +#: notebook/static/base/js/dialog.js:163 +msgid "Manually edit the JSON below to manipulate the metadata for this notebook." +msgstr "" + +#: notebook/static/base/js/dialog.js:165 +msgid " We recommend putting custom metadata attributes in an appropriately named substructure, so they don't conflict with those of others." +msgstr "" + +#: notebook/static/base/js/dialog.js:180 +msgid "Edit the metadata" +msgstr "" + +#: notebook/static/base/js/dialog.js:202 +msgid "Edit Notebook Metadata" +msgstr "" + +#: notebook/static/base/js/dialog.js:204 +msgid "Edit Cell Metadata" +msgstr "" + +#: notebook/static/base/js/dialog.js:208 +#: notebook/static/notebook/js/notebook.js:475 +#: notebook/static/notebook/js/savewidget.js:71 +#: notebook/static/tree/js/notebooklist.js:859 +#: notebook/static/tree/js/notebooklist.js:1418 +msgid "Cancel" +msgstr "" + +#: notebook/static/base/js/dialog.js:208 +msgid "Edit" +msgstr "" + +#: notebook/static/base/js/dialog.js:208 +#: notebook/static/notebook/js/kernelselector.js:278 +#: notebook/static/notebook/js/mathjaxutils.js:42 +#: notebook/static/notebook/js/notebook.js:469 +#: notebook/static/notebook/js/notificationarea.js:187 +#: notebook/static/notebook/js/savewidget.js:71 +#: notebook/static/tree/js/newnotebook.js:97 +#: notebook/static/tree/js/notebooklist.js:859 +msgid "OK" +msgstr "" + +#: notebook/static/base/js/dialog.js:208 +msgid "Apply" +msgstr "" + +#: notebook/static/base/js/dialog.js:225 +msgid "WARNING: Could not save invalid JSON." +msgstr "" + +#: notebook/static/base/js/dialog.js:247 +msgid "There are no attachments for this cell." +msgstr "" + +#: notebook/static/base/js/dialog.js:250 +msgid "Current cell attachments" +msgstr "" + +#: notebook/static/base/js/dialog.js:259 +#: notebook/static/notebook/js/celltoolbarpresets/attachments.js:46 +msgid "Attachments" +msgstr "" + +#: notebook/static/base/js/dialog.js:283 +msgid "Restore" +msgstr "" + +#: notebook/static/base/js/dialog.js:293 +#: notebook/static/tree/js/notebooklist.js:1018 +msgid "Delete" +msgstr "" + +#: notebook/static/base/js/dialog.js:342 notebook/static/base/js/dialog.js:386 +msgid "Edit attachments" +msgstr "" + +#: notebook/static/base/js/dialog.js:348 +msgid "Edit Notebook Attachments" +msgstr "" + +#: notebook/static/base/js/dialog.js:350 +msgid "Edit Cell Attachments" +msgstr "" + +#: notebook/static/base/js/dialog.js:373 +msgid "Select a file to insert." +msgstr "" + +#: notebook/static/base/js/dialog.js:399 +msgid "Select a file" +msgstr "" + +#: notebook/static/notebook/js/about.js:14 +msgid "You are using Jupyter notebook." +msgstr "" + +#: notebook/static/notebook/js/about.js:16 +msgid "The version of the notebook server is: " +msgstr "" + +#: notebook/static/notebook/js/about.js:22 +msgid "The server is running on this version of Python:" +msgstr "" + +#: notebook/static/notebook/js/about.js:25 +msgid "Waiting for kernel to be available..." +msgstr "" + +#: notebook/static/notebook/js/about.js:27 +msgid "Server Information:" +msgstr "" + +#: notebook/static/notebook/js/about.js:29 +msgid "Current Kernel Information:" +msgstr "" + +#: notebook/static/notebook/js/about.js:32 +msgid "Could not access sys_info variable for version information." +msgstr "" + +#: notebook/static/notebook/js/about.js:34 +msgid "Cannot find sys_info!" +msgstr "" + +#: notebook/static/notebook/js/about.js:38 +msgid "About Jupyter Notebook" +msgstr "" + +#: notebook/static/notebook/js/about.js:47 +msgid "unable to contact kernel" +msgstr "" + +#: notebook/static/notebook/js/actions.js:69 +msgid "toggle rtl layout" +msgstr "" + +#: notebook/static/notebook/js/actions.js:70 +msgid "Toggle the screen directionality between left-to-right and right-to-left" +msgstr "" + +#: notebook/static/notebook/js/actions.js:76 +msgid "edit command mode keyboard shortcuts" +msgstr "" + +#: notebook/static/notebook/js/actions.js:77 +msgid "Open a dialog to edit the command mode keyboard shortcuts" +msgstr "" + +#: notebook/static/notebook/js/actions.js:97 +msgid "restart kernel" +msgstr "" + +#: notebook/static/notebook/js/actions.js:98 +msgid "restart the kernel (no confirmation dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:106 +msgid "confirm restart kernel" +msgstr "" + +#: notebook/static/notebook/js/actions.js:107 +msgid "restart the kernel (with dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:113 +msgid "restart kernel and run all cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:114 +msgid "restart the kernel, then re-run the whole notebook (no confirmation dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:120 +msgid "confirm restart kernel and run all cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:121 +msgid "restart the kernel, then re-run the whole notebook (with dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:127 +msgid "restart kernel and clear output" +msgstr "" + +#: notebook/static/notebook/js/actions.js:128 +msgid "restart the kernel and clear all output (no confirmation dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:134 +msgid "confirm restart kernel and clear output" +msgstr "" + +#: notebook/static/notebook/js/actions.js:135 +msgid "restart the kernel and clear all output (with dialog)" +msgstr "" + +#: notebook/static/notebook/js/actions.js:142 +#: notebook/static/notebook/js/actions.js:143 +msgid "interrupt the kernel" +msgstr "" + +#: notebook/static/notebook/js/actions.js:150 +msgid "run cell and select next" +msgstr "" + +#: notebook/static/notebook/js/actions.js:152 +msgid "run cell, select below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:159 +#: notebook/static/notebook/js/actions.js:160 +msgid "run selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:167 +#: notebook/static/notebook/js/actions.js:168 +msgid "run cell and insert below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:175 +#: notebook/static/notebook/js/actions.js:176 +msgid "run all cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:183 +#: notebook/static/notebook/js/actions.js:184 +msgid "run all cells above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:190 +#: notebook/static/notebook/js/actions.js:191 +msgid "run all cells below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:197 +#: notebook/static/notebook/js/actions.js:198 +msgid "enter command mode" +msgstr "" + +#: notebook/static/notebook/js/actions.js:205 +#: notebook/static/notebook/js/actions.js:206 +msgid "insert image" +msgstr "" + +#: notebook/static/notebook/js/actions.js:213 +#: notebook/static/notebook/js/actions.js:214 +msgid "cut cell attachments" +msgstr "" + +#: notebook/static/notebook/js/actions.js:221 +#: notebook/static/notebook/js/actions.js:222 +msgid "copy cell attachments" +msgstr "" + +#: notebook/static/notebook/js/actions.js:229 +#: notebook/static/notebook/js/actions.js:230 +msgid "paste cell attachments" +msgstr "" + +#: notebook/static/notebook/js/actions.js:237 +#: notebook/static/notebook/js/actions.js:238 +msgid "split cell at cursor" +msgstr "" + +#: notebook/static/notebook/js/actions.js:245 +#: notebook/static/notebook/js/actions.js:246 +msgid "enter edit mode" +msgstr "" + +#: notebook/static/notebook/js/actions.js:253 +msgid "select previous cell" +msgstr "" + +#: notebook/static/notebook/js/actions.js:254 +msgid "select cell above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:265 +msgid "select next cell" +msgstr "" + +#: notebook/static/notebook/js/actions.js:266 +msgid "select cell below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:277 +msgid "extend selection above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:278 +msgid "extend selected cells above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:289 +msgid "extend selection below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:290 +msgid "extend selected cells below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:301 +#: notebook/static/notebook/js/actions.js:302 +msgid "cut selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:312 +#: notebook/static/notebook/js/actions.js:313 +msgid "copy selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:327 +#: notebook/static/notebook/js/actions.js:328 +msgid "paste cells above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:335 +#: notebook/static/notebook/js/actions.js:336 +msgid "paste cells below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:344 +#: notebook/static/notebook/js/actions.js:345 +msgid "insert cell above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:354 +#: notebook/static/notebook/js/actions.js:355 +msgid "insert cell below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:365 +#: notebook/static/notebook/js/actions.js:366 +msgid "change cell to code" +msgstr "" + +#: notebook/static/notebook/js/actions.js:373 +#: notebook/static/notebook/js/actions.js:374 +msgid "change cell to markdown" +msgstr "" + +#: notebook/static/notebook/js/actions.js:381 +#: notebook/static/notebook/js/actions.js:382 +msgid "change cell to raw" +msgstr "" + +#: notebook/static/notebook/js/actions.js:389 +#: notebook/static/notebook/js/actions.js:390 +msgid "change cell to heading 1" +msgstr "" + +#: notebook/static/notebook/js/actions.js:397 +#: notebook/static/notebook/js/actions.js:398 +msgid "change cell to heading 2" +msgstr "" + +#: notebook/static/notebook/js/actions.js:405 +#: notebook/static/notebook/js/actions.js:406 +msgid "change cell to heading 3" +msgstr "" + +#: notebook/static/notebook/js/actions.js:413 +#: notebook/static/notebook/js/actions.js:414 +msgid "change cell to heading 4" +msgstr "" + +#: notebook/static/notebook/js/actions.js:421 +#: notebook/static/notebook/js/actions.js:422 +msgid "change cell to heading 5" +msgstr "" + +#: notebook/static/notebook/js/actions.js:429 +#: notebook/static/notebook/js/actions.js:430 +msgid "change cell to heading 6" +msgstr "" + +#: notebook/static/notebook/js/actions.js:437 +msgid "toggle cell output" +msgstr "" + +#: notebook/static/notebook/js/actions.js:438 +msgid "toggle output of selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:445 +msgid "toggle cell scrolling" +msgstr "" + +#: notebook/static/notebook/js/actions.js:446 +msgid "toggle output scrolling of selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:453 +msgid "clear cell output" +msgstr "" + +#: notebook/static/notebook/js/actions.js:454 +msgid "clear output of selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:460 +msgid "move cells down" +msgstr "" + +#: notebook/static/notebook/js/actions.js:461 +msgid "move selected cells down" +msgstr "" + +#: notebook/static/notebook/js/actions.js:469 +msgid "move cells up" +msgstr "" + +#: notebook/static/notebook/js/actions.js:470 +msgid "move selected cells up" +msgstr "" + +#: notebook/static/notebook/js/actions.js:478 +#: notebook/static/notebook/js/actions.js:479 +msgid "toggle line numbers" +msgstr "" + +#: notebook/static/notebook/js/actions.js:486 +#: notebook/static/notebook/js/actions.js:487 +msgid "show keyboard shortcuts" +msgstr "" + +#: notebook/static/notebook/js/actions.js:494 +msgid "delete cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:495 +msgid "delete selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:502 +#: notebook/static/notebook/js/actions.js:503 +msgid "undo cell deletion" +msgstr "" + +#: notebook/static/notebook/js/actions.js:512 +msgid "merge cell with previous cell" +msgstr "" + +#: notebook/static/notebook/js/actions.js:513 +msgid "merge cell above" +msgstr "" + +#: notebook/static/notebook/js/actions.js:519 +msgid "merge cell with next cell" +msgstr "" + +#: notebook/static/notebook/js/actions.js:520 +msgid "merge cell below" +msgstr "" + +#: notebook/static/notebook/js/actions.js:527 +#: notebook/static/notebook/js/actions.js:528 +msgid "merge selected cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:535 +msgid "merge cells" +msgstr "" + +#: notebook/static/notebook/js/actions.js:536 +msgid "merge selected cells, or current cell with cell below if only one cell is selected" +msgstr "" + +#: notebook/static/notebook/js/actions.js:549 +msgid "show command pallette" +msgstr "" + +#: notebook/static/notebook/js/actions.js:550 +msgid "open the command palette" +msgstr "" + +#: notebook/static/notebook/js/actions.js:557 +msgid "toggle all line numbers" +msgstr "" + +#: notebook/static/notebook/js/actions.js:558 +msgid "toggles line numbers in all cells, and persist the setting" +msgstr "" + +#: notebook/static/notebook/js/actions.js:569 +msgid "show all line numbers" +msgstr "" + +#: notebook/static/notebook/js/actions.js:570 +msgid "show line numbers in all cells, and persist the setting" +msgstr "" + +#: notebook/static/notebook/js/actions.js:579 +msgid "hide all line numbers" +msgstr "" + +#: notebook/static/notebook/js/actions.js:580 +msgid "hide line numbers in all cells, and persist the setting" +msgstr "" + +#: notebook/static/notebook/js/actions.js:589 +msgid "toggle header" +msgstr "" + +#: notebook/static/notebook/js/actions.js:590 +msgid "switch between showing and hiding the header" +msgstr "" + +#: notebook/static/notebook/js/actions.js:605 +#: notebook/static/notebook/js/actions.js:606 +msgid "show the header" +msgstr "" + +#: notebook/static/notebook/js/actions.js:615 +#: notebook/static/notebook/js/actions.js:616 +msgid "hide the header" +msgstr "" + +#: notebook/static/notebook/js/actions.js:646 +msgid "toggle toolbar" +msgstr "" + +#: notebook/static/notebook/js/actions.js:647 +msgid "switch between showing and hiding the toolbar" +msgstr "" + +#: notebook/static/notebook/js/actions.js:660 +#: notebook/static/notebook/js/actions.js:661 +msgid "show the toolbar" +msgstr "" + +#: notebook/static/notebook/js/actions.js:669 +#: notebook/static/notebook/js/actions.js:670 +msgid "hide the toolbar" +msgstr "" + +#: notebook/static/notebook/js/actions.js:678 +#: notebook/static/notebook/js/actions.js:679 +msgid "close the pager" +msgstr "" + +#: notebook/static/notebook/js/actions.js:704 +msgid "ignore" +msgstr "" + +#: notebook/static/notebook/js/actions.js:710 +#: notebook/static/notebook/js/actions.js:711 +msgid "move cursor up" +msgstr "" + +#: notebook/static/notebook/js/actions.js:731 +#: notebook/static/notebook/js/actions.js:732 +msgid "move cursor down" +msgstr "" + +#: notebook/static/notebook/js/actions.js:750 +#: notebook/static/notebook/js/actions.js:751 +msgid "scroll notebook down" +msgstr "" + +#: notebook/static/notebook/js/actions.js:760 +#: notebook/static/notebook/js/actions.js:761 +msgid "scroll notebook up" +msgstr "" + +#: notebook/static/notebook/js/actions.js:770 +msgid "scroll cell center" +msgstr "" + +#: notebook/static/notebook/js/actions.js:771 +msgid "Scroll the current cell to the center" +msgstr "" + +#: notebook/static/notebook/js/actions.js:781 +msgid "scroll cell top" +msgstr "" + +#: notebook/static/notebook/js/actions.js:782 +msgid "Scroll the current cell to the top" +msgstr "" + +#: notebook/static/notebook/js/actions.js:792 +msgid "duplicate notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:793 +msgid "Create and open a copy of the current notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:799 +msgid "trust notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:800 +msgid "Trust the current notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:806 +msgid "rename notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:807 +msgid "Rename the current notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:813 +msgid "toggle all cells output collapsed" +msgstr "" + +#: notebook/static/notebook/js/actions.js:814 +msgid "Toggle the hidden state of all output areas" +msgstr "" + +#: notebook/static/notebook/js/actions.js:820 +msgid "toggle all cells output scrolled" +msgstr "" + +#: notebook/static/notebook/js/actions.js:821 +msgid "Toggle the scrolling state of all output areas" +msgstr "" + +#: notebook/static/notebook/js/actions.js:828 +msgid "clear all cells output" +msgstr "" + +#: notebook/static/notebook/js/actions.js:829 +msgid "Clear the content of all the outputs" +msgstr "" + +#: notebook/static/notebook/js/actions.js:835 +msgid "save notebook" +msgstr "" + +#: notebook/static/notebook/js/actions.js:836 +msgid "Save and Checkpoint" +msgstr "" + +#: notebook/static/notebook/js/cell.js:79 +msgid "Warning: accessing Cell.cm_config directly is deprecated." +msgstr "" + +#: notebook/static/notebook/js/cell.js:763 +#, python-format +msgid "Unrecognized cell type: %s" +msgstr "" + +#: notebook/static/notebook/js/cell.js:777 +msgid "Unrecognized cell type" +msgstr "" + +#: notebook/static/notebook/js/celltoolbar.js:296 +#, python-format +msgid "Error in cell toolbar callback %s" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:53 +#, python-format +msgid "Clipboard types: %s" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:96 +msgid "Dialog for paste from system clipboard" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:109 +msgid "Ctrl-V" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:111 +msgid "Cmd-V" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:113 +#, python-format +msgid "Press %s again to paste" +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:116 +msgid "Why is this needed? " +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:118 +msgid "We can't get paste events in this browser without a text box. " +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:119 +msgid "There's an invisible text box focused in this dialog." +msgstr "" + +#: notebook/static/notebook/js/clipboard.js:125 +#, python-format +msgid "%s to paste" +msgstr "" + +#: notebook/static/notebook/js/codecell.js:310 +msgid "Can't execute cell since kernel is not set." +msgstr "" + +#: notebook/static/notebook/js/codecell.js:472 +msgid "In" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:269 +#, python-format +msgid "Could not find a kernel matching %s. Please select a kernel:" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:278 +msgid "Continue Without Kernel" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:278 +msgid "Set Kernel" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:281 +msgid "Kernel not found" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:319 +#: notebook/static/tree/js/newnotebook.js:99 +msgid "Creating Notebook Failed" +msgstr "" + +#: notebook/static/notebook/js/kernelselector.js:320 +#: notebook/static/tree/js/notebooklist.js:1360 +#, python-format +msgid "The error was: %s" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:54 +msgid "Run" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:76 +msgid "Code" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:77 +msgid "Markdown" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:78 +msgid "Raw NBConvert" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:79 +msgid "Heading" +msgstr "" + +#: notebook/static/notebook/js/maintoolbar.js:115 +msgid "unrecognized cell type:" +msgstr "" + +#: notebook/static/notebook/js/mathjaxutils.js:45 +#, python-format +msgid "Failed to retrieve MathJax from '%s'" +msgstr "" + +#: notebook/static/notebook/js/mathjaxutils.js:47 +msgid "Math/LaTeX rendering will be disabled." +msgstr "" + +#: notebook/static/notebook/js/menubar.js:220 +msgid "Trusted Notebook" +msgstr "" + +#: notebook/static/notebook/js/menubar.js:226 +msgid "Trust Notebook" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:16 +#: notebook/static/notebook/js/menubar.js:383 +msgid "None" +msgstr "" + +#: notebook/static/notebook/js/menubar.js:406 +msgid "No checkpoints" +msgstr "" + +#: notebook/static/notebook/js/menubar.js:465 +msgid "Opens in a new window" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:431 +msgid "Autosave in progress, latest changes may be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:433 +msgid "Unsaved changes will be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:438 +msgid "The Kernel is busy, outputs may be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:461 +msgid "This notebook is version %1$s, but we only fully support up to %2$s." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:463 +msgid "You can still work with this notebook, but cell and output types introduced in later notebook versions will not be available." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:470 +msgid "Restart and Run All Cells" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:471 +msgid "Restart and Clear All Outputs" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:472 +msgid "Restart" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:473 +msgid "Continue Running" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:474 +msgid "Reload" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:476 +msgid "Overwrite" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:477 +msgid "Trust" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:478 +msgid "Revert" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:483 +msgid "Newer Notebook" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:1548 +msgid "Use markdown headings" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:1550 +msgid "Jupyter no longer uses special heading cells. Instead, write your headings in Markdown cells using # characters:" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:1553 +msgid "## This is a level 2 heading" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2248 +msgid "Restart kernel and re-run the whole notebook?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2250 +msgid "Are you sure you want to restart the current kernel and re-execute the whole notebook? All variables and outputs will be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2275 +msgid "Restart kernel and clear all output?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2277 +msgid "Do you want to restart the current kernel and clear all output? All variables and outputs will be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2322 +msgid "Restart kernel?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2324 +msgid "Do you want to restart the current kernel? All variables will be lost." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2734 +msgid "Notebook changed" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2735 +msgid "The notebook file has changed on disk since the last time we opened or saved it. Do you want to overwrite the file on disk with the version open here, or load the version on disk (reload the page) ?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2782 +#: notebook/static/notebook/js/notebook.js:2990 +msgid "Notebook validation failed" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2785 +msgid "The save operation succeeded, but the notebook does not appear to be valid. The validation error was:" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2836 +msgid "A trusted Jupyter notebook may execute hidden malicious code when you open it. Selecting trust will immediately reload this notebook in a trusted state. For more information, see the Jupyter security documentation: " +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2840 +msgid "here" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2848 +msgid "Trust this notebook?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2981 +msgid "Notebook failed to load" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2983 +msgid "The error was: " +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2987 +msgid "See the error console for details." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2995 +msgid "The notebook also failed validation:" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:2997 +msgid "An invalid notebook may not function properly. The validation error was:" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3036 +#, python-format +msgid "This notebook has been converted from an older notebook format to the current notebook format v(%s)." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3038 +#, python-format +msgid "This notebook has been converted from a newer notebook format to the current notebook format v(%s)." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3046 +msgid "The next time you save this notebook, the current notebook format will be used." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3051 +msgid "Older versions of Jupyter may not be able to read the new format." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3053 +msgid "Some features of the original notebook may not be available." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3056 +msgid "To preserve the original version, close the notebook without saving it." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3061 +msgid "Notebook converted" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3083 +msgid "(No name)" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3131 +#, python-format +msgid "An unknown error occurred while loading this notebook. This version can load notebook formats %s or earlier. See the server log for details." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3142 +msgid "Error loading notebook" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3243 +msgid "Are you sure you want to revert the notebook to the latest checkpoint?" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3246 +msgid "This cannot be undone." +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3249 +msgid "The checkpoint was last updated at:" +msgstr "" + +#: notebook/static/notebook/js/notebook.js:3260 +msgid "Revert notebook to checkpoint" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:77 +#: notebook/static/notebook/js/tour.js:61 +#: notebook/static/notebook/js/tour.js:67 +msgid "Edit Mode" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:84 +#: notebook/static/notebook/js/notificationarea.js:88 +#: notebook/static/notebook/js/tour.js:54 +msgid "Command Mode" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:95 +msgid "Kernel Created" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:99 +msgid "Connecting to kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:103 +msgid "Not Connected" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:106 +msgid "click to reconnect" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:115 +msgid "Restarting kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:129 +msgid "Kernel Restarting" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:130 +msgid "The kernel appears to have died. It will restart automatically." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:140 +#: notebook/static/notebook/js/notificationarea.js:198 +#: notebook/static/notebook/js/notificationarea.js:218 +msgid "Dead kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:141 +#: notebook/static/notebook/js/notificationarea.js:219 +#: notebook/static/notebook/js/notificationarea.js:266 +msgid "Kernel Dead" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:145 +msgid "Interrupting kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:151 +msgid "No Connection to Kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:161 +msgid "A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:166 +msgid "Connection failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:179 +msgid "No kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:180 +msgid "Kernel is not running" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:187 +msgid "Don't Restart" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:187 +msgid "Try Restarting Now" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:191 +msgid "The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:225 +msgid "No Kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:252 +msgid "Failed to start the kernel" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:272 +#: notebook/static/notebook/js/notificationarea.js:292 +#: notebook/static/notebook/js/notificationarea.js:306 +msgid "Kernel Busy" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:273 +msgid "Kernel starting, please wait..." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:279 +#: notebook/static/notebook/js/notificationarea.js:286 +msgid "Kernel Idle" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:280 +msgid "Kernel ready" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:297 +msgid "Using kernel: " +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:298 +msgid "Only candidate for language: %1$s was %2$s." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:319 +msgid "Loading notebook" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:322 +msgid "Notebook loaded" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:325 +msgid "Saving notebook" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:328 +msgid "Notebook saved" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:331 +msgid "Notebook save failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:334 +msgid "Notebook copy failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:339 +msgid "Checkpoint created" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:347 +msgid "Checkpoint failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:350 +msgid "Checkpoint deleted" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:353 +msgid "Checkpoint delete failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:356 +msgid "Restoring to checkpoint..." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:359 +msgid "Checkpoint restore failed" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:364 +msgid "Autosave disabled" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:367 +#, python-format +msgid "Saving every %d sec." +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:383 +msgid "Trusted" +msgstr "" + +#: notebook/static/notebook/js/notificationarea.js:385 +msgid "Not Trusted" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:75 +msgid "click to expand output" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:79 +msgid "click to expand output; double click to hide output" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:167 +msgid "click to unscroll output; double click to hide" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:174 +msgid "click to scroll output; double click to hide" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:422 +msgid "Javascript error adding output!" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:427 +msgid "See your browser Javascript console for more details." +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:468 +#, python-format +msgid "Out[%d]:" +msgstr "" + +#: notebook/static/notebook/js/outputarea.js:577 +#, python-format +msgid "Unrecognized output: %s" +msgstr "" + +#: notebook/static/notebook/js/pager.js:36 +msgid "Open the pager in an external window" +msgstr "" + +#: notebook/static/notebook/js/pager.js:45 +msgid "Close the pager" +msgstr "" + +#: notebook/static/notebook/js/pager.js:148 +msgid "Jupyter Pager" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:39 +#: notebook/static/notebook/js/quickhelp.js:49 +#: notebook/static/notebook/js/quickhelp.js:50 +msgid "go to cell start" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:40 +#: notebook/static/notebook/js/quickhelp.js:51 +#: notebook/static/notebook/js/quickhelp.js:52 +msgid "go to cell end" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:41 +#: notebook/static/notebook/js/quickhelp.js:53 +msgid "go one word left" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:42 +#: notebook/static/notebook/js/quickhelp.js:54 +msgid "go one word right" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:43 +#: notebook/static/notebook/js/quickhelp.js:55 +msgid "delete word before" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:44 +#: notebook/static/notebook/js/quickhelp.js:56 +msgid "delete word after" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:61 +msgid "code completion or indent" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:62 +msgid "tooltip" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:63 +msgid "indent" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:64 +msgid "dedent" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:65 +msgid "select all" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:66 +msgid "undo" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:67 +#: notebook/static/notebook/js/quickhelp.js:68 +msgid "redo" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:102 +#: notebook/static/notebook/js/quickhelp.js:243 +msgid "Shift" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:103 +msgid "Alt" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:104 +msgid "Up" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:105 +msgid "Down" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:106 +msgid "Left" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:107 +msgid "Right" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:108 +#: notebook/static/notebook/js/quickhelp.js:246 +msgid "Tab" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:109 +msgid "Caps Lock" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:110 +#: notebook/static/notebook/js/quickhelp.js:269 +msgid "Esc" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:111 +msgid "Ctrl" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:112 +#: notebook/static/notebook/js/quickhelp.js:290 +msgid "Enter" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:113 +msgid "Page Up" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:114 +#: notebook/static/notebook/js/quickhelp.js:130 +msgid "Page Down" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:115 +msgid "Home" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:116 +msgid "End" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:117 +#: notebook/static/notebook/js/quickhelp.js:245 +msgid "Space" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:118 +msgid "Backspace" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:119 +msgid "Minus" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:130 +msgid "PageUp" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:197 +msgid "The Jupyter Notebook has two different keyboard input modes." +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:199 +msgid "Edit mode allows you to type code or text into a cell and is indicated by a green cell border." +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:201 +msgid "Command mode binds the keyboard to notebook level commands and is indicated by a grey cell border with a blue left margin." +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:222 +#: notebook/static/notebook/js/tooltip.js:58 +#: notebook/static/notebook/js/tooltip.js:69 +msgid "Close" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:225 +msgid "Keyboard shortcuts" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:240 +msgid "Command" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:241 +msgid "Control" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:242 +msgid "Option" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:244 +msgid "Return" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:270 +#, python-format +msgid "Command Mode (press %s to enable)" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:272 +msgid "Edit Shortcuts" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:275 +msgid "edit command-mode keyboard shortcuts" +msgstr "" + +#: notebook/static/notebook/js/quickhelp.js:292 +#, python-format +msgid "Edit Mode (press %s to enable)" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:49 +msgid "Autosave Failed!" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:71 +#: notebook/static/tree/js/notebooklist.js:846 +#: notebook/static/tree/js/notebooklist.js:859 +msgid "Rename" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:78 +#: notebook/static/tree/js/notebooklist.js:837 +msgid "Enter a new notebook name:" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:86 +msgid "Rename Notebook" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:98 +msgid "Invalid notebook name. Notebook names must have 1 or more characters and can contain any characters except :/\\. Please enter a new notebook name:" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:103 +msgid "Renaming..." +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:109 +msgid "Unknown error" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:178 +msgid "no checkpoint" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:193 +#, python-format +msgid "Last Checkpoint: %s" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:217 +msgid "(unsaved changes)" +msgstr "" + +#: notebook/static/notebook/js/savewidget.js:219 +msgid "(autosaved)" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:74 +#, python-format +msgid "Warning: too many matches (%d). Some changes might not be shown or applied." +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:77 +#, python-format +msgid "%d match" +msgid_plural "%d matches" +msgstr[0] "" +msgstr[1] "" + +#: notebook/static/notebook/js/searchandreplace.js:145 +msgid "More than 100 matches, aborting" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:166 +msgid "Use regex (JavaScript regex syntax)" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:174 +msgid "Replace in selected cells" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:181 +msgid "Match case" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:187 +msgid "Find" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:203 +msgid "Replace" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:255 +msgid "No matches, invalid or empty regular expression" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:370 +msgid "Replace All" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:374 +msgid "Find and Replace" +msgstr "" + +#: notebook/static/notebook/js/searchandreplace.js:400 +#: notebook/static/notebook/js/searchandreplace.js:401 +msgid "find and replace" +msgstr "" + +#: notebook/static/notebook/js/textcell.js:551 +msgid "Write raw LaTeX or other formats here, for use with nbconvert. It will not be rendered in the notebook. When passing through nbconvert, a Raw Cell's content is added to the output unmodified." +msgstr "" + +#: notebook/static/notebook/js/tooltip.js:41 +msgid "Grow the tooltip vertically (press shift-tab twice)" +msgstr "" + +#: notebook/static/notebook/js/tooltip.js:48 +msgid "show the current docstring in pager (press shift-tab 4 times)" +msgstr "" + +#: notebook/static/notebook/js/tooltip.js:49 +msgid "Open in Pager" +msgstr "" + +#: notebook/static/notebook/js/tooltip.js:68 +msgid "Tooltip will linger for 10 seconds while you type" +msgstr "" + +#: notebook/static/notebook/js/tour.js:27 +msgid "Welcome to the Notebook Tour" +msgstr "" + +#: notebook/static/notebook/js/tour.js:30 +msgid "You can use the left and right arrow keys to go backwards and forwards." +msgstr "" + +#: notebook/static/notebook/js/tour.js:33 +msgid "Filename" +msgstr "" + +#: notebook/static/notebook/js/tour.js:35 +msgid "Click here to change the filename for this notebook." +msgstr "" + +#: notebook/static/notebook/js/tour.js:39 +msgid "Notebook Menubar" +msgstr "" + +#: notebook/static/notebook/js/tour.js:40 +msgid "The menubar has menus for actions on the notebook, its cells, and the kernel it communicates with." +msgstr "" + +#: notebook/static/notebook/js/tour.js:44 +msgid "Notebook Toolbar" +msgstr "" + +#: notebook/static/notebook/js/tour.js:45 +msgid "The toolbar has buttons for the most common actions. Hover your mouse over each button for more information." +msgstr "" + +#: notebook/static/notebook/js/tour.js:48 +msgid "Mode Indicator" +msgstr "" + +#: notebook/static/notebook/js/tour.js:50 +msgid "The Notebook has two modes: Edit Mode and Command Mode. In this area, an indicator can appear to tell you which mode you are in." +msgstr "" + +#: notebook/static/notebook/js/tour.js:58 +msgid "Right now you are in Command Mode, and many keyboard shortcuts are available. In this mode, no icon is displayed in the indicator area." +msgstr "" + +#: notebook/static/notebook/js/tour.js:64 +msgid "Pressing Enter or clicking in the input text area of the cell switches to Edit Mode." +msgstr "" + +#: notebook/static/notebook/js/tour.js:70 +msgid "Notice that the border around the currently active cell changed color. Typing will insert text into the currently active cell." +msgstr "" + +#: notebook/static/notebook/js/tour.js:73 +msgid "Back to Command Mode" +msgstr "" + +#: notebook/static/notebook/js/tour.js:76 +msgid "Pressing Esc or clicking outside of the input text area takes you back to Command Mode." +msgstr "" + +#: notebook/static/notebook/js/tour.js:79 +msgid "Keyboard Shortcuts" +msgstr "" + +#: notebook/static/notebook/js/tour.js:91 +msgid "You can click here to get a list of all of the keyboard shortcuts." +msgstr "" + +#: notebook/static/notebook/js/tour.js:94 +#: notebook/static/notebook/js/tour.js:100 +msgid "Kernel Indicator" +msgstr "" + +#: notebook/static/notebook/js/tour.js:97 +msgid "This is the Kernel indicator. It looks like this when the Kernel is idle." +msgstr "" + +#: notebook/static/notebook/js/tour.js:103 +msgid "The Kernel indicator looks like this when the Kernel is busy." +msgstr "" + +#: notebook/static/notebook/js/tour.js:107 +msgid "Interrupting the Kernel" +msgstr "" + +#: notebook/static/notebook/js/tour.js:109 +msgid "To cancel a computation in progress, you can click here." +msgstr "" + +#: notebook/static/notebook/js/tour.js:114 +msgid "Notification Area" +msgstr "" + +#: notebook/static/notebook/js/tour.js:115 +msgid "Messages in response to user actions (Save, Interrupt, etc.) appear here." +msgstr "" + +#: notebook/static/notebook/js/tour.js:117 +msgid "End of Tour" +msgstr "" + +#: notebook/static/notebook/js/tour.js:120 +msgid "This concludes the Jupyter Notebook User Interface Tour." +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/attachments.js:32 +msgid "Edit Attachments" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/default.js:19 +msgid "Cell" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/default.js:29 +#: notebook/static/notebook/js/celltoolbarpresets/default.js:47 +msgid "Edit Metadata" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:22 +msgid "Custom" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:32 +msgid "Set the MIME type of the raw cell:" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:40 +msgid "Raw Cell MIME Type" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:74 +msgid "Raw NBConvert Format" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/rawcell.js:81 +msgid "Raw Cell Format" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:15 +msgid "Slide" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:16 +msgid "Sub-Slide" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:17 +msgid "Fragment" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:18 +msgid "Skip" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:19 +msgid "Notes" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:35 +msgid "Slide Type" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/slideshow.js:41 +msgid "Slideshow" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/tags.js:133 +msgid "Add tag" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/tags.js:163 +msgid "Edit the list of tags below. All whitespace is treated as tag separators." +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/tags.js:172 +msgid "Edit the tags" +msgstr "" + +#: notebook/static/notebook/js/celltoolbarpresets/tags.js:186 +msgid "Edit Tags" +msgstr "" + +#: notebook/static/tree/js/kernellist.js:86 +#: notebook/static/tree/js/terminallist.js:105 +msgid "Shutdown" +msgstr "" + +#: notebook/static/tree/js/newnotebook.js:70 +#, python-format +msgid "Create a new notebook with %s" +msgstr "" + +#: notebook/static/tree/js/newnotebook.js:101 +msgid "An error occurred while creating a new notebook." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:122 +msgid "Creating File Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:124 +msgid "An error occurred while creating a new file." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:142 +msgid "Creating Folder Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:144 +msgid "An error occurred while creating a new folder." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:271 +msgid "Failed to read file" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:272 +#, python-format +msgid "Failed to read file %s" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:283 +#, python-format +msgid "The file size is %d MB. Do you still want to upload it?" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:286 +msgid "Large file size warning" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:355 +msgid "Server error: " +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:390 +msgid "The notebook list is empty." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:463 +msgid "Click here to rename, delete, etc." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:503 +msgid "Running" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:835 +msgid "Enter a new file name:" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:836 +msgid "Enter a new directory name:" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:838 +msgid "Enter a new name:" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:843 +msgid "Rename file" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:844 +msgid "Rename directory" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:845 +msgid "Rename notebook" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:859 +msgid "Move" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:875 +msgid "An error occurred while renaming \"%1$s\" to \"%2$s\"." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:878 +msgid "Rename Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:927 +#, python-format +msgid "Enter a new destination directory path for this item:" +msgid_plural "Enter a new destination directory path for these %d items:" +msgstr[0] "" +msgstr[1] "" + +#: notebook/static/tree/js/notebooklist.js:940 +#, python-format +msgid "Move an Item" +msgid_plural "Move %d Items" +msgstr[0] "" +msgstr[1] "" + +#: notebook/static/tree/js/notebooklist.js:959 +msgid "An error occurred while moving \"%1$s\" from \"%2$s\" to \"%3$s\"." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:961 +msgid "Move Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1007 +#, python-format +msgid "Are you sure you want to permanently delete: \"%s\"?" +msgid_plural "Are you sure you want to permanently delete the %d files or folders selected?" +msgstr[0] "" +msgstr[1] "" + +#: notebook/static/tree/js/notebooklist.js:1035 +#, python-format +msgid "An error occurred while deleting \"%s\"." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1037 +msgid "Delete Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1078 +#, python-format +msgid "Are you sure you want to duplicate: \"%s\"?" +msgid_plural "Are you sure you want to duplicate the %d files selected?" +msgstr[0] "" +msgstr[1] "" + +#: notebook/static/tree/js/notebooklist.js:1088 +msgid "Duplicate" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1102 +#, python-format +msgid "An error occurred while duplicating \"%s\"." +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1104 +msgid "Duplicate Failed" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1323 +msgid "Upload" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1332 +msgid "Invalid file name" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1333 +msgid "File names must be at least one character and not start with a period" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1362 +msgid "Cannot upload invalid Notebook" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1395 +#, python-format +msgid "There is already a file named \"%s\". Do you want to replace it?" +msgstr "" + +#: notebook/static/tree/js/notebooklist.js:1397 +msgid "Replace file" +msgstr "" + diff --git a/notebook/i18n/nbui.pot b/notebook/i18n/nbui.pot new file mode 100644 index 0000000000..11c30aac64 --- /dev/null +++ b/notebook/i18n/nbui.pot @@ -0,0 +1,731 @@ +# Translations template for Jupyter. +# Copyright (C) 2017 ORGANIZATION +# This file is distributed under the same license as the Jupyter project. +# FIRST AUTHOR , 2017. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Jupyter VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-07-07 12:48-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.3.4\n" + +#: notebook/templates/404.html:3 +msgid "You are requesting a page that does not exist!" +msgstr "" + +#: notebook/templates/edit.html:37 +msgid "current mode" +msgstr "" + +#: notebook/templates/edit.html:48 notebook/templates/notebook.html:78 +msgid "File" +msgstr "" + +#: notebook/templates/edit.html:50 notebook/templates/tree.html:57 +msgid "New" +msgstr "" + +#: notebook/templates/edit.html:51 +msgid "Save" +msgstr "" + +#: notebook/templates/edit.html:52 notebook/templates/tree.html:36 +msgid "Rename" +msgstr "" + +#: notebook/templates/edit.html:53 notebook/templates/tree.html:38 +msgid "Download" +msgstr "" + +#: notebook/templates/edit.html:56 notebook/templates/notebook.html:131 +#: notebook/templates/tree.html:41 +msgid "Edit" +msgstr "" + +#: notebook/templates/edit.html:58 +msgid "Find" +msgstr "" + +#: notebook/templates/edit.html:59 +msgid "Find & Replace" +msgstr "" + +#: notebook/templates/edit.html:61 +msgid "Key Map" +msgstr "" + +#: notebook/templates/edit.html:62 +msgid "Default" +msgstr "" + +#: notebook/templates/edit.html:63 +msgid "Sublime Text" +msgstr "" + +#: notebook/templates/edit.html:68 notebook/templates/notebook.html:159 +#: notebook/templates/tree.html:40 +msgid "View" +msgstr "" + +#: notebook/templates/edit.html:70 notebook/templates/notebook.html:162 +msgid "Show/Hide the logo and notebook title (above menu bar)" +msgstr "" + +#: notebook/templates/edit.html:71 notebook/templates/notebook.html:163 +msgid "Toggle Header" +msgstr "" + +#: notebook/templates/edit.html:72 notebook/templates/notebook.html:171 +msgid "Toggle Line Numbers" +msgstr "" + +#: notebook/templates/edit.html:75 +msgid "Language" +msgstr "" + +#: notebook/templates/error.html:23 +msgid "The error was:" +msgstr "" + +#: notebook/templates/login.html:24 +msgid "Password or token:" +msgstr "" + +#: notebook/templates/login.html:26 +msgid "Password:" +msgstr "" + +#: notebook/templates/login.html:31 +msgid "Log in" +msgstr "" + +#: notebook/templates/login.html:39 +msgid "No login available, you shouldn't be seeing this page." +msgstr "" + +#: notebook/templates/logout.html:24 +#, python-format +msgid "Proceed to the dashboard" +msgstr "" + +#: notebook/templates/logout.html:26 +#, python-format +msgid "Proceed to the login page" +msgstr "" + +#: notebook/templates/notebook.html:62 +msgid "Menu" +msgstr "" + +#: notebook/templates/notebook.html:65 notebook/templates/notebook.html:254 +msgid "Kernel" +msgstr "" + +#: notebook/templates/notebook.html:68 +msgid "This notebook is read-only" +msgstr "" + +#: notebook/templates/notebook.html:81 +msgid "New Notebook" +msgstr "" + +#: notebook/templates/notebook.html:85 +msgid "Opens a new window with the Dashboard view" +msgstr "" + +#: notebook/templates/notebook.html:86 +msgid "Open..." +msgstr "" + +#: notebook/templates/notebook.html:90 +msgid "Open a copy of this notebook's contents and start a new kernel" +msgstr "" + +#: notebook/templates/notebook.html:91 +msgid "Make a Copy..." +msgstr "" + +#: notebook/templates/notebook.html:92 +msgid "Rename..." +msgstr "" + +#: notebook/templates/notebook.html:93 +msgid "Save and Checkpoint" +msgstr "" + +#: notebook/templates/notebook.html:96 +msgid "Revert to Checkpoint" +msgstr "" + +#: notebook/templates/notebook.html:106 +msgid "Print Preview" +msgstr "" + +#: notebook/templates/notebook.html:107 +msgid "Download as" +msgstr "" + +#: notebook/templates/notebook.html:109 +msgid "Notebook (.ipynb)" +msgstr "" + +#: notebook/templates/notebook.html:110 +msgid "Script" +msgstr "" + +#: notebook/templates/notebook.html:111 +msgid "HTML (.html)" +msgstr "" + +#: notebook/templates/notebook.html:112 +msgid "Markdown (.md)" +msgstr "" + +#: notebook/templates/notebook.html:113 +msgid "reST (.rst)" +msgstr "" + +#: notebook/templates/notebook.html:114 +msgid "LaTeX (.tex)" +msgstr "" + +#: notebook/templates/notebook.html:115 +msgid "PDF via LaTeX (.pdf)" +msgstr "" + +#: notebook/templates/notebook.html:118 +msgid "Deploy as" +msgstr "" + +#: notebook/templates/notebook.html:123 +msgid "Trust the output of this notebook" +msgstr "" + +#: notebook/templates/notebook.html:124 +msgid "Trust Notebook" +msgstr "" + +#: notebook/templates/notebook.html:127 +msgid "Shutdown this notebook's kernel, and close this window" +msgstr "" + +#: notebook/templates/notebook.html:128 +msgid "Close and Halt" +msgstr "" + +#: notebook/templates/notebook.html:133 +msgid "Cut Cells" +msgstr "" + +#: notebook/templates/notebook.html:134 +msgid "Copy Cells" +msgstr "" + +#: notebook/templates/notebook.html:135 +msgid "Paste Cells Above" +msgstr "" + +#: notebook/templates/notebook.html:136 +msgid "Paste Cells Below" +msgstr "" + +#: notebook/templates/notebook.html:137 +msgid "Paste Cells & Replace" +msgstr "" + +#: notebook/templates/notebook.html:138 +msgid "Delete Cells" +msgstr "" + +#: notebook/templates/notebook.html:139 +msgid "Undo Delete Cells" +msgstr "" + +#: notebook/templates/notebook.html:141 +msgid "Split Cell" +msgstr "" + +#: notebook/templates/notebook.html:142 +msgid "Merge Cell Above" +msgstr "" + +#: notebook/templates/notebook.html:143 +msgid "Merge Cell Below" +msgstr "" + +#: notebook/templates/notebook.html:145 +msgid "Move Cell Up" +msgstr "" + +#: notebook/templates/notebook.html:146 +msgid "Move Cell Down" +msgstr "" + +#: notebook/templates/notebook.html:148 +msgid "Edit Notebook Metadata" +msgstr "" + +#: notebook/templates/notebook.html:150 +msgid "Find and Replace" +msgstr "" + +#: notebook/templates/notebook.html:152 +msgid "Cut Cell Attachments" +msgstr "" + +#: notebook/templates/notebook.html:153 +msgid "Copy Cell Attachments" +msgstr "" + +#: notebook/templates/notebook.html:154 +msgid "Paste Cell Attachments" +msgstr "" + +#: notebook/templates/notebook.html:156 +msgid "Insert Image" +msgstr "" + +#: notebook/templates/notebook.html:166 +msgid "Show/Hide the action icons (below menu bar)" +msgstr "" + +#: notebook/templates/notebook.html:167 +msgid "Toggle Toolbar" +msgstr "" + +#: notebook/templates/notebook.html:170 +msgid "Show/Hide line numbers in cells" +msgstr "" + +#: notebook/templates/notebook.html:174 +msgid "Cell Toolbar" +msgstr "" + +#: notebook/templates/notebook.html:179 +msgid "Insert" +msgstr "" + +#: notebook/templates/notebook.html:182 +msgid "Insert an empty Code cell above the currently active cell" +msgstr "" + +#: notebook/templates/notebook.html:183 +msgid "Insert Cell Above" +msgstr "" + +#: notebook/templates/notebook.html:185 +msgid "Insert an empty Code cell below the currently active cell" +msgstr "" + +#: notebook/templates/notebook.html:186 +msgid "Insert Cell Below" +msgstr "" + +#: notebook/templates/notebook.html:189 +msgid "Cell" +msgstr "" + +#: notebook/templates/notebook.html:191 +msgid "Run this cell, and move cursor to the next one" +msgstr "" + +#: notebook/templates/notebook.html:192 +msgid "Run Cells" +msgstr "" + +#: notebook/templates/notebook.html:193 +msgid "Run this cell, select below" +msgstr "" + +#: notebook/templates/notebook.html:194 +msgid "Run Cells and Select Below" +msgstr "" + +#: notebook/templates/notebook.html:195 +msgid "Run this cell, insert below" +msgstr "" + +#: notebook/templates/notebook.html:196 +msgid "Run Cells and Insert Below" +msgstr "" + +#: notebook/templates/notebook.html:197 +msgid "Run all cells in the notebook" +msgstr "" + +#: notebook/templates/notebook.html:198 +msgid "Run All" +msgstr "" + +#: notebook/templates/notebook.html:199 +msgid "Run all cells above (but not including) this cell" +msgstr "" + +#: notebook/templates/notebook.html:200 +msgid "Run All Above" +msgstr "" + +#: notebook/templates/notebook.html:201 +msgid "Run this cell and all cells below it" +msgstr "" + +#: notebook/templates/notebook.html:202 +msgid "Run All Below" +msgstr "" + +#: notebook/templates/notebook.html:205 +msgid "All cells in the notebook have a cell type. By default, new cells are created as 'Code' cells" +msgstr "" + +#: notebook/templates/notebook.html:206 +msgid "Cell Type" +msgstr "" + +#: notebook/templates/notebook.html:209 +msgid "Contents will be sent to the kernel for execution, and output will display in the footer of cell" +msgstr "" + +#: notebook/templates/notebook.html:212 +msgid "Contents will be rendered as HTML and serve as explanatory text" +msgstr "" + +#: notebook/templates/notebook.html:213 notebook/templates/notebook.html:298 +msgid "Markdown" +msgstr "" + +#: notebook/templates/notebook.html:215 +msgid "Contents will pass through nbconvert unmodified" +msgstr "" + +#: notebook/templates/notebook.html:216 +msgid "Raw NBConvert" +msgstr "" + +#: notebook/templates/notebook.html:220 +msgid "Current Outputs" +msgstr "" + +#: notebook/templates/notebook.html:223 +msgid "Hide/Show the output of the current cell" +msgstr "" + +#: notebook/templates/notebook.html:224 notebook/templates/notebook.html:240 +msgid "Toggle" +msgstr "" + +#: notebook/templates/notebook.html:227 +msgid "Scroll the output of the current cell" +msgstr "" + +#: notebook/templates/notebook.html:228 notebook/templates/notebook.html:244 +msgid "Toggle Scrolling" +msgstr "" + +#: notebook/templates/notebook.html:231 +msgid "Clear the output of the current cell" +msgstr "" + +#: notebook/templates/notebook.html:232 notebook/templates/notebook.html:248 +msgid "Clear" +msgstr "" + +#: notebook/templates/notebook.html:236 +msgid "All Output" +msgstr "" + +#: notebook/templates/notebook.html:239 +msgid "Hide/Show the output of all cells" +msgstr "" + +#: notebook/templates/notebook.html:243 +msgid "Scroll the output of all cells" +msgstr "" + +#: notebook/templates/notebook.html:247 +msgid "Clear the output of all cells" +msgstr "" + +#: notebook/templates/notebook.html:257 +msgid "Send Keyboard Interrupt (CTRL-C) to the Kernel" +msgstr "" + +#: notebook/templates/notebook.html:258 +msgid "Interrupt" +msgstr "" + +#: notebook/templates/notebook.html:261 +msgid "Restart the Kernel" +msgstr "" + +#: notebook/templates/notebook.html:262 +msgid "Restart" +msgstr "" + +#: notebook/templates/notebook.html:265 +msgid "Restart the Kernel and clear all output" +msgstr "" + +#: notebook/templates/notebook.html:266 +msgid "Restart & Clear Output" +msgstr "" + +#: notebook/templates/notebook.html:269 +msgid "Restart the Kernel and re-run the notebook" +msgstr "" + +#: notebook/templates/notebook.html:270 +msgid "Restart & Run All" +msgstr "" + +#: notebook/templates/notebook.html:273 +msgid "Reconnect to the Kernel" +msgstr "" + +#: notebook/templates/notebook.html:274 +msgid "Reconnect" +msgstr "" + +#: notebook/templates/notebook.html:282 +msgid "Change kernel" +msgstr "" + +#: notebook/templates/notebook.html:287 +msgid "Help" +msgstr "" + +#: notebook/templates/notebook.html:290 +msgid "A quick tour of the notebook user interface" +msgstr "" + +#: notebook/templates/notebook.html:290 +msgid "User Interface Tour" +msgstr "" + +#: notebook/templates/notebook.html:291 +msgid "Opens a tooltip with all keyboard shortcuts" +msgstr "" + +#: notebook/templates/notebook.html:291 +msgid "Keyboard Shortcuts" +msgstr "" + +#: notebook/templates/notebook.html:292 +msgid "Opens a dialog allowing you to edit Keyboard shortcuts" +msgstr "" + +#: notebook/templates/notebook.html:292 +msgid "Edit Keyboard Shortcuts" +msgstr "" + +#: notebook/templates/notebook.html:297 +msgid "Notebook Help" +msgstr "" + +#: notebook/templates/notebook.html:303 +msgid "Opens in a new window" +msgstr "" + +#: notebook/templates/notebook.html:319 +msgid "About Jupyter Notebook" +msgstr "" + +#: notebook/templates/notebook.html:319 +msgid "About" +msgstr "" + +#: notebook/templates/page.html:114 +msgid "Jupyter Notebook requires JavaScript." +msgstr "" + +#: notebook/templates/page.html:115 +msgid "Please enable it to proceed. " +msgstr "" + +#: notebook/templates/page.html:121 +msgid "dashboard" +msgstr "" + +#: notebook/templates/page.html:132 +msgid "Logout" +msgstr "" + +#: notebook/templates/page.html:134 +msgid "Login" +msgstr "" + +#: notebook/templates/tree.html:23 +msgid "Files" +msgstr "" + +#: notebook/templates/tree.html:24 +msgid "Running" +msgstr "" + +#: notebook/templates/tree.html:25 +msgid "Clusters" +msgstr "" + +#: notebook/templates/tree.html:32 +msgid "Select items to perform actions on them." +msgstr "" + +#: notebook/templates/tree.html:35 +msgid "Duplicate selected" +msgstr "" + +#: notebook/templates/tree.html:35 +msgid "Duplicate" +msgstr "" + +#: notebook/templates/tree.html:36 +msgid "Rename selected" +msgstr "" + +#: notebook/templates/tree.html:37 +msgid "Move selected" +msgstr "" + +#: notebook/templates/tree.html:37 +msgid "Move" +msgstr "" + +#: notebook/templates/tree.html:38 +msgid "Download selected" +msgstr "" + +#: notebook/templates/tree.html:39 +msgid "Shutdown selected notebook(s)" +msgstr "" + +#: notebook/templates/tree.html:39 +msgid "Shutdown" +msgstr "" + +#: notebook/templates/tree.html:40 +msgid "View selected" +msgstr "" + +#: notebook/templates/tree.html:41 +msgid "Edit selected" +msgstr "" + +#: notebook/templates/tree.html:42 +msgid "Delete selected" +msgstr "" + +#: notebook/templates/tree.html:50 +msgid "Click to browse for a file to upload." +msgstr "" + +#: notebook/templates/tree.html:51 +msgid "Upload" +msgstr "" + +#: notebook/templates/tree.html:65 +msgid "Text File" +msgstr "" + +#: notebook/templates/tree.html:68 +msgid "Folder" +msgstr "" + +#: notebook/templates/tree.html:72 +msgid "Terminal" +msgstr "" + +#: notebook/templates/tree.html:76 +msgid "Terminals Unavailable" +msgstr "" + +#: notebook/templates/tree.html:82 +msgid "Refresh notebook list" +msgstr "" + +#: notebook/templates/tree.html:90 +msgid "Select All / None" +msgstr "" + +#: notebook/templates/tree.html:93 +msgid "Select..." +msgstr "" + +#: notebook/templates/tree.html:98 +msgid "Select All Folders" +msgstr "" + +#: notebook/templates/tree.html:98 +msgid " Folders" +msgstr "" + +#: notebook/templates/tree.html:99 +msgid "Select All Notebooks" +msgstr "" + +#: notebook/templates/tree.html:99 +msgid " All Notebooks" +msgstr "" + +#: notebook/templates/tree.html:100 +msgid "Select Running Notebooks" +msgstr "" + +#: notebook/templates/tree.html:100 +msgid " Running" +msgstr "" + +#: notebook/templates/tree.html:101 +msgid "Select All Files" +msgstr "" + +#: notebook/templates/tree.html:101 +msgid " Files" +msgstr "" + +#: notebook/templates/tree.html:114 +msgid "Last Modified" +msgstr "" + +#: notebook/templates/tree.html:120 +msgid "Name" +msgstr "" + +#: notebook/templates/tree.html:130 +msgid "Currently running Jupyter processes" +msgstr "" + +#: notebook/templates/tree.html:134 +msgid "Refresh running list" +msgstr "" + +#: notebook/templates/tree.html:150 +msgid "There are no terminals running." +msgstr "" + +#: notebook/templates/tree.html:152 +msgid "Terminals are unavailable." +msgstr "" + +#: notebook/templates/tree.html:162 +msgid "Notebooks" +msgstr "" + +#: notebook/templates/tree.html:169 +msgid "There are no notebooks running." +msgstr "" + +#: notebook/templates/tree.html:178 +msgid "Clusters tab is now provided by IPython parallel." +msgstr "" + +#: notebook/templates/tree.html:179 +msgid "See 'IPython parallel' for installation details." +msgstr "" + diff --git a/notebook/i18n/notebook.pot b/notebook/i18n/notebook.pot new file mode 100644 index 0000000000..5437b1b0f5 --- /dev/null +++ b/notebook/i18n/notebook.pot @@ -0,0 +1,480 @@ +# Translations template for Jupyter. +# Copyright (C) 2017 ORGANIZATION +# This file is distributed under the same license as the Jupyter project. +# FIRST AUTHOR , 2017. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Jupyter VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2017-07-08 21:52-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.3.4\n" + +#: notebook/notebookapp.py:53 +msgid "The Jupyter Notebook requires tornado >= 4.0" +msgstr "" + +#: notebook/notebookapp.py:57 +msgid "The Jupyter Notebook requires tornado >= 4.0, but you have < 1.1.0" +msgstr "" + +#: notebook/notebookapp.py:59 +#, python-format +msgid "The Jupyter Notebook requires tornado >= 4.0, but you have %s" +msgstr "" + +#: notebook/notebookapp.py:209 +msgid "The `ignore_minified_js` flag is deprecated and no longer works." +msgstr "" + +#: notebook/notebookapp.py:210 +#, python-format +msgid "Alternatively use `%s` when working on the notebook's Javascript and LESS" +msgstr "" + +#: notebook/notebookapp.py:211 +msgid "The `ignore_minified_js` flag is deprecated and will be removed in Notebook 6.0" +msgstr "" + +#: notebook/notebookapp.py:389 +msgid "List currently running notebook servers." +msgstr "" + +#: notebook/notebookapp.py:393 +msgid "Produce machine-readable JSON output." +msgstr "" + +#: notebook/notebookapp.py:397 +msgid "If True, each line of output will be a JSON object with the details from the server info file." +msgstr "" + +#: notebook/notebookapp.py:402 +msgid "Currently running servers:" +msgstr "" + +#: notebook/notebookapp.py:419 +msgid "Don't open the notebook in a browser after startup." +msgstr "" + +#: notebook/notebookapp.py:423 +msgid "DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib." +msgstr "" + +#: notebook/notebookapp.py:439 +msgid "Allow the notebook to be run from root user." +msgstr "" + +#: notebook/notebookapp.py:470 +msgid "" +"The Jupyter HTML Notebook.\n" +" \n" +" This launches a Tornado based HTML Notebook Server that serves up an HTML5/Javascript Notebook client." +msgstr "" + +#: notebook/notebookapp.py:509 +msgid "Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation" +msgstr "" + +#: notebook/notebookapp.py:540 +msgid "Set the Access-Control-Allow-Credentials: true header" +msgstr "" + +#: notebook/notebookapp.py:544 +msgid "Whether to allow the user to run the notebook as root." +msgstr "" + +#: notebook/notebookapp.py:548 +msgid "The default URL to redirect to from `/`" +msgstr "" + +#: notebook/notebookapp.py:552 +msgid "The IP address the notebook server will listen on." +msgstr "" + +#: notebook/notebookapp.py:565 +#, python-format +msgid "" +"Cannot bind to localhost, using 127.0.0.1 as default ip\n" +"%s" +msgstr "" + +#: notebook/notebookapp.py:579 +msgid "The port the notebook server will listen on." +msgstr "" + +#: notebook/notebookapp.py:583 +msgid "The number of additional ports to try if the specified port is not available." +msgstr "" + +#: notebook/notebookapp.py:587 +msgid "The full path to an SSL/TLS certificate file." +msgstr "" + +#: notebook/notebookapp.py:591 +msgid "The full path to a private key file for usage with SSL/TLS." +msgstr "" + +#: notebook/notebookapp.py:595 +msgid "The full path to a certificate authority certificate for SSL/TLS client authentication." +msgstr "" + +#: notebook/notebookapp.py:599 +msgid "The file where the cookie secret is stored." +msgstr "" + +#: notebook/notebookapp.py:628 +#, python-format +msgid "Writing notebook server cookie secret to %s" +msgstr "" + +#: notebook/notebookapp.py:635 +#, python-format +msgid "Could not set permissions on %s" +msgstr "" + +#: notebook/notebookapp.py:640 +msgid "" +"Token used for authenticating first-time connections to the server.\n" +"\n" +" When no password is enabled,\n" +" the default is to generate a new, random token.\n" +"\n" +" Setting to an empty string disables authentication altogether, which is NOT RECOMMENDED.\n" +" " +msgstr "" + +#: notebook/notebookapp.py:650 +msgid "" +"One-time token used for opening a browser.\n" +" Once used, this token cannot be used again.\n" +" " +msgstr "" + +#: notebook/notebookapp.py:726 +msgid "" +"Specify Where to open the notebook on startup. This is the\n" +" `new` argument passed to the standard library method `webbrowser.open`.\n" +" The behaviour is not guaranteed, but depends on browser support. Valid\n" +" values are:\n" +" 2 opens a new tab,\n" +" 1 opens a new window,\n" +" 0 opens in an existing window.\n" +" See the `webbrowser.open` documentation for details.\n" +" " +msgstr "" + +#: notebook/notebookapp.py:737 +msgid "DEPRECATED, use tornado_settings" +msgstr "" + +#: notebook/notebookapp.py:742 +msgid "" +"\n" +" webapp_settings is deprecated, use tornado_settings.\n" +msgstr "" + +#: notebook/notebookapp.py:746 +msgid "Supply overrides for the tornado.web.Application that the Jupyter notebook uses." +msgstr "" + +#: notebook/notebookapp.py:750 +msgid "" +"\n" +" Set the tornado compression options for websocket connections.\n" +"\n" +" This value will be returned from :meth:`WebSocketHandler.get_compression_options`.\n" +" None (default) will disable compression.\n" +" A dict (even an empty one) will enable compression.\n" +"\n" +" See the tornado docs for WebSocketHandler.get_compression_options for details.\n" +" " +msgstr "" + +#: notebook/notebookapp.py:761 +msgid "Supply overrides for terminado. Currently only supports \"shell_command\"." +msgstr "" + +#: notebook/notebookapp.py:764 +msgid "Extra keyword arguments to pass to `set_secure_cookie`. See tornado's set_secure_cookie docs for details." +msgstr "" + +#: notebook/notebookapp.py:768 +msgid "" +"Supply SSL options for the tornado HTTPServer.\n" +" See the tornado docs for details." +msgstr "" + +#: notebook/notebookapp.py:772 +msgid "Supply extra arguments that will be passed to Jinja environment." +msgstr "" + +#: notebook/notebookapp.py:776 +msgid "Extra variables to supply to jinja templates when rendering." +msgstr "" + +#: notebook/notebookapp.py:812 +msgid "DEPRECATED use base_url" +msgstr "" + +#: notebook/notebookapp.py:816 +msgid "base_project_url is deprecated, use base_url" +msgstr "" + +#: notebook/notebookapp.py:832 +msgid "Path to search for custom.js, css" +msgstr "" + +#: notebook/notebookapp.py:844 +msgid "" +"Extra paths to search for serving jinja templates.\n" +"\n" +" Can be used to override templates from notebook.templates." +msgstr "" + +#: notebook/notebookapp.py:855 +msgid "extra paths to look for Javascript notebook extensions" +msgstr "" + +#: notebook/notebookapp.py:900 +#, python-format +msgid "Using MathJax: %s" +msgstr "" + +#: notebook/notebookapp.py:903 +msgid "The MathJax.js configuration file that is to be used." +msgstr "" + +#: notebook/notebookapp.py:908 +#, python-format +msgid "Using MathJax configuration file: %s" +msgstr "" + +#: notebook/notebookapp.py:914 +msgid "The notebook manager class to use." +msgstr "" + +#: notebook/notebookapp.py:920 +msgid "The kernel manager class to use." +msgstr "" + +#: notebook/notebookapp.py:926 +msgid "The session manager class to use." +msgstr "" + +#: notebook/notebookapp.py:932 +msgid "The config manager class to use" +msgstr "" + +#: notebook/notebookapp.py:953 +msgid "The login handler class to use." +msgstr "" + +#: notebook/notebookapp.py:960 +msgid "The logout handler class to use." +msgstr "" + +#: notebook/notebookapp.py:964 +msgid "Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headerssent by the upstream reverse proxy. Necessary if the proxy handles SSL" +msgstr "" + +#: notebook/notebookapp.py:976 +msgid "" +"\n" +" DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.\n" +" " +msgstr "" + +#: notebook/notebookapp.py:988 +msgid "Support for specifying --pylab on the command line has been removed." +msgstr "" + +#: notebook/notebookapp.py:990 +msgid "Please use `%pylab{0}` or `%matplotlib{0}` in the notebook itself." +msgstr "" + +#: notebook/notebookapp.py:995 +msgid "The directory to use for notebooks and kernels." +msgstr "" + +#: notebook/notebookapp.py:1018 +#, python-format +msgid "No such notebook dir: '%r'" +msgstr "" + +#: notebook/notebookapp.py:1031 +msgid "DEPRECATED use the nbserver_extensions dict instead" +msgstr "" + +#: notebook/notebookapp.py:1036 +msgid "server_extensions is deprecated, use nbserver_extensions" +msgstr "" + +#: notebook/notebookapp.py:1040 +msgid "Dict of Python modules to load as notebook server extensions.Entry values can be used to enable and disable the loading ofthe extensions. The extensions will be loaded in alphabetical order." +msgstr "" + +#: notebook/notebookapp.py:1049 +msgid "Reraise exceptions encountered loading server extensions?" +msgstr "" + +#: notebook/notebookapp.py:1052 +msgid "" +"(msgs/sec)\n" +" Maximum rate at which messages can be sent on iopub before they are\n" +" limited." +msgstr "" + +#: notebook/notebookapp.py:1056 +msgid "" +"(bytes/sec)\n" +" Maximum rate at which stream output can be sent on iopub before they are\n" +" limited." +msgstr "" + +#: notebook/notebookapp.py:1060 +msgid "" +"(sec) Time window used to \n" +" check the message and data rate limits." +msgstr "" + +#: notebook/notebookapp.py:1071 +#, python-format +msgid "No such file or directory: %s" +msgstr "" + +#: notebook/notebookapp.py:1141 +msgid "Notebook servers are configured to only be run with a password." +msgstr "" + +#: notebook/notebookapp.py:1142 +msgid "Hint: run the following command to set a password" +msgstr "" + +#: notebook/notebookapp.py:1143 +msgid "\t$ python -m notebook.auth password" +msgstr "" + +#: notebook/notebookapp.py:1181 +#, python-format +msgid "The port %i is already in use, trying another port." +msgstr "" + +#: notebook/notebookapp.py:1184 +#, python-format +msgid "Permission to listen on port %i denied" +msgstr "" + +#: notebook/notebookapp.py:1193 +msgid "ERROR: the notebook server could not be started because no available port could be found." +msgstr "" + +#: notebook/notebookapp.py:1199 +msgid "[all ip addresses on your system]" +msgstr "" + +#: notebook/notebookapp.py:1223 +#, python-format +msgid "Terminals not available (error was %s)" +msgstr "" + +#: notebook/notebookapp.py:1259 +msgid "interrupted" +msgstr "" + +#: notebook/notebookapp.py:1261 +msgid "y" +msgstr "" + +#: notebook/notebookapp.py:1262 +msgid "n" +msgstr "" + +#: notebook/notebookapp.py:1263 +#, python-format +msgid "Shutdown this notebook server (%s/[%s])? " +msgstr "" + +#: notebook/notebookapp.py:1269 +msgid "Shutdown confirmed" +msgstr "" + +#: notebook/notebookapp.py:1273 +msgid "No answer for 5s:" +msgstr "" + +#: notebook/notebookapp.py:1274 +msgid "resuming operation..." +msgstr "" + +#: notebook/notebookapp.py:1282 +#, python-format +msgid "received signal %s, stopping" +msgstr "" + +#: notebook/notebookapp.py:1338 +#, python-format +msgid "Error loading server extension %s" +msgstr "" + +#: notebook/notebookapp.py:1369 +#, python-format +msgid "Shutting down %d kernels" +msgstr "" + +#: notebook/notebookapp.py:1375 +#, python-format +msgid "%d active kernel" +msgid_plural "%d active kernels" +msgstr[0] "" +msgstr[1] "" + +#: notebook/notebookapp.py:1379 +#, python-format +msgid "" +"The Jupyter Notebook is running at:\n" +"\r" +"%s" +msgstr "" + +#: notebook/notebookapp.py:1426 +msgid "Running as root is not recommended. Use --allow-root to bypass." +msgstr "" + +#: notebook/notebookapp.py:1432 +msgid "Use Control-C to stop this server and shut down all kernels (twice to skip confirmation)." +msgstr "" + +#: notebook/notebookapp.py:1434 +msgid "Welcome to Project Jupyter! Explore the various tools available and their corresponding documentation. If you are interested in contributing to the platform, please visit the communityresources section at http://jupyter.org/community.html." +msgstr "" + +#: notebook/notebookapp.py:1445 +#, python-format +msgid "No web browser found: %s." +msgstr "" + +#: notebook/notebookapp.py:1450 +#, python-format +msgid "%s does not exist" +msgstr "" + +#: notebook/notebookapp.py:1484 +msgid "Interrupted..." +msgstr "" + +#: notebook/services/contents/filemanager.py:506 +#, python-format +msgid "Serving notebooks from local directory: %s" +msgstr "" + +#: notebook/services/contents/manager.py:68 +msgid "Untitled" +msgstr "" + diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index f131a64f06..0068f9d1ad 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -10,6 +10,7 @@ import binascii import datetime import errno +import gettext import importlib import io import json @@ -34,23 +35,28 @@ from jinja2 import Environment, FileSystemLoader +# Set up message catalog access +base_dir = os.path.realpath(os.path.join(__file__, '..', '..')) +trans = gettext.translation('notebook', localedir=os.path.join(base_dir, 'notebook/i18n'), fallback=True) +trans.install() +_ = trans.gettext + # Install the pyzmq ioloop. This has to be done before anything else from # tornado is imported. from zmq.eventloop import ioloop ioloop.install() # check for tornado 3.1.0 -msg = "The Jupyter Notebook requires tornado >= 4.0" try: import tornado except ImportError: - raise ImportError(msg) + raise ImportError(_("The Jupyter Notebook requires tornado >= 4.0")) try: version_info = tornado.version_info except AttributeError: - raise ImportError(msg + ", but you have < 1.1.0") + raise ImportError(_("The Jupyter Notebook requires tornado >= 4.0, but you have < 1.1.0")) if version_info < (4,0): - raise ImportError(msg + ", but you have %s" % tornado.version) + raise ImportError(_("The Jupyter Notebook requires tornado >= 4.0, but you have %s") % tornado.version) from tornado import httpserver from tornado import web @@ -113,15 +119,6 @@ jupyter notebook password # enter a password to protect the server """ -DEV_NOTE_NPM = """It looks like you're running the notebook from source. -If you're working on the Javascript of the notebook, try running - - npm run build:watch - -in another terminal window to have the system incrementally -watch and build the notebook's JavaScript for you, as you make changes. -""" - #----------------------------------------------------------------------------- # Helper functions #----------------------------------------------------------------------------- @@ -154,17 +151,11 @@ def __init__(self, jupyter_app, kernel_manager, contents_manager, config_manager, log, base_url, default_url, settings_overrides, jinja_env_options): - # If the user is running the notebook in a git directory, make the assumption - # that this is a dev install and suggest to the developer `npm run build:watch`. - base_dir = os.path.realpath(os.path.join(__file__, '..', '..')) - dev_mode = os.path.exists(os.path.join(base_dir, '.git')) - if dev_mode: - log.info(DEV_NOTE_NPM) settings = self.init_settings( jupyter_app, kernel_manager, contents_manager, - session_manager, kernel_spec_manager, config_manager, log, base_url, - default_url, settings_overrides, jinja_env_options) + session_manager, kernel_spec_manager, config_manager, log, + base_url, default_url, settings_overrides, jinja_env_options) handlers = self.init_handlers(settings) super(NotebookWebApplication, self).__init__(handlers, **settings) @@ -186,9 +177,27 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager, jenv_opt = {"autoescape": True} jenv_opt.update(jinja_env_options if jinja_env_options else {}) - env = Environment(loader=FileSystemLoader(template_path), **jenv_opt) - + env = Environment(loader=FileSystemLoader(template_path), extensions=['jinja2.ext.i18n'], **jenv_opt) sys_info = get_sys_info() + + # If the user is running the notebook in a git directory, make the assumption + # that this is a dev install and suggest to the developer `npm run build:watch`. + base_dir = os.path.realpath(os.path.join(__file__, '..', '..')) + dev_mode = os.path.exists(os.path.join(base_dir, '.git')) + + nbui = gettext.translation('nbui', localedir=os.path.join(base_dir, 'notebook/i18n'), fallback=True) + env.install_gettext_translations(nbui, newstyle=False) + + if dev_mode: + DEV_NOTE_NPM = """It looks like you're running the notebook from source. + If you're working on the Javascript of the notebook, try running + + %s + + in another terminal window to have the system incrementally + watch and build the notebook's JavaScript for you, as you make changes.""" % 'npm run build:watch' + log.info(DEV_NOTE_NPM) + if sys_info['commit_source'] == 'repository': # don't cache (rely on 304) when working from master version_hash = '' @@ -197,10 +206,9 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager, version_hash = datetime.datetime.now().strftime("%Y%m%d%H%M%S") if jupyter_app.ignore_minified_js: - log.warning("""The `ignore_minified_js` flag is deprecated and no - longer works. Alternatively use `npm run build:watch` when - working on the notebook's Javascript and LESS""") - warnings.warn("The `ignore_minified_js` flag is deprecated and will be removed in Notebook 6.0", DeprecationWarning) + log.warning(_("""The `ignore_minified_js` flag is deprecated and no longer works.""")) + log.warning(_("""Alternatively use `%s` when working on the notebook's Javascript and LESS""") % 'npm run build:watch') + warnings.warn(_("The `ignore_minified_js` flag is deprecated and will be removed in Notebook 6.0"), DeprecationWarning) now = utcnow() @@ -378,20 +386,20 @@ def start(self): class NbserverListApp(JupyterApp): version = __version__ - description="List currently running notebook servers." + description=_("List currently running notebook servers.") flags = dict( json=({'NbserverListApp': {'json': True}}, - "Produce machine-readable JSON output."), + _("Produce machine-readable JSON output.")), ) json = Bool(False, config=True, - help="If True, each line of output will be a JSON object with the " - "details from the server info file.") + help=_("If True, each line of output will be a JSON object with the " + "details from the server info file.")) def start(self): if not self.json: - print("Currently running servers:") + print(_("Currently running servers:")) for serverinfo in list_running_servers(self.runtime_dir): if self.json: print(json.dumps(serverinfo)) @@ -408,11 +416,11 @@ def start(self): flags = dict(base_flags) flags['no-browser']=( {'NotebookApp' : {'open_browser' : False}}, - "Don't open the notebook in a browser after startup." + _("Don't open the notebook in a browser after startup.") ) flags['pylab']=( {'NotebookApp' : {'pylab' : 'warn'}}, - "DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib." + _("DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib.") ) flags['no-mathjax']=( {'NotebookApp' : {'enable_mathjax' : False}}, @@ -428,7 +436,7 @@ def start(self): flags['allow-root']=( {'NotebookApp' : {'allow_root' : True}}, - "Allow the notebook to be run from root user." + _("Allow the notebook to be run from root user.") ) # Add notebook manager flags @@ -459,12 +467,9 @@ class NotebookApp(JupyterApp): name = 'jupyter-notebook' version = __version__ - description = """ - The Jupyter HTML Notebook. - - This launches a Tornado based HTML Notebook Server that serves up an - HTML5/Javascript Notebook client. - """ + description = _("""The Jupyter HTML Notebook. + + This launches a Tornado based HTML Notebook Server that serves up an HTML5/Javascript Notebook client.""") examples = _examples aliases = aliases flags = flags @@ -501,7 +506,7 @@ def _default_log_format(self): ignore_minified_js = Bool(False, config=True, - help='Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation', + help=_('Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation'), ) # file to be opened in the notebook server @@ -532,19 +537,19 @@ def _default_log_format(self): ) allow_credentials = Bool(False, config=True, - help="Set the Access-Control-Allow-Credentials: true header" + help=_("Set the Access-Control-Allow-Credentials: true header") ) allow_root = Bool(False, config=True, - help="Whether to allow the user to run the notebook as root." + help=_("Whether to allow the user to run the notebook as root.") ) default_url = Unicode('/tree', config=True, - help="The default URL to redirect to from `/`" + help=_("The default URL to redirect to from `/`") ) ip = Unicode('localhost', config=True, - help="The IP address the notebook server will listen on." + help=_("The IP address the notebook server will listen on.") ) @default('ip') @@ -557,7 +562,7 @@ def _default_ip(self): try: s.bind(('localhost', 0)) except socket.error as e: - self.log.warning("Cannot bind to localhost, using 127.0.0.1 as default ip\n%s", e) + self.log.warning(_("Cannot bind to localhost, using 127.0.0.1 as default ip\n%s"), e) return '127.0.0.1' else: s.close() @@ -571,27 +576,27 @@ def _valdate_ip(self, proposal): return value port = Integer(8888, config=True, - help="The port the notebook server will listen on." + help=_("The port the notebook server will listen on.") ) port_retries = Integer(50, config=True, - help="The number of additional ports to try if the specified port is not available." + help=_("The number of additional ports to try if the specified port is not available.") ) certfile = Unicode(u'', config=True, - help="""The full path to an SSL/TLS certificate file.""" + help=_("""The full path to an SSL/TLS certificate file.""") ) keyfile = Unicode(u'', config=True, - help="""The full path to a private key file for usage with SSL/TLS.""" + help=_("""The full path to a private key file for usage with SSL/TLS.""") ) client_ca = Unicode(u'', config=True, - help="""The full path to a certificate authority certificate for SSL/TLS client authentication.""" + help=_("""The full path to a certificate authority certificate for SSL/TLS client authentication.""") ) cookie_secret_file = Unicode(config=True, - help="""The file where the cookie secret is stored.""" + help=_("""The file where the cookie secret is stored.""") ) @default('cookie_secret_file') @@ -620,32 +625,31 @@ def _default_cookie_secret(self): def _write_cookie_secret_file(self, secret): """write my secret to my secret_file""" - self.log.info("Writing notebook server cookie secret to %s", self.cookie_secret_file) + self.log.info(_("Writing notebook server cookie secret to %s"), self.cookie_secret_file) with io.open(self.cookie_secret_file, 'wb') as f: f.write(secret) try: os.chmod(self.cookie_secret_file, 0o600) except OSError: self.log.warning( - "Could not set permissions on %s", + _("Could not set permissions on %s"), self.cookie_secret_file ) token = Unicode('', - help="""Token used for authenticating first-time connections to the server. + help=_("""Token used for authenticating first-time connections to the server. When no password is enabled, the default is to generate a new, random token. Setting to an empty string disables authentication altogether, which is NOT RECOMMENDED. - """ + """) ).tag(config=True) one_time_token = Unicode( - help="""One-time token used for opening a browser. - + help=_("""One-time token used for opening a browser. Once used, this token cannot be used again. - """ + """) ) _token_generated = True @@ -719,7 +723,7 @@ def _token_changed(self, change): """) webbrowser_open_new = Integer(2, config=True, - help="""Specify Where to open the notebook on startup. This is the + help=_("""Specify Where to open the notebook on startup. This is the `new` argument passed to the standard library method `webbrowser.open`. The behaviour is not guaranteed, but depends on browser support. Valid values are: @@ -727,23 +731,23 @@ def _token_changed(self, change): 1 opens a new window, 0 opens in an existing window. See the `webbrowser.open` documentation for details. - """) + """)) webapp_settings = Dict(config=True, - help="DEPRECATED, use tornado_settings" + help=_("DEPRECATED, use tornado_settings") ) @observe('webapp_settings') def _update_webapp_settings(self, change): - self.log.warning("\n webapp_settings is deprecated, use tornado_settings.\n") + self.log.warning(_("\n webapp_settings is deprecated, use tornado_settings.\n")) self.tornado_settings = change['new'] tornado_settings = Dict(config=True, - help="Supply overrides for the tornado.web.Application that the " - "Jupyter notebook uses.") + help=_("Supply overrides for the tornado.web.Application that the " + "Jupyter notebook uses.")) websocket_compression_options = Any(None, config=True, - help=""" + help=_(""" Set the tornado compression options for websocket connections. This value will be returned from :meth:`WebSocketHandler.get_compression_options`. @@ -751,25 +755,25 @@ def _update_webapp_settings(self, change): A dict (even an empty one) will enable compression. See the tornado docs for WebSocketHandler.get_compression_options for details. - """ + """) ) terminado_settings = Dict(config=True, - help='Supply overrides for terminado. Currently only supports "shell_command".') + help=_('Supply overrides for terminado. Currently only supports "shell_command".')) cookie_options = Dict(config=True, - help="Extra keyword arguments to pass to `set_secure_cookie`." - " See tornado's set_secure_cookie docs for details." + help=_("Extra keyword arguments to pass to `set_secure_cookie`." + " See tornado's set_secure_cookie docs for details.") ) ssl_options = Dict(config=True, - help="""Supply SSL options for the tornado HTTPServer. - See the tornado docs for details.""") + help=_("""Supply SSL options for the tornado HTTPServer. + See the tornado docs for details.""")) jinja_environment_options = Dict(config=True, - help="Supply extra arguments that will be passed to Jinja environment.") + help=_("Supply extra arguments that will be passed to Jinja environment.")) jinja_template_vars = Dict( config=True, - help="Extra variables to supply to jinja templates when rendering.", + help=_("Extra variables to supply to jinja templates when rendering."), ) enable_mathjax = Bool(True, config=True, @@ -805,11 +809,11 @@ def _update_base_url(self, proposal): value = value + '/' return value - base_project_url = Unicode('/', config=True, help="""DEPRECATED use base_url""") + base_project_url = Unicode('/', config=True, help=_("""DEPRECATED use base_url""")) @observe('base_project_url') def _update_base_project_url(self, change): - self.log.warning("base_project_url is deprecated, use base_url") + self.log.warning(_("base_project_url is deprecated, use base_url")) self.base_url = change['new'] extra_static_paths = List(Unicode(), config=True, @@ -825,7 +829,7 @@ def static_file_path(self): return self.extra_static_paths + [DEFAULT_STATIC_FILES_PATH] static_custom_path = List(Unicode(), - help="""Path to search for custom.js, css""" + help=_("""Path to search for custom.js, css""") ) @default('static_custom_path') @@ -837,9 +841,9 @@ def _default_static_custom_path(self): ] extra_template_paths = List(Unicode(), config=True, - help="""Extra paths to search for serving jinja templates. + help=_("""Extra paths to search for serving jinja templates. - Can be used to override templates from notebook.templates.""" + Can be used to override templates from notebook.templates.""") ) @property @@ -848,7 +852,7 @@ def template_file_path(self): return self.extra_template_paths + DEFAULT_TEMPLATE_PATH_LIST extra_nbextensions_path = List(Unicode(), config=True, - help="""extra paths to look for Javascript notebook extensions""" + help=_("""extra paths to look for Javascript notebook extensions""") ) @property @@ -893,39 +897,39 @@ def _update_mathjax_url(self, change): # enable_mathjax=False overrides mathjax_url self.mathjax_url = u'' else: - self.log.info("Using MathJax: %s", new) + self.log.info(_("Using MathJax: %s"), new) mathjax_config = Unicode("TeX-AMS-MML_HTMLorMML-full,Safe", config=True, - help="""The MathJax.js configuration file that is to be used.""" + help=_("""The MathJax.js configuration file that is to be used.""") ) @observe('mathjax_config') def _update_mathjax_config(self, change): - self.log.info("Using MathJax configuration file: %s", change['new']) + self.log.info(_("Using MathJax configuration file: %s"), change['new']) contents_manager_class = Type( default_value=LargeFileManager, klass=ContentsManager, config=True, - help='The notebook manager class to use.' + help=_('The notebook manager class to use.') ) kernel_manager_class = Type( default_value=MappingKernelManager, config=True, - help='The kernel manager class to use.' + help=_('The kernel manager class to use.') ) session_manager_class = Type( default_value=SessionManager, config=True, - help='The session manager class to use.' + help=_('The session manager class to use.') ) config_manager_class = Type( default_value=ConfigManager, config = True, - help='The config manager class to use' + help=_('The config manager class to use') ) kernel_spec_manager = Instance(KernelSpecManager, allow_none=True) @@ -946,19 +950,19 @@ def _update_mathjax_config(self, change): default_value=LoginHandler, klass=web.RequestHandler, config=True, - help='The login handler class to use.', + help=_('The login handler class to use.'), ) logout_handler_class = Type( default_value=LogoutHandler, klass=web.RequestHandler, config=True, - help='The logout handler class to use.', + help=_('The logout handler class to use.'), ) trust_xheaders = Bool(False, config=True, - help=("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers" - "sent by the upstream reverse proxy. Necessary if the proxy handles SSL") + help=(_("Whether to trust or not X-Scheme/X-Forwarded-Proto and X-Real-Ip/X-Forwarded-For headers" + "sent by the upstream reverse proxy. Necessary if the proxy handles SSL")) ) info_file = Unicode() @@ -969,9 +973,9 @@ def _default_info_file(self): return os.path.join(self.runtime_dir, info_file) pylab = Unicode('disabled', config=True, - help=""" + help=_(""" DISABLED: use %pylab or %matplotlib in the notebook to enable matplotlib. - """ + """) ) @observe('pylab') @@ -981,14 +985,14 @@ def _update_pylab(self, change): backend = ' %s' % change['new'] else: backend = '' - self.log.error("Support for specifying --pylab on the command line has been removed.") + self.log.error(_("Support for specifying --pylab on the command line has been removed.")) self.log.error( - "Please use `%pylab{0}` or `%matplotlib{0}` in the notebook itself.".format(backend) + _("Please use `%pylab{0}` or `%matplotlib{0}` in the notebook itself.").format(backend) ) self.exit(1) notebook_dir = Unicode(config=True, - help="The directory to use for notebooks and kernels." + help=_("The directory to use for notebooks and kernels.") ) @default('notebook_dir') @@ -1011,7 +1015,7 @@ def _notebook_dir_validate(self, proposal): # If we receive a non-absolute path, make it absolute. value = os.path.abspath(value) if not os.path.isdir(value): - raise TraitError("No such notebook dir: %r" % value) + raise TraitError(trans.gettext("No such notebook dir: '%r'") % value) return value @observe('notebook_dir') @@ -1024,37 +1028,37 @@ def _update_notebook_dir(self, change): # TODO: Remove me in notebook 5.0 server_extensions = List(Unicode(), config=True, - help=("DEPRECATED use the nbserver_extensions dict instead") + help=(_("DEPRECATED use the nbserver_extensions dict instead")) ) @observe('server_extensions') def _update_server_extensions(self, change): - self.log.warning("server_extensions is deprecated, use nbserver_extensions") + self.log.warning(_("server_extensions is deprecated, use nbserver_extensions")) self.server_extensions = change['new'] nbserver_extensions = Dict({}, config=True, - help=("Dict of Python modules to load as notebook server extensions." + help=(_("Dict of Python modules to load as notebook server extensions." "Entry values can be used to enable and disable the loading of" "the extensions. The extensions will be loaded in alphabetical " - "order.") + "order.")) ) reraise_server_extension_failures = Bool( False, config=True, - help="Reraise exceptions encountered loading server extensions?", + help=_("Reraise exceptions encountered loading server extensions?"), ) - iopub_msg_rate_limit = Float(1000, config=True, help="""(msgs/sec) + iopub_msg_rate_limit = Float(1000, config=True, help=_("""(msgs/sec) Maximum rate at which messages can be sent on iopub before they are - limited.""") + limited.""")) - iopub_data_rate_limit = Float(1000000, config=True, help="""(bytes/sec) + iopub_data_rate_limit = Float(1000000, config=True, help=_("""(bytes/sec) Maximum rate at which stream output can be sent on iopub before they are - limited.""") + limited.""")) - rate_limit_window = Float(3, config=True, help="""(sec) Time window used to - check the message and data rate limits.""") + rate_limit_window = Float(3, config=True, help=_("""(sec) Time window used to + check the message and data rate limits.""")) def parse_command_line(self, argv=None): super(NotebookApp, self).parse_command_line(argv) @@ -1064,7 +1068,7 @@ def parse_command_line(self, argv=None): f = os.path.abspath(arg0) self.argv.remove(arg0) if not os.path.exists(f): - self.log.critical("No such file or directory: %s", f) + self.log.critical(_("No such file or directory: %s"), f) self.exit(1) # Use config here, to ensure that it takes higher priority than @@ -1134,9 +1138,9 @@ def init_webapp(self): self.default_url = url_path_join(self.base_url, self.default_url) if self.password_required and (not self.password): - self.log.critical("Notebook servers are configured to only be run with a password.") - self.log.critical("Hint: run the following command to set a password") - self.log.critical("\t$ python -m notebook.auth password") + self.log.critical(_("Notebook servers are configured to only be run with a password.")) + self.log.critical(_("Hint: run the following command to set a password")) + self.log.critical(_("\t$ python -m notebook.auth password")) sys.exit(1) self.web_app = NotebookWebApplication( @@ -1174,10 +1178,10 @@ def init_webapp(self): self.http_server.listen(port, self.ip) except socket.error as e: if e.errno == errno.EADDRINUSE: - self.log.info('The port %i is already in use, trying another port.' % port) + self.log.info(_('The port %i is already in use, trying another port.') % port) continue elif e.errno in (errno.EACCES, getattr(errno, 'WSAEACCES', errno.EACCES)): - self.log.warning("Permission to listen on port %i denied" % port) + self.log.warning(_("Permission to listen on port %i denied") % port) continue else: raise @@ -1186,13 +1190,13 @@ def init_webapp(self): success = True break if not success: - self.log.critical('ERROR: the notebook server could not be started because ' - 'no available port could be found.') + self.log.critical(_('ERROR: the notebook server could not be started because ' + 'no available port could be found.')) self.exit(1) @property def display_url(self): - ip = self.ip if self.ip else '[all ip addresses on your system]' + ip = self.ip if self.ip else _('[all ip addresses on your system]') url = self._url(ip) if self.token: # Don't log full token if it came from config @@ -1216,7 +1220,7 @@ def init_terminals(self): self.web_app.settings['terminals_available'] = True except ImportError as e: log = self.log.debug if sys.platform == 'win32' else self.log.warning - log("Terminals not available (error was %s)", e) + log(_("Terminals not available (error was %s)"), e) def init_signal(self): if not sys.platform.startswith('win') and sys.stdin and sys.stdin.isatty(): @@ -1252,20 +1256,22 @@ def _confirm_exit(self): This doesn't work on Windows. """ info = self.log.info - info('interrupted') + info(_('interrupted')) print(self.notebook_info()) - sys.stdout.write("Shutdown this notebook server (y/[n])? ") + yes = _('y') + no = _('n') + sys.stdout.write(_("Shutdown this notebook server (%s/[%s])? ") % (yes, no)) sys.stdout.flush() r,w,x = select.select([sys.stdin], [], [], 5) if r: line = sys.stdin.readline() - if line.lower().startswith('y') and 'n' not in line.lower(): - self.log.critical("Shutdown confirmed") + if line.lower().startswith(yes) and no not in line.lower(): + self.log.critical(_("Shutdown confirmed")) ioloop.IOLoop.current().stop() return else: - print("No answer for 5s:", end=' ') - print("resuming operation...") + print(_("No answer for 5s:"), end=' ') + print(_("resuming operation...")) # no answer, or answer is no: # set it back to original SIGINT handler # use IOLoop.add_callback because signal.signal must be called @@ -1273,7 +1279,7 @@ def _confirm_exit(self): ioloop.IOLoop.current().add_callback(self._restore_sigint_handler) def _signal_stop(self, sig, frame): - self.log.critical("received signal %s, stopping", sig) + self.log.critical(_("received signal %s, stopping"), sig) ioloop.IOLoop.current().stop() def _signal_info(self, sig, frame): @@ -1329,7 +1335,7 @@ def init_server_extensions(self): except Exception: if self.reraise_server_extension_failures: raise - self.log.warning("Error loading server extension %s", modulename, + self.log.warning(_("Error loading server extension %s"), modulename, exc_info=True) def init_mime_overrides(self): @@ -1359,16 +1365,21 @@ def cleanup_kernels(self): The kernels will shutdown themselves when this process no longer exists, but explicit shutdown allows the KernelManagers to cleanup the connection files. """ - self.log.info('Shutting down %d kernels', - len(self.kernel_manager.list_kernel_ids())) + n_kernels = len(self.kernel_manager.list_kernel_ids()) + kernel_msg = trans.ngettext('Shutting down %d kernel', 'Shutting down %d kernels', n_kernels) + self.log.info(kernel_msg % n_kernels) self.kernel_manager.shutdown_all() def notebook_info(self): "Return the current working directory and the server url information" info = self.contents_manager.info_string() + "\n" - info += "%d active kernels \n" % len(self.kernel_manager._kernels) + n_kernels = len(self.kernel_manager.list_kernel_ids()) + kernel_msg = trans.ngettext("%d active kernel", "%d active kernels", n_kernels) + info += kernel_msg % n_kernels + info += "\n" # Format the info so that the URL fits on a single line in 80 char display - return info + "The Jupyter Notebook is running at:\n\r%s" % self.display_url + info += _("The Jupyter Notebook is running at:\n%s") % self.display_url + return info def server_info(self): """Return a JSONable dict of information about this server.""" @@ -1414,18 +1425,18 @@ def start(self): except AttributeError: uid = -1 # anything nonzero here, since we can't check UID assume non-root if uid == 0: - self.log.critical("Running as root is not recommended. Use --allow-root to bypass.") + self.log.critical(_("Running as root is not recommended. Use --allow-root to bypass.")) self.exit(1) info = self.log.info for line in self.notebook_info().split("\n"): info(line) - info("Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).") + info(_("Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).")) if 'dev' in notebook.__version__: - info("Welcome to Project Jupyter! Explore the various tools available" + info(_("Welcome to Project Jupyter! Explore the various tools available" " and their corresponding documentation. If you are interested" " in contributing to the platform, please visit the community" - "resources section at http://jupyter.org/community.html.") + "resources section at http://jupyter.org/community.html.")) self.write_server_info_file() @@ -1433,12 +1444,12 @@ def start(self): try: browser = webbrowser.get(self.browser or None) except webbrowser.Error as e: - self.log.warning('No web browser found: %s.' % e) + self.log.warning(_('No web browser found: %s.') % e) browser = None if self.file_to_run: if not os.path.exists(self.file_to_run): - self.log.critical("%s does not exist" % self.file_to_run) + self.log.critical(_("%s does not exist") % self.file_to_run) self.exit(1) relpath = os.path.relpath(self.file_to_run, self.notebook_dir) @@ -1472,7 +1483,7 @@ def start(self): try: self.io_loop.start() except KeyboardInterrupt: - info("Interrupted...") + info(_("Interrupted...")) finally: self.remove_server_info_file() self.cleanup_kernels() diff --git a/notebook/services/contents/filemanager.py b/notebook/services/contents/filemanager.py index 4a03441b87..d31b495776 100644 --- a/notebook/services/contents/filemanager.py +++ b/notebook/services/contents/filemanager.py @@ -514,7 +514,7 @@ def rename_file(self, old_path, new_path): raise web.HTTPError(500, u'Unknown error renaming file: %s %s' % (old_path, e)) def info_string(self): - return "Serving notebooks from local directory: %s" % self.root_dir + return _("Serving notebooks from local directory: %s") % self.root_dir def get_kernel_path(self, path, model=None): """Return the initial API path of a kernel associated with a given notebook""" diff --git a/notebook/services/contents/manager.py b/notebook/services/contents/manager.py index c24d767c83..dea04210e8 100644 --- a/notebook/services/contents/manager.py +++ b/notebook/services/contents/manager.py @@ -4,6 +4,7 @@ # Distributed under the terms of the Modified BSD License. from fnmatch import fnmatch +import gettext import itertools import json import os @@ -64,7 +65,7 @@ def _notary_default(self): Glob patterns to hide in file and directory listings. """) - untitled_notebook = Unicode("Untitled", config=True, + untitled_notebook = Unicode(_("Untitled"), config=True, help="The base name used when creating untitled notebooks." ) diff --git a/notebook/static/base/js/dialog.js b/notebook/static/base/js/dialog.js index 96190548c8..b59d9908b1 100644 --- a/notebook/static/base/js/dialog.js +++ b/notebook/static/base/js/dialog.js @@ -1,13 +1,13 @@ // Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. -define(function(require) { +define(['jquery', + 'codemirror/lib/codemirror', + 'bootstrap', + 'base/js/i18n'], + function($, CodeMirror, bs, i18n) { "use strict"; - var CodeMirror = require('codemirror/lib/codemirror'); - var bs = require('bootstrap'); - var $ = require('jquery'); - /** * A wrapper around bootstrap modal for easier use * Pass it an option dictionary with the following properties: @@ -86,7 +86,7 @@ define(function(require) { var button = $("