TranslationsUpstreamImport

Dev Week -- Getting Translations Quicker into Launchpad: Upstream Imports Sharing -- David Planella -- Wed, Jul 13th, 2011

   1 [16:02] <dpm> hey everyone!
   2 [16:03] <dpm> welcome all to the 3rd day of Ubuntu Developer Week
   3 [16:03] <dpm> and welcome to this UDW talk about one of the coolest features of Launchpad Translations: upstream imports sharing
   4 [16:03] <dpm> My name is David Planella, and I work on the Community team at Canonical as the Ubuntu Translations Coordinator
   5 [16:04] <dpm> As part of my job, I get the pleasure of working with the awesome Ubuntu translation teams and with the equally awesome Launchpad developers
   6 [16:04] <dpm> I also use Launchpad for translating Ubuntu on a regular basis, as part of my volunteer contribution to the project,
   7 [16:04] <dpm> which is why I'm excited about this feature and I'd like to share it with you guys
   8 [16:05] <dpm> So, without further ado, let's roll!
   9 [16:05] <dpm> oh, btw, I've set aside some time for questions at the end, but feel free to ask anything during the talk.
  10 [16:05] <dpm> just remember to prepend your questions with QUESTION: and ask them on the #ubuntu-classroom-chat channel
  11 [16:06] <dpm> So...
  12 [16:06] <dpm>  
  13 [16:06] <dpm> What is message sharing
  14 [16:06] <dpm> -----------------------
  15 [16:06] <dpm>  
  16 [16:06] <dpm> Before we delve into details, let's start with some basics: what's all this about?
  17 [16:07] <dpm> In short, message sharing is a unique feature in Launchpad with which translations for identical messages are essentially linked into one single message
  18 [16:07] <dpm> This means that as a translator, you just need to translate that message once and your translations will appear automatically in all other places where that message appears.
  19 [16:08] <dpm> The only requirements are that those messages are contained within a template with the same name and are part of different series of a distribution or project in Launchpad.
  20 [16:08] <dpm> This may sound a bit abstract, so let's have a look at an example:
  21 [16:08] <dpm> Let's say you're translating Unity in Ubuntu Oneiric:
  22 [16:08] <dpm> https://translations.launchpad.net/ubuntu/oneiric/+source/unity/+pots/unity/
  23 [16:09] <dpm> (you translate it from that URL in Launchpad)
  24 [16:09] <dpm> And you translate the message "Quit" into your language
  25 [16:09] <dpm> Instantly your translation will propagate to the Unity translation in _Natty_ (and all other releases):
  26 [16:10] <dpm> So it will appear translated here:
  27 [16:10] <dpm> https://translations.launchpad.net/ubuntu/natty/+source/unity/+pots/unity/
  28 [16:10] <dpm> without you having had to actually translate it there
  29 [16:10] <dpm> So basically Launchpad is doing the work for you! :-)
  30 [16:11] <dpm> It also works when you want to do corrections:
  31 [16:12] <dpm> Let's say you are not happy with the translation of "Quit" in Unity, and you change it in the Natty series in Launchpad
  32 [16:12] <dpm> So you go to: https://translations.launchpad.net/ubuntu/natty/+source/unity/+pots/unity/
  33 [16:12] <dpm> and change it
  34 [16:13] <dpm> actually, I could point you to the actual message:
  35 [16:13] <dpm> https://translations.launchpad.net/ubuntu/natty/+source/unity/+pots/unity/ca/2/+translate
  36 [16:13] <dpm> anyway, so you fix the "Quit" translation
  37 [16:13] <dpm> perhaps there was a typo, perhaps you were not happy with the current translation, etc.
  38 [16:15] <dpm> That change will also be propagated to all other Ubuntu series, so that you don't have to manually fix each one of them
  39 [16:15] <dpm> Isn't that cool?
  40 [16:15] <dpm> And as you see, it works both ways: from older series to new ones, and viceversa. The order does not really matter at all.
  41 [16:15] <dpm> we've got a question:
  42 [16:15] <ClassBot> shnatsel|busy asked: If there was a change in terminology between the series, e.g. I translated "torrent" with one word, then the app changed (some strings changed, some strings added) and now I use a different word, is there a way to prevent the new terminology partly leaking to the older series and making a terrible mess there?
  43 [16:16] <dpm> that's a good point
  44 [16:16] <dpm> however, with the current implementation this will not happen
  45 [16:16] <dpm> message sharing works only with identical messages
  46 [16:17] <dpm> this means that if in the first series the original string was "torrent",
  47 [16:17] <dpm> and in the next series the original string was "torrent new",
  48 [16:18] <dpm> there won't be any message sharing at all, avoiding inadvertently translating strings you don't want to be translated automatically
  49 [16:19] <ClassBot> gpc asked: So, "torrent" and "torrent." are not the same string?
  50 [16:20] <dpm> that's correct, even with such a small change as this, they're not considered the same string
  51 [16:20] <dpm> they need to be identical
  52 [16:20] <dpm> so rather than a fuzzy match, message sharing works only on identical matches
  53 [16:21] <dpm> fuzzy matching would need further development in Launchpad
  54 [16:21] <dpm> If you're interested on how difficult it would be to implement it, or even in implement it yourself,
  55 [16:21] <dpm> I'd recommend asking on the #launchpad channel
  56 [16:21] <dpm> that's where the Launchpad developers hang out
  57 [16:22] <dpm> and they're always happy to help
  58 [16:22] <dpm> Anyway, let'w move on...
  59 [16:22] <dpm> So far we've only talked about distributions, and in particular Ubuntu. But this equally works within series of projects in Launchpad
  60 [16:22] <dpm> But more on that later on...
  61 [16:22] <dpm> You'll find out more about sharing here as well:
  62 [16:22] <dpm> http://blog.launchpad.net/translations/sharing-translations
  63 [16:22] <dpm> http://danilo.segan.org/blog/launchpad/automatic-translations-sharing
  64 [16:23] <dpm>  
  65 [16:23] <dpm> Benefits of messsage sharing
  66 [16:23] <dpm> ----------------------------
  67 [16:23] <dpm> Continuing with the basics: what good is this for?
  68 [16:24] <dpm> In terms of Launchpad itself, it makes it much more effective to store the data: rather than storing many translations for a same message, only one needs to be stored.
  69 [16:24] <dpm> But most importantly:
  70 [16:24] <dpm> For project maintainers: when they upload a template to a new release series and it gets imported, will instantly get all existing translations from previous releases shared with the new series and translators won’t have to re-do their work. They won’t have to worry about uploading correct versions of translated PO files, and can just care about POT files instead.
  71 [16:25] <dpm> For translators: they no longer have to worry about back-porting translation fixes to older releases anymore, and they can simply translate the latest release: translations will automatically propagate to older releases. Also, this works both ways, so if you are translating a current stable release, newer development release will get those updates too!
  72 [16:26] <dpm> Any other questions so far?
  73 [16:27] <dpm> Ok, let's continue then
  74 [16:27] <dpm>  
  75 [16:27] <dpm> What's new in message sharing
  76 [16:27] <dpm> -----------------------------
  77 [16:27] <dpm> Until recently, message sharing had only worked within the limits of a distribution or of a project.
  78 [16:28] <dpm> That is, messages could be shared amongst all the series in a distribution or amongst all series of a project.
  79 [16:28] <dpm> As cool as it already was, that was it: data could not flow across projects and distributions, and each one of these Launchpad entities behaved like isolated islands with regards to message sharing.
  80 [16:29] <dpm> But before going forward, let me recap quickly on some other basic concepts in Launchpad. When we're talking about message sharing, we're interested mostly in two types of Launchpad entities
  81 [16:30] <dpm> * Projects: these are standalone projects whose translations are exposed in Launchpad. If these projects are packaged in a distribution, we often refer to the actual project at a location such as https://launchpad.net/some-project as to the upstream project. An example is the Chromium project at https://translations.launchpad.net/chromium-browser/. Upstream projects can host their translations in Launchpad or externally. In the latter case, translat
  82 [16:30] <dpm> ions can still be imported into Launchpad, but more on that later on
  83 [16:31] <dpm> * Distributions: these are collections of source packages, each one of which is also exposed for translation. The most obvious example is Ubuntu. Here's an example of the Natty series of the Ubuntu distribution: https://translations.launchpad.net/ubuntu/natty
  84 [16:32] <dpm> So the news, and the main subject of this talk, is that from now on translations can be shared, given the right permissions, across projects and distributions.
  85 [16:32] <dpm> Again, let's take an example:
  86 [16:32] <dpm> • The Synaptic project is translatable in Launchpad: https://translations.launchpad.net/synaptic
  87 [16:33] <dpm> • At the same time, the Ubuntu distribution has got a Synaptic package which is translatable in Launchpad: https://translations.staging.launchpad.net/ubuntu/natty/+source/synaptic/
  88 [16:33] <dpm> • Now, given that the upstream maintainer has enabled sharing and has set the right permissions, now translators can translate Synaptic in Ubuntu and their translations will seamlessly flow into the upstream project!
  89 [16:33] <dpm> • This works again both ways: if one translates Synaptic in the upstream project, translations will appear in the Ubuntu distribution
  90 [16:34] <dpm> So no more backporting translations or exporting them and committing them back and forth.
  91 [16:35] <ClassBot> ashams asked: So why there is a separate set of Templates for each release of Ubuntu, i.e. (in Natty: https://translations.launchpad.net/ubuntu/natty/+source/unity/+pots/unity/) in Oneric: https://translations.launchpad.net/ubuntu/oneiric/+source/unity/+pots/unity/)
  92 [16:36] <dpm> This is due to the fact that for each series of Ubuntu you not only get new applications with new templates (or some go away), but also you get different messages in the templates
  93 [16:36] <dpm> This is how releases of projects work, it hasn't got anything to do with message sharing
  94 [16:37] <dpm> i.e. we need different sets of templates for each series, otherwise if we had one single set, it will overwrite the old ones on each release
  95 [16:38] <dpm> Anyway, combine the previous example with automatic translation imports and exports, and project maintainers get a fully automated translation workflow, which is really really awesome :-)
  96 [16:38] <dpm> More on automatic imports/exports:
  97 [16:38] <dpm> https://help.launchpad.net/Translations/YourProject/ImportingTranslations
  98 [16:38] <dpm> http://blog.launchpad.net/general/exporting-translations-to-a-bazaar-branch
  99 [16:39] <dpm> So far we've covered projects hosted in Launchpad - what happens with projects hosted externally?
 100 [16:39] <dpm> If translations of a given project are hosted externally, you won't get the benefit of full integration into Launchpad, but you'll still get some important advantages:
 101 [16:40] <dpm> • Translations will need to be imported from a mirror branch into a Launchpad upstream project
 102 [16:40] <dpm> • They will then be regularly imported to Launchpad Translations
 103 [16:40] <dpm> • From there, they will flow quickly, and on a regular basis, into the Ubuntu distribution
 104 [16:40] <dpm> • Up until here, the end result is the same as for upstream projects hosting translations in Launchpad
 105 [16:40] <dpm> • However, translations will only flow in the direction upstream -> Ubuntu, as we don't have a way to automatically send translations to the external project yet
 106 [16:41] <dpm> • The big benefit here is that translations will be imported reliably and quickly on a regular basis
 107 [16:42] <dpm> For an overview on message sharing across projects and distributions, check out this UDS presentation by Henning Eggers, one of the Launchpad developers who implemented this feature, and myself:
 108 [16:42] <dpm> http://ubuntuone.com/p/skw/
 109 [16:43] <dpm>  
 110 [16:43] <dpm> How to enable message sharing
 111 [16:43] <dpm> -----------------------------
 112 [16:43] <dpm> The cool thing to know is that within a project or a distribution message sharing is already enabled
 113 [16:44] <dpm> There are no steps that the project maintainers need to follow: every new series will automatically share messages with all the others
 114 [16:45] <dpm> However, if you want to share messages between an upstream project and a distribution (e.g. Ubuntu), there are a set of steps that need to be performed first:
 115 [16:45] <dpm> * Enable translations in the upstream project, setting the right permissions and translations group
 116 [16:46] <dpm> * If the project you want to enable sharing for is hosting translations externally, you'll need to request a bzr import, so that translations can get imported from an external branch
 117 [16:47] <dpm> * Finally, you'll need to link the upstream project to the corresponding source package in Launchpad
 118 [16:47] <dpm> Right now just a few projects and source packages are linked this way, but this cycle we're planning a community effort to enable sharing for all supported packages.
 119 [16:48] <dpm> I've prepared a table with an overview of the supported packages here:
 120 [16:48] <dpm> https://wiki.ubuntu.com/Translations/Projects/LaunchpadUpstreamImports
 121 [16:48] <dpm> And will soon announce how the community can help in enabling these for sharing.
 122 [16:48] <dpm> Stay tuned to the Ubuntu translators list for more info:
 123 [16:49] <dpm> https://wiki.ubuntu.com/Translations/Contact/#Mailing_lists
 124 [16:49] <dpm> Ok, I think that's all I had on content, so let's go for questions!
 125 [16:49] <dpm>  
 126 [16:49] <dpm> Q & A
 127 [16:49] <dpm> -----
 128 [16:50] <ClassBot> yurchor asked: Why does translation sharing behaves strange (diffs are really weird)? Ex.: https://translations.launchpad.net/ubuntu/natty/+source/avogadro/+pots/libavogadro/uk/+translate?show=new_suggestions
 129 [16:51] <dpm> I think that particular case is a project in which there was some data that needed migration (i.e. Ubuntu translations exported and uploaded in the upstream package) and that did not happen.
 130 [16:51] <dpm> I'd suggest pointing this out in the #launchpad channel, where the Launchpad devs can have a look at it in more detail
 131 [16:52] <ClassBot> yurchor asked: What if the project does not have repository with translations (like Fedora's libvirt, etc. on Transifex, translations are generated at package creation)? What will be imported from upstream?
 132 [16:53] <dpm> I'm not familiar with how translations are stored in Fedora's libvirt. The only layout that's supported for external repositories is PO files stored in an external version control system that can be imported as a bzr branch (e.g. git, mercurial, svn, etc)
 133 [16:54] <dpm> QUESTION: For example, I'm translating a BitTorrent client. I had a translation of the term "torrent" that I used in all strings that contain it. Then a new major release arrived that has some strings added, some strings removed and some strings (like "New torrent") intact. For the new version, I find a better translation of the term "torrent", and change it in all those strings in the newer series. But then the new translation of "New torrent", wit
 134 [16:54] <dpm> h the new term to describe "torrent" will leak to the older series, while some other strings in there still use the old term. How can I prevent it?
 135 [16:55] <dpm> oh, I understand what you mean now
 136 [16:56] <dpm> Unfortunately, there is no way to detect this in Launchpad, as there is no way to link the "New torrent" to the "torrent" messages
 137 [16:56] <dpm> In this particular case, one thing you can do is to export the translation as a PO file, and replace all the "New torrent" translations with the new term
 138 [16:57] <dpm> and then reupload in Launchpad
 139 [16:57] <dpm> One thing I forgot to mention, and it might be useful if you want to keep the old terminology in older series,
 140 [16:57] <dpm> is that you can explicitly choose individual messages to diverge
 141 [16:58] <dpm> so you can call "torrent" as "a" in a series and "b" in another series, bypassing message sharing
 142 [16:59] <dpm> Ok, I think there is not much time for more questions, so we can probably wrap it up here
 143 [16:59] <dpm> If you've got other questions, feel free to ask me on the #ubuntu-translators channel on Freenode
 144 [16:59] <dpm> So thank you everyone for listening and for participating with your questions
 145 [17:00] <dpm> I hope you enjoyed the talk and see you soon!

MeetingLogs/devweek1107/TranslationsUpstreamImport (last edited 2011-07-14 08:04:56 by dholbach)