Closed Bug 491254 Opened 11 years ago Closed 10 years ago

Some languages need weekdays in plural form for some particular sentences inside Recurrence Summary.

Categories

(Calendar :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bv1578, Assigned: bv1578)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090503 Lightning/1.0pre Shredder/3.0b3pre

Code that generates recurrence summary in Edit Event dialog doesn't consider that some languages need weekdays nouns in plural form inside sentences like 
"Every <weekday noun>";
e.g. in Italian language (see https://wiki.mozilla.org/Talk:L20n:Examples):

  "Saturday"       -> "Sabato"
  "every Saturday" -> "tutti i Sabati"     ('Sabati' plural of 'Sabato')
  "Sunday"         -> "Domenica"
  "Every Sunday"   -> "tutte le Domeniche" ('Domeniche' plural of 'Domenica')
   
For a better translation should be considered this issue too. 

Reproducible: Always

Steps to Reproduce:
1. with a localized version of Sunbird\Lightning, create a custom repeat event;
2. select one of the following rules:
   - weekly with a weekday
   - monthly with "every" + a weekday
   - annually with "every" + a weekday;
Actual Results:  
recurrence summary isn't correctly translated for languages that have grammar rule explained above.

Expected Results:  
a better translation.
There are three strings related to the issue:
weeklyNthOn          -> every %1$S;every #2 weeks on %1$S (first part only)
monthlyEveryOfEvery  -> every %1$S of every month;every %1$S of every #2 months
yearlyOnEveryNthOfNth-> every %1$S of %2$S;every #3 years on every %1$S of %2$S

This patch allows to enable the required plurals in those strings by a "control string" (pluralForWeekdays) that localizers can activate writing "true" if their languages need weekdays in plural form.
Patch also adds seven strings for weekdays plurals (repeatDetailsDayxPlural). 

These plurals don't need to be processed by PluralForm() function because they refer all to the same case: "every ...", therefore localizers can write directly the right plural form in these seven strings if their language need it.
Function pluralWeekday() will select weekday in normal or plural form according to 'pluralForWeekdays' value "true" or "false".

Don't know whether there are languages that need something different.
Attachment #375585 - Flags: review?(philipp)
Assignee: nobody → bv1578
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 375585 [details] [diff] [review]
[after beta] proposal

Code wise, this looks ok. I'd like to get some comments from other localizers though!
Attachment #375585 - Flags: review?(philipp)
Attachment #375585 - Flags: review?(calendar-l10n)
Attachment #375585 - Flags: review+
Comment on attachment 375585 [details] [diff] [review]
[after beta] proposal

Ok, that doesn't seem to work. Lets just check this in after our beta and see how things go.

Leaving review request in place to make sure I don't forget.
Attachment #375585 - Attachment description: proposal → [after beta] proposal
Whiteboard: [checkin after beta]
Attachment #375585 - Flags: review?(calendar-l10n)
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/e402614509a5>

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin after beta]
Target Milestone: --- → 1.0b2
You need to log in before you can comment on or make changes to this bug.