? Language Change PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
13 Sep 2023

Pull Request for Issue #41710 .

Summary of Changes

revert parts from #41710
@brianteeman @HLeithner

com_finder: uses number_format

<caption class="caption-top"><?php echo Text::sprintf('COM_FINDER_STATISTICS_STATS_DESCRIPTION', number_format($this->data->term_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->taxonomy_node_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')), number_format($this->data->taxonomy_branch_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR'))); ?></caption>

plg_content_vote: is float

// Get rating
$rating = (float) $row->rating;
$rcount = (int) $row->rating_count;
// Round to 0.5
$rating = round($rating / 0.5) * 0.5;

finderindex: uses round

$text = Text::sprintf('FINDER_CLI_BATCH_COMPLETE', $i + 1, $processingTime = round(microtime(true) - $this->qtime, 3));

Testing Instructions

com_finder/statistics: values above 1000
plg_content_vote: two votes (5+4)/2=4.5
finderindex: run cli/joomla.php findex:index

Actual result BEFORE applying this Pull Request

image
image
image

Expected result AFTER applying this Pull Request

image
image
image

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar joomla-cms-bot joomla-cms-bot - change - 13 Sep 2023
Category Administration Language & Strings
avatar heelc29 heelc29 - open - 13 Sep 2023
avatar heelc29 heelc29 - change - 13 Sep 2023
Status New Pending
avatar tecpromotion tecpromotion - test_item - 13 Sep 2023 - Tested successfully
avatar tecpromotion
tecpromotion - comment - 13 Sep 2023

I have tested this item ✅ successfully on 081e913


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41740.

avatar Quy Quy - test_item - 13 Sep 2023 - Tested successfully
avatar Quy
Quy - comment - 13 Sep 2023

I have tested this item ✅ successfully on 081e913


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41740.

avatar Quy Quy - change - 13 Sep 2023
Status Pending Ready to Commit
Labels Added: Language Change PR-5.0-dev
avatar Quy
Quy - comment - 13 Sep 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41740.

avatar wilsonge
wilsonge - comment - 13 Sep 2023

Rather than string can we use %f for a float? It is still a number at the end of the day.

avatar HLeithner
HLeithner - comment - 13 Sep 2023

does %f work @heelc29 ?

avatar heelc29
heelc29 - comment - 13 Sep 2023

does %f work @heelc29 ?

The first one com_finder.ini: No because it is a string - see https://www.php.net/manual/en/function.number-format.php

The others: There is a different for number of digits to be printed after the decimal point (by default, this is 6) https://www.php.net/manual/en/function.sprintf.php

Example:

value: 45.12
output (s) 45.12
output (f) 45.120000
avatar HLeithner HLeithner - change - 13 Sep 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-13 21:38:45
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 13 Sep 2023
avatar HLeithner HLeithner - merge - 13 Sep 2023
avatar HLeithner
HLeithner - comment - 13 Sep 2023

I merge this for now

Add a Comment

Login with GitHub to post a comment