Add ability to use a localization as alternative source language for translation
Categories
(Webtools Graveyard :: Pontoon, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: Pike, Assigned: abowler, 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.
Updated•7 years ago
|
Reporter | ||
Comment 2•7 years ago
|
||
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.
Updated•7 years ago
|
Updated•6 years ago
|
Comment 3•5 years ago
|
||
I have a few a couple of questions about this feature:
- 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?
- 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).
Comment 4•5 years ago
•
|
||
(In reply to Matjaz Horvat [:mathjazz] from comment #3)
I have a few a couple of questions about this feature:
- 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.
- 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.
Comment 5•5 years ago
|
||
(In reply to Matjaz Horvat [:mathjazz] from comment #3)
- 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.
- 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.
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Thanks for clarifying, :guerojeff and :flod!
We should:
-
Add a new field to the UserProfile model called "preferred_source_locale":
https://github.com/mozilla/pontoon/blob/bb0fbb4/pontoon/base/models.py#L336 -
Add a new user setting "Preferred source locale" to the /settings page: see the design attachment.
-
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.
Updated•5 years ago
|
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?
Comment 9•5 years ago
|
||
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.
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Description
•