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

Commit

Permalink
Merge pull request #32531 from benfrancis/1215926
Browse files Browse the repository at this point in the history
Bug 1215926 - Fix strings in pin dialog r=albertopq
  • Loading branch information
benfrancis committed Oct 19, 2015
2 parents 9cf6b61 + b52c014 commit 8610f9b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions apps/system/js/app_chrome.js
Expand Up @@ -407,6 +407,7 @@
Service && Service.request('Places:setPinned', this.app.config.url, true)
.then(() => {
this.app.debug('Succeeding in pinning ' + this.app.config.url);
this.systemBanner.show('page-pinned-to-home-screen');
var screenshotBlob = this.app.getCachedScreenshotBlob();
if (screenshotBlob) {
Service.request('Places:saveScreenshot', this.app.config.url,
Expand Down
3 changes: 1 addition & 2 deletions apps/system/js/pin_page_system_dialog.js
Expand Up @@ -128,7 +128,6 @@
switch (action) {
case 'pin':
activeApp.appChrome.pinPage();
this._banner.show();
break;

case 'pin-site':
Expand Down Expand Up @@ -173,7 +172,7 @@
this.pinSiteButton.setAttribute('data-l10n-id', 'pinning-unpin-site');
this.pinSiteButton.dataset.action = 'unpin-site';
} else {
this.pinSiteButton.setAttribute('data-l10n-id', 'pinning-pin');
this.pinSiteButton.setAttribute('data-l10n-id', 'pinning-pin-site');
this.pinSiteButton.dataset.action = 'pin-site';
}
});
Expand Down
6 changes: 4 additions & 2 deletions apps/system/locales/system.en-US.properties
Expand Up @@ -647,11 +647,11 @@ pinning-unpin-type=Unpin "{{type}}"

# LOCALIZATION NOTE (pinning-pin-page): This string is used as
# panel title. "Pin" indicates the action to pin a page.
pinning-pin-page=Pin Page
pinning-pin-page=Pin page

# LOCALIZATION NOTE (pinning-pin-site): This string is used as
# panel title. "Pin" indicates the action to pin a site.
pinning-pin-site=Pin Website
pinning-pin-site=Pin site

# LOCALIZATION NOTE (from): is followed (on a new line) by the URL source of
# the pin. See also: https://bug1168948.bmoattachments.org/attachment.cgi?id=8639285
Expand All @@ -661,6 +661,8 @@ from=From
site-pinned-to-home-screen=Site pinned to home screen
# LOCALIZATION NOTE: Message shown in a banner after un-pinning a site
site-unpinned-from-home-screen=Site unpinned from home screen
# LOCALIZATION NOTE: Message shown in a banner after successfully pinning a page
page-pinned-to-home-screen=Page pinned to home screen

# LOCALIZATION NOTE (or): divider between pinning a page and a site.
# See also: https://bug1214242.bmoattachments.org/attachment.cgi?id=8673636
Expand Down
5 changes: 0 additions & 5 deletions apps/system/test/unit/pin_page_system_dialog_test.js
Expand Up @@ -146,11 +146,6 @@ suite('Pin Page dialog', function() {
assert.isTrue(stubPin.called);
});

test('shows the banner', function() {
subject.pinButton.dispatchEvent(new CustomEvent('click'));
assert.isTrue(toastStub.show.called);
});

test('saves the pinned site', function() {
subject.pinSiteButton.dispatchEvent(new CustomEvent('click'));
assert.isTrue(stubPinSite.called);
Expand Down

0 comments on commit 8610f9b

Please sign in to comment.