--[SCRIPT]
property testTextEdit : false
set locales to {"English", "French", "da", "Dutch", "fi", "German", "Italian", "no", "pl", "pt_PT", "pt", "Spanish", "sv", "ru", "Japanese", "ko", "zh_CN", "zh_TW"}
set dest to "Build_menuResources:"
set shared to ".app:Contents:Resources:"
if testTextEdit then
set p2nib to (path to desktop folder as text) & "TextEdit" & shared
set n2nib to "Edit"
else
set p2nib to (path to desktop folder as text) & "Maintenance" & shared
set n2nib to "MainMenu"
end if
repeat with i from 1 to count of locales
set loc to (item i of locales) as text
set the_Nib to p2nib & loc & ".lproj:" & n2nib & ".nib:"
set the_Strings to dest & loc & ".strings"
tell application "System Events"
if exists disk item the_Strings then delete disk item the_Strings
set flag to exists disk item the_Nib
end tell
if flag then
set theStrings to (quoted form of (POSIX path of the_Strings))
set theNib to (quoted form of (POSIX path of the_Nib))
try
do shell script "nibtool -L " & theNib & " > " & theStrings
on error
tell application "System Events" to delete disk item the_Strings
end try
end if -- flag
end repeat
--[/SCRIPT]