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

Weblate doesn't show the "other"/"others" categories as translatable strings #814

Closed
MarcAbonce opened this issue Jan 24, 2022 · 3 comments · Fixed by #859
Closed

Weblate doesn't show the "other"/"others" categories as translatable strings #814

MarcAbonce opened this issue Jan 24, 2022 · 3 comments · Fixed by #859
Labels
area: translation bug Something isn't working

Comments

@MarcAbonce
Copy link
Contributor

Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG
61853aa (current master)

What happened?

Weblate doesn't show the "other"/"others" categories as translatable strings. They do not show up in any of the messages.po files either, even though all the other new subcategories already appear in there.

How To Reproduce

  1. Go to Weblate.
  2. Try to find the "other" string.

Expected behavior

  1. Strings should be translatable.

Additional context

I think that the script used to generate the messages.po files wasn't able to pick up those strings because they are defined outside the gettext, see: https://github.com/searxng/searxng/blob/master/searx/webapp.py#L189-L190

...
    gettext('web'),
    gettext(DEFAULT_GROUP_NAME),
    gettext(OTHER_CATEGORY)
)
@MarcAbonce MarcAbonce added the bug Something isn't working label Jan 24, 2022
@not-my-profile
Copy link
Contributor

not-my-profile commented Jan 24, 2022

Ah yeah my bad ... I thought that the gettext functions actually did something, I guess the strings are extracted statically.

@return42
Copy link
Member

return42 added a commit to return42/searxng that referenced this issue Feb 3, 2022
Closes: searxng#814
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this issue Feb 17, 2022
Closes: searxng#814
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this issue Mar 16, 2022
Closes: searxng#814
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42
Copy link
Member

I think that the script used to generate the messages.po files wasn't able to pick up those strings because they are defined outside the gettext

@MarcAbonce I fixed this issue in PR #859 .. if you have time for, would like to have a look at this PR? / thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: translation bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants