"Repeat until" option in custom recurrence edit window halts "OK" button

RESOLVED FIXED

Status

Mozilla Localizations
pt-BR / Portuguese (Brazil)
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Emerson Prado, Assigned: Gustavo Jr. Alves)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.8.1.17pre) Gecko/20080806 Calendar/0.9pre

When I'm setting a custom recurrence for an event, if I choose the "Repeat until" option, I can't leave the edit window.
There are two ways of setting the final date:
If I type it on the "Repeat until" date field, the date is displayed normally, but hitting "OK" does nothing.
If I click on the drop-down calendar, clicking a date has no effect either - I have to click "OK" to collapse the drop-down calendar (should this be reported as another bug?). Then again "OK" won't close the edit window.

Reproducible: Always

Steps to Reproduce:
1.Open or edit event
2.Set recurrence to "Custom"
3.Choose "Repeat until"
4.Type date
5.Click "OK"
Actual Results:  
Nothing happens

Expected Results:  
The recurrence window should close and the chosen final date should appear in the event window proper field
Do you see any messages in the Error Console?

It works for me using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17pre) Gecko/2008080621 Calendar/0.9pre and local storage calendar.
Using the pt-BR build I see the following error opening the dialog:

Erro: newEl has no properties
Arquivo-fonte: chrome://calendar/content/sun-calendar-event-dialog-recurrence.js
Linha: 612

Looking at the code I think there might be some error in the pt-BR translation of the strings that control the order of the dialog items.
Actually I think the issue is that additional conntent was added during the translation: 

http://mxr.mozilla.org/seamonkey/source/calendar/locales/en-US/chrome/prototypes/sun-calendar-event-dialog.properties#144  yearlyOrder=%1$S %2$S

http://mxr.mozilla.org/l10n-mozilla1.8/source/pt-BR/calendar/chrome/prototypes/sun-calendar-event-dialog.properties#145  yearlyOrder=%2$S de %1$S

There exists no dialog element with the ID "de" and the whole dialog is therefore broken therefore.
Depends on: 449646
(Reporter)

Comment 4

10 years ago
Created attachment 332940 [details]
Error console status after trying a "repeat until" custom recurrence

The four errors appeared in distinct times, each in one of the following actions (obvious order):
Open custom recurrence dialog
Select "Repeat until" option
Typing a date in the "Repeat until" date field
Clicking "OK"
Cancelling the recurrence dialog didn't add more errors or warnings
(Reporter)

Comment 5

10 years ago
That's correct. I'm the translator and I inserted the " de " wrongly assuming it would appear in the screen. What I needed is an element which would translate as "of", because in pt-BR we use <day> of <month>. I'll take the " de " out, but still need the "of" element. Should I open a new bug for it?
Anyway, from a non-programmer perspective, I can't relate this error with the custom recurrence dialog, since the bad line under discussion doesn't seem to impact the "repeat until" option specifically. Also, the custom recurrence is accepted for all other options, including yearly. So I guess something else is wrong.
I attached an error console screenshot, with four errors relating to this problem (actually, the first one may be related to Comment #3).
Regards.
As written above it's caused by the pt-BR translation of the yearlyOrder property. When opening the dialog it fails during initialization. All other issues are just consequences of the failed initialization.

I'm not sure how Bug 449646 will be fixed. For now you could workaround the error by fixing the pt-BR translation of the yearlyOrder property.
Assignee: nobody → gjalves
Status: UNCONFIRMED → NEW
Component: General → pt-BR / Brazilian
Ever confirmed: true
Product: Calendar → Mozilla Localizations
QA Contact: general → leandro
(In reply to comment #5)
> Anyway, from a non-programmer perspective, I can't relate this error with the
> custom recurrence dialog, since the bad line under discussion doesn't seem to
> impact the "repeat until" option specifically.

If you want to know ;) Opening the dialog calls onLoad()
http://mxr.mozilla.org/mozilla1.8/source/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js#44
that calls the method changeWidgetsOrder()
http://mxr.mozilla.org/mozilla1.8/source/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js#620
that calls the method changeOrderForElements() that breaks with the error
http://mxr.mozilla.org/mozilla1.8/source/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js#584

If no error occurs onLoad() proceeds with setting up the variables like gStartTime or setting the controls to the existing recurrence rule (Bug 449638).
(Reporter)

Comment 8

10 years ago
(In reply to comment #6)
> As written above it's caused by the pt-BR translation of the yearlyOrder
> property. When opening the dialog it fails during initialization. All other
> issues are just consequences of the failed initialization.
> 
> I'm not sure how Bug 449646 will be fixed. For now you could workaround the
> error by fixing the pt-BR translation of the yearlyOrder property.
> 

Done. Bug can be closed, but I'm not sure which res to use. Should it be "Invalid"?
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.