iLocalize doesn't support NSMenuItem's attributedTitle fragment content

22 views
Skip to first unread message

Ulf Dunkel

unread,
Jun 19, 2014, 7:18:35 AM6/19/14
to iloc...@googlegroups.com
Hi everybody.

I ran into an issue with an Xcode 5.x NIB that supports attributed
titles for NSMenuItems.
I simply wanted to have my zoom popup menu show all entries
right-aligned, like this:

+-----------+
| 25% |
| 50% |
| 100% |
| 200% |
| 400% |
| 800% |
| 1,600% |
+-----------+

This works like a charm when you follow this description:
http://stackoverflow.com/questions/21352460/how-to-align-text-center-in-nsmenuitem-cocoa-mac-osx

But when it comes to localization, none of the attributed title strings
is localized, but the English strings are copied into all localized
NIBs. :-(

This is, how e.g. the German zoom popup menu should look like:

+-----------+
| 25 % |
| 50 % |
| 100 % |
| 200 % |
| 400 % |
| 800 % |
| 1.600 % |
+-----------+

But it doesn't. Here is a code snippet from the relevant NIB which shows
the "localized" 1,600% item:

----- snip -----

<menuItem title="1,600%" tag="1600" id="YAs-el-zAz">
<attributedString key="attributedTitle">
<fragment content="1,600%">
<attributes>
<font key="NSFont" metaFont="toolTip"/>
<paragraphStyle key="NSParagraphStyle" alignment="right"
lineBreakMode="wordWrapping" baseWritingDirection="natural"/>
</attributes>
</fragment>
</attributedString>
</menuItem>

----- snap -----


I fear that as long as this issue isn't fixed, all changes in the base
NIB will overwrite all manual adjustments to the localized NIBs, over
and over again.

Can you please fix this issue, Jean?

--
Bis bald / See you soon / A bientôt / Tot ziens / Ĝis revido

invers Software & DSD.net, Inh. Ulf Dunkel
dun...@icalamus.net - www.icalamus.net

iCalamus. Publish your ideas.

Pflichtangaben gem. § 37a HGB:
Sitz des Unternehmens: DE-49624 Löningen
Reply all
Reply to author
Forward
0 new messages