You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works except the following code attempts to lookup a localized string for the footer section it builds (named citizen-page-info-viewcount) which of course won't exist. The result ends up looking like this:
<sectionid="footer-info-viewcount" class="page-info__item"><divclass="page-info__label">⧼citizen-page-info-viewcount⧽</div><divclass="page-info__text">This page has been accessed 4 times.</div></section>
For completion, the footer section looks like the following on a built-in theme such as MonoBook:
<liid="viewcount">This page has been accessed 4 times.</li>
One might consider this a bug but I didn't want to be presumptuous.
If I add the corresponding key to Citizen/i18n/en.json of course it works fine:
53c53,54< "prefs-citizen-resetbutton-label": "Reset to default"---> "prefs-citizen-resetbutton-label": "Reset to default",> "citizen-page-info-viewcount": "Views"
However, maintaining that kind of a change manually across upgrades is cumbersome and error prone. The same would be true to some kind of entry in $/languages/messages/MessagesEn.php.
Is there a framework I am missing for adding this content myself in a way that won't be overwritten on an instance/skin upgrade? Perhaps the skin should fallback to $item['name'] in Footer.php if no locale text exists? In that case the footer label would at least be Viewcount instead of ⧼citizen-page-info-viewcount⧽ which is at least readable (in English).
I would also be happy to PR this in to make this extension "supported" but I could only sanely do a few of the translations without just blindly using e.g. Google Translate.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Theme is working well. I added https://www.mediawiki.org/wiki/Extension:HitCounters to my instance which adds how many times a page has been viewed in the footer.
This works except the following code attempts to lookup a localized string for the footer section it builds (named
citizen-page-info-viewcount
) which of course won't exist. The result ends up looking like this:For completion, the footer section looks like the following on a built-in theme such as MonoBook:
One might consider this a bug but I didn't want to be presumptuous.
If I add the corresponding key to
Citizen/i18n/en.json
of course it works fine:However, maintaining that kind of a change manually across upgrades is cumbersome and error prone. The same would be true to some kind of entry in
$/languages/messages/MessagesEn.php
.Is there a framework I am missing for adding this content myself in a way that won't be overwritten on an instance/skin upgrade? Perhaps the skin should fallback to
$item['name']
inFooter.php
if no locale text exists? In that case the footer label would at least beViewcount
instead of⧼citizen-page-info-viewcount⧽
which is at least readable (in English).I would also be happy to PR this in to make this extension "supported" but I could only sanely do a few of the translations without just blindly using e.g. Google Translate.
Beta Was this translation helpful? Give feedback.
All reactions