Skip to content

Commit ea36126

Browse files
shakyShanegithub-actions[bot]
authored andcommitted
Release build 7.28.0 [ci release]
1 parent 256fb24 commit ea36126

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+485
-136
lines changed

CHANGELOG.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
- onboarding: copy update (#1520)
1+
- history: empty state translations (#1547)
2+
- build(deps-dev): bump the typescript group across 1 directory with 4 updates (#1540)

Sources/ContentScopeScripts/dist/pages/history/dist/index.js

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@
23232323
note: "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
23242324
},
23252325
no_results_text: {
2326-
title: "Try searching for a different URL or keywords",
2326+
title: "Try searching for a different URL or keywords.",
23272327
note: "Placeholder text when a search gave no results."
23282328
},
23292329
delete_all: {
@@ -3184,7 +3184,12 @@
31843184
var HistoryServiceDispatchContext = J(defaultDispatch);
31853185
var ResultsContext = J(
31863186
/** @type {ReadonlySignal<Results>} */
3187-
d3({ items: [], heights: [], viewIds: [] })
3187+
d3({
3188+
items: [],
3189+
heights: [],
3190+
viewIds: [],
3191+
info: { finished: false, query: { term: "" } }
3192+
})
31883193
);
31893194
var RangesContext = J(
31903195
/** @type {ReadonlySignal<Range[]>} */
@@ -3194,6 +3199,7 @@
31943199
const queryDispatch = useQueryDispatch();
31953200
const ranges = useSignal(initial.ranges.ranges);
31963201
const results = useSignal({
3202+
info: initial.query.info,
31973203
items: initial.query.results,
31983204
heights: generateHeights(initial.query.results),
31993205
viewIds: generateViewIds(initial.query.results)
@@ -3202,6 +3208,7 @@
32023208
const unsub = service.onResults((data) => {
32033209
results.value = {
32043210
items: data.results,
3211+
info: data.info,
32053212
heights: generateHeights(data.results),
32063213
viewIds: generateViewIds(data.results)
32073214
};
@@ -4188,10 +4195,20 @@
41884195
}
41894196
function EmptyState() {
41904197
const { t: t4 } = useTypedTranslation();
4198+
const results = useResultsData();
41914199
const query = useQueryContext();
4192-
const hasSearch = query.value.term !== null && query.value.term.trim().length > 0;
4193-
if (hasSearch) {
4194-
return /* @__PURE__ */ g(Empty, { title: t4("no_results_title", { term: `"${query.value.term}"` }), text: t4("no_results_text") });
4200+
const hasSearch = useComputed(() => query.value.term !== null && query.value.term.trim().length > 0);
4201+
const text = useComputed(() => {
4202+
const termFromSearchBox = query.value.term;
4203+
if (!("term" in results.value.info.query)) return termFromSearchBox;
4204+
const termFromApiResponse = results.value.info.query.term;
4205+
if (termFromSearchBox === termFromApiResponse) {
4206+
return termFromSearchBox;
4207+
}
4208+
return termFromApiResponse;
4209+
});
4210+
if (hasSearch.value) {
4211+
return /* @__PURE__ */ g(Empty, { title: t4("no_results_title", { term: `"${text.value}"` }), text: t4("no_results_text") });
41954212
}
41964213
return /* @__PURE__ */ g(Empty, { title: t4("empty_title"), text: t4("empty_text") });
41974214
}
@@ -4954,7 +4971,7 @@
49544971
}
49554972
}
49564973
async function getStrings(environment) {
4957-
return environment.locale === "en" ? history_default : await fetch(`./locales/${environment.locale}/new-tab.json`).then((x4) => x4.json()).catch((e4) => {
4974+
return environment.locale === "en" ? history_default : await fetch(`./locales/${environment.locale}/history.json`).then((x4) => x4.json()).catch((e4) => {
49584975
console.error("Could not load locale", environment.locale, e4);
49594976
return history_default;
49604977
});

Sources/ContentScopeScripts/dist/pages/history/locales/de/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Seitenbesuche werden angezeigt, sobald du mit dem Browsen beginnst.",
16+
"title" : "Noch kein Browserverlauf.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Keine Ergebnisse für {term} gefunden",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Versuche es mit einer anderen URL oder anderen Stichwörtern.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Alle löschen",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/en/history.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"note": "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
2323
},
2424
"no_results_text": {
25-
"title": "Try searching for a different URL or keywords",
25+
"title": "Try searching for a different URL or keywords.",
2626
"note": "Placeholder text when a search gave no results."
2727
},
2828
"delete_all": {

Sources/ContentScopeScripts/dist/pages/history/locales/es/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Las visitas a la página se mostrarán cuando empieces a navegar.",
16+
"title" : "Todavía no hay historial de navegación.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "No se han encontrado resultados para {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Intenta buscar una URL diferente o palabras clave distintas.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Eliminar todo",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/fr/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Les visites de page apparaîtront une fois que vous commencerez à naviguer.",
16+
"title" : "Aucun historique de navigation pour le moment.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Aucun résultat trouvé pour {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Essayez de rechercher une URL ou des mots-clés différents.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Tout supprimer",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/it/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Le visite alla pagina appariranno non appena inizierai la navigazione.",
16+
"title" : "Ancora nessuna cronologia di navigazione.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Nessun risultato trovato per {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Prova a cercare un URL o parole chiave diverse.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Elimina tutto",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/nl/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Paginabezoeken worden zichtbaar zodra je begint te browsen.",
16+
"title" : "Nog geen surfgeschiedenis.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Geen resultaten gevonden voor {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Probeer te zoeken naar een andere URL of trefwoorden.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Alles verwijderen",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/pl/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Gdy zaczniesz przeglądać, pojawią się odwiedziny stron.",
16+
"title" : "Jeszcze nie ma historii przeglądania.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Brak wyników dla {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Spróbuj wyszukać inny adres URL lub inne słowa kluczowe.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Usuń wszystko",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/pt/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "As visitas a páginas vão aparecer assim que começares a navegar.",
16+
"title" : "Ainda não há histórico de navegação.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Nenhum resultado encontrado para {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Experimenta pesquisar um URL ou palavras-chave diferentes.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Eliminar tudo",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

Sources/ContentScopeScripts/dist/pages/history/locales/ru/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Информация о посещении страниц появится после того, как вы начнете просмотр.",
16+
"title" : "Истории посещений пока нет.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "По запросу «{term}» ничего не найдено.",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Попробуйте ввести другой адрес или ключевые слова.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Удалить все",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

build/integration/pages/history/dist/index.js

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@
23232323
note: "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
23242324
},
23252325
no_results_text: {
2326-
title: "Try searching for a different URL or keywords",
2326+
title: "Try searching for a different URL or keywords.",
23272327
note: "Placeholder text when a search gave no results."
23282328
},
23292329
delete_all: {
@@ -3184,7 +3184,12 @@
31843184
var HistoryServiceDispatchContext = J(defaultDispatch);
31853185
var ResultsContext = J(
31863186
/** @type {ReadonlySignal<Results>} */
3187-
d3({ items: [], heights: [], viewIds: [] })
3187+
d3({
3188+
items: [],
3189+
heights: [],
3190+
viewIds: [],
3191+
info: { finished: false, query: { term: "" } }
3192+
})
31883193
);
31893194
var RangesContext = J(
31903195
/** @type {ReadonlySignal<Range[]>} */
@@ -3194,6 +3199,7 @@
31943199
const queryDispatch = useQueryDispatch();
31953200
const ranges = useSignal(initial.ranges.ranges);
31963201
const results = useSignal({
3202+
info: initial.query.info,
31973203
items: initial.query.results,
31983204
heights: generateHeights(initial.query.results),
31993205
viewIds: generateViewIds(initial.query.results)
@@ -3202,6 +3208,7 @@
32023208
const unsub = service.onResults((data) => {
32033209
results.value = {
32043210
items: data.results,
3211+
info: data.info,
32053212
heights: generateHeights(data.results),
32063213
viewIds: generateViewIds(data.results)
32073214
};
@@ -4188,10 +4195,20 @@
41884195
}
41894196
function EmptyState() {
41904197
const { t: t4 } = useTypedTranslation();
4198+
const results = useResultsData();
41914199
const query = useQueryContext();
4192-
const hasSearch = query.value.term !== null && query.value.term.trim().length > 0;
4193-
if (hasSearch) {
4194-
return /* @__PURE__ */ g(Empty, { title: t4("no_results_title", { term: `"${query.value.term}"` }), text: t4("no_results_text") });
4200+
const hasSearch = useComputed(() => query.value.term !== null && query.value.term.trim().length > 0);
4201+
const text = useComputed(() => {
4202+
const termFromSearchBox = query.value.term;
4203+
if (!("term" in results.value.info.query)) return termFromSearchBox;
4204+
const termFromApiResponse = results.value.info.query.term;
4205+
if (termFromSearchBox === termFromApiResponse) {
4206+
return termFromSearchBox;
4207+
}
4208+
return termFromApiResponse;
4209+
});
4210+
if (hasSearch.value) {
4211+
return /* @__PURE__ */ g(Empty, { title: t4("no_results_title", { term: `"${text.value}"` }), text: t4("no_results_text") });
41954212
}
41964213
return /* @__PURE__ */ g(Empty, { title: t4("empty_title"), text: t4("empty_text") });
41974214
}
@@ -4954,7 +4971,7 @@
49544971
}
49554972
}
49564973
async function getStrings(environment) {
4957-
return environment.locale === "en" ? history_default : await fetch(`./locales/${environment.locale}/new-tab.json`).then((x4) => x4.json()).catch((e4) => {
4974+
return environment.locale === "en" ? history_default : await fetch(`./locales/${environment.locale}/history.json`).then((x4) => x4.json()).catch((e4) => {
49584975
console.error("Could not load locale", environment.locale, e4);
49594976
return history_default;
49604977
});
@@ -5239,10 +5256,14 @@
52395256
const { term } = msg.params.query;
52405257
if (term !== "") {
52415258
if (term === "empty" || term.includes('"') || term.includes("<")) {
5242-
return asResponse([], msg.params.offset, msg.params.limit);
5259+
const response2 = asResponse([], msg.params.offset, msg.params.limit);
5260+
response2.info.query = { term };
5261+
return response2;
52435262
}
52445263
if (term === "empty") {
5245-
return asResponse([], msg.params.offset, msg.params.limit);
5264+
const response2 = asResponse([], msg.params.offset, msg.params.limit);
5265+
response2.info.query = { term };
5266+
return response2;
52465267
}
52475268
if (term.trim().match(/^\d+$/)) {
52485269
const int = parseInt(term.trim(), 10);

build/integration/pages/history/locales/de/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Seitenbesuche werden angezeigt, sobald du mit dem Browsen beginnst.",
16+
"title" : "Noch kein Browserverlauf.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Keine Ergebnisse für {term} gefunden",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Versuche es mit einer anderen URL oder anderen Stichwörtern.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Alle löschen",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

build/integration/pages/history/locales/en/history.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"note": "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
2323
},
2424
"no_results_text": {
25-
"title": "Try searching for a different URL or keywords",
25+
"title": "Try searching for a different URL or keywords.",
2626
"note": "Placeholder text when a search gave no results."
2727
},
2828
"delete_all": {

build/integration/pages/history/locales/es/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Las visitas a la página se mostrarán cuando empieces a navegar.",
16+
"title" : "Todavía no hay historial de navegación.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "No se han encontrado resultados para {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Intenta buscar una URL diferente o palabras clave distintas.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Eliminar todo",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

build/integration/pages/history/locales/fr/history.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,17 @@
1313
"note" : "Text shown where there are no remaining history entries"
1414
},
1515
"empty_text" : {
16-
"title" : "Les visites de page apparaîtront une fois que vous commencerez à naviguer.",
16+
"title" : "Aucun historique de navigation pour le moment.",
1717
"note" : "Placeholder text when there's no results to show"
1818
},
19+
"no_results_title" : {
20+
"title" : "Aucun résultat trouvé pour {term}",
21+
"note" : "The placeholder {term} will be dynamically replaced with the search term entered by the user. For example, if the user searches for 'cats', the title will become 'No results found for cats'."
22+
},
23+
"no_results_text" : {
24+
"title" : "Essayez de rechercher une URL ou des mots-clés différents.",
25+
"note" : "Placeholder text when a search gave no results."
26+
},
1927
"delete_all" : {
2028
"title" : "Tout supprimer",
2129
"note" : "Text for a button that deletes all items or entries. An additional confirmation dialog will be presented."

0 commit comments

Comments
 (0)