зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1823965 - Update success strings for HISTORY and FORMDATA resource imports in the new migration wizard. r=niklas,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D173319
This commit is contained in:
Родитель
3220100958
Коммит
d4fd8ed785
|
@ -291,11 +291,10 @@ export class MigrationWizardParent extends JSWindowActorParent {
|
|||
);
|
||||
}
|
||||
case lazy.MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.HISTORY: {
|
||||
let quantity = MigrationUtils.getImportedCount("history");
|
||||
return lazy.gFluentStrings.formatValue(
|
||||
"migration-wizard-progress-success-history",
|
||||
{
|
||||
quantity,
|
||||
maxAgeInDays: MigrationUtils.HISTORY_MAX_AGE_IN_DAYS,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -308,6 +307,11 @@ export class MigrationWizardParent extends JSWindowActorParent {
|
|||
}
|
||||
);
|
||||
}
|
||||
case lazy.MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.FORMDATA: {
|
||||
return lazy.gFluentStrings.formatValue(
|
||||
"migration-wizard-progress-success-formdata"
|
||||
);
|
||||
}
|
||||
default: {
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ const RESOURCE_TYPES_WITH_QUANTITIES = [
|
|||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.BOOKMARKS,
|
||||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.HISTORY,
|
||||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.PASSWORDS,
|
||||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.FORMDATA,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -209,11 +210,36 @@ function assertQuantitiesShown(wizard, expectedResourceTypes) {
|
|||
progressGroup.dataset.resourceType
|
||||
)
|
||||
) {
|
||||
Assert.notEqual(
|
||||
successText.indexOf(EXPECTED_QUANTITY),
|
||||
-1,
|
||||
`Found expected quantity in success string: ${successText}`
|
||||
);
|
||||
if (
|
||||
progressGroup.dataset.resourceType ==
|
||||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.HISTORY
|
||||
) {
|
||||
// HISTORY is a special case that doesn't show the number of imported
|
||||
// history entries, but instead shows the maximum number of days of history
|
||||
// that might have been imported.
|
||||
Assert.notEqual(
|
||||
successText.indexOf(MigrationUtils.HISTORY_MAX_AGE_IN_DAYS),
|
||||
-1,
|
||||
`Found expected maximum number of days of history: ${successText}`
|
||||
);
|
||||
} else if (
|
||||
progressGroup.dataset.resourceType ==
|
||||
MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES.FORMDATA
|
||||
) {
|
||||
// FORMDATA is another special case, because we simply show "Form history" as
|
||||
// the success string, rather than a particular quantity.
|
||||
Assert.equal(
|
||||
successText,
|
||||
"Form history",
|
||||
`Found expected form data string: ${successText}`
|
||||
);
|
||||
} else {
|
||||
Assert.notEqual(
|
||||
successText.indexOf(EXPECTED_QUANTITY),
|
||||
-1,
|
||||
`Found expected quantity in success string: ${successText}`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// If you've found yourself here, and this is failing, it's probably because you've
|
||||
// updated MigrationWizardParent.#getStringForImportQuantity to return a string for
|
||||
|
|
|
@ -108,13 +108,15 @@ migration-wizard-progress-success-passwords =
|
|||
# browser has completed.
|
||||
#
|
||||
# Variables:
|
||||
# $quantity (Number): the number of successfully imported history entries
|
||||
# $maxAgeInDays (Number): the maximum number of days of history that might be imported.
|
||||
migration-wizard-progress-success-history =
|
||||
{ $quantity ->
|
||||
[one] { $quantity } visit
|
||||
*[other] { $quantity } visits
|
||||
{ $maxAgeInDays ->
|
||||
[one] From the last day
|
||||
*[other] From the last { $maxAgeInDays } days
|
||||
}
|
||||
|
||||
migration-wizard-progress-success-formdata = Form history
|
||||
|
||||
migration-wizard-safari-permissions-sub-header = To import Safari bookmarks and browsing history:
|
||||
migration-wizard-safari-instructions-continue = Select “Continue”
|
||||
migration-wizard-safari-instructions-folder = Select Safari folder in the list and choose “Open”
|
||||
|
|
Загрузка…
Ссылка в новой задаче