related to #1459 Translating MB to Mo

This commit is contained in:
Matthieu Leproux
2021-08-09 15:07:57 +02:00
parent 0386d0cd52
commit 849c344010
4 changed files with 9 additions and 7 deletions
+2 -3
View File
@@ -1,12 +1,12 @@
function displayResponse(domElem, values, mDivs, mValues) {
for (let index = 0; index < domElem.length; index++) {
domElem[index].html(values[index] + " Mo")
domElem[index].html(unit_MB.replace("%s",values[index]))
}
for (let index = 0; index < mDivs.length; index++) {
mDivName = mDivs[index].getAttribute("name");
mDivs[index].title = mValues[mDivName] + " Mo";
mDivs[index].title = unit_MB.replace("%s", mValues[mDivName])
}
$(".cache-lastCalculated-value").html(no_time_elapsed);
@@ -15,7 +15,6 @@ function displayResponse(domElem, values, mDivs, mValues) {
$(document).ready(function () {
$(".refresh-cache-size").on("click", function () {
$(this).find(".refresh-icon").addClass("animate-spin");
console.log("lelelele");
return new Promise((res, rej) => {
jQuery.ajax({
@@ -6,6 +6,7 @@
const confirm_msg = '{"Yes, I am sure"|@translate}';
const cancel_msg = "{"No, I have changed my mind"|@translate}";
const no_time_elapsed = "{"right now"|@translate}";
const unit_MB = "{"%s MB"|@translate}"
let selected = [];
$(".lock-gallery-button").each(function() {
const gallery_tip = '{"A locked gallery is only visible to administrators"|@translate|@escape:'javascript'}';
@@ -147,7 +148,7 @@ $(".delete-size-check").click( function () {
<span class="cache-size-text">{'Cache size'|@translate}</span>
<span class="cache-size-value">
{if isset($cache_sizes)}
{round($cache_sizes[0]['value']/1024/1024, 2)} Mo
{"%s MB"|@translate:{round($cache_sizes[0]['value']/1024/1024, 2)}}
{else}
{'N/A'|translate}
{/if}
@@ -159,7 +160,7 @@ $(".delete-size-check").click( function () {
<a href="{$U_MAINT_COMPILED_TEMPLATES}" class="icon-file-code maintenance-action">{'Purge compiled templates'|@translate}
<span class="multiple-compiledTemplate-sizes">
{if isset($cache_sizes)}
{round($cache_sizes[2]['value']/1024/1024, 2)} Mo
{"%s MB"|@translate:{round($cache_sizes[2]['value']/1024/1024, 2)}}
{else}
{'N/A'|translate}
{/if}
@@ -171,7 +172,7 @@ $(".delete-size-check").click( function () {
<span id="label-delete-size-checkbox">{'Delete multiple size images'|@translate}
<span class="multiple-pictures-sizes">
{if isset($cache_sizes)}
{round($cache_sizes[1]['value']['all']/1024/1024, 2)} Mo
{"%s MB"|@translate:{round($cache_sizes[1]['value']['all']/1024/1024, 2)}}
{else}
{'N/A'|translate}
{/if}
@@ -179,7 +180,7 @@ $(".delete-size-check").click( function () {
</span>
<div class="delete-check-container">
{foreach from=$purge_derivatives key=name item=url name=loop}
<div class="delete-size-check" title="{if isset($cache_sizes)} {round($cache_sizes[1]['value'][$url]/1024/1024, 2)} Mo{else}{'N/A'|translate}{/if}" data-selected="0" name="{$url}">
<div class="delete-size-check" title="{if isset($cache_sizes)}{"%s MB"|@translate:{round($cache_sizes[1]['value'][$url]/1024/1024, 2)}}{else}{'N/A'|translate}{/if}" data-selected="0" name="{$url}">
<span class="select-checkbox"><i class="icon-ok" style="margin-left:8px"></i></span>
<span class="picture-deletion-size" style="font-size:14px;margin-left:5px;padding-top:2px;">{$name}</span>
</div>
+1
View File
@@ -1239,3 +1239,4 @@ $lang['Has access to administration. Can only manage content: photos/albums/user
$lang['No access to administration, can see private content with appropriate permissions.'] = 'No access to administration, can see private content with appropriate permissions.';
$lang['Can be shared by several individuals without conflict (they cannot change the password).'] = 'Can be shared by several individuals without conflict (they cannot change the password).';
$lang['Equivalent to deactivation. The user is still in the list, but can no longer log in.'] = 'Equivalent to deactivation. The user is still in the list, but can no longer log in.';
$lang['%s MB'] = '%s MB';
+1
View File
@@ -1241,3 +1241,4 @@ $lang['Has access to administration. Can only manage content: photos/albums/user
$lang['No access to administration, can see private content with appropriate permissions.'] = 'Pas d\'accès à l\'administration. Peut accéder au contenu privé s\'il en a les permissions.';
$lang['Can be shared by several individuals without conflict (they cannot change the password).'] = 'Partageable entre plusieurs personnes sans rentrer en conflit (mot de passe non modifiable).';
$lang['Equivalent to deactivation. The user is still in the list, but can no longer log in.'] = 'Équivalent à une désactivation. L\'utilisateur est toujours dans la liste mais ne peut plus se connecter.';
$lang['%s MB'] = '%s Mo';