Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: About box to display nbclassic instead of notebook #147

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nbclassic/i18n/fr_FR/LC_MESSAGES/nbjs.po
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ msgid "Select a file"
msgstr "Sélectionner un fichier"

#: notebook/static/notebook/js/about.js:14
msgid "You are using Jupyter notebook."
msgid "You are using Jupyter NbClassic."
msgstr "Vous utilisez un notebook Jupyter."

#: notebook/static/notebook/js/about.js:16
msgid "The version of the notebook server is: "
msgid "The version of the Jupyter server is: "
msgstr "La version du serveur de notebook est : "

#: notebook/static/notebook/js/about.js:22
Expand Down Expand Up @@ -162,7 +162,7 @@ msgid "Cannot find sys_info!"
msgstr "Impossible de trouver sys_info !"

#: notebook/static/notebook/js/about.js:38
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "À propos de Jupyter Notebook"

#: notebook/static/notebook/js/about.js:47
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/i18n/fr_FR/LC_MESSAGES/nbui.po
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ msgid "Opens in a new window"
msgstr "S'ouvre dans une nouvelle fenêtre"

#: notebook/templates/notebook.html:319
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "À propos de Jupyter Notebook"

#: notebook/templates/notebook.html:319
Expand Down
6 changes: 3 additions & 3 deletions nbclassic/i18n/ja_JP/LC_MESSAGES/nbjs.po
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ msgid "Select a file"
msgstr "ファイルを選択"

#: notebook/static/notebook/js/about.js:14
msgid "You are using Jupyter notebook."
msgid "You are using Jupyter NbClassic."
msgstr "Jupyter notebook を使用しています。"

#: notebook/static/notebook/js/about.js:16
msgid "The version of the notebook server is: "
msgid "The version of the Jupyter server is: "
msgstr "ノートブックサーバのバージョン"

#: notebook/static/notebook/js/about.js:22
Expand Down Expand Up @@ -147,7 +147,7 @@ msgid "Cannot find sys_info!"
msgstr "sys_info が見つかりません!"

#: notebook/static/notebook/js/about.js:38
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "Jupyter Notebook について"

#: notebook/static/notebook/js/about.js:47
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/i18n/ja_JP/LC_MESSAGES/nbui.po
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ msgid "Opens in a new window"
msgstr "新しいウィンドウで開く"

#: notebook/templates/notebook.html:319
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "Jupyter Notebook について"

#: notebook/templates/notebook.html:319
Expand Down
6 changes: 3 additions & 3 deletions nbclassic/i18n/nl/LC_MESSAGES/nbjs.po
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ msgid "Select a file"
msgstr "Een bestand selecteren"

#: notebook/static/notebook/js/about.js:14
msgid "You are using Jupyter notebook."
msgid "You are using Jupyter NbClassic."
msgstr "U gebruikt Jupyter notebook."

#: notebook/static/notebook/js/about.js:16
msgid "The version of the notebook server is: "
msgid "The version of the Jupyter server is: "
msgstr "De versie van de notebookserver is: "

#: notebook/static/notebook/js/about.js:22
Expand Down Expand Up @@ -158,7 +158,7 @@ msgid "Cannot find sys_info!"
msgstr "Ik kan sys_info niet vinden!"

#: notebook/static/notebook/js/about.js:38
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "Over Jupyter Notebook"

#: notebook/static/notebook/js/about.js:47
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/i18n/nl/LC_MESSAGES/nbui.po
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ msgid "Opens in a new window"
msgstr "Opent in een nieuw venster"

#: notebook/templates/notebook.html:319
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "Over Jupyter Notebook"

#: notebook/templates/notebook.html:319
Expand Down
6 changes: 3 additions & 3 deletions nbclassic/i18n/ru_RU/LC_MESSAGES/nbjs.po
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ msgid "Select a file"
msgstr "Выберите файл"

#: notebook/static/notebook/js/about.js:14
msgid "You are using Jupyter notebook."
msgid "You are using Jupyter NbClassic."
msgstr "Вы используете блокнот Jupyter."

#: notebook/static/notebook/js/about.js:16
msgid "The version of the notebook server is: "
msgid "The version of the Jupyter server is: "
msgstr "Версия сервера блокнотов: "

#: notebook/static/notebook/js/about.js:22
Expand Down Expand Up @@ -161,7 +161,7 @@ msgid "Cannot find sys_info!"
msgstr "Невозможно найти sys_info!"

#: notebook/static/notebook/js/about.js:38
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "О блокноте Jupyter"

#: notebook/static/notebook/js/about.js:47
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/i18n/ru_RU/LC_MESSAGES/nbui.po
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ msgid "Opens in a new window"
msgstr "Открыть в новом окне"

#: notebook/templates/notebook.html:319
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "О блокноте Jupyter"

#: notebook/templates/notebook.html:319
Expand Down
6 changes: 3 additions & 3 deletions nbclassic/i18n/zh_CN/LC_MESSAGES/nbjs.po
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ msgid "Select a file"
msgstr "选择文件"

#: notebook/static/notebook/js/about.js:14
msgid "You are using Jupyter notebook."
msgid "You are using Jupyter NbClassic."
msgstr "您正在使用 Jupyter Notebook。"

#: notebook/static/notebook/js/about.js:16
msgid "The version of the notebook server is: "
msgid "The version of the Jupyter server is: "
msgstr "该 notebook 服务的版本是:"

#: notebook/static/notebook/js/about.js:22
Expand Down Expand Up @@ -148,7 +148,7 @@ msgid "Cannot find sys_info!"
msgstr "找不到 sys_info!"

#: notebook/static/notebook/js/about.js:38
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "关于 Jupyter Notebook"

#: notebook/static/notebook/js/about.js:47
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/i18n/zh_CN/LC_MESSAGES/nbui.po
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ msgid "Opens in a new window"
msgstr "在新窗口打开"

#: notebook/templates/notebook.html:319
msgid "About Jupyter Notebook"
msgid "About Jupyter NbClassic"
msgstr "关于本程序"

#: notebook/templates/notebook.html:319
Expand Down
14 changes: 8 additions & 6 deletions nbclassic/static/notebook/js/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ requirejs([
$('#notebook_about').click(function () {
// use underscore template to auto html escape
if (sys_info) {
var text = i18n.msg._('You are using Jupyter notebook.');
var text = i18n.msg._('You are using Jupyter NbClassic.');
text = text + '<br/><br/>';
text = text + i18n.msg._('The version of the notebook server is: ');
text = text + _.template('<b><%- version %></b>')({ version: sys_info.notebook_version });
text = text + i18n.msg._('The version of the Jupyter server is: ');
text = text + _.template('<b><%- version %></b>')({ version: sys_info.jupyter_server_version });
if (sys_info.commit_hash) {
text = text + _.template('-<%- hash %>')({ hash: sys_info.commit_hash });
}
text = text + '<br/>';
text = text + i18n.msg._('The server is running on this version of Python:');
text = text + '<br/>';
text = text + 'To get the version of nbclassic, run in a terminal: jupyter nbclassic --version';
text = text + '<br/>';
text = text + i18n.msg._('The server is running on this version of Python:');
text = text + _.template('<br/><pre>Python <%- pyver %></pre>')({
pyver: sys_info.sys_version });
var kinfo = $('<div/>').attr('id', '#about-kinfo').text(i18n.msg._('Waiting for kernel to be available...'));
Expand All @@ -35,7 +37,7 @@ requirejs([
body.append($('<p/>').html(text));
}
dialog.modal({
title: i18n.msg._('About Jupyter Notebook'),
title: i18n.msg._('About Jupyter NbClassic'),
body: body,
buttons: { 'OK': {} }
});
Expand Down
2 changes: 1 addition & 1 deletion nbclassic/templates/notebook.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
{% endif %}
{% endfor %}
<li class="divider"></li>
<li title="{% trans %}About Jupyter Notebook{% endtrans %}"><a id="notebook_about" href="#">{% trans %}About{% endtrans %}</a></li>
<li title="{% trans %}About Jupyter NbClassic{% endtrans %}"><a id="notebook_about" href="#">{% trans %}About{% endtrans %}</a></li>
{% endblock %}
</ul>
</li>
Expand Down