Closed
Bug 299757
Opened 19 years ago
Closed 19 years ago
Dates in Go menu not localizable
Categories
(Camino Graveyard :: Translations, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino0.9
People
(Reporter: markus, Assigned: Usul)
References
Details
Attachments
(2 files, 3 obsolete files)
1.45 KB,
patch
|
moz
:
review+
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
30.33 KB,
image/png
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050620 Camino/0.9a1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050620 Camino/0.9a1
In the Go-meny, in the History-part, the choices for "Earlier today" and
"Yesterday" are localized, but then it says for example "Friday June 24". These
strings doesn't seem to be localizable.
Reproducible: Always
Steps to Reproduce:
1. Keep your history for more than two days
2. Check your Go-meny
Actual Results:
The strings are not localized.
Expected Results:
The strings should be localized.
Assignee | ||
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: camino0.9?
Comment 1•19 years ago
|
||
"Today" and "Yesterday" are localizable.
Other dates use [NSCalendarDate descriptionWithCalendarFormat:@"%A %B %d"].
The last bucket, "More than a week ago", is also localizable.
Maybe I need to do something like the suggestion here:
http://www.cocoabuilder.com/archive/message/cocoa/2004/6/14/109716
but I don't know if it's possible to get the format that I want.
Summary: Dates in Go-meny not localizable → Dates in Go menu not localizable
Assignee | ||
Comment 2•19 years ago
|
||
Simon gave me the hint for the patch. I just tested it. Thanks simon.
Assignee | ||
Updated•19 years ago
|
Attachment #188352 -
Flags: review?(mozilla)
Comment 3•19 years ago
|
||
(In reply to comment #2)
> Created an attachment (id=188352) [edit]
> Patch localizing dates
>
> Simon gave me the hint for the patch. I just tested it. Thanks simon.
Looks good to me, except that I'd move the [[NSUserDefaults
standardUserDefaults] dictionaryRepresentation] outside of the for loop:
NSDictionary *locale = [[NSUserDefaults standardUserDefaults]
dictionaryRepresentation];
(swapping in |locale| where the method call is now). It's only six items though,
so it probably doesn't matter very much.
Comment 4•19 years ago
|
||
Did anyone find documentation saying that
[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
was the right thing to pass in for locale: ?
I saw it on a mailing list, but it seems a little odd.
Updated•19 years ago
|
Flags: camino0.9? → camino0.9+
Target Milestone: --- → Camino0.9
Comment 5•19 years ago
|
||
(In reply to comment #4)
> Did anyone find documentation saying that
> [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
> was the right thing to pass in for locale: ?
> I saw it on a mailing list, but it seems a little odd.
It seemed a bit odd to me too, so I checked |defaults read NSGlobalDomain| in
the terminal and found keys that are identical to the locale keys for
NSCalendarDate (NSMonthNameArray, NSWeekDayNameArray, etc.).
Comment 6•19 years ago
|
||
Comment on attachment 188352 [details] [diff] [review]
Patch localizing dates
OK with me then.
Attachment #188352 -
Flags: review?(mozilla) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #188352 -
Flags: superreview?(pinkerton)
Comment 7•19 years ago
|
||
looks ok to me, can you put up a new patch with getting the locale dict outside
the loop?
Comment 8•19 years ago
|
||
One more thing: I noticed we have
"HistoryMenuDateFormat" = "%A, %B %d";
in Localizable.strings; why are we hardcoding the format instead of using that?
Comment 9•19 years ago
|
||
(In reply to comment #8)
> One more thing: I noticed we have
>
> "HistoryMenuDateFormat" = "%A, %B %d";
>
> in Localizable.strings; why are we hardcoding the format instead of using that?
Because I'm an idiot?
Assignee | ||
Updated•19 years ago
|
Attachment #188352 -
Flags: superreview?(pinkerton)
Assignee | ||
Comment 10•19 years ago
|
||
Attachment #188352 -
Attachment is obsolete: true
Attachment #188443 -
Flags: review?(mozilla)
Comment 11•19 years ago
|
||
Comment on attachment 188443 [details] [diff] [review]
Taking Wheva's comment into account. Getting the format from the users prefs.
r=me, with the following caveats:
There should only be one space before |NSDictionary*| and |curCalendarLocale|,
though, for whoever checks it in.
One other concern is that the date format string from the user defaults
contains a year. I'm not too concerned about it, but it might look a bit
unpolished, since it's pretty obvious what year is being referenced.
Attachment #188443 -
Flags: review?(mozilla) → review+
Comment 12•19 years ago
|
||
(In reply to comment #11)
> One other concern is that the date format string from the user defaults
> contains a year. I'm not too concerned about it, but it might look a bit
> unpolished, since it's pretty obvious what year is being referenced.
Yeah, I don't think we want the default date format; I think we should get the
"HistoryMenuDateFormat" localized string.
Assignee | ||
Comment 13•19 years ago
|
||
(In reply to comment #12)
> Yeah, I don't think we want the default date format; I think we should get the
> "HistoryMenuDateFormat" localized string.
I agree, striping the %Y sucks. I'll post a new patch and once the patch is
applied I'll post a note on the caminol10n mailing list and on the website.
Assignee | ||
Comment 14•19 years ago
|
||
Attachment #188443 -
Attachment is obsolete: true
Attachment #188565 -
Flags: review?(mozilla)
Updated•19 years ago
|
Attachment #188565 -
Flags: superreview+
Comment 15•19 years ago
|
||
(In reply to comment #14)
NSLocalizedString(@"%A %B %d",@"")
Should be
NSLocalizedString(@"HistoryMenuDateFormat", @"")
Updated•19 years ago
|
Attachment #188565 -
Flags: review?(mozilla) → review-
Comment 16•19 years ago
|
||
Couldn't hurt to move the NSLocalizedString() call outside of the loop, either,
since it's a macro for an Objective-C method.
NSString *format = NSLocalizedString(@"HistoryMenuDateFormat", @"");
or whatever.
Assignee | ||
Comment 17•19 years ago
|
||
If wevah's Ok, could smfr commit it ?
Attachment #188565 -
Attachment is obsolete: true
Attachment #188580 -
Flags: review?(mozilla)
Comment 18•19 years ago
|
||
Comment on attachment 188580 [details] [diff] [review]
Addressing's reviewer comments
Looks good to me.
NSString* sdf=NSLocalizedString(@"HistoryMenuDateFormat", @"");
should have spaces around the =, but whoever does the check-in can fix that.
Attachment #188580 -
Flags: review?(mozilla) → review+
Assignee | ||
Updated•19 years ago
|
Attachment #188580 -
Flags: superreview?(pinkerton)
Comment 19•19 years ago
|
||
Comment on attachment 188580 [details] [diff] [review]
Addressing's reviewer comments
>Index: HistoryDataSource.mm
>===================================================================
>+ NSDictionary* curCalendarLocale = [[NSUserDefaults standardUserDefaults] dictionaryRepresentation];
>+ NSString* sdf=NSLocalizedString(@"HistoryMenuDateFormat", @"");
Use a better variable name than "sdf" (suggest "dateFormat"), and spaces
around the "=" please.
sr with those fixed.
Attachment #188580 -
Flags: superreview?(pinkerton) → superreview+
Comment 20•19 years ago
|
||
fixed things smfr mentioned, checked in on trunk
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment 21•19 years ago
|
||
It differs from the date set with OS format.
year/month/day week is a standard format in Japan.
A setup of the date format of OS:
https://bugzilla.mozilla.org/attachment.cgi?id=149085
Assignee | ||
Comment 22•19 years ago
|
||
(In reply to comment #21)
> Created an attachment (id=188761) [edit]
> screen shot of history
>
> It differs from the date set with OS format.
> year/month/day week is a standard format in Japan.
>
Yes the localizer needs to change the string in localized.string. I've just send
a mail on the subject to the caminol10n team so they are now aware that they
should do it.
You need to log in
before you can comment on or make changes to this bug.
Description
•