Bonitas voluntatis ex intentione finis dependet quia bonitas voluntatis dependeat a bonitate voliti.
The goodness of the will depends on the intention of the end because the goodness of the will depends on the goodness of the thing willed.
Quando intentio est causa volendi, ordo ad finem accipitur ut quaedam ratio bonitatis in obiecto.
When the intention is the cause of [the act of] willing, the order to the end is considered as a certain formal aspect of the goodness of the object.
Intentio dupliciter se potest habere ad voluntatem: uno modo, ut praecedens; alio modo, ut concomitans.
The intention may stand in a twofold relation to the act of the will: first, as preceding it; secondly, as accompanying it.
Praecedit quidem causaliter intentio voluntatem, quando aliquid volumus propter intentionem alicuius finis. Et tunc ordo ad finem consideratur ut ratio quaedam bonitatis ipsius voliti: puta, cum aliquis vult ieiunare propter Deum; habet enim ieiunium rationem boni ex hoc ipso quod fit propter Deum.
The intention precedes the act of the will causally, when we will something because we intend a certain end. And then the order to the end is considered as a certain formal aspect of the goodness of the thing willed: for instance, when a man wills to fast for God's sake; because the act of fasting has the formal aspect of good from the very fact that it is done for God's sake.
Consequitur autem intentio voluntatem, quando accedit voluntati praeexistenti: puta si aliquis velit aliquid facere, et postea referat illud in Deum. Et tunc primae voluntatis bonitas non dependet ex intentione sequenti, nisi quatenus reiteratur actus voluntatis cum sequenti intentione.
On the other hand, intention accompanies the act of the will, when it is added to a preceding act of the will: for instance, a man may will to do something, and may afterwards refer it to God. And then the goodness of the previous act of the will does not depend on the subsequent intention, except insofar as that act of the will is repeated with the subsequent intention.
Voluntas non potest dici bona, si sit intentio mala causa volendi. Qui enim vult dare eleemosynam propter inanem gloriam consequendam, vult id quod de se est bonum, sub ratione mali; et ideo, prout est volitum ab ipso, est malum. Unde voluntas eius est mala. Sed si intentio sit consequens, tunc voluntas potuit esse bona; et per intentionem sequentem non depravatur ille actus voluntatis qui praecessit, sed actus voluntatis qui iteratur.
The [act of the] will cannot be said to be good, if an evil intention is the cause of [the act of] willing. For when a man wills to give an alms for the sake of vainglory, he wills that which is good in itself, under a formal aspect of evil; and therefore, as willed by him, it is evil. Wherefore his [act of] will is evil. If, however, the intention is subsequent to the [act of the] will, then the [act of the] will may be good; and the subsequent intention does not spoil that act of the will which preceded, but that act of the will which is repeated.
Sicut iam dictum est, "malum contingit ex singularibus defectibus, bonum vero ex tota et integra causa". Unde sive voluntas sit eius quod est secundum se malum, etiam sub ratione boni; sive sit boni sub ratione mali: semper voluntas erit mala. Sed ad hoc quod sit voluntas bona, requiritur quod sit boni sub ratione boni; idest quod velit bonum, et propter bonum.
As we have already stated (a6 ad 1), "evil results from each particular defect, but good from the whole and entire cause". Hence, whether the will tend to what is evil in itself, even under the formal aspect of good; or to the good under the formal aspect of evil: it will be evil in either case. But in order for the will to be good, it must tend to the good under the formal aspect of good; in other words, it must will the good, and for the sake of the good.