Closed Bug 1881814 Opened 1 year ago Closed 1 year ago

AC Global Preference Update Global Language Action

Categories

(Firefox for Android :: Translations, task, P1)

All
Android
task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: olivia, Assigned: olivia)

References

Details

(Whiteboard: [fxdroid][foundation][translations:127])

Attachments

(1 file)

This bug is to add an action for updating the language on the global language settings screen. Need to also ensure the page settings remain in sync.

Severity: -- → N/A
Depends on: 1862291
Priority: -- → P1
Whiteboard: [fxdroid][foundation]
Assignee: nobody → ohall
Whiteboard: [fxdroid][foundation] → [fxdroid][foundation][translations:127]

Looks like this was added already via bug 1877203! I'm going to improve the documentation around this area. It is easy to miss what APIs are implemented and not implemented. I'll update this bug with better documentation shortly.

Edit: Realize I just saw updateLanguageSetting which is the path for the page settings, not global settings. So, this bug is still valid, but more just adding the action, and less connecting the API.

Confirming the following Global APIS:

Never Translate This Site:

  • Fetch via TranslationsAction.OperationRequestedAction, operation = TranslationOperation.FETCH_NEVER_TRANSLATE_SITES aka requestNeverTranslateSites
    • Sets as TranslationsBrowserState.neverTranslateSites
  • Update via TranslationsAction.RemoveNeverTranslateSiteAction aka removeNeverTranslateSite

Language Settings:

  • Fetch TranslationsAction.OperationRequestedAction, operation = TranslationOperation.FETCH_AUTOMATIC_LANGUAGE_SETTINGS via aka requestLanguageSettings
    • Sets as TranslationsBrowserState.languageSettings
  • Update via NEED TO ADD HERE aka updateLanguageSetting

This patch adds the option to update the user's language settings from a global perspective.

  • Adds TranslationsAction.UpdateLanguageSettingsAction to update the language setting.
    • TranslationsStateReducer proactively accepts updates and is set on the translations engine
      or else the state is rolled back in TranslationsMiddleware.
  • Refactors updateLanguageSetting in TranslationsMiddleware to handle both the page setting and global setting perspective.
Blocks: 1876819
Pushed by ohall@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b6148d2775f Translations AC Action to Update Language Preferences r=android-reviewers,giorga
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: