Defect #43906
closedWiki help does not display localized content for locales with a region subtag
Description
Wiki help displays the English content instead of localized content for locales with a region subtag, even when the localized help files exist. The attached patch fixes the issue.
Steps to reproduce:
1. Set "Text formatting" to "CommonMark Markdown".
2. Set your user language to "Tamil" (ta-IN).
3. Open /help/wiki_syntax.
Expected result:
The Tamil help is displayed.
Actual result:
The English help is displayed.
Files
Updated by Go MAEDA 17 days ago
- File wiki-help-fix-for-locales-with-region-subtag-v2.patch wiki-help-fix-for-locales-with-region-subtag-v2.patch added
I updated the patch to use a simpler approach.
The first version tried the ta-IN directory first and then fell back to ta-in if it was not found. I changed it to always look for the lowercase ta-in directory.
Redmine 5.1 used this simpler approach before HelpController was added in Redmine 6.0. For this fix, I thought it was better to use the same simpler implementation (see source:tags/5.1.9/lib/redmine/wiki_formatting/common_mark/helper.rb#L37) instead of adding a fallback mechanism with limited benefit.