title: Why applescript doesn't accept file object in localized string command?
body: <p>Following applescript throws error:</p>
  
  <pre><code>set thePath to path to application support from user domain as alias
  set mystr to localized string "Add people to this note" in bundle file thePath
  </code></pre>
  
  <p>And the error is</p>
  
  <pre><code>error "Can’t make file (alias \"Macintosh HD:Users:shakes:Library:Application Support:\") into type file." number -1700 from file (alias "Macintosh HD:Users:shakes:Library:Application Support:") to file
  </code></pre>
  
  <p>What does this error means? <code>localized string</code> expects a <code>file</code> or <code>alias</code> object which <code>thePath</code> is then why this error?</p>
  
  <p>FYI, <a href="https://developer.apple.com/library/content/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW23" rel="nofollow noreferrer"><code>localized string</code> reference</a> says:</p>
  
  <pre><code>Syntax
  localized   string  text    required
  from table   text   optional
  in bundle   fileSpecifier   optional
  </code></pre>