',
'
',
- 'Name: ',
+ '', _('calendarNameLabel'), ' ',
' ',
'Current password: ',
@@ -118,25 +118,25 @@ Dragonfly.Calendar.PersonalProperties.prototype.buildHtml = function (html)
'', // password group
- 'Send out invitation... '
+ '', _('calendarSendInvitation'), ' '
);
html2.set (this.nb.insertPage ('Basic', 0));
// specific users
html2 = new d.HtmlBuilder (
- 'Email:
',
+ 'Email:
',
'',
''
);
html2.set (this.nb.insertPage ('Detailed', 1));
@@ -162,7 +162,7 @@ Dragonfly.Calendar.PersonalProperties.prototype.connectHtml = function (elem)
this._loadFrom (this._calendar);
delete this._calendar;
} else {
- $(this.nameId).value = 'New Calendar';
+ $(this.nameId).value = _('defaultCalendarName');
this.color.setColor (d.getRandomColor ());
$(this.colorId).name = 'calendar-color';
this.publishClicked ();
@@ -237,7 +237,7 @@ Dragonfly.Calendar.PersonalProperties.prototype._loadFrom = function (calendar)
this.bongoId = calendar.bongoId;
- $(this.nameId).value = cal.name || 'New Calendar';
+ $(this.nameId).value = cal.name || _('defaultCalendarName');
$(this.colorId).value = cal.color || d.getRandomColor ();
$(this.publishId).checked = !!cal.publish;
@@ -663,7 +663,7 @@ Dragonfly.Calendar.SubscribedProperties.prototype.connectHtml = function (elem)
this._loadFrom (this._calendar);
delete this._calendar;
} else {
- $(this.nameId).value = 'New Calendar';
+ $(this.nameId).value = _('defaultCalendarName');
this.color.setColor (d.getRandomColor ());
$(this.colorId).name = 'calendar-color';
}
@@ -693,7 +693,7 @@ Dragonfly.Calendar.SubscribedProperties.prototype._loadFrom = function (calendar
var cal = calendar.cal;
- $(this.nameId).value = cal.name || 'New Calendar';
+ $(this.nameId).value = cal.name || _('defaultCalendarName');
$(this.colorId).value = cal.color || d.getRandomColor ();
$(this.urlId).value = cal.url || '';
@@ -806,7 +806,7 @@ Dragonfly.Calendar.NewSubscriptionPopup.prototype.buildHtml = function (html)
this, html, '');
// No need to connect html because the superclass does it for us
@@ -950,7 +950,7 @@ Dragonfly.Calendar.CalendarPropsPopup.prototype.summarize = function ()
html.push ('');
html.set (this.contentId);
@@ -1016,10 +1016,10 @@ Dragonfly.Calendar.CalendarInvitationPopup.prototype.connectHtml = function (ele
'this person and the server ', d.escapeHTML (this.invite.server), '.'];
var actions = [
- { value: "Delete", onclick: 'deleteClicked', secondary: true },
- { value: "Junk", onclick: 'junkClicked', secondary: true },
- { value: "Ignore", onclick: 'ignoreClicked'},
- { value: "Subscribe", onclick: 'subscribedClicked'}];
+ { value: _('genericDelete'), onclick: 'deleteClicked', secondary: true },
+ { value: _('buttonJunkLabel'), onclick: 'junkClicked', secondary: true },
+ { value: _('buttonIgnoreLabel'), onclick: 'ignoreClicked'},
+ { value: _('eventSubscribe'), onclick: 'subscribedClicked'}];
this.setForm (form, actions);
this.setClosable (true);
diff --git a/src/www/js/Composer.js b/src/www/js/Composer.js
index d080edc..e72f90f 100644
--- a/src/www/js/Composer.js
+++ b/src/www/js/Composer.js
@@ -107,21 +107,21 @@ Dragonfly.Mail.Composer.prototype.buildHtml = function (html)
html.push (
'',
- 'To: ',
+ ' ', _('mailTo'), ' ',
' ',
'
',
- 'Cc: ',
+ ' ', _('mailCc'), ' ',
' ',
'
',
- 'Bcc: ',
+ ' ', _('mailBcc'), ' ',
' ',
'
',
- 'Subject: ',
- 'From: ', d.escapeHTML (this.msg.from), ' ',
- 'Attachments: ');
+ '', _('mailSubject'), ' ',
+ '', _('mailFrom'), ' ', d.escapeHTML (this.msg.from), ' ',
+ '', _('mailAttachments'), ' ');
if (this.msg.contents) {
switch (this.msg.contents.contenttype) {
@@ -143,13 +143,13 @@ Dragonfly.Mail.Composer.prototype.buildHtml = function (html)
}
}
- html.push ('Attach file... ',
+ html.push ('', _('mailAttachLabel'), ' ',
'',
d.escapeHTML (this.msg.body), ' ',
'',
- ' ',
- ' ',
- '
');
+ ' ',
+ ' ',
+ '
');
html.addCallback (bind ('connectHtml', this));
return html;
@@ -695,7 +695,7 @@ Dragonfly.Mail.AttachmentForm.prototype.buildHtml = function (html)
}
html.push ('
', d.escapeHTML (this.attachmentId), ' (', d.escapeHTML (this.mimeType), ') ',
- '
Remove ');
+ '
', _('mailRemoveAttachment'), ' ');
if (!this.attachmentId) {
html.push ('',
diff --git a/src/www/js/Dragonfly.js b/src/www/js/Dragonfly.js
index 8efc2ca..c72befd 100644
--- a/src/www/js/Dragonfly.js
+++ b/src/www/js/Dragonfly.js
@@ -807,8 +807,8 @@ Dragonfly.buildSidebar = function ()
html = new d.HtmlBuilder (
'
',
'
',
- '
',
- '
',
+ '
',
+ '
',
'
');
html.set (d.sideBook.appendPage (IMG({ 'class': 'icon calendars', src: '/img/blank.gif' })));
diff --git a/src/www/js/Gettext.js b/src/www/js/Gettext.js
index 3b5dc33..58f1e2a 100644
--- a/src/www/js/Gettext.js
+++ b/src/www/js/Gettext.js
@@ -39,7 +39,7 @@ Dragonfly.Gettext.gettext = function (msgid)
}
if (!g._translations[msgid]) {
- logWarning ('No translation found.');
+ logWarning ('No translation found for "'+msgid+'" in '+g._locale);
return msgid;
}
diff --git a/src/www/js/JCal.js b/src/www/js/JCal.js
index 7984536..bc5ef3e 100644
--- a/src/www/js/JCal.js
+++ b/src/www/js/JCal.js
@@ -527,7 +527,7 @@ Dragonfly.JCal.buildNewEvent = function (summary, dayOrDate, tzid)
var d = Dragonfly;
var c = d.Calendar;
- summary = summary || 'New Event';
+ summary = summary || _('eventDefaultTitle');
var params = { };
var start, end;
diff --git a/src/www/js/Mail.js b/src/www/js/Mail.js
index 8a84601..50743fb 100644
--- a/src/www/js/Mail.js
+++ b/src/www/js/Mail.js
@@ -100,10 +100,10 @@ Dragonfly.Mail.updateToolbar = function (loc)
var v = m.getView (loc);
/* these aren't *exactly* right... */
- $('mail-toolbar-archive').value = (loc.set == 'all') ? 'Unarchive' : 'Archive';
- $('mail-toolbar-delete').value = (loc.set == 'trash') ? 'Undelete' : 'Delete';
- $('mail-toolbar-junk').value = (loc.set == 'junk') ? 'Not Junk' : 'Junk';
- $('mail-toolbar-star').value = (loc.set == 'starred') ? 'Unstar' : 'Star';
+ $('mail-toolbar-archive').value = (loc.set == 'all') ? _('buttonUnarchiveLabel') : _('buttonArchiveLabel');
+ $('mail-toolbar-delete').value = (loc.set == 'trash') ? _('buttonUndeleteLabel') : _('genericDelete');
+ $('mail-toolbar-junk').value = (loc.set == 'junk') ? _('buttonNotJunkLabel') : _('buttonJunkLabel');
+ $('mail-toolbar-star').value = (loc.set == 'starred') ? _('buttonUnstarLabel') : _('buttonStarLabel');
Element[v.selectAll ? 'show' : 'hide' ] ('mail-toolbar-select-all');
Element[v.deselectAll ? 'show' : 'hide' ] ('mail-toolbar-deselect-all');
@@ -186,10 +186,10 @@ Dragonfly.Mail.buildSummarySelect = function ()
Element.setHTML ('mail-summary-div', [
'
',
- 'All ',
- 'To Me ',
- 'From My Contacts ',
- 'Mailing Lists ',
+ '', _('mailAllLabel'), ' ',
+ '', _('mailToMeLabel'), ' ',
+ '', _('mailFromContactsLabel'), ' ',
+ '', _('mailSubscriptionsLabel'), ' ',
' ']);
Event.observe ('mail-summary-select', 'change',
@@ -249,13 +249,13 @@ Dragonfly.Mail.build = function (loc)
'
',
- '
',
- '
',
- '
',
- '
',
+ '
',
+ '
',
+ '
',
+ '
',
- '
',
- '
',
+ '
',
+ '
',
'',
'
',
@@ -499,7 +499,7 @@ Dragonfly.Mail.Messages.build = function (loc)
var d = Dragonfly;
var m = d.Mail;
- return m['build' + (loc.message ? 'Conversation' : 'List') + 'View'] (loc);
+ return m['build' + (loc.message ? _('mailConversation') : _('mailList')) + _('mailView')] (loc);
};
Dragonfly.Mail.Messages.load = function (loc, jsob)
@@ -507,7 +507,7 @@ Dragonfly.Mail.Messages.load = function (loc, jsob)
var c = Dragonfly.Mail.Messages;
var m = Dragonfly.Mail;
- return m['load' + (loc.message ? 'Item' : 'List')] (loc, jsob);
+ return m['load' + (loc.message ? _('mailItem') : _('mailList'))] (loc, jsob);
};
*/
@@ -609,7 +609,7 @@ Dragonfly.Mail.Contacts.getBreadCrumbs = function (loc)
if (loc.contact) {
return d.format ('
{1} {2} ',
d.escapeHTML (loc.getClientUrl ('contact')),
- loc.set == 'sent' ? 'To ' : 'From ',
+ loc.set == 'sent' ? _('mailTo') + " " : _('mailFrom') + " ",
d.escapeHTML (ab.getNameForContact (loc.contact)));
}
};
diff --git a/src/www/js/MailListView.js b/src/www/js/MailListView.js
index f81236b..848d350 100644
--- a/src/www/js/MailListView.js
+++ b/src/www/js/MailListView.js
@@ -98,7 +98,7 @@ Dragonfly.Mail.ListView.load = function (loc, jsob)
list.addConversations (html, jsob.conversations);
} else {
list.addGroupFooter (html,
- '
No messages ');
+ '
' + _('mailNoMessages') + ' ');
}
list.buildEnd (html);
@@ -179,7 +179,7 @@ Dragonfly.Mail.MultiListView.load = function (loc, jsob)
if (!group.total) {
list.addGroupFooter (html,
- '
No messages ');
+ '
' + _('mailNoMessages') + ' ');
continue;
}
@@ -187,9 +187,10 @@ Dragonfly.Mail.MultiListView.load = function (loc, jsob)
list.addConversations (html, group.conversations);
if (group.total > group.conversations.length) {
list.addGroupFooter (html,
- d.format ('
{2} more... ',
+ d.format ('
{2} {3} ',
urlBase, encodeURIComponent (group[subgroup]),
- group.total - group.conversations.length));
+ group.total - group.conversations.length),
+ _('mailMoreSuffix'));
}
}
diff --git a/src/www/js/OccurrenceEditor.js b/src/www/js/OccurrenceEditor.js
index 8f54713..afa466a 100644
--- a/src/www/js/OccurrenceEditor.js
+++ b/src/www/js/OccurrenceEditor.js
@@ -42,10 +42,10 @@ Dragonfly.Calendar.OccurrencePopup.prototype.quickEventEdit = function (elem)
new d.HtmlBuilder (
'
',
- '
enter free-form text, for example: ',
- 'lunch with Joe tomorrow at noon
'
+ '
', _('freeFormInstructions'), ' ',
+ '', _('freeFormExample'), '
'
).set (this.contentId);
var editDetails = function (evt) {
@@ -106,8 +106,8 @@ Dragonfly.Calendar.OccurrencePopup.prototype.summarize = function (occurrence, e
var html = new d.HtmlBuilder();
this.summary = new c.OccurrenceSummary (this.occurrence, html);
html.push ('
');
+ '
', _('genericDelete'), ' ',
+ '
', _('genericEdit'), ' ');
html.set (this.contentId);
Event.observe (deleteId, 'click', this.delConfirm.bindAsEventListener (this));
@@ -134,14 +134,14 @@ Dragonfly.Calendar.OccurrencePopup.prototype.edit = function (evt, occurrence, e
this.editor = new c.OccurrenceEditor (this.occurrence);
if (!this.occurrence.vcalendar.bongoId) { // use new event actions
this.setForm (this.editor, [
- { value: "Cancel", onclick: 'cancel' },
- { value: "Save", onclick: 'save' }
+ { value: _('genericCancel'), onclick: 'cancel' },
+ { value: _('genericSave'), onclick: 'save' }
]);
} else { // use existing event actions
this.setForm (this.editor, [
- { value: "Delete", onclick: 'del', secondary: true },
- { value: "Cancel", onclick: 'dispose' },
- { value: "Save", onclick: 'save' }
+ { value: _('genericDelete'), onclick: 'del', secondary: true },
+ { value: _('genericCancel'), onclick: 'dispose' },
+ { value: _('genericSave'), onclick: 'save' }
]);
}
@@ -173,7 +173,7 @@ Dragonfly.Calendar.OccurrencePopup.prototype.del = function ()
return;
}
- d.notify ('Deleting event...', true);
+ d.notify (_('genericSavingChanges'), true);
forEach (occurrence.bubles, function (b) { addElementClass (b, 'deleting') });
JCal.delOccurrence (occurrence, changeScope).addCallbacks (
@@ -184,7 +184,7 @@ Dragonfly.Calendar.OccurrencePopup.prototype.del = function ()
} else {
d.Calendar.remove (occurrence.event);
}
- d.notify ('DELETED!!');
+ d.notify (_('genericChangesSaved'));
return result;
}, this), bind ('showError', this));
};
@@ -215,7 +215,7 @@ Dragonfly.Calendar.OccurrencePopup.prototype.save = function ()
return;
}
- d.notify ('Saving changes...', true);
+ d.notify (_('genericSavingChanges'), true);
if (occurrence.bubles) {
forEach (occurrence.bubles, function (b) {
addElementClass (b, 'saving')
@@ -225,7 +225,7 @@ Dragonfly.Calendar.OccurrencePopup.prototype.save = function ()
JCal.saveOccurrence (occurrence, this.changes, this.changeScope).addCallbacks (
bind (function (result) {
this.hide ();
- d.notify ('Changes saved.');
+ d.notify (_('genericChangesSaved'));
var tab = condGetProp (d.curLoc, 'tab');
if (tab && (tab == 'calendar' || tab == 'summary')) {
if (occurrence.vcalendar.isRecurring) {
@@ -255,10 +255,10 @@ Dragonfly.Calendar.OccurrencePopup.prototype.delConfirm = function ()
}
this.hide ();
- var text = ['Are you sure you want to delete the event ',
- '“', Dragonfly.escapeHTML (this.occurrence.summary), '”?',
- ' This cannot be undone.
'];
- var actions = [{ value: "Cancel", onclick: 'dispose'}, { value: "Delete", onclick: 'del'}];
+ var text = ['
', _('deleteEventConfirm'),
+ '“', Dragonfly.escapeHTML (this.occurrence.summary), '”',
+ _('genericRemovePost'), '
'];
+ var actions = [{ value: _('genericCancel'), onclick: 'dispose'}, { value: _('genericDelete'), onclick: 'del'}];
this.setForm (text, actions);
this.show();
};
@@ -268,16 +268,16 @@ Dragonfly.Calendar.OccurrencePopup.prototype.getScope = function (forSave)
this.hide ();
this.scopeForm = Dragonfly.nextId ('occurrence-scope');
var form = [
- 'This event is part of a series. Would you like ',
- (forSave) ? 'changes to apply to' : 'to delete', ':
',
+ '', _('eventSeriesIntro'),
+ (forSave) ? _('eventSeriesChanges') : _('eventSeriesDelete'), ':
',
'