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
PR: Localize strings in JLab #8800
Conversation
Thanks for making a pull request to JupyterLab! To try out this branch on binder, follow this link: |
c236919
to
5c9d354
Compare
I'll be afk for the next 3 hours or so, but will be focusing on getting this done after that. |
As far as I can tell there I sno need to change any API, except for the noun and plural stuff in the menus (and even we could make the changes optional and backwards compatible anyway). So I could open a PR just with that and make the rest of the changes in separate PRs and not in a hurry. Still let's talk to go over the details. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed the first 110 files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't look closely at the FIXME comments in this pass
Looking into them after I make the next push (moving the factories changed a lot, so that is also a breaking change I guess... since It is also being used in the exampleS) |
ceb36b8
to
3ac627c
Compare
1022065
to
3c98117
Compare
I also changed the |
To fix examples:
|
I think this is causing the file browser plugin to fail: diff --git a/packages/filebrowser-extension/src/index.ts b/packages/filebrowser-extension/src/index.ts
index 90f662256..190e35c96 100644
--- a/packages/filebrowser-extension/src/index.ts
+++ b/packages/filebrowser-extension/src/index.ts
@@ -158,7 +158,7 @@ const factory: JupyterFrontEndPlugin<IFileBrowserFactory> = {
activate: activateFactory,
id: '@jupyterlab/filebrowser-extension:factory',
provides: IFileBrowserFactory,
- requires: [ILabShell, IDocumentManager, IDocumentManager, ITranslator],
+ requires: [ILabShell, IDocumentManager, ITranslator],
optional: [IStateDB, IRouter, JupyterFrontEnd.ITreeResolver]
}; |
Thanks for the help @afshin ! I will add a check for number of parameters on requires and also check if a same plugin has been registered before. That very stupid error on my side was not providing the right feedback :-p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's merge and iterate
References
Code changes
User-facing changes
Backwards-incompatible changes
To be completed:
File/Edit/Kernel/Run menu extensions that used constants for action/noun/plural/name have now been replaced to functions that take the amount of items so that the pluralization can be correctly handled for different languages.
IEditorServices provides now 2 functions
getFactoryService
,getMimeTypeService
(that accept an optional translator instead offactoryService
andtypeService
.