Grav-plugin-admin: Labels in backup managers displayed as constants ?

Created on 13 Oct 2019  路  14Comments  路  Source: getgrav/grav-plugin-admin

Hello,
I seem to have labels as

GRAV.NICETIME.MIN_PLURAL
Newest Backup
GRAV.NICETIME.MIN_PLURAL
Oldest Backup

at /admin/tools/backups

Best regards.

cannot recreate

Most helpful comment

For those finding this, make sure you don't have "Translations" disabled in the "Languages" section of the "System" configuration

All 14 comments

Have you upgraded grav to latest version?

Hi,
Yes I am on

*# v1.6.16

09/19/2019

*
but not sure if it occured after the upgrade.

Are you running the admin in a non-english language? I can't replicate this with the default 'english' language.

I can confirm this behavior, even with English.
Also, see https://github.com/getgrav/grav-plugin-admin/issues/1678

Running v1.6.17 (11/06/2019)

Hello,

I just created a new backup on my grav installation.

The graphical interface now have this strange glitch :
image

Grav version : Grav v1.6.19 - Admin v1.9.12

What plugins do you have installed? I can鈥檛 replicate this at all.

Hello,

Installed plugins :
image

Hosted on a shared web hosting on OVH (PHP 7.3.12)
I tried to clear the cache without change.

Regards,
Anael

image
Grav v1.6.19

PHP 7.3.12 (7.4 gives errors).

Still present on Grav v1.6.31 - Admin v1.9.19 (same module as previous, full up-to-date).

As a debug, i notice that the function nicetimeFunc($date, $long_strings = true, $show_tense = true) is called with params : ("Sat, 28 Dec 2019 16:22:04 +0100", false, false)

On the twig template file newest_date is correct "Sat, 28 Dec 2019 16:22:04 +0100 ". But the newest_backup is already a bad string "12 GRAV.NICETIME.MO_PLURAL "

The function adminNicetimeFilter($date, $long_strings = true) is called for displaying "Latest Page Updates" on Dashboard but not on Tools.

On the themes/grav/templates/partials/dashboard-pages.html.twig, filter adminNicetime is used.
On the themes/grav/templates/partials/tools-backups.html.twig, filter nicetime is used.

Based on this, I made the related PR.
Regards,
Anael

For those finding this, make sure you don't have "Translations" disabled in the "Languages" section of the "System" configuration

Ouch that must have been the case, because after the upgrade to 1.7, _all_ strings were shown as the key names instead of the translated values. In 1.6, just a few strings had that issue.

Yes that setting was actually broken in 1.6, and was not fully disabling translations. That is fixed in 1.7 but now it's catching people off-guard that had toggled that and not toggled it back because they saw no differences.

Makes total sense now. Thanks!

Nice catch (Cf #2038) !
I close #2003 in consequences.

Regards

Was this page helpful?
0 / 5 - 0 ratings

Related issues

simonlayfield picture simonlayfield  路  3Comments

WilliamMiceli picture WilliamMiceli  路  4Comments

CoDanny picture CoDanny  路  3Comments

darkroastcreative picture darkroastcreative  路  4Comments

artofthesmart picture artofthesmart  路  4Comments