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

[bug] variableReferencePattern are not correctly displayed in inline annotation #1092

Closed
NilsJacobsen opened this issue Jul 14, 2023 · 4 comments · Fixed by #1121
Closed
Assignees
Labels
scope: inlang/sherlock-vscode Related to source-code/ide-extension. type: bug Something isn't working

Comments

@NilsJacobsen
Copy link
Member

Problem

The problem origined in this PR: mifi/lossless-cut#1653 (comment)

Keep all {{type}} tracks annotates as Keep all

Expected behavior

Should just show the translation.

Reproduction

Fork https://github.com/mifi/lossless-cut
Add config
Use ide-extension

inlang.config.js file

/**
 * @type { import("@inlang/core/config").DefineConfig }
 */
export async function defineConfig(env) {
	const { default: i18nextPlugin } = await env.$import(
		"https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@3/dist/index.js",
	)

	const { default: standardLintRules } = await env.$import(
		"https://cdn.jsdelivr.net/npm/@inlang/plugin-standard-lint-rules@3/dist/index.js",
	)

	return {
		referenceLanguage: "en",
		plugins: [
			i18nextPlugin({
				pathPattern: "public/locales/{language}/translation.json",
			}),
			standardLintRules(),
		],
	}
}

npx @inlang/cli config validate file

valid

Other information

No response

@NilsJacobsen NilsJacobsen added the type: bug Something isn't working label Jul 14, 2023
@maige-app maige-app bot added the scope: inlang/sherlock-vscode Related to source-code/ide-extension. label Jul 14, 2023
@felixhaeberle
Copy link
Contributor

@openscript I analyzed this bug already, we currently do not handle placeholders in the rendering of the message preview decoration.

Bildschirmfoto 2023-07-14 um 10 20 39 Bildschirmfoto 2023-07-14 um 10 20 26 Bildschirmfoto 2023-07-14 um 10 20 32

@openscript
Copy link
Contributor

I think it's not hard to fix to show the whole message with the placeholder. 1h should be sufficient.

@openscript
Copy link
Contributor

@felixhaeberle: I think it is a quick win. Should I do it today?

@felixhaeberle
Copy link
Contributor

@openscript Go for it! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: inlang/sherlock-vscode Related to source-code/ide-extension. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants