Closed Bug 1903092 Opened 5 months ago Closed 5 months ago

Translations from LTR to RTL languages and vice-versa are not working / Persian si not supported in Beta128

Categories

(Firefox :: Translations, defect, P3)

Firefox 128
Desktop
All
defect

Tracking

()

VERIFIED FIXED
Tracking Status
firefox128 --- verified
firefox129 --- verified

People

(Reporter: danibodea, Unassigned)

References

Details

Attachments

(1 file)

Note

  • When the user attempts to translate a selection from a Persian language article to english (or vice versa), the translation is not provided. It would seem that the Persian language is not supported in Beta channel.

Found in

  • Beta v128.0b3

Affected versions

  • Beta v128.0b3
  • Beta v127.0b9
  • Release v127.0

Tested platforms

  • Affected platforms: All
  • Unaffected platforms: None

Steps to reproduce

  1. Launch the browser and set the language to Persian (Arabic).
  2. Make sure the feature is enabled:
    browser.translations.select.enable = true
  3. Load an article that is displayed in a supported language (English):
    https://en.wikipedia.org/wiki/Main_Page
  4. Select a piece of text, open the context menu and select the Translate option.
  5. Observe the Select Translations panel.

Expected result

  • The translation is provided (from English to Persian);
  • All interactive elements are enabled and properly displayed.

Actual result

  • The panel is displayed, but instead of a translation, the following text is observed:
    ".Translated text will appear here"
  • Translate full page and Copy buttons are disabled.
  • Telemetry: onOpen event is displayed, but onTranslate event is NOT displayed.
  • It would seem that the Persion language is not supported even though it should be.

Regression range

  • It does not appear to be a regression since it also reproduces in Beta v127.0b9. This is the first Beta testing run.

Additional notes

  • When the user launches an English locale build and attempts to translate a selection from a persian article, the unsupported language error is displayed in the panel.
  • It would appear that the Persian language is only supported in the Nightly channel (not supported in Beta and Release channels)
Blocks: 1870363
Severity: -- → S3
Has STR: --- → yes
OS: Unspecified → All
Hardware: Unspecified → Desktop

This will be fixed once Bug 1902711 is uplifted into beta (it's already been requested).

The correct expected behavior should be the following:

Expected Result

  • Translation to Persian is not offered.

This should be verifiable in Nightly already, and verifiable in beta once it is uplifted.

I will wait until it is uplifted/verified to close this bug.

See Also: → 1902711

Yes, I looked into this, and verified that the fix from Bug 1902711 will fix this issue once it is uplifted.

It is a little difficult to verify (right now) because Persian is offered in Nightly, but is not offered in Beta.

However, if you paste the change from Bug 1902711 into the Persian Beta Firefox browser console, you can verify that it is fixed:

TranslationsParent.getTopPreferredSupportedToLang = async () {
  for (const langTag of TranslationsParent.getPreferredLanguages()) {
    if (await TranslationsParent.isSupportedAsToLang(langTag)) {
    return langTag;
    }
  }
  return PIVOT_LANGUAGE;
};

And we will be able to further verify without the browser-console hack once it is fully uplifted.

Priority: -- → P3
Flags: qe-verify+

This should be fixed by Bug 1902711 and is ready for verification in Nightly as well as 128.0b5 and higher.

I am not certain I understand the expected behavior in the Beta channel.
The current behavior in Beta v128.0b5 is as follows:

A. When using a Persian language (FA) build:

  1. Load an English language article;
  2. Attempt to translate an English phrase to Persian;
    Actual: It translates to English, as if Persion is not supported as target language in the Beta channel.

B. When using an English language build:

  1. Load a Persian language article;
  2. Attempt to translate a Persian language phrase into English;
    Actual: The language unsupported warning is displayed.

The Firefox Translations Models page shows that Persian language is only released in Local Build or Nightly channel and it should not be offered as a target language or as a source language in Beta channel.

Unlike Finnish (where it is accepted as an origin language, but not as a target language in all channels), in the case of Persian, it is neither accepted as an origin language, nor as a target language in beta/release channels, so I assume that the behavior is correct. Erik, Please confirm that this is the intended behavior. Thank you!

Flags: needinfo?(enordin)

The expected behavior is that Persian should not be available in the Beta channel, as you mentioned it is only available in the Nightly or Local Builds.

This matches the behavior that I see in my 158.0b5 build (see attached video).

When I attempt to translate an English page, e.g. https://en.wikipedia.org, it appears to translate form English (انگلیسی) to English (انگلیسی) as expected for the target-language fallback.

And I do not see Persian (فارسی) listed in either the from-language list, or the to-language list, as expected.

Are you seeing something different than shown in the video?

Flags: needinfo?(enordin) → needinfo?(dbodea)

No, the same behavior can be observed across all operating systems. It was verified in Beta v128.0b5 on Windows 10, MacOS11 and Ubuntu22. Thank you for the validation, I just needed to make sure that it behaves correctly. This bug can be closed. Please set the status to Rezolved-Fixed so we can close as Verified.

Flags: needinfo?(dbodea) → needinfo?(enordin)

Thank you for double checking and clarifying!

Status: NEW → RESOLVED
Closed: 5 months ago
Flags: needinfo?(enordin)
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: