Le 14 sept. 2006 à 17:12, Emmanuel a écrit : At 11:57 AM +0200 9/14/06, Yvan KOENIG wrote: I am trying to script Pages 1.0.2.
As a french guy, I work with the french app. It's boring because the "localized string" function is unable to return the localized version for every used strings. Some are not stored in the Localizable.strings file (some are in UndoStrings.strings others are elsewhere).
Maybe you will save some time with Smile's "localize" command: you provide a string and a file (or a bundle) to search for the translation, "localize" returns the translated string.
Hello
I tried with this code:
--[SCRIPT] set thePath to "Macintosh HD:Applications:iWork '06:Pages.app:" as alias
set lstr to localize "Show Inspector" in thePath log lstr set lstr to localize "Hide Inspector" in thePath log lstr set lstr to localize "New Inspector" in thePath log lstr set lstr to localize "Preferences…" in thePath log lstr set lstr to localize "Smooth Path" in thePath log lstr set lstr to localize "Pica" in thePath log lstr set lstr to localize "Pouces" in thePath log lstr set lstr to localize "Centimeters" in thePath log lstr set lstr to localize "Picas" in thePath
--[/SCRIPT]
And got exactly the same results that with the Apple's Script Editor.
"Afficher l’Inspecteur" "Masquer l’Inspecteur"
"New Inspector" "Preferences…" "Smooth Path" "Pica" "Pouces" "Centimeters" "Picas"
It's not a surprise as it was what I am afraid of ;-)
Yvan KOENIG |