You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/packages/frontend/i18n/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ To get a feeling how this works, search in the source code for existing usages.
12
12
- A `defineMessage({ id: "[...].[...].[label|title|tooltip|...]", defaultMessage:"..."})` is used when you define a message in a data structure, which will be referenced by a component. That "defined message" is basically a tagged object. You cannot use it directly in a component!
13
13
- To make use of such a `defineMessage`, you have to get a hold of `const intl = useIntl()` and then `intl.formatMessage(the_message_object)`. That will render a string.
14
14
- Note: There is a type `IntlMessage` defiend by us here in `./types.ts`. It requires `id` and `defaultMessage`. Search for `isIntlMessage` in the code base to see, how it is used to check what to do with it.
15
+
- Outside the react context, you use `i18n/index::getIntl`.
15
16
16
17
Note: The "extract" step parses the source-code of all `*.tsx` files and only a few selected `*.ts` files. You cannot use variables where messages are defined, because the extract tool does not know what to do with them. So, for example, the files that define commands are `*.ts` files, and the messages it uses are referencing the exported messages defined in `i18n/common.ts`. Scanning all files just takes too long.
"Tooltip on the menu enty to open the AI Assistant for generating documents",
211
219
},
220
+
stop: {
221
+
id: "labels.stop",
222
+
defaultMessage: "Stop",
223
+
description: "Label on a button to stop an ongoing process",
224
+
},
212
225
});
213
226
214
227
exportconstmenu=defineMessages({
@@ -327,6 +340,99 @@ export const jupyter = {
327
340
defaultMessage:
328
341
"Open the Jupyter command line console connected to the running kernel.",
329
342
},
343
+
browser_actions_trust_title: {
344
+
id: "jupyter.editor.browser_actions.trust.title",
345
+
defaultMessage: "Trust this Notebook?",
346
+
description: "For a specific Jupyter Notebook",
347
+
},
348
+
browser_actions_trust_body: {
349
+
id: "jupyter.editor.browser_actions.trust.body",
350
+
defaultMessage:
351
+
"A trusted Jupyter notebook may execute hidden Javascript code or carry out other attacks via malicious HTML. Selecting trust below, or evaluating any cell, will disable the code that strips dangerous HTML from this notebook. (NOTE: CoCalc does NOT implement the official Jupyter security model for trusted notebooks; in particular, we assume that you do trust collaborators on your CoCalc projects. Also, in many cases we still do not execute Javascript in HTML, even if the notebook is trusted.)",
"Are you sure you want to close this file and halt the kernel? All variable state will be lost.",
361
+
},
362
+
restart_and_run_all_title: {
363
+
id: "jupyter.editor.restart_and_run_all.title",
364
+
defaultMessage: "Restart kernel and run notebook",
365
+
description: "For a Jupyter Notebook",
366
+
},
367
+
restart_and_run_all_body: {
368
+
id: "jupyter.editor.restart_and_run_all.body",
369
+
defaultMessage:
370
+
"Are you sure you want to restart the kernel and run the notebook? All variable state and output will be reset, though past output is available in TimeTravel.",
371
+
description: "For a Jupyter Notebook",
372
+
},
373
+
restart_and_run_all_stop: {
374
+
id: "jupyter.editor.restart_and_run_all.stop",
375
+
defaultMessage: "Run all (stop on first error)",
376
+
description: "In a Jupyter Notebook, running all cells after a restart",
377
+
},
378
+
restart_and_run_all_nostop: {
379
+
id: "jupyter.editor.restart_and_run_all.nostop",
380
+
defaultMessage: "Run all (do not stop on errors)",
381
+
description: "In a Jupyter Notebook, running all cells after a restart",
"Are you sure you want to restart the kernel and re-execute all cells? All variable state and output will be reset, though past output is available in TimeTravel.",
398
+
description: "Description for restarting a Jupyter Notebook",
0 commit comments