The Babcock shipyard in Rosyth is finalising a deal to build up to four Type 31 frigates for the Danish navy.