Closed Bug 1380356 Opened 3 years ago Closed 3 months ago

Add ability to use a localization as alternative source language for translation

Categories

(Webtools :: Pontoon, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Pike, Assigned: abowler2, Mentored)

References

Details

(Whiteboard: outreachyround19, l10n-docs-needed)

Attachments

(2 files)

Some localization communities have a hard time to directly translate from English, and prefer to do their work based on an existing translation.

We had examples in the past that used Russian, but also French or Spanish are good examples.

It'd be nice to be able to do that on pontoon, too.

Caveat, as we're facing perf issues with getting translation entries already, getting them for both alternative source and target language is going to double that.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1328879
This is distinct from bug 1328879 in that that bug is about a projects for which all localizations are for something that's not en-US. This bug is about an intermediate localization to be used as source language for some localizations in a project only.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Priority: -- → P3
Status: REOPENED → NEW

I have a few a couple of questions about this feature:

  1. Am I right in assuming this should be a per-user setting (instead of per-team)? Note that we don't have a per-team settings page, so we'd need to design and implement that first. If we must have a per-team setting, can it be developed in a followup?
  2. Should the "Alternative source language" be a single locale or an ordered list of locales, similar to the one we use for the Locales tab (see Preferred locales to get suggestions from in the /settings page).

(In reply to Matjaz Horvat [:mathjazz] from comment #3)

I have a few a couple of questions about this feature:

  1. Am I right in assuming this should be a per-user setting (instead of per-team)? Note that we don't have a per-team settings page, so we'd need to design and implement that first. If we must have a per-team setting, can it be developed in a followup?

Yes, that sounds good.

  1. Should the "Alternative source language" be a single locale or an ordered list of locales, similar to the one we use for the Locales tab (see Preferred locales to get suggestions from in the /settings page).

I think having a list could complicate things and the current locales feature is sufficient for that purpose. A single locale is probably best.

(In reply to Matjaz Horvat [:mathjazz] from comment #3)

  1. Am I right in assuming this should be a per-user setting (instead of per-team)? Note that we don't have a per-team settings page, so we'd need to design and implement that first. If we must have a per-team setting, can it be developed in a followup?

Definitely per-user.

  1. Should the "Alternative source language" be a single locale or an ordered list of locales, similar to the one we use for the Locales tab (see Preferred locales to get suggestions from in the /settings page).

Good question. The issue is that we cannot guarantee the alternative locale will be fully translated. If it's not much work, maybe a short fallback list (2-3 languages) would be safer. If it complicates implementation too much, one locale would be OK.

Thanks for clarifying, :guerojeff and :flod!

We should:

  1. Add a new field to the UserProfile model called "preferred_source_locale":
    https://github.com/mozilla/pontoon/blob/bb0fbb4/pontoon/base/models.py#L336

  2. Add a new user setting "Preferred source locale" to the /settings page: see the design attachment.

  3. Instead of Entity, show Translation to the user's "preferred_source_locale" if it exists in the string list and in the source string panel.

Assignee: nobody → abowler2
Mentor: m
Status: NEW → ASSIGNED

Hey Matjaz ~

I wanted to touch base to make sure I'm on the right path on #1 before migrating the new "preferred_source_locale" field.

Since it will be a drop down selection similar to the Custom Homepage, I set it up similarly as: preferred_source_locale = models.CharField(max_length=10, blank=True, null=True)

Is this the correct?

abowler2: you can actually use models.ForeignKey(Locale) here. We can't do that for the Custom Homepage, because one of the values is "Default Homepage".

While you're at it, please also bump max_length to 20 for the custom_homepage, to sync it with the Locale.code max_length. You can use the same migration as for adding the preferred_source_locale field. We actually have locale codes on pontoon.mozilla.org that don't fit in 10 characters.

Blocks: 1600134
Status: ASSIGNED → RESOLVED
Closed: 3 years ago3 months ago
Resolution: --- → FIXED
Whiteboard: outreachyround19
Whiteboard: outreachyround19 → outreachyround19, l10n-docs-needed
Whiteboard: outreachyround19, l10n-docs-needed → outreachyround19
Whiteboard: outreachyround19 → outreachyround19, l10n-docs-needed
You need to log in before you can comment on or make changes to this bug.