Fix bug 672158 - Custom repeated task - cannot click on OK button. r=decathlon
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 25 Jul 2011 10:49:01 +0200
changeset 8348 dbccd428da1a5e2e474c17c8c3b703c9608978c4
parent 8347 3fb9f6c5653781ecc09dc1d72942f9c03e63fdec
child 8349 d9230f21632a0b51bcc75c6295f204d3242ec93c
push id84
push userbugzilla@standard8.plus.com
push dateTue, 16 Aug 2011 21:25:04 +0000
treeherdercomm-beta@6970c86be3cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdecathlon
bugs672158
Fix bug 672158 - Custom repeated task - cannot click on OK button. r=decathlon
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/locales/en-US/chrome/calendar/calendar-event-dialog.properties
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -757,18 +757,21 @@ function changeOrderForElements(aPropKey
                 aPropParams.length + " params.";
         Components.utils.reportError(s + " " + ex);
         return;
     }
 
     // Add elements in the right order, removing them from their old parent
     for (var i = 0; i < aPropParams.length; i++) {
         var newEl = document.getElementById(localeOrder[i]);
-        parents[i].appendChild(newEl.parentNode.removeChild(newEl));
-
+        if (newEl) {
+            parents[i].appendChild(newEl.parentNode.removeChild(newEl));
+        } else {
+            cal.ERROR("Localization error, could not find node '" + localeOrder[i] + "'. Please have your localizer check the string '" + aPropKey + "'");
+        }
     }
 }
 
 /**
  * Change locale-specific widget order for Edit Recurrence window
  */
 function changeWidgetsOrder() {
     changeOrderForElements("monthlyOrder",
--- a/calendar/locales/en-US/chrome/calendar/calendar-event-dialog.properties
+++ b/calendar/locales/en-US/chrome/calendar/calendar-event-dialog.properties
@@ -125,16 +125,17 @@ monthlyRuleNthOfEveryNounclass2=%1$S of 
 # This string allows to change the order of the elements "ordinal" and
 # "weekday" (or to insert a word between them) for the argument %1$S of the
 # string monthlyRuleNthOfEveryNounclass...
 # Without changing this string, the order is that one required from most
 # languages: ordinal + weekday (e.g. "'the first' 'Monday' of every 2 months").
 # %1$S - ordinal with article
 # %2$S - weekday noun
 # e.g. "'the first' 'Monday'"
+# DONT_TRANSLATE: Make sure there are no extra words in this property, just variables.
 ordinalWeekdayOrder=%1$S %2$S
 
 # LOCALIZATION NOTE (monthlyEveryOfEveryNounclass...):
 # Edit recurrence window -> Recurrence pattern -> Monthly repeat rules
 # Translate these strings according to noun class/gender of weekday (%1$S)
 # set in 'repeadDetailsDay...Nounclass' strings.
 # Nounclass1 <-> Masculine gender; Nounclass2 <-> Feminine gender.
 # Add others strings with suffix 3, 4,... for others noun classes if your
@@ -345,28 +346,31 @@ selectAFile=Please select the file(s) to
 removeCalendarsTitle=Remove Attachments
 removeCalendarsText=Do you really want to remove %1$S attachments?
 
 # Recurrence Dialog Widget Order
 # LOCALIZATION NOTE: You can change the order of below params
 # Edit recurrence window -> Recurrence pattern -> Repeat monthly
 # %1$S - ordinal with article, %2$S - weekday
 # e.g. "the First Saturday"
+# DONT_TRANSLATE: Make sure there are no extra words in this property, just variables.
 monthlyOrder=%1$S %2$S
 
 # Edit recurrence window -> Recurrence pattern -> Repeat yearly
 # %1$S - day of month, %2$S - of, %3$S - month
 # e.g. "6 [of] September"
 # If you don't need %2$S in your locale - please put this on the third place.
+# DONT_TRANSLATE: Make sure there are no extra words in this property, just variables.
 yearlyOrder=%1$S %3$S %2$S
 
 # Edit recurrence window -> Recurrence pattern -> Repeat yearly
 # %1$S - ordinal with article, %2$S - weekday, %3$S  - of, %4$S - month
 # e.g. "the First Saturday of September"
 # If you don't need %3$S in your locale - please put this on the third place.
+# DONT_TRANSLATE: Make sure there are no extra words in this property, just variables.
 yearlyOrder2=%1$S %2$S %3$S %4$S
 
 # LOCALIZATION NOTE (pluralForWeekdays):
 # This string allows to set the use of weekdays nouns in plural form for
 # languages that need them in sentences like "every Monday" or "every Sunday
 # of March" etc.
 # Rule strings involved by this setting are:
 # - weeklyNthOn   (only the first part) e.g. "every Sunday"