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)
Updated•8 years ago
|
| Reporter | ||
Comment 2•8 years ago
|
||
Updated•8 years ago
|
Updated•7 years ago
|
Comment 3•6 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•6 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•6 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•6 years ago
|
||
Comment 7•6 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•6 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•6 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•6 years ago
|
||
Comment 11•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•4 years ago
|
Description
•