issue #23549: automatically include translations in build

small unrelated refactor