-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.6, 4.1.1, 4.1.6, 4.2, 4.2.3, 4.3
-
HQ 2023 Planning i4 Moppies
In the current letter avatars, given names (first names) come first. However, this is not preferred in Asian locales (including Japanese and Chinese). If family names (last names) come first in display names in the current locale, letter avatars must respect the preference.
How to reproduce:
- Install the Japanese locale (or other locales of languages where family names come first)
- Create users (see the examples below)
- Switch to the user
- Change the locale to Japanese
- Check the text avatar
User info examples (locale is always ja (Japanese)):
1. Hara Takashi
- First name: 敬 (=Takashi)
- Last name: 原 (=HARA)
- Name displayed in Japanese: 原 敬
- Expected letter avatar: 原敬
- Actual letter avatar: 敬原
2. Chun-Li
- First name: 麗 (=Li)
- Last name: 春 (=Chun)
- Name displayed in Japanese (and probably Chinese): 春 麗
- Expected letter avatar: 春麗
- Actual letter avatar: 麗春
core_renderer::render_user_picture in lib/outputrenderers.php must be fixed to fix this problem.
$output = html_writer::tag('span', mb_substr($user->firstname, 0, 1) . mb_substr($user->lastname, 0, 1), |
↑ This must be fixed. At least we must check the value $CFG->fullnamedisplay.
- Testing discovered
-
MOBILE-4575 Letter avatars should respect the preference which should come first family or given names
-
- Open
-