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

Ensure markdown links don't get messed up in language packs by using "Locked" comment #137830

Closed
TylerLeonhardt opened this issue Nov 24, 2021 · 3 comments
Assignees
Labels
engineering VS Code - Build / issue tracking / etc. l10n-platform Localization platform issues (not wrong translations)
Milestone

Comments

@TylerLeonhardt
Copy link
Member

TylerLeonhardt commented Nov 24, 2021

from #126614 (comment)

add a dev comment like {Locked="]({1})"} should be able to enforce there is no space added between.

There will validation error if space added. (previous plane text comment won't cause validation error).
Assume translation violate the rule still got checked in. Build process will revert the translation back to English because violate the loc rule. Hence there won't be function break.

so adding

'{Locked="]({0})"}'

to the comment array here:

const headerDescriptionActionsText = localize({ key: 'workspaceTrustEditorHeaderActions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).", `command:workbench.trust.configure`);

so it looks like:

comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)', '{Locked="]({0})"}']

should enable this validation.

I need to find all of these comments and change them accordingly.

cc @danyeh

@TylerLeonhardt TylerLeonhardt added the engineering VS Code - Build / issue tracking / etc. label Nov 24, 2021
@TylerLeonhardt TylerLeonhardt added this to the Backlog milestone Nov 24, 2021
@TylerLeonhardt TylerLeonhardt self-assigned this Nov 24, 2021
@TylerLeonhardt
Copy link
Member Author

It's also possible to do this for package.nls.json files like so:

{
	"view.workbench.scm.disabled": { 
               "message": "If you would like to use git features, please enable git in your [settings](command:workbench.action.openSettings?%5B%22git.enabled%22%5D).\nTo learn more about how to use git and source control in VS Code [read our docs](https://aka.ms/vscode-scm).",
               "comment": [
			"Please do not add a space between ] and (. It is a special link syntax.",
			"Please do not translate the 'command:....' text. It is a special link syntax.",
			"{Locked=\"]({0})\"}",
			"{Locked=\"(command:\"}"
		]
        }
}

from #126408 (comment)

@TylerLeonhardt TylerLeonhardt added the l10n-platform Localization platform issues (not wrong translations) label Feb 17, 2022
@TylerLeonhardt
Copy link
Member Author

I'm going to close this and fix these as they come up

@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
engineering VS Code - Build / issue tracking / etc. l10n-platform Localization platform issues (not wrong translations)
Projects
None yet
Development

No branches or pull requests

1 participant