Fix translation setup for api-site

After a recent change to api-site, the translation scripts tried to
translate the www directory which is wrong.

This patch  unifies the translation setup of both propose and upstream
jobs into the common library and enhances the initial setup so that it
skips non-directories (like pom.xml) and special directories like www
and tools.

Change-Id: I9402d75ca9c8df67c62c56bbad582cb1166824c6
Merge "Fix translation setup for api-site"