After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692208 - Split translated videos into per-locale packages
Split translated videos into per-locale packages
Status: RESOLVED OBSOLETE
Product: gnome-getting-started
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: git master
Assigned To: gnome-getting-started-maint
gnome-getting-started-maint
Depends on:
Blocks: 695792
 
 
Reported: 2013-01-21 16:29 UTC by Petr Kovar
Modified: 2018-03-28 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
index.page patch adding the install button (1.53 KB, patch)
2013-02-13 18:18 UTC, Petr Kovar
none Details | Review

Description Petr Kovar 2013-01-21 16:29:35 UTC
Split translated videos into per-locale packages to decrease the overall package size, which is huge due to video files.

More in Shaun's mail: 

https://mail.gnome.org/archives/gnome-i18n/2013-January/msg00024.html

One way we could address this is with language packs of videos.
We'd package the translated pages, subtitles and all, in the
main package, but split the translated videos into per-locale
packages.

I just added support for the Mallard Conditionals lang test
token[1] to Yelp, which means we could have something like
this on the index page:

<if:if test="!lang:C action:install"
       xmlns:if="http://projectmallard.org/if/1.0/";>
  <p>You can watch these videos in your language if you install a
  language pack.</p>
  <p><link action="install:getting-started-cz" style="button">Make
  it so.</link></p>
</if:if>

This would only show up in translated versions (more precisely,
copies without an xml:lang attribute). Unfortunately, we don't
yet have a way to hide it after the package is installed.


[1] http://projectmallard.org/if/1.0/tokens.html#lang
Comment 1 Shaun McCance 2013-02-13 16:27:09 UTC
Petr asked on IRC about using the right locale in the install link. The default ITS rules for Mallard will put the whole <link> element, attribute and all, into the PO file. So translators can translate it. But translators usually avoid translating the markup bits, I think. So here's a trick to separate the install action and the link text to make translators' lives easier.

Add these to the <page> element:
  xmlns:mal="http://projectmallard.org/1.0/"
  xmlns:its="http://www.w3.org/2005/11/its"

Add this to the <info> element:
  <its:rules>
    <its:translateRule selector="//mal:link/@action" translate="yes"/>
    <its:locNoteRule selector="//mal:link/@action">
      <its:locNote>Translate this to install:getting-started-LL, replacing LL                                           
      with your locale, only if there is a video translation pack for your                                              
      locale.</its:locNote>
    </its:locNoteRule>
  </its:rules>

Change the <p> with the link to this:
  <p><link action="install:getting-started-cz" style="button" its:translate="no">
  <span its:translate="yes">Make it so.</span></link></p>

Now the PO file generated by itstool should have this:

#. (itstool) path: p/link@action
#. (itstool) comment: p/link@action
#. Translate this to install:getting-started-LL, replacing LL with your
#. locale, only if there is a video translation pack for your locale.
#: index.page:31
msgid "install:getting-started-cz"
msgstr ""

#. (itstool) path: link/span
#: index.page:32
msgid "Make it so."
msgstr ""

There would still be an issue with any localizations for which we don't have a video language pack, which I imagine will happen a lot. Probably the best way to deal with that is to manage the conditional on the if:if. So instead of just this:
  <if:if test="!langC action:install">

We do this:
  <if:if test="lang:cz action:install, lang:de action:install, ...">

And we add to the list as language packs are verified to exist. But if the language packs are just a distro thing, and not an upstream GNOME thing, this could get really tricky.
Comment 2 Petr Kovar 2013-02-13 18:18:44 UTC
Created attachment 235938 [details] [review]
index.page patch adding the install button

Attaching a patch that adds the install button, per Shaun's comment.

Updated RPMs for Fedora rawhide are available at:

http://pmkovar.fedorapeople.org/

Result: seems to work as expected when viewing the page via yelp's All Documents with the cs locale.

Doesn't seem to work for me when opening the page via terminal.
Comment 3 Petr Kovar 2013-02-17 21:31:13 UTC
shaunm recently blogged about this on Planet:

http://blogs.gnome.org/shaunm/2013/02/14/mallard-and-video-language-packs/
Comment 4 Petr Kovar 2013-03-26 16:56:14 UTC
A koji build for F19 with subpackages is here: 

http://koji.fedoraproject.org/koji/buildinfo?buildID=406220
Comment 5 GNOME Infrastructure Team 2018-03-28 13:15:43 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-getting-started-docs/issues/1.