The Republican Party has formally nominated Donald Trump for president at its convention.