Closed
Bug 463273
Opened 17 years ago
Closed 17 years ago
Error: Failed to read 'repeatDetailsOrdinal0' from chrome://calendar/locale/calendar-event-dialog.properties
Categories
(Calendar :: General, defect)
Calendar
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.0b1
People
(Reporter: ssitter, Assigned: hubert+bmo)
References
Details
Attachments
(3 files, 6 obsolete files)
|
542 bytes,
text/plain
|
Details | |
|
47.58 KB,
patch
|
berend.cornelius09
:
review+
|
Details | Diff | Splinter Review |
|
23.88 KB,
patch
|
hubert+bmo
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081105 Calendar/1.0pre (BuildID: 20081105110610)
Steps to Reproduce:
1. Start Sunbird with clean profile
2. Import the attached testcase that was taken from Bug 356207
3. Open the event for editing, choose "Edit all occurrences" when prompted
Actual Results:
Recurrence summary in the Edit Event dialog shows
[[[
Occurs the Failed to read 'repeatDetailsOrdinal0' from chrome://calendar/locale/calendar-event-dialog.properties. Wednesday effective 9/1/2004 from 2:15 PM to 2:15 PM
]]]
Error Console shows:
[[[
Error: Failed to read 'repeatDetailsOrdinal0' from chrome://calendar/locale/calendar-event-dialog.properties. Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://calendar/content/calUtils.js :: calGetString :: line 658" data: no]
Source file: chrome://calendar/content/calUtils.js
Line: 662
]]]
Expected Results:
No error. I think the correct recurrence summary should be "Occurs every Wednesday the 1st effective ...". If this is not possible display nothing.
Updated•17 years ago
|
Flags: blocking-calendar1.0+
Comment 1•17 years ago
|
||
This patch takes care, catching all edge cases and at least displaying a message to click for details. It also adds plural forms for all strings added and adds a test calendar to be used for l10n with events that each cause a different locale string and plural form to be shown.
I've added events only for plural forms 1-3, if more is needed please file a bug.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #357866 -
Flags: review?(Berend.Cornelius)
Comment 2•17 years ago
|
||
Forgot to qref the ics file.
Attachment #357866 -
Attachment is obsolete: true
Attachment #357870 -
Flags: review?(Berend.Cornelius)
Attachment #357866 -
Flags: review?(Berend.Cornelius)
Updated•17 years ago
|
Whiteboard: [needs review]
Updated•17 years ago
|
Attachment #357870 -
Flags: review?(Berend.Cornelius) → review+
Comment 3•17 years ago
|
||
Comment on attachment 357870 [details] [diff] [review]
[checked in] Fix - v1
patch works fine with the testcase and greatly improves the readability of the source code. I wouldn't mind defining "getRString" and "getDString" globally probably with a more meaningfull name, so that we can use them in all the other places, too.
Comment 4•17 years ago
|
||
I'd rather keep them local.
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/b9cd225d077e>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
OS: Windows XP → All
Hardware: x86 → All
Resolution: --- → FIXED
Whiteboard: [needs review]
Target Milestone: --- → 1.0
Comment 5•17 years ago
|
||
Since defining the function is very simple, I'd like to keep them only in functions that really need it. I guess I could imagine renaming getRString and making it a top-level function, but getDString is quite specific.
| Assignee | ||
Comment 6•17 years ago
|
||
There is:
yearlyEveryNthOfNth=every %1$S of %2$S;every 3 years on every %1$S of %2$S
Should be:
yearlyEveryNthOfNth=every %1$S of %2$S;every #4 years on every %1$S of %2$S
-> REOPEN
BTW - # XXX Please file a bug if this makes it hard to localize the list.
Without keys for weekdays and months it is impossible to localize correctly in Polish. Do you need a separate bug?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 7•17 years ago
|
||
repeatDetailsOrdinalN (where N=[1-5]) and repeatDetailsOrdinal-1 are unused and should be removed
| Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #7)
> repeatDetailsOrdinalN (where N=[1-5]) and repeatDetailsOrdinal-1 are unused and
> should be removed
Nevermind, my mistake. I am sorry for the spam.
| Assignee | ||
Comment 9•17 years ago
|
||
Patch resolves a problem described in comment 6, add two elements to xul file (now 2 keys in properties file are unable to see in the Edit Reccurence window) and does few other fixes.
Assignee: philipp → hubert
Status: REOPENED → ASSIGNED
Attachment #358713 -
Flags: review?(Berend.Cornelius)
| Assignee | ||
Comment 10•17 years ago
|
||
Comment 11•17 years ago
|
||
For english at least the correct form would be "Every Saturday of April" (i.e "The" needs to be collapsed when "Every" is selected.
| Assignee | ||
Comment 12•17 years ago
|
||
(In reply to comment #11)
> For english at least the correct form would be "Every Saturday of April" (i.e
> "The" needs to be collapsed when "Every" is selected.
On the other hand - I am affraid that described behavior can be incorrect in few languages...
Maybe we should leave event.recurrence.repeat.every.label and event.recurrence.pattern.yearly.every.weekday.label empty?
Monthly:
Every _____ Sunday
Every First Sunday
Every Last Sunday
Yearly:
Every _____ Sunday of January
Every First Sunday of January
Every Last Sunday of January
Also I should change "monthly-ordinal-first-every" to "monthly-ordinal-every-label"
Comment 13•17 years ago
|
||
Comment on attachment 358713 [details] [diff] [review]
Patch (few fixes)
looks good; r=berend
Attachment #358713 -
Flags: review?(Berend.Cornelius) → review+
| Assignee | ||
Comment 14•17 years ago
|
||
(In reply to comment #13)
> (From update of attachment 358713 [details] [diff] [review])
> looks good; r=berend
What about with Philipp's comment?
Comment 15•17 years ago
|
||
Just one notification from reviewing source code.
http://mxr.mozilla.org/comm-central/source/calendar/base/content/calendar-dialog-utils.js#183
> let monthlyString = getRString("monthlyDayOfNth", [startDate.day]);
> ruleString = PluralForm.get(rule.interval, monthlyString)
> .replace("#1", rule.interval);
Is it correct? #2 instead of #1?
http://mxr.mozilla.org/comm-central/source/calendar/locales/en-US/chrome/calendar/calendar-event-dialog.properties#87
> monthlyDayOfNth=day %1$S of every month;day %1$S of every #2 months
Updated•17 years ago
|
Attachment #357870 -
Attachment description: Fix - v1 → [checked in] Fix - v1
Comment 16•17 years ago
|
||
Comment on attachment 358713 [details] [diff] [review]
Patch (few fixes)
> <menupopup id="montly-ordinal-menupopup">
>+ <menuitem id="monthly-ordinal-first-every"
>+ label="&event.recurrence.repeat.every.label;"
>+ value="0"/>
> <menuitem id="monthly-ordinal-first-label"
> label="&event.recurrence.repeat.first.label;"
> value="1"/>
> <menuitem id="mnthly-ordinal-second-label"
> label="&event.recurrence.repeat.second.label;"
> value="2"/>
Please, fix the id of the menuitem element "mnthly-ordinal-second-label".
Comment 17•17 years ago
|
||
From calendar-event-dialog.properties:
# LOCALIZATION NOTE (repeatDetailsRuleDaily3):
# Edit recurrence window -> Recurrence pattern -> Daily repeat rules
# #1 - number
# e.g. "every 4 days"
dailyEveryNth=every day;every #1 days
repeatDetailsRuleDaily4=every weekday
I'd like to mention that not all locales have "1" as a separate rule. For
example, in Lithuanian 1, 21, 31, ..., 91, 101, 121 etc. match the first rule,
and if I leave the first string as "every day", this wouldn't be correct.
OTOH, I don't want to see "every 1 day" here either.
Could we please have separate recurrence strings to translate for cases where
X=1 ?
| Assignee | ||
Comment 18•17 years ago
|
||
Comment on attachment 358713 [details] [diff] [review]
Patch (few fixes)
I will prepare a new patch (but I wait for decision regarding "the every").
Attachment #358713 -
Flags: review+ → review-
| Reporter | ||
Comment 19•17 years ago
|
||
Did this fix Bug 351671 too?
Comment 20•17 years ago
|
||
I'm also wondering why repeatDetailsMonthX and repeatDetailsDayX were removed? Where will month and day names be taken from now?
| Assignee | ||
Comment 21•17 years ago
|
||
(In reply to comment #20)
> I'm also wondering why repeatDetailsMonthX and repeatDetailsDayX were removed?
Don't care, it will back :)
Comment 22•17 years ago
|
||
Hubert, would you also take care to update reminderCustomUnit* to support plurals?.. :)
| Assignee | ||
Comment 23•17 years ago
|
||
(In reply to comment #22)
> Hubert, would you also take care to update reminderCustomUnit* to support
> plurals?.. :)
Please submit a new bug for this.
Comment 24•17 years ago
|
||
(In reply to comment #23)
> (In reply to comment #22)
> > Hubert, would you also take care to update reminderCustomUnit* to support
> > plurals?.. :)
>
> Please submit a new bug for this.
OK, it's now in bug 475278.
Comment 26•17 years ago
|
||
The example .ics file has three UIDs used twice, monthlyLastDayOfNth-[123] and therefore Sunbird fails to import three events. Some events also have end date earlier than start date, but that doesn't hurt much as you want to use that file only to view occurrence wording not to change any event.
Also, perhaps calendar-event-dialog.properties/dtd files should have a comment about where you can find example calendar so that future localizers would know that it exists.
Comment 27•17 years ago
|
||
(In reply to comment #20)
> I'm also wondering why repeatDetailsMonthX and repeatDetailsDayX were removed?
> Where will month and day names be taken from now?
This is now taken from dateFormat.properties. I hope this is ok.
| Assignee | ||
Comment 28•17 years ago
|
||
(In reply to comment #27)
> (In reply to comment #20)
> > I'm also wondering why repeatDetailsMonthX and repeatDetailsDayX were removed?
> > Where will month and day names be taken from now?
>
> This is now taken from dateFormat.properties. I hope this is ok.
Unfortunately not. Some languages (like Polish) cannot use forms from dateFormat.properties here.
English / Polish
the first / pierwszy
January / styczeń
The first of January / Pierwszy stycznia
Comment 29•17 years ago
|
||
It also limits Estonian traslation at the moment.
Could we use recurrence.pattern.monthly* and recurrence.pattern.yearly* values from caledar-event-dialog.dtd the same way they're used in dropdowns when you pick recurrence rule? With these I was able to get it right for 0.9.
Comment 30•17 years ago
|
||
dateFormat: I can just revert to using extra strings in the recurrence dialog.
| Assignee | ||
Comment 31•17 years ago
|
||
(In reply to comment #30)
> dateFormat: I can just revert to using extra strings in the recurrence dialog.
I will add these changes to the new patch.
| Assignee | ||
Comment 32•17 years ago
|
||
New patch after comments: 11, 12, 15, 19.
Empty options in dropdown lists are not the best resolution however I don't have better idea.
Attachment #358713 -
Attachment is obsolete: true
Attachment #358714 -
Attachment is obsolete: true
Attachment #359361 -
Flags: review?(Berend.Cornelius)
| Assignee | ||
Comment 33•17 years ago
|
||
| Assignee | ||
Updated•17 years ago
|
Attachment #359361 -
Attachment description: Patch 4 (see comments: 11, 12, 15, 19) → Patch 4 (see comments: 11, 12, 15, 28)
Comment 34•17 years ago
|
||
(In reply to comment #32)
> Empty options in dropdown lists are not the best resolution however I don't
> have better idea.
Two possible solutions
======================
* Make the dropdown contain "The", i.e:
( ) [ The First \/] [ Wednesday \/]
( ) [ Every \/] [ Wednesday \/]
* Collapse (visbility:hidden shouldn't change the width) the "The" when Every
is selected:
( ) The [ First \/] [ Wednesday \/]
( ) [ Every \/] [ Wednesday \/]
| Assignee | ||
Comment 35•17 years ago
|
||
(In reply to comment #34)
> Two possible solutions
> ======================
>
> * Make the dropdown contain "The", i.e:
>
> ( ) [ The First \/] [ Wednesday \/]
> ( ) [ Every \/] [ Wednesday \/]
OK.
> * Collapse (visbility:hidden shouldn't change the width) the "The" when Every
> is selected:
>
> ( ) The [ First \/] [ Wednesday \/]
> ( ) [ Every \/] [ Wednesday \/]
It is risky - see my comment 12 regarding localization.
Attachment #359361 -
Attachment is obsolete: true
Attachment #359364 -
Attachment is obsolete: true
Attachment #359488 -
Flags: review?
Attachment #359361 -
Flags: review?(Berend.Cornelius)
| Assignee | ||
Updated•17 years ago
|
Attachment #359488 -
Flags: review? → review?(philipp)
Comment 36•17 years ago
|
||
Comment on attachment 359488 [details] [diff] [review]
Patch 5 (see comment 34)
>-<!ENTITY event.recurrence.repeat.first.label "First">
>-<!ENTITY event.recurrence.repeat.second.label "Second">
>-<!ENTITY event.recurrence.repeat.third.label "Third">
>-<!ENTITY event.recurrence.repeat.fourth.label "Fourth">
>-<!ENTITY event.recurrence.repeat.fifth.label "Fifth">
>-<!ENTITY event.recurrence.repeat.last.label "Last">
>+<!ENTITY event.recurrence.repeat.first.label "The First">
>+<!ENTITY event.recurrence.repeat.second.label "The Second">
>+<!ENTITY event.recurrence.repeat.third.label "The Third">
>+<!ENTITY event.recurrence.repeat.fourth.label "The Fourth">
>+<!ENTITY event.recurrence.repeat.fifth.label "The Fifth">
>+<!ENTITY event.recurrence.repeat.last.label "The Last">
...
>-<!ENTITY event.recurrence.pattern.yearly.first.label "First">
>-<!ENTITY event.recurrence.pattern.yearly.second.label "Second">
>-<!ENTITY event.recurrence.pattern.yearly.third.label "Third">
>-<!ENTITY event.recurrence.pattern.yearly.fourth.label "Fourth">
>-<!ENTITY event.recurrence.pattern.yearly.fifth.label "Fifth">
>-<!ENTITY event.recurrence.pattern.yearly.last.label "Last">
>+<!ENTITY event.recurrence.pattern.yearly.first.label "The First">
>+<!ENTITY event.recurrence.pattern.yearly.second.label "The Second">
>+<!ENTITY event.recurrence.pattern.yearly.third.label "The Third">
>+<!ENTITY event.recurrence.pattern.yearly.fourth.label "The Fourth">
>+<!ENTITY event.recurrence.pattern.yearly.fifth.label "The Fifth">
>+<!ENTITY event.recurrence.pattern.yearly.last.label "The Last">
These labels need renaming since the string changed.
r=philipp with the above changes, please upload a new patch and set r+ and checkin-needed
Attachment #359488 -
Flags: review?(philipp) → review+
| Assignee | ||
Comment 37•17 years ago
|
||
I've also changed key name yearlyEveryNthOfNth to yearlyOnEveryNthOfNth (many localizers did the same mistake as we have in en-US - "3 years" instead of "#3 years")
Attachment #359488 -
Attachment is obsolete: true
Attachment #359781 -
Flags: review+
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 38•17 years ago
|
||
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/3d71892bdb83>
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Updated•17 years ago
|
Attachment #359781 -
Attachment description: Patch 6 (see comment 36) → [checked in] Patch 6 (see comment 36)
Comment 39•17 years ago
|
||
I'd like to say one last thing on this matter. Sorry for not having replied sooner, but I had no time during this week. I've already spoken with Axel Hecht about what I'm going to say and he told me that we can't do anything now and that we should wait for Mozilla2. I'm writing just to let you all know this and (hope) remember when it'll be the right time.
Here in italy we have gender accordance of articles, adjectives and so on. The problem is that monday, ..., saturday are masculine nouns, but sunday is feminine. So for example:
The First Monday -> Il primo lunedì
The First Sunday -> La prima domenica
So now I translate The First and so on with the masculine accordance because it happens more often; but if a user want to set up a reminder on a sunday event he will get
Il primo domenica
which is like using "he" for "Sarah" or "Michelle".
Comment 40•17 years ago
|
||
I guess we could add even more strings and do something like
ordinalFirstSunday=The first
-> ordinalFirstSunday=La prima
ordinalFirstMonday=The first
-> ordinalFirstMonday=Il primo
This will result in a lot of strings though and we'll have to add code to switch the names based on the selected weekday. If you think this is worth the effort, do you think you could whip up a patch to take care? If so, please file a new bug.
| Assignee | ||
Comment 41•17 years ago
|
||
(In reply to comment #39)
> The First Monday -> Il primo lunedì
> The First Sunday -> La prima domenica
In Polish we don't use articles so it easier for me, however I have similar problem:
> The First Monday -> Pierwszy poniedziałek
> The First Sunday -> Pierwsza niedziela
so I use:
1. poniedziałek
1. niedziela
Comment 42•17 years ago
|
||
(In reply to comment #40)
> I guess we could add even more strings and do something like
> This will result in a lot of strings though and we'll have to add code to
> switch the names based on the selected weekday.
I know it's a big work, and there are other strings affected by this problem. As I said, I can wait (I don't know the others, but I can) Mozilla2. I just wanted to report the problem now to advertize it. I wrote some more examples here the last July: https://wiki.mozilla.org/Talk:L20n:Examples as requested by Axel, and I'll write some more in the future. So, just remember this (I'll remind it to you, anyway) when you'll be able to solve this problem easily.
Comment 43•17 years ago
|
||
(In reply to comment #41)
> so I use:
>
> 1. poniedziałek
> 1. niedziela
This could be a good workaround. I'll look into it, thanks.
Comment 44•14 years ago
|
||
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in
before you can comment on or make changes to this bug.
Description
•