The Princess Royal will commemorate the sacrifices of black South Africans and other races who played a vital First World War role during her final day in Cape Town.