I will praise you with an upright heart as I learn your righteous laws. (NIV)
I will praise and give thanks to You with uprightness of heart when I learn [by sanctified experiences] Your righteous judgments [Your decisions against and punishments for particular lines of thought and conduct]. (AMP)
I will praise thee with uprightness of heart, when I shall have learned thy righteous judgments. (KJV)