Language Change ? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
22 Aug 2021

Its not pretty and I dont like it, but it works.

Pull Request for Issue #35257

Summary of Changes

Translates date according to DATE_FORMAT_LC3 at all times
show No version note if there was no version note to fulfil a placeholder and not leave a trailing period after a space.

Testing Instructions

restore an item from content history

Actual result BEFORE applying this Pull Request

  1. The "Saved on" date show from $model->getState('save_date') doesnt respect my language file date format

  2. if there was no $model->getState('version_note') to show something like (No Version Note) instead of a space that then pushes the period looking odd.

Screenshot 2021-08-20 at 16 47 16

Caused by language string:

JLIB_APPLICATION_SUCCESS_LOAD_HISTORY="Prior version restored. Saved on %s %s."

$this->setMessage(
Text::sprintf(
  JLIB_APPLICATION_SUCCESS_LOAD_HISTORY', $model->getState('save_date'), $model->getState('version_note')
  )
);

Expected result AFTER applying this Pull Request

Screenshot 2021-08-22 at 17 40 59

Screenshot 2021-08-22 at 17 40 55

Documentation Changes Required

avatar PhilETaylor PhilETaylor - open - 22 Aug 2021
avatar PhilETaylor PhilETaylor - change - 22 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Aug 2021
Category Administration com_content com_contenthistory Language & Strings Libraries
avatar PhilETaylor PhilETaylor - change - 22 Aug 2021
The description was changed
avatar PhilETaylor PhilETaylor - edited - 22 Aug 2021
avatar brianteeman
brianteeman - comment - 22 Aug 2021

Your screenshot shows why this change to remove time is not a good idea

avatar PhilETaylor
PhilETaylor - comment - 22 Aug 2021

Your screenshot shows why this change to remove time is not a good idea

By using the language string you yourself chose from the list of available translated dates I provided... I give up.

Nothing about this PR was intended to remove time specifically. It was more about formatting the date string using the language so it was more readable, and removing the space before the period when no version note was saved (which after checking many client sites, is extremely rare to see a version note in the db, clients just hit save, they dont enter a version note...)

avatar PhilETaylor PhilETaylor - change - 22 Aug 2021
Labels Added: Language Change ?
avatar PhilETaylor
PhilETaylor - comment - 22 Aug 2021

Now Changed to DATE_FORMAT_LC2 so that a time is provided.

Screenshot 2021-08-22 at 18 09 14

Screenshot 2021-08-22 at 18 09 09

avatar Quy
Quy - comment - 29 Aug 2021

The Version Note column displays No version note even when there is a note.

avatar PhilETaylor
PhilETaylor - comment - 30 Aug 2021

The Version Note column displays No version note even when there is a note.

I cannot replicate that sorry.

<?php echo $item->version_note ? htmlspecialchars($item->version_note) : Text::_('JLIB_APPLICATION_INFO_NO_VERSION_NOTE'); ?>

Screenshot 2021-08-30 at 15 18 47

Screenshot 2021-08-30 at 15 18 54

avatar Quy
Quy - comment - 30 Aug 2021

Stupid me entered in Note and not Version Note. Sorry for the noise.

avatar chmst chmst - change - 31 Jan 2022
Labels Added: ?
Removed: ?
avatar PhilETaylor PhilETaylor - change - 6 Mar 2022
Labels Added: ?
Removed: ?
avatar PhilETaylor PhilETaylor - change - 7 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-07 18:33:52
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 7 Mar 2022

Add a Comment

Login with GitHub to post a comment