Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added localization for debug level selector #12033

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

xcariba
Copy link
Contributor

@xcariba xcariba commented Dec 29, 2022

What it does

Fixes #11973.

Adds localization support for debug console severity.

How to test

  • Start theia and open folder
  • Create js file and write different log calls (console.error('My Error'); console.info('My Info');
  • Add debugger; call or set breakpoint
  • Start debugger for created js file
  • Open debug console view
  • Write some js call and press enter (in my case debug console was empty until some call was made from console)
  • Switch debug levels, it will show messages with chosen level

Review checklist

Reminder for reviewers

@msujew msujew self-requested a review January 9, 2023 13:42
Comment on lines 34 to 38
const error = nls.localize('theia/core/severity/errors', 'Errors');
const warning = nls.localize('theia/core/severity/warnings', 'Warnings');
const info = nls.localize('theia/core/severity/info', 'Info');
const log = nls.localize('theia/core/severity/log', 'Log');
const ignore = nls.localize('theia/core/severity/all', 'All');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I'm not too sure whether we should localize these values directly. I would rather have a Severity.toLocaleString() function that accepts a string | Severity and returns a localized version of the string. Use the result at the caller site of debug-console-contribution.tsx.

@vince-fugnitto vince-fugnitto added debug issues that related to debug functionality localization issues related to localization/internalization/nls and removed debug issues that related to debug functionality labels Jan 10, 2023
@msujew
Copy link
Member

msujew commented Jan 27, 2023

@xcariba Are you still interested in contributing this change?

Signed-off-by: Alexander Kozinko <xcariba@gmail.com>
@xcariba xcariba force-pushed the fix-debug-levels-localization branch from 503dd14 to 05ce583 Compare January 30, 2023 11:18
@xcariba
Copy link
Contributor Author

xcariba commented Jan 30, 2023

@msujew Yes, I just don't have enough time =( I agree with your suggestion, fixed PR

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
localization issues related to localization/internalization/nls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug console severity selector is not localized
3 participants