Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fedora - Tracking Translations with Transtats

#1
Tracking Translations with Transtats

<div style="margin: 5px 5% 10px 5%;"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats.png" width="1024" height="450" title="" alt="" /></div><div><p class="has-text-align-justify">Translation is an important step in software localization which helps make software more popular globally, and impacts international user experience. In recent years, localization processes have been evolving worldwide to become more continuous, faster, efficient with automation. In Fedora, the development of the <a href="http://zanata.org/">Zanata</a> platform and its plugins, then <a href="http://transtats.org/">Transtats</a>, and now the migration to the <a href="https://weblate.org/en/">Weblate</a> platform are part of this common ongoing goal. The localization of a desktop OS like Fedora is highly complex because it depends on many factors of the individual upstream projects which are packaged in Fedora. For example, different translation timelines, resources, and tooling.</p>
<h2>What is Transtats?</h2>
<p class="has-text-align-justify">Transtats is a web application which tries to tie up upstream repositories, translation platforms, build system, and product release schedule together to solve problems of mismatch, out-of-sync conditions and to assist the timely packaging of quality translations. Actually, it collects translation data, analyzes them, and creates meaningful representations.</p>
<p>Fedora Transtats is hosted at <a href="https://transtats.fedoraproject.org/">https://transtats.fedoraproject.org/</a></p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats.png" alt="" class="wp-image-29876" /></figure>
<h2>How to see the translation status of my package?</h2>
<p class="has-text-align-justify">Just select <strong>Packages</strong> tab from left hand side navigation bar. This takes us to the packages list view. Then, search for the package and click on its name.</p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-1.png" alt="" class="wp-image-29877" /></figure>
<p class="has-text-align-justify">For example <em>anaconda</em>. On package details page, locate following:</p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-2.png" alt="" class="wp-image-29879" /></figure>
<p class="has-text-align-justify">Here, we have translation statistics from translation platform: <a href="https://fedora.zanata.org/project/view/anaconda">Zanata</a> and <a href="https://koji.fedoraproject.org/koji">Koji</a> build system. Syncs with the platform and build system are scheduled, which update differences periodically. Languages in red color indicate that there are translated strings remaining in the Translation Platform to be pulled and packaged, whereas, blue denote translated messages could not make 100% in the built package.</p>
<h2>String breakage (or changes?)</h2>
<p class="has-text-align-justify">In translation of software packages, one of the challenges is to prevent string breakage. Package maintainers should strive to abide by the scheduled Fedora release String Freeze. However, in some circumstances it could be necessary to break the string freeze and to inform the translation team on the mailing list. As well as, to update latest translation template (POT) file in the translation platform. Just in case these actions seem missing – translators may get new strings to translate very late or the application may have some strings untranslated. In the worst case, an outdated translation string mismatch may result in a crash. Sync and automation pipelines are there to prevent this, nevertheless it depends on the push or pull methods followed by package developers or maintainers. </p>
<p class="has-text-align-justify">To deal with the same context, we can use a job template in Transtats to detect this string change – particularly useful after string freeze in Fedora release schedule. This would be really helpful for the folks who look for packaging translations without string breakage, keeping translation template (POT) file in sync with translation platform, and testing localized form of the application for translation completeness to back trace.</p>
<h2>How to detect string changes?</h2>
<p class="has-text-align-justify">One of the options in <strong>Jobs</strong> tab is ‘YML based Jobs’. Where we can see available job templates.</p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-3.png" alt="" class="wp-image-29881" /></figure>
<p class="has-text-align-justify">The jobs framework executes all the tasks mentioned in the YAML, create appropriate logs and store results. Track String Change job basically:</p>
<ol>
<li>Clones the source repository of respective package.</li>
<li>Tries to generate translation template (POT) file.</li>
<li>Downloads POT file from respective translation platform.</li>
<li>And, finds differences between both the POT files.</li>
</ol>
<p><em>Actually, Transtats maintains mapping of upstream repository, Translation Platform project and respective build tag for every package.</em></p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-4.png" alt="" class="wp-image-29882" /></figure>
<p class="has-text-align-justify">Let’s take a closer look into this YAML. We can provide value for %PACKAGE_NAME% and %RELEASE_SLUG% in the next step – <strong>Set Values</strong>! For example: <em>anaconda</em> and <em>fedora-32</em>. Furthermore, a couple of things seek attention are:</p>
<ul>
<li>In case the upstream software repository maintains separate git branch for fedora release, please edit ‘branch: master’ to ‘branch: &lt;fedora-release-branch&gt;’</li>
<li>In ‘generate’ block, mention the command to generate POT file. Default one should work for ‘intltool-update’ only, however, many packages do have their own.</li>
<li>A few packages may have gettext domain name different than that of package name. If this is the case, mention the gettext domain too.</li>
</ul>
<p class="has-text-align-justify">As soon as the job is triggered, logs should be populated. If this is not a <em>scratch</em> run, a unique URL shall also be created at the end.</p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-5.png" alt="" class="wp-image-29883" /></figure>
<p class="has-text-align-justify">Left hand side is the input YAML and right hand side is respective log for each task. Here we can find the differences and figure out string mismatch.</p>
<figure class="wp-block-image size-large"><img src="https://www.sickgaming.net/blog/wp-content/uploads/2020/01/tracking-translations-with-transtats-6.png" alt="" class="wp-image-29884" /></figure>
<p class="has-text-align-justify">In <a href="https://github.com/transtats/transtats">Transtats</a>, we can create solutions to different problems in the form of job templates. And, scheduling of these jobs could be a step towards automation.</p>
</div>


https://www.sickgaming.net/blog/2020/01/...transtats/
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB Theme © iAndrew 2016