Bug 1540085 - Use label.value rather than text content in site data settings UI to use cropping. r=jaws,flod

Differential Revision: https://phabricator.services.mozilla.com/D25692

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Zibi Braniecki 2019-04-04 14:14:52 +00:00
Родитель a7df8024a2
Коммит 54768975b1
3 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -92,7 +92,7 @@ add_task(async function test_grouping() {
let [value, unit] = DownloadUtils.convertByteUnits(quotaUsage * 4);
let l10nAttributes = frameDoc.l10n.getAttributes(columns[2]);
is(l10nAttributes.id, "site-usage-persistent",
is(l10nAttributes.id, "site-storage-persistent",
"Should show the site as persistent if one origin is persistent.");
// The shown quota can be slightly larger than the raw data we put in (though it should
// never be smaller), but that doesn't really matter to us since we only want to test that

Просмотреть файл

@ -62,7 +62,7 @@ let gSiteDataSettings = {
// Add "Storage" column
if (site.usage > 0 || site.persisted) {
let [value, unit] = DownloadUtils.convertByteUnits(site.usage);
let strName = site.persisted ? "site-usage-persistent" : "site-usage-pattern";
let strName = site.persisted ? "site-storage-persistent" : "site-storage-usage";
addColumnItem({
id: strName,
args: { value, unit },

Просмотреть файл

@ -38,8 +38,10 @@ site-data-button-save =
# Variables:
# $value (Number) - Value of the unit (for example: 4.6, 500)
# $unit (String) - Name of the unit (for example: "bytes", "KB")
site-usage-pattern = { $value } { $unit }
site-usage-persistent = { site-usage-pattern } (Persistent)
site-storage-usage =
.value = { $value } { $unit }
site-storage-persistent =
.value = { site-storage-usage.value } (Persistent)
site-data-remove-all =
.label = Remove All