This patch adds two new Actions:
* `OperationRequestedAction` - for requesting to fetch data
* `SetSettingsAction` - for setting that data on the browser store
`TranslationsMiddleware` reacts to these Actions by fetching and setting
the appropriate data.
The patch to update data will be bug 1877203.
This patch corrects an issue where `isTranslateProcessing` and
`isRestoreProcessing` states were not updating due to not sending along
pre-process actions in `EngineDelegateMiddleware`.
This patch adds the additional state information of `supportedLanguages` and `translationError` to `TranslationsState`. The `supportedLanguages` are the languages the translation engine supports for translating for use in UI dropdowns. `translationError` is any error that occurred relating to translating.
`supportedLanguages` is currently set via an action that indicates the intention to translate on the new `EngineMiddleware` addition of `TranslationsMiddleware`. This patch also adds a new `TranslationOperation` of `FETCH_TO_AND_FROM_LANGUAGES` to indicate the process of getting `supportedLanguages`.
`translationError` is added to the `TranslationsState` to store errors as they arise. `TranslateExceptionAction` is also refactored from using the generic `Throwable` to the new `TranslationError` to accommodate `supportedLanguages` and better general error handling.O_AND_FROM_LANGUAGES` to indicate the process of getting `supportedLanguages`.
This bug adds a few options for translations preferences on the engine,
including:
* (Runtime Setting) Option to get/set translations offer popup
* (Runtime Request) Option to get/set translation language preference
* (Session Request) Option to get/set a site's translation preference
This bug adds a translation session delegate for receiving information
from GeckoView on the state of the toolkit translation engine and also
when to expect and offer translations on a given page.
It also updates reference browser to use auto-detected defaults for
translating.
This patch adds engine support for translate and restoring the page after
a translation. `requestTranslate` and `requestTranslationRestore` are
the Gecko engine session functions.
This corresponding actions for these functions are `TranslateAction`,
and `TranslateRestoreAction`. The success and failure correspond to the
actions `TranslateSuccessAction` and `TranslateExceptionAction`.
Sample usage is provided on reference browser. The sample is currently
hardcoded to support Spanish to English page translations until the next
API is introduced.
This commit adds:
* An `AwesomeBarState` class to hold the currently visible suggestions
and last clicked suggestion.
* `VisibilityStateUpdated` and `SuggestionClicked` `AwesomeBarAction`s
to update the state, and an `EngagementFinished` action to reset the
state. Consumers will dispatch these actions on the `BrowserStore`
in response to user interactions with the awesomebar and toolbar.
* A `metadata` map to `AwesomeBar.Suggestion`, allowing providers to
attach opaque data to each suggestion.
* Adds `checkForPdfViewer` to determine if page is a PDF Viewer page or not
* Adjusts save_to_pdf_failure to have extras of pdf, non-pdf, or unknown
* Adjusts save_to_pdf_failure to have extras of failure reason
* Adjusts save_to_pdf_tapped to have extras of pdf, non-pdf, or unknown
* Adds save_to_pdf_completed with extras of pdf, non-pdf, or unknown