Search help doesn't work for some locales

AI-generated summary

The discussion revolves around the issue that the search help feature in Discourse does not work for non-English locales. ndalliard reported the issue with the DE locale, which was also confirmed by gerhard to be a bug affecting all non-English languages. The bug is caused by the localization fallback not working correctly, resulting in a 404 error. gerhard investigated the issue and found the problem to be related to I18n.exists? not using the fallback. A possible solution was identified in gerhard, which is a pull request to fix the issue for all languages. As an incremental fix, JSey added the German locale for the search help string on Transifex.

Continuing the discussion from Search help doesn't work in RU locale:

The same happens to me when I use DE locale, then the help button from the search doesn’t work. When I switch over to EN locale it works flawless. Any ideas how to fix that? Do I have to translate something?

1개의 좋아요

No need to translate anything. This is a bug.
AFAIK the search help works only for English, all other languages result in an Error 404 when https://meta.discourse.org/static/search_help.html is requested.

4개의 좋아요

I did look into this issue. This seems to be a problem with the localization fallback.
The translation is available, but it looks like I18n.exists? doesn’t use the fallback.

@riking I’m not sure how to solve this. Can you please take a look at this?

4개의 좋아요

Well, it works for zh_CN. https://meta.discoursecn.org/ It’s v1.4.0.beta11 +93

Yes, it works, because the translation for static.search_help exists for zh_CN.
I corrected my post in the other topic:

2개의 좋아요

Just added the German locale for that string on Transifex - as an “incremental fix” for this bug… :smile:

3개의 좋아요

This should fix it for all languages:
https://github.com/discourse/discourse/pull/3792

5개의 좋아요

This topic was automatically closed after 24 hours. New replies are no longer allowed.