浏览代码

Backport PR #10885: Improve language choice menu and dialog (#10887)

Co-authored-by: Michał Krassowski <5832902+krassowski@users.noreply.github.com>
MeeseeksMachine 3 年之前
父节点
当前提交
6073074d43
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      packages/translation-extension/src/index.ts

+ 6 - 3
packages/translation-extension/src/index.ts

@@ -114,7 +114,7 @@ const langMenu: JupyterFrontEndPlugin<void> = {
               const toggled = displayName === nativeName;
               const label = toggled
                 ? `${displayName}`
-                : `${displayName} (${nativeName})`;
+                : `${displayName} - ${nativeName}`;
 
               // Add a command per language
               command = `jupyterlab-translation:${locale}`;
@@ -127,10 +127,13 @@ const langMenu: JupyterFrontEndPlugin<void> = {
                 execute: () => {
                   return showDialog({
                     title: trans.__('Change interface language?'),
-                    body: trans.__('Are you sure you want to refresh?'),
+                    body: trans.__(
+                      'After changing the interface language to %1, you will need to reload JupyterLab to see the changes.',
+                      label
+                    ),
                     buttons: [
                       Dialog.cancelButton({ label: trans.__('Cancel') }),
-                      Dialog.okButton({ label: trans.__('Ok') })
+                      Dialog.okButton({ label: trans.__('Change and reload') })
                     ]
                   }).then(result => {
                     if (result.button.accept) {