Skip to content

Bad 'OK' capitalization on 'Add Triggered Breakpoint...' (fix #240490)#240492

Merged
roblourens merged 1 commit intomicrosoft:mainfrom
gjsjohnmurray:fix-240490
Feb 12, 2025
Merged

Bad 'OK' capitalization on 'Add Triggered Breakpoint...' (fix #240490)#240492
roblourens merged 1 commit intomicrosoft:mainfrom
gjsjohnmurray:fix-240490

Conversation

@gjsjohnmurray
Copy link
Contributor

This PR fixes #240490

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thanks @gjsjohnmurray!

@roblourens roblourens added this to the February 2025 milestone Feb 12, 2025
@roblourens roblourens enabled auto-merge (squash) February 12, 2025 16:38

const closeButton = new Button(this.selectBreakpointContainer, defaultButtonStyles);
closeButton.label = nls.localize('ok', "Ok");
closeButton.label = nls.localize('ok', "OK");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to bump the nls.localize key (i.e. 'ok' to 'ok1'), otherwise the string will not get relocalized? @TylerLeonhardt to confirm

Copy link
Member

Choose a reason for hiding this comment

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

I'm also interested as I think we may not need to do this anymore (is the key actually a hash of the key+contents? What's the key used for exactly?)

Copy link
Member

Choose a reason for hiding this comment

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

Yes you have to bump the key in order for the pipeline to recognize the change... however, I think this change is still fine because the intent is that it's just changing the "English translation". It's very unlikely that Ok translates differently than OK in another language... so the existing translations are still valid.

@Tyriar you may be thinking of extension localization which doesn't use a key... the key in core gets passed all the way to the translators and they use it for context in translating the string. In a lot of cases, this context isn't needed and if so, it should be in a comment and not the key... so we could move to a keyless function (I have a issue for this already).

Copy link
Member

Choose a reason for hiding this comment

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

@TylerLeonhardt moving to keyless as the default would be great. I've called this sort of thing out before in PRs, if the plan is to still keep the key, should the content just be an implicit part of the key so we don't need to think about it and any changes to the English content trigger re-translation? I never saw the key as a way to provide particularly useful context. If context is needed I'd go for ILocalizeInfo.

@roblourens roblourens merged commit 5f2be64 into microsoft:main Feb 12, 2025
7 checks passed
@gjsjohnmurray gjsjohnmurray deleted the fix-240490 branch February 12, 2025 17:57
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad 'OK' capitalization on 'Add Triggered Breakpoint...'

5 participants