Re: Preferences and l10n
Re: Preferences and l10n
- Subject: Re: Preferences and l10n
- From: Jean-Christophe Helary <email@hidden>
- Date: Wed, 20 May 2015 16:37:14 +0900
Thank you Shane, amazing stuff :)
Jean-Christophe
> 2015/05/20 16:26、Shane Stanley <email@hidden> のメール:
>
> 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".
>
>
> --
> Shane Stanley <email@hidden>
> <www.macosxautomation.com/applescript/apps/>
>
_______________________________________________
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