Some more fixes for translation

rebased PR #741 to resolve a conflict and to add another change, both due to d162a9e.