Open Bug 1865919 Opened 2 years ago Updated 2 years ago

Organize different translation types using a sealed class

Categories

(Firefox for Android :: Translations, enhancement, P3)

All
Android
enhancement

Tracking

()

People

(Reporter: olivia, Unassigned)

Details

Adding a Translation class similar to this:

sealed class Translation(val isTranslated: Boolean, val isRestoreProcessing: Boolean) {
    class Automatic(isTranslated: Boolean, isRestoreProcessing: Boolean):Translation(isTranslated,
    isRestoreProcessing
)
    class User(isTranslated: Boolean, isRestoreProcessing: Boolean, val isTranslateProcessing: Boolean):Translation(isTranslated,
        isRestoreProcessing
    )
}

Could be useful for organizing the difference between a User requested translation and one that automatically occurs. Would require refactoring TranslationsStateReducer with logic to check for the scenarios.

If translation pair is not null on an engine translation state change, then a translation occurred.

Severity: -- → N/A
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.