Closed Bug 289549 Opened 20 years ago Closed 20 years ago

[l10n] localized version in Preferences can't change Monospaced font

Categories

(Camino Graveyard :: Preferences, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino0.9

People

(Reporter: Michel.Mouric, Assigned: sfraser_bugs)

References

Details

(Keywords: fixed1.7.7)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050407 Camino/0.8+
Build Identifier: Camino 0.8.3-Multilang

Impossible to change the monospace font with the "Preferences Appearence Fonts"
window in the FRENCH LOCALIZED version.

Reproducible: Always

Steps to Reproduce:
1. Open Preferences
2. Try to change the monospaced font
3

Actual Results:  
The change is not reflected in the field for the name of the monospaced font

Expected Results:  
The change is not made
Haven't confirmed. Updated summary with [l10n]. CCing Ludo to look into this.
Summary: french localized version : Preferences : Monospaced font → [l10n] french localized version : Preferences : Monospaced font
I need to sort where the problems comes from.
sources might be:

     1) Broken mib after translations (hand editing of the panel thru IB).
     2) AppleGlot bug.
     3) Other.



Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: qa-mozilla
Problem is present in italian version also.
Summary: [l10n] french localized version : Preferences : Monospaced font → [l10n] localized version in Preferences can'tchange Monospaced font
If I try to open the Appearance.nib file from the original (English only)
package, I get an error from Interface Builder:
"Open Interface
An inconsistency in the document was found and repaired. Please save the document"

This doesn't happen with any of the other prefpanes' .nib files.
I check appearance.mm and find this line:
" [matrixChooseFont selectedCell] alternateTitle] "
this method depend on Alt. Title in NSButtonCell.
We should not change Alt. Title from "monospace".
(In reply to comment #5)
> We should not change Alt. Title from "monospace".

By doing so we make things work, but I think it's not the right way to go.
The other button (for proportional fonts) has the alt. text localized and works
ok. I guess there's something broken in the prefpane code.



I think I get it now: the problem must be in the blank spaces. If I translate
the alt. text with a string with blank spaces, it doesn't work. With a single
word string, the button works ok.
Can anyone else confirm this behaviour?
Hmm, I can't reproduce this in the Swedish localization, which uses a multi-word
translation of "monospace".
We should not use Alt. Title for l10n.
Summary: [l10n] localized version in Preferences can'tchange Monospaced font → [l10n] localized version in Preferences can't change Monospaced font
Comment on attachment 180180 [details] [diff] [review]
patch : use tag instead of Alt. Title

>Index: Appearance.mm
>===================================================================
>RCS file: /cvsroot/mozilla/camino/PreferencePanes/Appearance/Appearance.mm,v
>retrieving revision 1.6
>diff -u -9 -r1.6 Appearance.mm
>--- Appearance.mm	27 Apr 2003 08:40:51 -0000	1.6
>+++ Appearance.mm	9 Apr 2005 15:34:20 -0000
>@@ -500,31 +500,40 @@
> {
>   if ([fontType isEqualToString:@"monospace"])
>     return @"fixed";
> 
>   return @"variable";
> }
> 
> - (void)syncFontPanel
> {
>-  NSString 	*fontType = [[matrixChooseFont selectedCell] alternateTitle];
>-  NSFont		*newFont	= [[self getFontSampleForType:fontType] font];
>+  NSString* fontType;
>+  switch([[matrixChooseFont selectedCell] tag]) {
>+    case 1:
>+      fontType = @"monospace";
>+      break;
>+    case 0:
>+    default:

We should log in default and do what is currently being done in the case 0.
Else this is the solution.

Waverider would you mind respining the patch.

Tested on the 0.8 branch on 10.3.
Waverider mind respining the patch ?
Blocks: 289801
Attachment #180180 - Attachment is obsolete: true
landed on the 1.7branch for 084, keep this open to land on the trunk.
Keywords: fixed1.7.7
Target Milestone: --- → Camino0.9
this patch totally doesn't apply to the trunk, looks like the entire panel has
been rewritten. someone needs to make the appropriate patch there so it'll work.
taking
Status: NEW → ASSIGNED
(In reply to comment #14)
> this patch totally doesn't apply to the trunk, looks like the entire panel has
> been rewritten. someone needs to make the appropriate patch there so it'll work.
No more radio buttons involved. Trunk code has 
- (IBAction)proportionalFontChoiceButtonClicked:(id)sender
- (IBAction)monospaceFontChoiceButtonClicked:(id)sender

Hence nothing to do for trunk. Marking Fixed because the pref rewrite fixed it.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Still present on the new code.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Don't compare strings on alternate attributes in a .nib file.
The process used by Caminol10n implies that those .nib alternate attributes
*will* be translated, and the string comparison won't work in the translated
version. Hence I'm not using the altrenate text anymore.
Attachment #184532 - Flags: review?(Bruce.Davidson)
Comment on attachment 184532 [details] [diff] [review]
Patch v1.0 for trunk releases

Looks good. Haven't got a localised build to test, but makes sense and doesn't
change operation in normal en-us build.
r=me.
Attachment #184532 - Flags: review?(Bruce.Davidson) → review+
Attachment #184532 - Flags: superreview?(pinkerton)
Comment on attachment 184532 [details] [diff] [review]
Patch v1.0 for trunk releases

This breaks stuff because the alternate title is used to hold "serif" or
"sans-serif" depending on your default proprotional font type. See calls to
-setAlternateTitle:.
Attachment #184532 - Flags: superreview?(pinkerton) → superreview-
(In reply to comment #20)
> (From update of attachment 184532 [details] [diff] [review] [edit])
> This breaks stuff because the alternate title is used to hold "serif" or
> "sans-serif" depending on your default proprotional font type. See calls to
> -setAlternateTitle:.

FYI, the serif/sans-serif switching (as well as the proportional hint) is broken
right now in the nightlies; see bug 293561.
Mine.
Assignee: pinkerton → sfraser_bugs
Status: REOPENED → NEW
Fix checked in (with some other cleanup too). We no longer use -alternateTitle
at all.
Status: NEW → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: