Format Scribunto Lua Preview Limit Report memory numbers in bytes

Makes it consistent with other entries

Bug: T263592
Change-Id: Icc303455feab27966480854ea1c055ceab864ee0
This commit is contained in:
C. Scott Ananian 2020-10-23 14:09:46 -04:00
parent 00fc2c3f1e
commit 7ec0ebfb2a
5 changed files with 6 additions and 21 deletions

View file

@ -53,11 +53,11 @@
"scribunto-limitreport-timeusage": "Lua time usage",
"scribunto-limitreport-timeusage-value": "$1/$2 seconds",
"scribunto-limitreport-virtmemusage": "Lua virtual size",
"scribunto-limitreport-virtmemusage-value-raw": "$1/$2",
"scribunto-limitreport-virtmemusage-value": "$1/$2 {{PLURAL:$2|byte|bytes}}",
"scribunto-limitreport-estmemusage": "Lua estimated memory usage",
"scribunto-limitreport-estmemusage-value-raw": "$1",
"scribunto-limitreport-estmemusage-value": "$1 {{PLURAL:$1|byte|bytes}}",
"scribunto-limitreport-memusage": "Lua memory usage",
"scribunto-limitreport-memusage-value-raw": "$1/$2",
"scribunto-limitreport-memusage-value": "$1/$2 {{PLURAL:$2|byte|bytes}}",
"scribunto-limitreport-profile": "Lua Profile",
"scribunto-limitreport-profile-ms": "$1 ms",
"scribunto-limitreport-profile-percent": "$1%",

View file

@ -42,10 +42,8 @@
"scribunto-limitreport-timeusage": "Dem Lua singe Ziggverbruch",
"scribunto-limitreport-timeusage-value": "$1/$2 Sekonde",
"scribunto-limitreport-virtmemusage": "Dem Lua sing vechtoälle Plazverbruch",
"scribunto-limitreport-virtmemusage-value-raw": "$1 vun $2",
"scribunto-limitreport-estmemusage": "Dem Lua singe Schpeijscherplazverbruch, jeschäz",
"scribunto-limitreport-memusage": "Dem Lua singe Schpeijscherplazverbruch",
"scribunto-limitreport-memusage-value-raw": "$1 vun $2",
"scribunto-limitreport-profile": "Dem Lua sing Profihl",
"scribunto-limitreport-profile-ms": "$1 ms",
"scribunto-limitreport-profile-percent": "$1%",

View file

@ -63,11 +63,11 @@
"scribunto-limitreport-timeusage": "Label for the \"Lua time usage\" row in the limit report table.\n\nSee also:\n* {{msg-mw|Scribunto-limitreport-timeusage-value}}",
"scribunto-limitreport-timeusage-value": "Format for the \"Lua time usage\" value in the limit report table. Parameters:\n* $1 - the usage in seconds\n* $2 - the maximum\nSee also:\n* {{msg-mw|Scribunto-limitreport-timeusage}}\n{{Identical|Second}}",
"scribunto-limitreport-virtmemusage": "Label for the \"Lua virtual size\" row in the limit report table.\n\nSee also:\n* {{msg-mw|Scribunto-limitreport-virtmemusage-value}}",
"scribunto-limitreport-virtmemusage-value-raw": "{{optional}}\nFormat for the \"Lua virtual size\" value in the limit report table. Parameters:\n* $1 - the usage\n* $2 - the maximum\nSee also:\n* {{msg-mw|Scribunto-limitreport-virtmemusage}}",
"scribunto-limitreport-virtmemusage-value": "{{optional}}\nFormat for the \"Lua virtual size\" value in the limit report table. Parameters:\n* $1 - the usage (in bytes)\n* $2 - the maximum (in bytes)\nSee also:\n* {{msg-mw|Scribunto-limitreport-virtmemusage}}",
"scribunto-limitreport-estmemusage": "Label for the \"Lua estimated memory usage\" row in the limit report table.\n\nSee also:\n* {{msg-mw|Scribunto-limitreport-estmemusage-value}}",
"scribunto-limitreport-estmemusage-value-raw": "{{notranslate}}\nFormat for the \"Lua estimated memory usage\" value in the limit report table.\n\nParameters:\n* $1 - the value\nSee also:\n* {{msg-mw|Scribunto-limitreport-estmemusage}}",
"scribunto-limitreport-estmemusage-value": "{{optional}}\nFormat for the \"Lua estimated memory usage\" value in the limit report table.\n\nParameters:\n* $1 - the value (in bytes)\nSee also:\n* {{msg-mw|Scribunto-limitreport-estmemusage}}",
"scribunto-limitreport-memusage": "Label for the \"Lua memory usage\" row in the limit report table.\n\nSee also:\n* {{msg-mw|Scribunto-limitreport-memusage-value}}",
"scribunto-limitreport-memusage-value-raw": "{{optional}}\nFormat for the \"Lua memory usage\" value in the limit report table. Parameters:\n* $1 - the usage\n* $2 - the maximum\nSee also:\n* {{msg-mw|Scribunto-limitreport-memusage}}",
"scribunto-limitreport-memusage-value": "{{optional}}\nFormat for the \"Lua memory usage\" value in the limit report table. Parameters:\n* $1 - the usage (in bytes)\n* $2 - the maximum (in bytes)\nSee also:\n* {{msg-mw|Scribunto-limitreport-memusage}}",
"scribunto-limitreport-profile": "Label for the \"Lua Profile\" row in the limit report table.\n\nFollowed by {{msg-mw|Scribunto-limitreport-profile-ms}} and {{msg-mw|Scribunto-limitreport-profile-percent}}.",
"scribunto-limitreport-profile-ms": "Text to format the milliseconds in the \"Lua Profile\" table.\n\nPreceded by {{msg-mw|Scribunto-limitreport-profile}}.\n\nFollowed by {{msg-mw|Scribunto-limitreport-profile-percent}}.\n\nParameters:\n* $1 - the time in milliseconds",
"scribunto-limitreport-profile-percent": "{{optional}}\nText to format the time percentage in the \"Lua Profile\" table.\n\nPreceded by {{msg-mw|Scribunto-limitreport-profile}} and {{msg-mw|Scribunto-limitreport-profile-ms}}.\n\nParameters:\n* $1 - the percentage",

View file

@ -140,11 +140,6 @@ class Scribunto_LuaSandboxEngine extends Scribunto_LuaEngine {
$report .= $this->formatHtmlLogs( $value, $localize );
}
return false;
case 'scribunto-limitreport-memusage':
$value = array_map( [ $lang, 'formatSize' ], $value );
$value = wfMessage( $key . '-value-raw' )->params( $value );
break;
}
if ( $key !== 'scribunto-limitreport-profile' ) {

View file

@ -71,14 +71,6 @@ class Scribunto_LuaStandaloneEngine extends Scribunto_LuaEngine {
$report .= $this->formatHtmlLogs( $value, $localize );
}
return false;
case 'scribunto-limitreport-virtmemusage':
$value = array_map( [ $lang, 'formatSize' ], $value );
$value = wfMessage( $key . '-value-raw' )->params( $value );
break;
case 'scribunto-limitreport-estmemusage':
$value = $lang->formatSize( $value );
$value = wfMessage( $key . '-value-raw' )->params( $value );
break;
}
return true;
}