[tracker/thunderbird-24] Trackerbird: added UI localization.
- From: Adrien Bustany <abustany src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/thunderbird-24] Trackerbird: added UI localization.
- Date: Mon, 10 Feb 2014 11:02:37 +0000 (UTC)
commit 63e6bc7d11025992dea39780cd70eb992b7d9624
Author: Michael Lipp <mnl mnl de>
Date: Mon Feb 10 11:12:24 2014 +0100
Trackerbird: added UI localization.
src/plugins/thunderbird/chrome.manifest | 1 +
src/plugins/thunderbird/chrome/content/plugin.js | 12 ++++++------
src/plugins/thunderbird/chrome/content/queue.js | 4 ++--
src/plugins/thunderbird/chrome/content/ui.js | 7 ++++++-
.../thunderbird/chrome/locale/de-DE/about.dtd | 4 ++++
.../thunderbird/chrome/locale/de-DE/options.dtd | 4 ++++
.../thunderbird/chrome/locale/de-DE/overlay.dtd | 2 ++
.../chrome/locale/de-DE/overlay.properties | 9 +++++++++
.../chrome/locale/en-US/overlay.properties | 10 +++++++++-
9 files changed, 43 insertions(+), 10 deletions(-)
---
diff --git a/src/plugins/thunderbird/chrome.manifest b/src/plugins/thunderbird/chrome.manifest
index 6d353fe..03763c2 100644
--- a/src/plugins/thunderbird/chrome.manifest
+++ b/src/plugins/thunderbird/chrome.manifest
@@ -1,6 +1,7 @@
content trackerbird chrome/content/
skin trackerbird classic/1.0 chrome/skin/
locale trackerbird en-US chrome/locale/en-US/
+locale trackerbird de-DE chrome/locale/de-DE/
overlay chrome://messenger/content/messenger.xul chrome://trackerbird/content/tb-overlay.xul
diff --git a/src/plugins/thunderbird/chrome/content/plugin.js
b/src/plugins/thunderbird/chrome/content/plugin.js
index a4e42ca..f2b3378 100644
--- a/src/plugins/thunderbird/chrome/content/plugin.js
+++ b/src/plugins/thunderbird/chrome/content/plugin.js
@@ -18,7 +18,7 @@ org.bustany.TrackerBird.Plugin = {
}
if (!this.initTracker()) {
- this._ui.showMessage("Cannot initialize Tracker");
+ this._ui.showMessage("cannotInit");
return;
}
@@ -67,17 +67,17 @@ org.bustany.TrackerBird.Plugin = {
if (!error.isNull ()) {
dump ("Could not initialize Tracker: " + error.contents.message.readString() + "\n");
- this._ui.showMessage("Cannot connect to Tracker");
+ this._ui.showMessage("cannotConnect");
tracker.error_free(error);
return;
}
// Tracker is ready, proceed with the rest of the init
- this._ui.showMessage("Initializing...");
+ this._ui.showMessage("initializing");
if (!this._persistentstore.init()) {
- this._ui.showMessage("Cannot initialize persistent storage");
+ this._ui.showMessage("cannotInitPersistent");
dump("Could not initialize Persistent store\n");
_persistentstore = null;
return;
@@ -90,13 +90,13 @@ org.bustany.TrackerBird.Plugin = {
}
if (!this._mailstore.init()) {
- this._ui.showMessage("Cannot initialize mail store");
+ this._ui.showMessage("cannotInitMail");
dump("Could not initialize mail store\n");
_mailstore = null;
return;
}
- this._ui.showMessage("Starting...");
+ this._ui.showMessage("starting");
this._mailstore.listAllFolders();
}
diff --git a/src/plugins/thunderbird/chrome/content/queue.js b/src/plugins/thunderbird/chrome/content/queue.js
index c3f0b81..52ec377 100644
--- a/src/plugins/thunderbird/chrome/content/queue.js
+++ b/src/plugins/thunderbird/chrome/content/queue.js
@@ -27,10 +27,10 @@ org.bustany.TrackerBird.Queue.prototype.addImmediate = function(item) {
org.bustany.TrackerBird.Queue.prototype.process = function() {
if (this._items.length == 0) {
- this._ui.showMessage("Indexer idle");
+ this._ui.showMessage("indexerIdle");
return;
}
- this._ui.showMessage(this._items.length + " actions remaining");
+ this._ui.showFormattedMessage("actionsRemaining", [this._items.length]);
if (this._active) {
return;
diff --git a/src/plugins/thunderbird/chrome/content/ui.js b/src/plugins/thunderbird/chrome/content/ui.js
index 6d2f027..878d436 100644
--- a/src/plugins/thunderbird/chrome/content/ui.js
+++ b/src/plugins/thunderbird/chrome/content/ui.js
@@ -7,11 +7,16 @@ org.bustany.TrackerBird.Ui = {
init: function() {
this._statusPanel = document.getElementById("trackerbird-status-panel");
+ this._strbundle = document.getElementById("trackerbird-strings");
return true;
},
showMessage: function(str) {
- this._statusPanel.label = str;
+ this._statusPanel.label = this._strbundle.getString(str);
+ },
+
+ showFormattedMessage: function(str, repls) {
+ this._statusPanel.label = this._strbundle.getFormattedString(str, repls);
}
}
diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
b/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
new file mode 100644
index 0000000..c2368a2
--- /dev/null
+++ b/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
@@ -0,0 +1,4 @@
+<!ENTITY about "Über TrackerBird">
+<!ENTITY version "Version:">
+<!ENTITY createdBy "Autor:">
+<!ENTITY homepage "Home Page:">
diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
b/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
new file mode 100644
index 0000000..21a49eb
--- /dev/null
+++ b/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
@@ -0,0 +1,4 @@
+<!ENTITY prefwindow.title "TrackerBird Einstellungen">
+<!ENTITY pane1.title "TrackerBird Einstellungen">
+<!ENTITY indexDelay.label "Drossel (ms Pause zwischen Aktivitäten)">
+<!ENTITY indexDelay.accesskey "T">
diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
new file mode 100644
index 0000000..2340655
--- /dev/null
+++ b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
@@ -0,0 +1,2 @@
+<!ENTITY idle "Leerlauf">
+<!ENTITY indexing "Indiziere...">
diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
new file mode 100644
index 0000000..89219a2
--- /dev/null
+++ b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
@@ -0,0 +1,9 @@
+actionsRemaining = %S verbleibende Aktivitäten
+cannotConnect = Verbindung mit Tracker nicht möglich
+cannotInit = Tracker-Initialisierung fehlgeschlagen
+cannotInitMail = Mail-Speicher-Initialisierung fehlgeschlagen
+cannotInitPersistent = DB-Initialisierung fehlgeschlagen
+indexerIdle = Indexer im Leerlauf
+indexing = Indiziere ...
+initializing = Initialisiere ...
+starting = Starte ...
diff --git a/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
b/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
index 4de173a..163b38d 100644
--- a/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
+++ b/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
@@ -1 +1,9 @@
-extensions trackerbird bustany org indexing = "Indexing"
+actionsRemaining = %S actions remaining
+cannotConnect = Cannot connect to Tracker
+cannotInit = Cannot initialize Tracker
+cannotInitMail = Cannot initialize mail store
+cannotInitPersistent = Cannot initialize persistent storage
+indexerIdle = Indexer idle
+indexing = Indexing...
+initializing = Initializing...
+starting = Starting...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]