Re: Accessing Localized File Menu String
Re: Accessing Localized File Menu String
- Subject: Re: Accessing Localized File Menu String
- From: Philip Aker <email@hidden>
- Date: Fri, 10 Jul 2009 00:36:05 -0700
On 2009-07-09, at 23:37:17, Chris Page wrote:
Any solution in sight for scriptors? In a recent discussion it was
found out that some often used Apple applications are setting both
the 'name' and the 'title' of menu items to the localized string.
This makes it impossible to ask for a menu by an unchanging term
and consequently one is forced to use an index (which may be
unreliable between releases). I'm not sure if nib tools usable for
this situation are available on a user setup which doesn't have the
Developer tools installed.
The solution is to report bugs against those applications. <http://bugreport.apple.com/
>
I'm willing to bet that folks on this list have filed bugs pertaining
to scripting years ago which still haven't been addressed. So that
doesn't strike me as being a solution. I think a better plan is for
the AppleScript team to gain an application scriptability watchdog
with some teeth.
A workaround might be to use the available command-line tools to
harvest localized strings from the nibs and place them in *.strings
files in your script bundle. This ties the script to a particular
version of the target application, but could be updated
automatically if you wrote a script to do it.
My first thought was to use the 'strings' tool but that's not workable:
strings /Applications/TextEdit.app/Contents/Resources/French.lproj/
Edit.nib/keyedobjects.nib > edit.txt
However I see that:
plutil -convert xml1 -o edit.plist /Applications/TextEdit.app/Contents/
Resources/French.lproj/Edit.nib/keyedobjects.nib
offers some hope because the association is with an action and that
can be used as a fixed element. The resulting plist format is not
exactly what one would call regular, however I think it might be
possible to work with.
Thanks,
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden