Branching a translation

claudiu.cristea - October 19, 2009 - 13:38
Project:Localization server
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:claudiu.cristea
Status:needs review
Description

As in German language, in Romanian there are two forms of addressing. While in English you use "You", in German you can use "Sie" (formal) or "Du" (informal, colloquial) and in Romanian "Dumneavoastră" (formal) or "Tu" (informal, colloquial). See http://drupal.org/project/de-informal.

Many users of Romanian translation have asked for an informal/colloquial version. For example, on an official site (company, public institution, ONG) you may want to use the formal form of addressing while on youth targeted site you may want to use the informal/colloquial translation...

While in drupal.org translations this seems to be something quite simple to achieve by creating and maintaining a separate branch in CVS for the Romanian translation, this seems to be difficult on localize.drupal.org.

It seems to be impossible without creating a new language (ro-informal or ro-colloquial) while we cannot define something like branches in a language. Moreover, creating a new language raise other issues:

  • We need a single OG group handle both languages not two separate confusing groups.
  • Maybe more than 50% of source strings will be the same. Maintaining them separately will lead to a loss of effort and to redundancy.

Finally, the questions are:

  • Are there some similar cases?
  • What are the best practices in cases like this?
  • Can this be a start discussion for a new feature on Localization server while (I almost sure) that not only German and Romanian languages are facing this issue?

#1

Gábor Hojtsy - October 19, 2009 - 13:45
Title:Romanian informal/colloquial translation» Branching a translation
Project:Drupal.org webmasters» Localization server
Version:<none>» 6.x-1.x-dev
Component:Localize.drupal.org» Code

Retitled to be more generic. Also, moved to l10n_server.

This came up a few times, and is indeed a drawback of the localization server. Theoretically branching languages could be supported by having "translation overrides", and a "base language", so a team can translate in a base language picking formal or informal for example and then branching to a different version. We might also need to support more then 2 branches (more then 1 language inheriting from one common base language), if we consider smaller regional variants of languages, etc.

#2

claudiu.cristea - October 20, 2009 - 17:53
Assigned to:Anonymous» claudiu.cristea
Status:active» needs review

This is a first patch in this direction.

The patch only creates the infrastructure for branches in Localization server and doesn't provide any branched translation UI (in this moment).

Right now, it provides:

  • DB/UI for branches. Add/Edit/Delete branches
  • Importing .po files into specific branch
  • Exporting to .po files from a specific branch with base branch fall-back

Things not covered yet:

  • Branch informations in Overview pages - translate/languages/[langcode]
  • Adapt UI for viewing (only the base is viewed) - translate/languages/[langcode]/view
  • Adapt UI for editing (only base can be edited) - translate/languages/[langcode]/edit. This needs to be discussed together with #563128: Rework the translation UI
  • Branches in filters
  • Extracting from packages... I didn't even manage to think on this!

I need a precise advice regarding permissions: l10n_community.module, function l10n_community_branch_access()

AttachmentSize
l10n_server_branch-D6.patch 34.41 KB

#3

claudiu.cristea - October 20, 2009 - 19:14

Some small fixes...

AttachmentSize
l10n_server_branch-D6.patch 34.51 KB

#4

claudiu.cristea - October 21, 2009 - 06:10

Another fix in the patch existing features.

An imported translation must be marked as duplicate if:

  1. Match an existing translation from his branch
  2. OR

  3. Match an existing translation from Base branch (bid = 0)

We don't want to import translations in a specific branch that are already translated in the base branch.

AttachmentSize
l10n_server_branch1-D6.patch 35.66 KB
 
 

Drupal is a registered trademark of Dries Buytaert.