Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

Commit

Permalink
Add link to version notes in update notification
Browse files Browse the repository at this point in the history
  • Loading branch information
darktrojan committed Jan 16, 2016
1 parent 69a3463 commit 37e92b6
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 12 deletions.
37 changes: 25 additions & 12 deletions bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,21 +560,34 @@ var idleObserver = {
}
idleService.removeIdleObserver(this, IDLE_TIMEOUT);

let version = parseFloat(userPrefs.getCharPref('version'), 10);
let version = userPrefs.getCharPref('version');
let recentWindow = Services.wm.getMostRecentWindow(BROWSER_WINDOW);
let browser = recentWindow.gBrowser;
let notificationBox = recentWindow.document.getElementById('global-notificationbox');
let message = strings.formatStringFromName('newversion', [version], 1);
let label = strings.GetStringFromName('donate.label');
let accessKey = strings.GetStringFromName('donate.accesskey');

notificationBox.appendNotification(message, 'newtabtools-donate', 'chrome://newtabtools/content/icon16.png', notificationBox.PRIORITY_INFO_MEDIUM, [{
label: label,
accessKey: accessKey,
callback: function() {
browser.selectedTab = browser.addTab('https://addons.mozilla.org/addon/new-tab-tools/contribute/installed/');
}
}]);
let message = strings.formatStringFromName('newversion', [parseFloat(version, 10)], 1);
let changeLogLabel = strings.GetStringFromName('changelog.label');
let changeLogAccessKey = strings.GetStringFromName('changelog.accesskey');
let donateLabel = strings.GetStringFromName('donate.label');
let donateAccessKey = strings.GetStringFromName('donate.accesskey');

notificationBox.appendNotification(
message, 'newtabtools-donate', 'chrome://newtabtools/content/icon16.png',
notificationBox.PRIORITY_INFO_MEDIUM, [{
label: changeLogLabel,
accessKey: changeLogAccessKey,
callback: function() {
browser.selectedTab =
browser.addTab('https://addons.mozilla.org/addon/new-tab-tools/versions/' + version);
}
}, {
label: donateLabel,
accessKey: donateAccessKey,
callback: function() {
browser.selectedTab =
browser.addTab('https://addons.mozilla.org/addon/new-tab-tools/contribute/installed/');
}
}]
);

userPrefs.setIntPref('donationreminder', Date.now() / 1000);
}
Expand Down
2 changes: 2 additions & 0 deletions locale/de/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = Neuer-Tab-Tools wurde auf Version %S aktualisiert. Bitte erwägen Sie eine Spende.
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Spenden
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/el/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = Το New Tab Tools έχει ενημερωθεί στην έκδοση %S. Το New Tab Tools είναι δωρεάν, αλλα η συνεισφορά σας θα εκτιμηθεί!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Δωρήστε
donate.accesskey = Δ

Expand Down
2 changes: 2 additions & 0 deletions locale/en-GB/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools has been updated to version %S. New Tab Tools is free, but your donation is appreciated!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Donate
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/en-US/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools has been updated to version %S. New Tab Tools is free, but your donation is appreciated!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Donate
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/fr/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools a été mis à jour à la version %S. Si vous appréciez ce module, merci de faire un petit don.
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Faire un don
donate.accesskey = F

Expand Down
2 changes: 2 additions & 0 deletions locale/it/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools è stato aggiornato alla versione %S. Per favore fai una donazione.
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Donazione
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/ja/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools はバージョン %S に更新されました。よろしければ寄付をご検討ください。
changelog.label = What Changed?
changelog.accesskey = C
donate.label = 寄付する
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/lv/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = NewTabTools ir atjaunināts uz versiju %S. NewTabTools ir bezmaksas, taču jūsu ziedojums tiks novērtēts!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Ziedot
donate.accesskey = Z

Expand Down
2 changes: 2 additions & 0 deletions locale/nl/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools is bijgewerkt naar versie %S. New Tab Tools is gratis maar uw donatie is welkom!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Doneren
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/pt-BR/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = O New Tab Tools foi atualizado para a versão %S. Por favor, considere fazer uma doação.
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Doar
donate.accesskey = o

Expand Down
2 changes: 2 additions & 0 deletions locale/ru/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = Расширение New Tab Tools было обновлено до версии %S. New Tab Tools распространяется бесплатно, но ваши пожертвования будут приняты с благодарностью!
changelog.label = What Changed?
changelog.accesskey = C
donate.label = Пожертвовать
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/zh-CN/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools 已更新到版本 %S。请考虑做点捐助。
changelog.label = What Changed?
changelog.accesskey = C
donate.label = 捐助
donate.accesskey = D

Expand Down
2 changes: 2 additions & 0 deletions locale/zh-TW/newTabTools.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
newversion = New Tab Tools 已更新至 %S。希望您能考慮捐助。
changelog.label = What Changed?
changelog.accesskey = C
donate.label = 捐款
donate.accesskey = D

Expand Down

0 comments on commit 37e92b6

Please sign in to comment.