Use retrolab domain for translation

This commit is contained in:
Jeremy Tuloup 2021-09-22 09:11:35 +02:00
parent c680ba9ef8
commit edc96c17cf
5 changed files with 12 additions and 12 deletions

View File

@ -99,7 +99,7 @@ const dirty: JupyterFrontEndPlugin<void> = {
if (!(app instanceof RetroApp)) {
throw new Error(`${dirty.id} must be activated in RetroLab.`);
}
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const message = trans.__(
'Are you sure you want to exit RetroLab?\n\nAny unsaved changes will be lost.'
);
@ -211,7 +211,7 @@ const pages: JupyterFrontEndPlugin<void> = {
palette: ICommandPalette | null,
menu: IMainMenu | null
): void => {
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const baseUrl = PageConfig.getBaseUrl();
app.commands.addCommand(CommandIDs.openLab, {
@ -458,7 +458,7 @@ const topVisibility: JupyterFrontEndPlugin<void> = {
translator: ITranslator,
menu: IMainMenu | null
) => {
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const top = retroShell.top;
app.commands.addCommand(CommandIDs.toggleTop, {
@ -590,7 +590,7 @@ const zen: JupyterFrontEndPlugin<void> = {
): void => {
const { commands } = app;
const elem = document.documentElement;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const toggleOn = () => {
retroShell?.collapseTop();

View File

@ -55,7 +55,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
menu: IMainMenu | null
): void => {
const { commands } = app;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
commands.addCommand(CommandIDs.open, {
label: args => args['text'] as string,

View File

@ -90,7 +90,7 @@ const launchButtons: JupyterFrontEndPlugin<void> = {
const { commands, shell } = app;
const baseUrl = PageConfig.getBaseUrl();
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const isEnabled = () => {
return (
@ -186,7 +186,7 @@ const launchRetroTree: JupyterFrontEndPlugin<void> = {
palette: ICommandPalette | null
): void => {
const { commands } = app;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const category = trans.__('Help');
commands.addCommand(CommandIDs.launchRetroTree, {

View File

@ -57,7 +57,7 @@ const checkpoints: JupyterFrontEndPlugin<void> = {
retroShell: IRetroShell | null
) => {
const { shell } = app;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const widget = new Widget();
widget.id = DOMUtils.createDomID();
widget.addClass('jp-RetroCheckpoint');

View File

@ -36,7 +36,7 @@ const newFiles: JupyterFrontEndPlugin<void> = {
) => {
const { commands } = app;
const browser = filebrowser.defaultBrowser;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
// wrapper commands to be able to override the label
const newNotebookCommand = 'tree:new-notebook';
@ -77,7 +77,7 @@ const newConsole: JupyterFrontEndPlugin<void> = {
) => {
const { commands } = app;
const browser = filebrowser.defaultBrowser;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const newConsoleCommand = 'tree:new-console';
commands.addCommand(newConsoleCommand, {
@ -111,7 +111,7 @@ const newTerminal: JupyterFrontEndPlugin<void> = {
) => {
const { commands } = app;
const browser = filebrowser.defaultBrowser;
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const newTerminalCommand = 'tree:new-terminal';
commands.addCommand(newTerminalCommand, {
@ -148,7 +148,7 @@ const browserWidget: JupyterFrontEndPlugin<void> = {
const tabPanel = new TabPanel({ tabPlacement: 'top', tabsMovable: true });
tabPanel.addClass('jp-TreePanel');
const trans = translator.load('jupyterlab');
const trans = translator.load('retrolab');
const { defaultBrowser: browser } = factory;
browser.title.label = trans.__('Files');