Defect #43906
closed
Wiki help does not display localized content for locales with a region subtag
Added by Go MAEDA 23 days ago.
Updated 14 days ago.
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
The affected languages are as follows.
CommonMark Markdown:
Textile:
- Spanish (Panama) (
es-PA)
- Portuguese (Brazil) (
pt-BR)
- Tamil (
ta-IN)
- Traditional Chinese (
zh-TW)
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.
- Target version changed from Candidate for next minor release to 6.0.10
Setting the target version to 6.0.10.
- Status changed from New to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
- Status changed from Resolved to Closed
Merged the fix into the stable branches in r24551 and r24552.
Also available in: Atom
PDF