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?

Comments

gábor hojtsy’s picture

Title: Romanian informal/colloquial translation » Branching a translation
Project: Drupal.org site moderators » Localization server
Version: » 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.

claudiu.cristea’s picture

Assigned: Unassigned » claudiu.cristea
Status: Active » Needs review
StatusFileSize
new34.41 KB

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()

claudiu.cristea’s picture

StatusFileSize
new34.51 KB

Some small fixes...

claudiu.cristea’s picture

StatusFileSize
new35.66 KB

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.

gábor hojtsy’s picture

As you have probably noticed, user permissions import/export issues and the new UI patch got/gets higher priority over this one, since those are to the benefit of all language groups even without any need for branching translations. So unfortunately it looks unlikely that I can take a deeper look at this soon.

claudiu.cristea’s picture

I understand this. Anyway I cannot go forward with this feature till the new UI will not be in place. The patch does not cover the UI interaction... It's only about the DB infrastructure, managing (add/edit/delete)... mostly back-end.

xano’s picture

Title: Branching a translation » Translation inheritance

Renaming the issue, because branching is something different than inheritance.

Gábor pointed me here after a small discussion on IRC. My 2 cents:

  1. We do not only have to be able to deal with 'dialects' (British English versus American English or Flemish versus Dutch) and formal or informal translations, but also with distributions. Open Atrium may need different translations, because their contexts differ from those in Drupal. This way we have translation packages that are named openatrium-en-gb or nl-flemish-informal, for instance.
  2. If we want managing translations to be easy and good from inside a Drupal installation we need a fixed, but flexible format for translation names, so code can automatically define the language to look for translations for. Take openatrium-nl-flemish for instance. openatrium is the distro, nl the language, flemish the 'dialect'. If a user installs another module, the code can look for a openatrium-nl-flemish translation, but fall back to openatrium-nl if it cannot find openatrium-nl-flemish. The format needs to be flexible for additions, like -informal.
  3. Importing translations to branches will become more difficult. A British English translation contains 80 strings that are fit for all English languages and 20 that contain British English, so you don't want to add all strings to "en-gb", because that will make maintenance a lot more difficult. We need a solution for this. This will probably only apply to contrib modules, which usually contain a lot less strings than core, so we may tailor a solution to dozens or hundreds of strings rather than thousands.
eiland’s picture

Same issue goes for ex-Yugoslavia languages, where Croatian, Serbian (latinics), Montenegrin, Bosnian and Serbocroatian are very common, but due to obvious reasons have some differences which are often important to the natives. There being a well developed Croatian package would give a huge head-start for those who who want to get going with the other families.

In my humble opinion, already 5 different names and language codes for one language package would already be an improvement.

I for one once downloaded Croatian and replaced all hr (hrvatski, Croatian) into sh (Srpskohrvatski, Serbocroatian), but of course that won't do.

So just to give some more thumbs-up for this thread!

ñull’s picture

Priority: Normal » Critical

Same is valid for Latin American Spanish and Castillian Spanish (Spoken in Spain). Beside a clear vocabulary difference, most Latin Americans address each other with Usted / Ustedes while in Spain the Tu / Vosotros is used. I don't see anywhere the possibility to choose the Local dialect of Spanish, but I do see a lot of Latin Americanisms in the "es" translation, making it utterly formal and therefore almost useless i.m.h.o. Lifting therefore the priority.

geek-merlin’s picture

What is the state of this for D7/D8, anyone knows?

claudiu.cristea’s picture

Priority: Critical » Major

I can port the patch to D7/8 but I need help with UI. That needs a to be designed as UI/UX first. We need mockups that explain how this feature is supposed to work in UI. The existing D6 patch only creates the infrastructure (backend) for language branches.

zirvap’s picture

StatusFileSize
new76.85 KB

Attached are a couple of rough drafts of how a UI could look like. I think I prefer the three column version, but it might demand a wide monitor to be OK.

If a translator has permissions to translate both parent and child language, I think it would be best if he or she can translate both from the same page: When you're adapting for a variant, you might see strings to add or improve for the parent language as well. Would this be easy or hard to implement?

(Edited to change "she" to "he and she", to avoid confusion, after email question.)

eiland’s picture

Hi, have you also considered the scenario where the child language is in fact more developed than the parent, for example Croatian (as a well developed child) for parent Serbocroatian (which would also be the parent for Bosnian, Serbian (Latinic) Montenegrin and I'm sure I'm forgetting one)...

zirvap’s picture

sammuell’s picture

I was looking for informal German translations and ended up here. This feature would be a great addition! Let's get this discussion started again!

So what is still missing here? As far as I can tell the proposed backend changes are loosely reviewed and agreed upon.

Backend

  • Port existing code to 7.x (or is the 7.x skipped entirely?)
  • Test coverage

Frontend

  • Adapt UI for editing
  • Branch informations in Overview pages - translate/languages/[langcode]
  • Adapt UI for viewing (only the base is viewed) - translate/languages/[langcode]/view
  • Branches in filters
  • Extracting from packages
  • Test coverage

Personally I would go for the 3 column layout as proposed, although there is currently not enough space as the website layout is fixed-width.

I would also try to have incremential updates and not try to integrate everything in one release, as this will take ages. E.g. comment #13 or fineer-grained permissions can be addressed once the main feature is functional.

claudiu.cristea’s picture

Title: Backend for language derivatives » Translation inheritance

@sammuell,

I can help with moving the patch to 7.x but keep in mind that this is fixing only the backend issue. IMO next steps need to be accomplished:

  1. Clarifying the name convention for branches and review all other @Xano's comments from #7. Make decisions.
  2. Port the patch from #4 (with respect to previous point decisions).
  3. Open a [meta] issue to group all tasks together (added #2077767: [meta] Language derivatives). Having, at least, next issues as children:
claudiu.cristea’s picture

Title: Translation inheritance » Backend for language derivatives
Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Needs review » Needs work
claudiu.cristea’s picture

Created the meta issue: #2077767: [meta] Language derivatives.

frederickjh’s picture

@claudiu.cristea

Hi! I am wanting to work on translation inheritance to try and move this forward. Since you say the patch from D6 implements inheritance in the backend I am guessing you have some idea how the backend works.

Where is the inheritance happening is this on localize.drupal.org or is this on the drupal site where it is installed?

Or to put it another way, if a site wants to use a language derivative will they need to download the original language and the derivative?
Or will the derivative language be packaged in such a way that translations from the derivative plus translations from the original language are all in one package or will be downloaded automatically?

The reason I ask this is, some where for each derivative language there will need to be a configuration for inheritance. Will this be done on localize.drupal.org or will this be done on the site where drupal and the derivative translation is installed?

I picture this configuration for inheritance to look and function similar to the current multi language configuration in Drupal.

Thanks in advance for your insight into the backend for inheritance!

God Bless!
Frederick

gábor hojtsy’s picture

Drupal 7 already has https://www.drupal.org/project/language_fallback and https://www.drupal.org/project/language_hierarchy and Drupal 8 has the backend features of language_fallback built in without a configurable frontend. So that could reproduce a configured language fallback system. I can see a way for localize.drupal.org and Drupal to replicate the same fallback configuration so they only need to share the different translation strings not copies.

geek-merlin’s picture

#20: +1 for this and keep translatios DRY.
So i don't see any hurdle for starting de-informal #608488: Translation inheritance.
Memo to mee: talk this over with some people.

mpp’s picture

Note that this also goes for Dutch (u, je). The Dutch styleguide team suggests using the formal form so we need a way to allow the informal form (nl-x-informal?).

Also note that the German team decided to try to avoid the issue by skipping Du/Sie in translations. source: Nico Grienauer on Slack:

Nico Grienauer @grienauer
decision was do hae no du/sie and write texts without it.
if you want it, you have to translate the strings you want e.g. via UI. there is no du/Sie for D8!

What work still needs to be done to support nl-x-informal on ldo?