Re: Preferences and l10n
Re: Preferences and l10n
- Subject: Re: Preferences and l10n
- From: Shane Stanley <email@hidden>
- Date: Wed, 20 May 2015 17:26:10 +1000
On 20 May 2015, at 12:32 pm, Jean-Christophe Helary <email@hidden> wrote:
I was thinking that since Script Editor allows for saving them as applications, there would be an implicit way to access the bundled Info.plist...
You really shouldn't be changing the Info.plist file at run-time, either. You risk breaking codesigning and probably permission to access the calendar database, and there's no guarantee you'll have permission anyhow.
The "correct" place is the app's property list file in Preferences. That can be done easily enough with AppleScriptObjC. The problem is that when you're writing and testing, because Script Editor is the app running the script, the values are stored in/read from Script Editor's Info.plist file. That's generally less than ideal. Is it better to store such values in the Info.plist or to put them into ~/Library/Application Support/... ?
You can store them where you like. You can get paths using "path to preferences" or "path to application support". And if I absolutely want to use Info.plist, is there a way for the Application to actually know where its location is ?
"path to me" will return the path to the app, which you can then extend.
2) create localized versions
You have to create the .lproj folders and .strings files yourself manually. Standard Additions gives you access via the 'localized string' command.
Ok, so instead of using, say:
display alert "not localized arbitrary string"
I would use
display alert (localized string of arbitrary_string_key)
Without the "of".
|
_______________________________________________
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