Re: extract localizedString from localizedStrings.js
Re: extract localizedString from localizedStrings.js
- Subject: Re: extract localizedString from localizedStrings.js
- From: Shane Stanley <email@hidden>
- Date: Wed, 20 Nov 2013 10:04:28 +1100
On 20 Nov 2013, at 8:34 AM, koenig.yvan <email@hidden> wrote:
> I am accustomed to extract localized strings stored in files like "Localizables.strings".
>
> But sometimes, Safari for instance, they are in files like "localizedStrings.js".
I suspect that's a particular case -- those look like they are from access directly by javascript.
> TextWrangler is able to open them but my goal is to grab on the fly the localized version of a string which may be useful in a script to reach an UI element.
>
> Is one of you knowing a way to achieve this goal ?
> Of course I may read the file as a text one to extract the meaningful row but this assume that I know the name of the proj folder which is a bit convoluted because french ones may be named fr.proj or french.proj.
You are going to have to look for either french.proj or fr.proj, I think -- either is acceptable. After that, you need to look for .strings files -- the developer can call them what they like.
But it has become more difficult in Mavericks, because there now also be . stringsdict files, which are property list files, and the formatting can also be more complex. These allow much better localization for plurals and gender-based formatting, so in theory you should be less offended by what you will see in future. But they're not really designed for human browsing.
--
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