I understood why I got two 'localized" names.
(1) Orange is the same in English and in French (2) Rouge is the one which I defined as a custom name. At first I replaced the standard Rouge by Rouges to force the system to create "com.apple.Labels.plist" then I edited it to move back to Rouge.
I removed the file "com.apple.Labels.plist", restarted the Finder and this time, the script return the complete English list.
tell application "ASObjC Runner" run the script {«script x»} with result returned --> {"None", "Gray", "Green", "Purple", "Blue", "Yellow", "Red", "Orange"} end tell Résultat : {"None", "Gray", "Green", "Purple", "Blue", "Yellow", "Red", "Orange"}
the application "ASObjC Runner" isn't localized so I guess that it get its Workspace from the English resources
I opened its package and duplicated en.lproj which I renamed fr.lproj.
Bingo. tell application "ASObjC Runner" run the script {«script x»} with result returned --> {"Aucun", "Gris", "Vert", "Violet", "Bleu", "Jaune", "Rouge", "Orange"} end tell
Maybe Apple would be fair to deliver a version with a set of lproj matching the one available in the Finder.
I will build one and will put it in my two public devices.
Yvan KOENIG (VALLAURIS, France) dimanche 6 novembre 2011 11:42:34
|