Skip to content

Commit

Permalink
Add caption, header, and language strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Quy committed Jun 10, 2020
1 parent d0ca9e4 commit 2d121c6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions administrator/language/en-GB/plg_system_stats.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ PLG_SYSTEM_STATS_MSG_ALLOW_SENDING_DATA="Enable Joomla Statistics?"
PLG_SYSTEM_STATS_MSG_JOOMLA_WANTS_TO_SEND_DATA="To better understand our install base and end user environments it is helpful if you send some site information back to a Joomla! controlled central server. No identifying data is captured at any point. You can change these settings later from Plugins > System - Joomla! Statistics."
PLG_SYSTEM_STATS_MSG_WHAT_DATA_WILL_BE_SENT="Select here to see the information that will be sent."
PLG_SYSTEM_STATS_RESET_UNIQUE_ID="Reset Unique ID"
PLG_SYSTEM_STATS_SETTING="Setting"
PLG_SYSTEM_STATS_STATISTICS="Statistics"
PLG_SYSTEM_STATS_UNIQUE_ID_LABEL="Unique ID"
PLG_SYSTEM_STATS_VALUE="Value"
PLG_SYSTEM_STATS_XML_DESCRIPTION="System Plugin that sends environment statistics to a server controlled by the Joomla! project for statistical analysis. Statistics sent include PHP version, CMS version, Database type, Database version and Server type."
23 changes: 19 additions & 4 deletions plugins/system/stats/layouts/stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,25 @@
$versionFields = array('php_version', 'db_version', 'cms_version');
?>
<table class="table mb-1 d-none" id="js-pstats-data-details">
<caption class="sr-only">
<?php echo Text::_('PLG_SYSTEM_STATS_STATISTICS'); ?>
</caption>
<thead>
<tr>
<th scope="col" class="w-15">
<?php echo Text::_('PLG_SYSTEM_STATS_SETTING'); ?>
</th>
<th scope="col">
<?php echo Text::_('PLG_SYSTEM_STATS_VALUE'); ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($statsData as $key => $value) : ?>
<tr>
<th scope="row"><?php echo Text::_('PLG_SYSTEM_STATS_LABEL_' . strtoupper($key)); ?></th>
<td><?php echo in_array($key, $versionFields) ? (preg_match('/\d+(?:\.\d+)+/', $value, $matches) ? $matches[0] : $value) : $value; ?></td>
</tr>
<tr>
<th scope="row"><?php echo Text::_('PLG_SYSTEM_STATS_LABEL_' . strtoupper($key)); ?></th>
<td><?php echo in_array($key, $versionFields) ? (preg_match('/\d+(?:\.\d+)+/', $value, $matches) ? $matches[0] : $value) : $value; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>

0 comments on commit 2d121c6

Please sign in to comment.