title: How do you handle extra strings lines added by translators?
body: <p>I recently started getting translations into 5 languages for an app I'm working on. When I got the translated strings back, there were a bunch of extra lines added around any tags like <code>&lt;b&gt;</code> or <code>xliff:g</code>. In cases where the text before/after the tag was not a space (e.g. it was punctuation), the extra line causes Android to show an extra space. For example, consider the following string in English:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;string name=&quot;welcome_title&quot;&gt;Welcome to &lt;xliff:g id=&quot;app_name&quot;&gt;App Name&lt;/xliff:g&gt;!&lt;/string&gt;
  </code></pre>
  <p>Pretty simple, right? When a <code>TextView</code> displays this in English, it obviously shows the desired result:</p>
  <blockquote>
  <p>Welcome to App Name!</p>
  </blockquote>
  <p>However, two separate translators (through the Play Store translation service) have now given me back translations that look like the following, e.g. in Spanish:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;string name=&quot;welcome_title&quot;&gt;
    Bienvenido a
    &lt;xliff:g id=&quot;app_name&quot;&gt;App Name&lt;/xliff:g&gt;
    !
  &lt;/string&gt;
  </code></pre>
  <p>which causes a <code>TextView</code> displaying this text to show an extra space between &quot;App Name&quot; and the exclamation point:</p>
  <blockquote>
  <p>Bienvenido a App Name !</p>
  </blockquote>
  <p>Practically, this means I have to manually inspect/edit <em>all</em> of the thousands of lines of translations done for me to make sure there aren't extra spaces. Not only is it extremely annoying, but in cases like Arabic, I have no clue how correct any spacing is and it's really hard to know I'm editing correctly.</p>
  <p>Has anyone come up with a way to prevent this from happening or clean it up quickly when it does happen? I couldn't find anything on this, but it's early and maybe I haven't had enough coffee! I can't be the only one who's had to deal with this.</p>