Fix bug 450147 - Some locales need to add of to the yearly-period-absolute-controls in Edit Recurrence window. r=philipp,p=hubert@hubertgajewski.com
authorPhilipp Kewisch <mozilla@kewis.ch>
Tue, 23 Sep 2008 19:54:25 +0200
changeset 401 c661dd0906ab92f0cf1d9acb55f2f6377d254d54
parent 400 3a2b64bc09bcae1ee47a7feda1edaed73f53807d
child 402 14e25711e0af4bfa7ec7652a9493d4eae413710c
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs450147
Fix bug 450147 - Some locales need to add of to the yearly-period-absolute-controls in Edit Recurrence window. r=philipp,p=hubert@hubertgajewski.com
calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.properties
calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js
calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.xul
calendar/prototypes/wcap/sun-calendar-event-dialog.css
--- a/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
+++ b/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.dtd
@@ -254,16 +254,26 @@
 <!ENTITY event.recurrence.pattern.monthly.week.7.label  "Saturday" >
 <!ENTITY event.recurrence.repeat.dayofmonth.label       "Day of the month">
 <!ENTITY event.recurrence.repeat.recur.label            "Recur on day(s)">
 
 <!ENTITY event.recurrence.every.label                        "Every:" >
 <!ENTITY repeat.units.years.both                             "Year(s)" >
 <!ENTITY event.recurrence.pattern.yearly.every.month.label   "Every" >
 <!ENTITY event.recurrence.pattern.yearly.every.weekday.label "Every" >
+
+<!-- LOCALIZATON NOTE
+     Some languages use a preposition when describing dates:
+     Portuguese: 6 de Setembro
+     English: 6 [of] September
+     event.recurrence.pattern.yearly.of.label is "of" in
+     Edit recurrence window -> Recurrence pattern -> Repeat yearly
+-->
+<!ENTITY event.recurrence.pattern.yearly.of.label            "" >
+
 <!ENTITY event.recurrence.pattern.yearly.month.1.label       "January" >
 <!ENTITY event.recurrence.pattern.yearly.month.2.label       "February" >
 <!ENTITY event.recurrence.pattern.yearly.month.3.label       "March" >
 <!ENTITY event.recurrence.pattern.yearly.month.4.label       "April" >
 <!ENTITY event.recurrence.pattern.yearly.month.5.label       "May" >
 <!ENTITY event.recurrence.pattern.yearly.month.6.label       "June" >
 <!ENTITY event.recurrence.pattern.yearly.month.7.label       "July" >
 <!ENTITY event.recurrence.pattern.yearly.month.8.label       "August" >
--- a/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.properties
+++ b/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.properties
@@ -131,19 +131,23 @@ summaryDueTaskLabel=Due:
 # Attach File Dialog
 selectAFile=Please select the file(s) to attach
 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 montly
-# %1$S - ordinal, %2$S - weekday 
+# %1$S - ordinal, %2$S - weekday
+# e.g. "First Saturday"
 monthlyOrder=%1$S %2$S
 
 # Edit recurrence window -> Recurrence pattern -> Repeat yearly
-# %1$S - day of month, %2$S - month
-yearlyOrder=%1$S %2$S
+# %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.
+yearlyOrder=%1$S %3$S %2$S
 
 # Edit recurrence window -> Recurrence pattern -> Repeat yearly
 # %1$S - ordinal, %2$S - weekday, %3$S  - of, %4$S - month
+# e.g. "First Saturday of September"
 # If you don't need %3$S in your locale - please put this on the third place.
 yearlyOrder2=%1$S %2$S %3$S %4$S
--- a/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js
+++ b/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js
@@ -618,15 +618,16 @@ function changeOrderForElements(aPropKey
  * Change widget order for Edit Recurrence window
  */
 function changeWidgetsOrder() {
     changeOrderForElements("monthlyOrder",
                            ["monthly-ordinal",
                             "monthly-weekday"]);
     changeOrderForElements("yearlyOrder",
                            ["yearly-days",
+                            "yearly-period-of-month-label",
                             "yearly-month-ordinal"]);
     changeOrderForElements("yearlyOrder2",
                            ["yearly-ordinal",
                             "yearly-weekday",
                             "yearly-period-of-label",
                             "yearly-month-rule"]);
 }
--- a/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.xul
+++ b/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.xul
@@ -296,16 +296,19 @@
                            orient="horizontal"
                            align="center">
                         <textbox id="yearly-days"
                                  value="1"
                                  size="3"
                                  oninput="updateRecurrenceControls();"
                                  disable-on-readonly="true"
                                  disable-on-occurrence="true"/>
+                        <label id="yearly-period-of-month-label"
+                               value="&event.recurrence.pattern.yearly.of.label;"
+                               control="yearly-month-ordinal"/>
                         <menulist id="yearly-month-ordinal"
                                   disable-on-readonly="true"
                                   disable-on-occurrence="true">
                           <menupopup id="yearly-month-ordinal-menupopup">
                             <menuitem id="yearly-month-ordinal-1"
                                       label="&event.recurrence.pattern.yearly.month.1.label;"
                                       value="1"/>
                             <menuitem id="yearly-month-ordinal-2"
@@ -404,17 +407,17 @@
                                       value="7"/>
                           </menupopup>
                         </menulist>
                       </box>
                     </row>
                     <row id="yearly-period-monthname-row" align="center">
                       <label id="yearly-period-of-label"
                              value="&event.recurrence.of.label;"
-                             style="text-align: right" control="yearly-month-rule"/>
+                             control="yearly-month-rule"/>
                       <menulist id="yearly-month-rule"
                                 disable-on-readonly="true"
                                 disable-on-occurrence="true">
                         <menupopup id="yearly-month-rule-menupopup">
                           <menuitem id="yearly-month-rule-1"
                                     label="&event.recurrence.pattern.yearly.month2.1.label;"
                                     value="1"/>
                           <menuitem id="yearly-month-rule-2"
--- a/calendar/prototypes/wcap/sun-calendar-event-dialog.css
+++ b/calendar/prototypes/wcap/sun-calendar-event-dialog.css
@@ -14,16 +14,17 @@
  * The Original Code is Sun Microsystems code.
  *
  * The Initial Developer of the Original Code is Sun Microsystems.
  * Portions created by the Initial Developer are Copyright (C) 2006
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Michael Buettner <michael.buettner@sun.com>
+ *   Hubert Gajewski <hubert@hubertgajewski.com>, Aviary.pl
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -33,16 +34,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #sun-calendar-event-dialog {
     padding: 0px;
 }
 
+#yearly-period-of-label,
 label.label {
     text-align: right;
 }
 
 #item-calendar,
 #item-categories,
 #item-repeat,
 #item-alarm,