Bug 1399511 - Update message displayed when a section has no data in about:telemetry r=chutten

MozReview-Commit-ID: 2Hb4oKKlhG7

--HG--
extra : rebase_source : 7c4b93a4d49ef9b48546deb5f64a823b7860bbc1
This commit is contained in:
Francesco Lodolo (:flod) 2017-09-15 06:53:33 +02:00
Родитель 48f0f26faf
Коммит 2fef2536fe
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -1433,8 +1433,10 @@ var Search = {
if (section.parentElement.id === "category-home") {
searchStatus = bundle.formatStringFromName("noSearchResultsAll", [text], 1);
} else {
let format = [section.textContent.trim(), text];
searchStatus = bundle.formatStringFromName("noSearchResults", format, 2);
let sectionName = section.textContent.trim();
searchStatus = (text === "")
? bundle.formatStringFromName("noDataToDisplay", [sectionName], 1)
: bundle.formatStringFromName("noSearchResults", [sectionName, text], 2);
}
document.getElementById("no-search-results-text").textContent = searchStatus;
}

Просмотреть файл

@ -47,7 +47,9 @@ resultsForSearch = Results for “%1$S”
noSearchResults = Sorry! There are no results in %1$S for “%2$S”
# LOCALIZATION NOTE(noSearchResultsAll): %S is replaced by the searched terms
noSearchResultsAll = Sorry! There are no results in any sections for “%S”
# LOCALIZATION NOTE(noDataToDisplay): %S is replaced by the section name.
# This message is displayed when a section is empty.
noDataToDisplay = Sorry! There is currently no data available in “%S”
# LOCALIZATION NOTE(currentPingSidebar): used as a tooltip for the “current”
# ping title in the sidebar
currentPingSidebar = current ping