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

Add localization to current examples #111

Open
5 of 17 tasks
kgoo124 opened this issue Sep 1, 2020 · 9 comments
Open
5 of 17 tasks

Add localization to current examples #111

kgoo124 opened this issue Sep 1, 2020 · 9 comments

Comments

@kgoo124
Copy link
Contributor

kgoo124 commented Sep 1, 2020

These current examples need the ITranslator added to them

TODO:

  • advanced/kernel-messaging
  • advanced/kernel-output
  • advanced/server-extension
  • basics/datagrid
  • basics/hello-world (nothing to translate)
  • basics/signals
  • command-palette
  • commands
  • context-menu
  • launcher
  • log-console/custom-log-console
  • log-console/log-messages
  • main-menu
  • react/react-widget
  • settings
  • state
  • widget-tracker/widgets
@goanpeca
Copy link
Member

goanpeca commented Sep 1, 2020

Thanks for taking the lead with this work @kgoo124 !

@jtpio
Copy link
Member

jtpio commented Sep 2, 2020

Thanks @kgoo124!

Having localization by default in the examples sounds good.

We might also want to add a little bit of narrative in one of them (maybe basics/hello-world) to introduce the concept.

@kgoo124
Copy link
Contributor Author

kgoo124 commented Sep 2, 2020

@jtpio I agree that some explanation needs to be done explaining how to implement localization.

I don't think basics/hello-world is a good place to introduce the translation because it only prints a message to the console (unless we want to translate that?). maybe a brand new example is necessary?

did you have any other thoughts about this? or any ideas as far as what would be included in the narrative?

@goanpeca
Copy link
Member

goanpeca commented Sep 2, 2020

We might also want to add a little bit of narrative in one of them

I also agree @jtpio it is a good idea, I could help on this.

@echarles
Copy link
Member

echarles commented Sep 3, 2020

I don't think basics/hello-world is a good place to introduce the translation because it only prints a message to the console (unless we want to translate that?). maybe a brand new example is necessary?

I agree a dedicated example is better for translation to avoid mixing concerns. See also #114 where I propose to flatten the example structure.

@jtpio
Copy link
Member

jtpio commented Sep 3, 2020

Nice 👍

Then we can indeed leave basics/hello-world out and have a dedicated example focused on the localization.

did you have any other thoughts about this? or any ideas as far as what would be included in the narrative?

The new example would most likely introduce the concept of translating JupyterLab with a small note on why it's important. And show how to consume and use ITranslator. So in the end it can be relatively short.

@echarles
Copy link
Member

echarles commented Sep 3, 2020

These current examples need the ITranslator added to them

To keep each extension simple, I would rather see only that dedicated translation example having the ITranslator. So adding ITranslator to each of the examples is not my preferred option. Less work for us, less confusing for the reader.

@goanpeca
Copy link
Member

goanpeca commented Sep 3, 2020

I have mixed feeling since translation is a transversal so having all examples use it, may be more work but will encourage making code translation friendly. The less work for us seems like a very small gain vs. reinforcing a transversal concept seems small

@echarles
Copy link
Member

echarles commented Sep 3, 2020

I have mixed feeling since translation is a transversal so having all examples use it, may be more work but will encourage making code translation friendly. The less work for us seems like a very small gain vs. reinforcing a transversal concept seems small

No issue for me. I can see the advantage enforcing good habits in all the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants