Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 827286 - Updates: "Tap to download" text is misleading #7372

Merged
merged 1 commit into from
Jan 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/system/js/update_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ var UpdateManager = {
render: function um_render() {
var _ = navigator.mozL10n.get;

this.toasterMessage.innerHTML = _('updatesAvailableMessage', {
this.toasterMessage.innerHTML = _('updateAvailableInfo', {
n: this.updatesQueue.length
});

Expand All @@ -271,7 +271,7 @@ var UpdateManager = {
});
}
} else {
message = _('updatesAvailableMessage', {
message = _('updateAvailableInfo', {
n: this.updatesQueue.length
});
}
Expand Down
12 changes: 6 additions & 6 deletions apps/system/locales/system.en-US.properties
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ downloadingAppProgress={{ progress }} / {{ max }} downloaded
cancelAllDownloads=Cancel all downloads
wantToCancelAll=Are you sure you want to cancel all downloads?
downloadError=There was an error while downloading the updates.
updatesAvailableMessage={[ plural(n) ]}
updatesAvailableMessage[one]={{ n }} update available. <span>Tap to download.</span>
updatesAvailableMessage[two]={{ n }} updates available. <span>Tap to download.</span>
updatesAvailableMessage[few]={{ u }} updates available. <span>Tap to download.</span>
updatesAvailableMessage[many]={{ n }} updates available. <span>Tap to download.</span>
updatesAvailableMessage[other]={{ n }} updates available. <span>Tap to download.</span>
updateAvailableInfo={[ plural(n) ]}
updateAvailableInfo[one]={{ n }} update available. <span>Tap for more info.</span>
updateAvailableInfo[two]={{ n }} updates available. <span>Tap for more info.</span>
updateAvailableInfo[few]={{ n }} updates available. <span>Tap for more info.</span>
updateAvailableInfo[many]={{ n }} updates available. <span>Tap for more info.</span>
updateAvailableInfo[other]={{ n }} updates available. <span>Tap for more info.</span>
numberOfUpdates={[ plural(n) ]}
numberOfUpdates[one]={{ n }} update available
numberOfUpdates[two]={{ n }} updates available
Expand Down
14 changes: 7 additions & 7 deletions apps/system/test/unit/update_manager_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ suite('system/UpdateManager', function() {
test('should show the available message if not downloading', function() {
UpdateManager.updatesQueue = updatableApps;
UpdateManager.render();
assert.equal('updatesAvailableMessage{"n":3}',
assert.equal('updateAvailableInfo{"n":3}',
UpdateManager.message.textContent);
});
});
Expand Down Expand Up @@ -512,7 +512,7 @@ suite('system/UpdateManager', function() {
test('should display an updated count', function(done) {
UpdateManager.addToUpdatesQueue(updatableApps[1]);
setTimeout(function() {
assert.equal('updatesAvailableMessage{"n":2}',
assert.equal('updateAvailableInfo{"n":2}',
UpdateManager.message.textContent);
done();
}, tinyTimeout * 2);
Expand All @@ -525,7 +525,7 @@ suite('system/UpdateManager', function() {
setTimeout(function() {
var css = UpdateManager.toaster.classList;
assert.isTrue(css.contains('displayed'));
assert.equal('updatesAvailableMessage{"n":1}',
assert.equal('updateAvailableInfo{"n":1}',
UpdateManager.message.textContent);
done();
}, tinyTimeout * 1.5);
Expand All @@ -534,15 +534,15 @@ suite('system/UpdateManager', function() {
test('should display an updated count', function(done) {
UpdateManager.addToUpdatesQueue(updatableApps[1]);
setTimeout(function() {
assert.equal('updatesAvailableMessage{"n":2}',
assert.equal('updateAvailableInfo{"n":2}',
UpdateManager.message.textContent);
done();
}, tinyTimeout * 2);
});

test('should show the right message', function(done) {
setTimeout(function() {
assert.equal('updatesAvailableMessage{"n":1}',
assert.equal('updateAvailableInfo{"n":1}',
UpdateManager.toasterMessage.textContent);
done();
}, tinyTimeout * 2);
Expand Down Expand Up @@ -981,7 +981,7 @@ suite('system/UpdateManager', function() {
var updatableApp = UpdateManager.updatableApps[0];

UpdateManager.addToUpdatesQueue(updatableApp);
assert.equal('updatesAvailableMessage{"n":1}',
assert.equal('updateAvailableInfo{"n":1}',
UpdateManager.message.textContent);
});

Expand Down Expand Up @@ -1057,7 +1057,7 @@ suite('system/UpdateManager', function() {

test('should render', function() {
UpdateManager.removeFromUpdatesQueue(updatableApp);
assert.equal('updatesAvailableMessage{"n":0}',
assert.equal('updateAvailableInfo{"n":0}',
UpdateManager.message.textContent);
});

Expand Down