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

Filter translation keys #13177

Open
Justman100 opened this issue Dec 3, 2024 · 14 comments
Open

Filter translation keys #13177

Justman100 opened this issue Dec 3, 2024 · 14 comments
Labels
question This is more a question for the support than an issue.

Comments

@Justman100
Copy link
Contributor

Describe the problem

Keys with values are also released for translation, which are not actually translated

Describe the solution you would like

That keys of values to be translated can be ignored

Describe alternatives you have considered

No response

Screenshots

grafik

Additional context

From the screenshot, for example, the keys timestamp and color should be ignored, i.e. not displayed for translation

@nijel
Copy link
Member

nijel commented Dec 3, 2024

You can configure which keys to filter using https://docs.weblate.org/en/latest/admin/projects.html#key-filter

@nijel nijel added the question This is more a question for the support than an issue. label Dec 3, 2024
Copy link

github-actions bot commented Dec 3, 2024

This issue has been marked as a question by a Weblate team member. Why? Because it belongs more to the professional Weblate Care or community Discussions than here. We strive to answer these reasonably fast here, too, but purchasing the support subscription is more responsible and faster for your business. And it makes Weblate stronger as well. Thanks!

In case your question is already answered, making a donation is the right way to say thank you!

@Justman100
Copy link
Contributor Author

You can configure which keys to filter using https://docs.weblate.org/en/latest/admin/projects.html#key-filter

Where to configure?

@nijel
Copy link
Member

nijel commented Dec 3, 2024

In component configuration...

@Justman100
Copy link
Contributor Author

In component configuration...

Here?
grafik

@nijel
Copy link
Member

nijel commented Dec 4, 2024

Looks like that (I don't speak German).

@Justman100
Copy link
Contributor Author

Looks like that (I don't speak German).

Again in english and the full site:
grafik

@nijel
Copy link
Member

nijel commented Dec 4, 2024

The option was introduced in Weblate 5.8 (as https://docs.weblate.org/en/latest/admin/projects.html#key-filter describes) and you are using 5.7.2, so you need to upgrade Weblate to see it.

@Justman100
Copy link
Contributor Author

The option was introduced in Weblate 5.8 (as https://docs.weblate.org/en/latest/admin/projects.html#key-filter describes) and you are using 5.7.2, so you need to upgrade Weblate to see it.

Oof 😅! Now I've got it! But how do I write that keys should be ignored? The function says that the regex only shows those keys, not hidden this

@nijel
Copy link
Member

nijel commented Dec 5, 2024

You can use negative lookaheads, there are some examples in the language filter docs: https://docs.weblate.org/en/latest/admin/projects.html#language-filter

nijel added a commit to nijel/weblate that referenced this issue Dec 5, 2024
@nijel
Copy link
Member

nijel commented Dec 5, 2024

I've addeed some examples in #13206

nijel added a commit that referenced this issue Dec 6, 2024
@Justman100
Copy link
Contributor Author

Justman100 commented Dec 14, 2024

I've addeed some examples in #13206

What with subkeys (key.subkey)?

@Justman100
Copy link
Contributor Author

And will this be applied to existing keys?

@nijel
Copy link
Member

nijel commented Dec 16, 2024

What with subkeys (key.subkey)?

It's a regular expression, so you can be pretty creative there.

And will this be applied to existing keys?

Yes, it is applied when parsing the file and AFAIK changing this should force parsing the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants