Status report counter is not correctly rendered on Japanese website because the class names are rendered in Japanese in the source code.
This is because of text variable usage on below line in /templates/admin/status-report-counter.html.twig which gets printed in Japanese in case of a Japanese website. Check attachment.
<div class="card-content"><span class="card-title report-counter-amount {{ text|lower }}-color">{{ amount }}</span><p>{{ text }}</p></div>
As the css is written with English alphabets, using the translatable text variable would probably break this in case where the content does not adhere to errors, warnings text.
Proposed solution is to use *severity* variable which generates correct class names and displays data correctly with the current code.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | post_patch_application.png | 67.32 KB | aniketto |
| #2 | material_admin-status_report_counter_multilingual_class_mismatch-3090669-2.patch | 740 bytes | aniketto |
| status_report_css_issue.png | 68.34 KB | aniketto |
Comments
Comment #2
anikettoCreated a patch as per the proposed solution and this solves the problem as correct class names are rendered.
Comment #3
anikettoComment #4
anikettoComment #5
tanmaykadam commentedComment #6
tanmaykadam commentedI have tested the patch and looks good to be merged.
Comment #7
tanmaykadam commentedComment #8
tanmaykadam commentedComment #9
e0ipsoThanks for the patch. This looks good. Committing.