Fixed minor bug with notifications and added notification for v0.7
diff --git a/_locales/ca/messages.json b/_locales/ca/messages.json
index 30e6160..a2f36c2 100644
--- a/_locales/ca/messages.json
+++ b/_locales/ca/messages.json
@@ -96,5 +96,7 @@
"notification_install_title": { "message": "Gràcies per instal·lar 'Traduïr Text Seleccionat'" },
"notification_install_message": { "message": "Fes clic en aquesta notificació per a configurar l'extensión." },
"notification_upgradedtostorage_title": { "message": "'Traduïr Text Seleccionat' s'ha actualizat a v0.6!" },
- "notification_upgradedtostorage_message": { "message": "Ara la configuració es sincronitzarà en tots els teus dispositius! La part dolenta és que has de configurar l'extensión una altra vegada :-( Fes clic en aquesta notificación per a configurar-la." }
+ "notification_upgradedtostorage_message": { "message": "Ara la configuració es sincronitzarà en tots els teus dispositius! La part dolenta és que has de configurar l'extensión una altra vegada :-( Fes clic en aquesta notificación per a configurar-la." },
+ "notification_reorder_title": { "message": "'Traduïr Text Seleccionat' s'ha actualizat a v0.7!" },
+ "notification_reorder_message": { "message": "Ara pots configurar en quin ordre vols que apareixin els idiomes en el menú contextual." }
}
diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index 8e36f91..a7c7422 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -96,5 +96,7 @@
"notification_install_title": { "message": "Thanks for installing 'Translate Selected Text'" },
"notification_install_message": { "message": "Click this notification to set it up." },
"notification_upgradedtostorage_title": { "message": "'Translate Selected Text' was updated to v0.6!" },
- "notification_upgradedtostorage_message": { "message": "Now your options will be synced across all your devices! The bad side is that you have to set up the extension again :-( Click this notification to set it up." }
+ "notification_upgradedtostorage_message": { "message": "Now your options will be synced across all your devices! The bad side is that you have to set up the extension again :-( Click this notification to set it up." },
+ "notification_reorder_title": { "message": "'Translate Selected Text' was updated to v0.7!" },
+ "notification_reorder_message": { "message": "Now you can configure in which order you want the languages to appear in the context menu. " }
}
diff --git a/_locales/es/messages.json b/_locales/es/messages.json
index 5bea4c9..723ab13 100644
--- a/_locales/es/messages.json
+++ b/_locales/es/messages.json
@@ -96,5 +96,7 @@
"notification_install_title": { "message": "Gracias por instalar 'Traducir Texto Seleccionado'" },
"notification_install_message": { "message": "Haz clic en esta notificación para configurar la extensión." },
"notification_upgradedtostorage_title": { "message": "'Traducir Texto Seleccionado' se ha actualizado a v0.6!" },
- "notification_upgradedtostorage_message": { "message": "¡Ahora la configuración se sincronizará en todos tus dispositivos! La parte mala es que tienes que configurar la extensión otra vez :-( Haz clic en esta notificación para configurarla." }
+ "notification_upgradedtostorage_message": { "message": "¡Ahora la configuración se sincronizará en todos tus dispositivos! La parte mala es que tienes que configurar la extensión otra vez :-( Haz clic en esta notificación para configurarla." },
+ "notification_reorder_title": { "message": "'Traducir Texto Seleccionado' se ha actualizado a v0.7!" },
+ "notification_reorder_message": { "message": "Ahora puedes configurar en qué orden quieres que aparezcan los idiomas en el menú contextual." }
}
diff --git a/background.js b/background.js
index efbcc38..9a7c269 100644
--- a/background.js
+++ b/background.js
@@ -106,7 +106,7 @@
chrome.storage.sync.set(settings, function() {
chrome.notifications.create("install", {
type: "basic",
- iconUrl: "translate-128.png",
+ iconUrl: "icons/translate-128.png",
title: chrome.i18n.getMessage("notification_install_title"),
message: chrome.i18n.getMessage("notification_install_message"),
isClickable: true
@@ -124,7 +124,7 @@
chrome.storage.sync.set(settings, function() {
chrome.notifications.create("upgradedtostorage", {
type: "basic",
- iconUrl: "translate-128.png",
+ iconUrl: "icons/translate-128.png",
title: chrome.i18n.getMessage("notification_upgradedtostorage_title"),
message: chrome.i18n.getMessage("notification_upgradedtostorage_message"),
isClickable: true
@@ -139,7 +139,15 @@
i++;
}
delete(items.languages);
- chrome.storage.sync.set(items);
+ chrome.storage.sync.set(items, function() {
+ chrome.notifications.create("reorder", {
+ type: "basic",
+ iconUrl: "icons/translate-128.png",
+ title: chrome.i18n.getMessage("notification_reorder_title"),
+ message: chrome.i18n.getMessage("notification_reorder_message"),
+ isClickable: true
+ }, function(id) {});
+ });
}
}
});
@@ -169,6 +177,10 @@
case "upgradedtostorage":
click2();
break;
+
+ case "reorder":
+ click2();
+ break;
}
chrome.notifications.clear(notification_id, function() {
diff --git a/manifest.json b/manifest.json
index 2b40c3e..ecb672a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "__MSG_appBetaName__",
"description": "__MSG_appDescription__",
- "version": "0.7.2.1",
+ "version": "0.7.2.2",
"permissions": [
"contextMenus",
"storage",