• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: extract localizedString from localizedStrings.js
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >extract localizedString from localizedStrings.js (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: Windowviews is not allowed assistive access
  • Next by Date: Re: Windowviews is not allowed assistive access
  • Previous by thread: extract localizedString from localizedStrings.js
  • Next by thread: Contacts ยป Select 'All Contacts'
  • Index(es):
    • Date
    • Thread