feat(grid): load all remaining rows with confirmation guard
This commit is contained in:
25 files changed
+336
-27
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import az from "../locales/az";
|
||||
import en from "../locales/en";
|
||||
import es from "../locales/es";
|
||||
import it_ from "../locales/it";
|
||||
import ja from "../locales/ja";
|
||||
import ko from "../locales/ko";
|
||||
import ptBR from "../locales/pt-BR";
|
||||
import tr from "../locales/tr";
|
||||
import zhCN from "../locales/zh-CN";
|
||||
import zhTW from "../locales/zh-TW";
|
||||
|
||||
const locales: Array<[string, Record<string, unknown>]> = [
|
||||
["az", az],
|
||||
["en", en],
|
||||
["es", es],
|
||||
["it", it_],
|
||||
["ja", ja],
|
||||
["ko", ko],
|
||||
["pt-BR", ptBR],
|
||||
["tr", tr],
|
||||
["zh-CN", zhCN],
|
||||
["zh-TW", zhTW],
|
||||
];
|
||||
|
||||
// The grid toolbar renders in whatever locale the user runs, so a missing key
|
||||
// would leak a raw key next to the "load all" button.
|
||||
const GRID_LOAD_ALL_KEYS = ["loadAllAndGoToLastRow", "allLoaded", "loadAllRowsConfirmTitle", "loadAllRowsConfirmMessage", "loadAllRowsContinue"] as const;
|
||||
|
||||
describe("grid load-all locale parity", () => {
|
||||
it.each(locales)("%s exposes the load-all copy", (_name, locale) => {
|
||||
const grid = (locale as { grid: Record<string, unknown> }).grid;
|
||||
for (const key of GRID_LOAD_ALL_KEYS) {
|
||||
expect(grid[key], `${_name}: grid.${key}`).toBeTypeOf("string");
|
||||
expect(grid[key] as string, `${_name}: grid.${key}`).not.toHaveLength(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1763,6 +1763,10 @@ export default withEnglishFallback({
|
||||
esDeepPageJumpConfirmMessage:
|
||||
"Elasticsearch search_after birbaşa səhifəyə keçə bilmir. DBX çatışmayan kursorları ardıcıllıqla əldə etməlidir və geriyə keçid 1-ci səhifədən yenidən başlayır. {page} nömrəli səhifəyə keçid zamanı {requests} sorğu göndəriləcəyi gözlənilir. Bu, uzun çəkə və klasterin yükünü artıra bilər. Davam edilsin?",
|
||||
esDeepPageJumpContinue: "Davam et",
|
||||
loadAllAndGoToLastRow: "Hamısını yüklə və sonuncu sətrə keç",
|
||||
loadAllRowsConfirmTitle: "Bütün sətirlərin yüklənməsini təsdiqlə",
|
||||
loadAllRowsConfirmMessage: "Hamısını yükləmək bir sorğu ilə ən çox {count} sətir əlavə gətirə bilər. Çox böyük nəticələr yaddaşı çox istifadə edir və uzun çəkə bilər. Davam edilsin?",
|
||||
loadAllRowsContinue: "Hamısını yüklə",
|
||||
allLoaded: "hamısı yükləndi",
|
||||
calculateTotalRows: "Sətirlərin ümumi sayını hesabla",
|
||||
calculateTotalRowsInline: "(sətirlərin ümumi sayını hesabla)",
|
||||
|
||||
@@ -1992,6 +1992,10 @@ export default {
|
||||
"Elasticsearch search_after cannot jump directly to a page. DBX must fetch missing cursors in order, and backward navigation restarts from page 1. Jumping to page {page} is expected to send {requests} queries. This may take a long time and increase cluster load. Continue?",
|
||||
esDeepPageJumpContinue: "Continue",
|
||||
allLoaded: "all loaded",
|
||||
loadAllAndGoToLastRow: "Load all and go to the last row",
|
||||
loadAllRowsConfirmTitle: "Confirm loading all rows",
|
||||
loadAllRowsConfirmMessage: "Loading everything fetches up to {count} more rows in one request. Very large results consume significant memory and can take a long time. Continue?",
|
||||
loadAllRowsContinue: "Load all rows",
|
||||
calculateTotalRows: "Count total rows",
|
||||
calculateTotalRowsInline: "(count total rows)",
|
||||
calculateTotalRowsFailed: "Count failed: {message}",
|
||||
|
||||
@@ -1925,6 +1925,10 @@ export default withEnglishFallback({
|
||||
"search_after de Elasticsearch no puede saltar directamente a una página. DBX debe obtener en orden los cursores que faltan y, al retroceder, comienza de nuevo desde la página 1. Saltar a la página {page} enviará aproximadamente {requests} consultas. Puede tardar y aumentar la carga del clúster. ¿Continuar?",
|
||||
esDeepPageJumpContinue: "Continuar",
|
||||
allLoaded: "todo cargado",
|
||||
loadAllAndGoToLastRow: "Cargar todo e ir a la última fila",
|
||||
loadAllRowsConfirmTitle: "Confirmar carga de todas las filas",
|
||||
loadAllRowsConfirmMessage: "Cargar todo puede traer hasta {count} filas más en una sola solicitud. Los resultados muy grandes consumen mucha memoria y pueden tardar. ¿Continuar?",
|
||||
loadAllRowsContinue: "Cargar todas las filas",
|
||||
calculateTotalRows: "Contar filas totales",
|
||||
calculateTotalRowsInline: "(contar filas totales)",
|
||||
calculateTotalRowsFailed: "Error al contar: {message}",
|
||||
|
||||
@@ -1922,6 +1922,10 @@ export default withEnglishFallback({
|
||||
"search_after di Elasticsearch non può passare direttamente a una pagina. DBX deve recuperare in ordine i cursori mancanti e, tornando indietro, riparte dalla pagina 1. Il passaggio alla pagina {page} invierà circa {requests} query. Potrebbe richiedere tempo e aumentare il carico del cluster. Continuare?",
|
||||
esDeepPageJumpContinue: "Continua",
|
||||
allLoaded: "tutto caricato",
|
||||
loadAllAndGoToLastRow: "Carica tutto e vai all'ultima riga",
|
||||
loadAllRowsConfirmTitle: "Conferma caricamento di tutte le righe",
|
||||
loadAllRowsConfirmMessage: "Il caricamento completo può recuperare fino a {count} righe aggiuntive in un'unica richiesta. Risultati molto grandi consumano molta memoria e possono richiedere tempo. Continuare?",
|
||||
loadAllRowsContinue: "Carica tutte le righe",
|
||||
calculateTotalRows: "Conta righe totali",
|
||||
calculateTotalRowsInline: "(conta righe totali)",
|
||||
calculateTotalRowsFailed: "Conteggio non riuscito: {message}",
|
||||
|
||||
@@ -2509,6 +2509,10 @@ export default withEnglishFallback({
|
||||
"Elasticsearch の search_after では指定ページへ直接移動できません。DBX は不足しているカーソルを順番に取得し、前のページへ戻る場合は 1 ページ目からやり直します。ページ {page} への移動では約 {requests} 回のクエリが送信される見込みです。時間がかかり、クラスター負荷が増える可能性があります。続行しますか?",
|
||||
esDeepPageJumpContinue: "移動を続ける",
|
||||
allLoaded: "すべて読み込み済み",
|
||||
loadAllAndGoToLastRow: "すべて読み込み、最終行へ移動",
|
||||
loadAllRowsConfirmTitle: "全行ロードの確認",
|
||||
loadAllRowsConfirmMessage: "すべて読み込むと、1 回のリクエストで最大 {count} 行を追加取得します。非常に大きな結果セットは多くのメモリを消費し、時間がかかることがあります。続行しますか?",
|
||||
loadAllRowsContinue: "ロードを続行",
|
||||
previewSqlEmpty: "プレビューする保留中のSQL変更はありません",
|
||||
renderMode: "レンダーモード",
|
||||
undoChange: "変更を元に戻す",
|
||||
|
||||
@@ -1872,6 +1872,10 @@ export default withEnglishFallback({
|
||||
"Elasticsearch의 search_after는 지정한 페이지로 바로 이동할 수 없습니다. DBX는 누락된 커서를 순서대로 가져와야 하며 이전 페이지로 이동할 때는 1페이지부터 다시 시작합니다. {page}페이지로 이동하면 약 {requests}개의 쿼리가 전송됩니다. 시간이 오래 걸리고 클러스터 부하가 증가할 수 있습니다. 계속하시겠습니까?",
|
||||
esDeepPageJumpContinue: "계속 이동",
|
||||
allLoaded: "모두 로드됨",
|
||||
loadAllAndGoToLastRow: "모두 불러오고 마지막 행으로 이동",
|
||||
loadAllRowsConfirmTitle: "전체 로드 확인",
|
||||
loadAllRowsConfirmMessage: "모두 로드하면 한 번의 요청으로 최대 {count}개의 행을 더 가져옵니다. 매우 큰 결과 집합은 많은 메모리를 사용하고 시간이 오래 걸릴 수 있습니다. 계속하시겠습니까?",
|
||||
loadAllRowsContinue: "계속 로드",
|
||||
calculateTotalRows: "전체 행 수 집계",
|
||||
calculateTotalRowsInline: "(전체 행 수 집계)",
|
||||
calculateTotalRowsFailed: "집계 실패: {message}",
|
||||
|
||||
@@ -1924,6 +1924,10 @@ export default withEnglishFallback({
|
||||
"O search_after do Elasticsearch não pode ir diretamente para uma página. O DBX precisa buscar os cursores ausentes em ordem e, ao voltar, reinicia pela página 1. Ir para a página {page} deve enviar cerca de {requests} consultas. Isso pode demorar e aumentar a carga do cluster. Continuar?",
|
||||
esDeepPageJumpContinue: "Continuar",
|
||||
allLoaded: "tudo carregado",
|
||||
loadAllAndGoToLastRow: "Carregar tudo e ir para a última linha",
|
||||
loadAllRowsConfirmTitle: "Confirmar carregamento de todas as linhas",
|
||||
loadAllRowsConfirmMessage: "Carregar tudo pode buscar até {count} linhas adicionais em uma única solicitação. Resultados muito grandes consomem muita memória e podem demorar. Continuar?",
|
||||
loadAllRowsContinue: "Carregar todas as linhas",
|
||||
calculateTotalRows: "Contar total de linhas",
|
||||
calculateTotalRowsInline: "(contar total de linhas)",
|
||||
calculateTotalRowsFailed: "Falha ao contar: {message}",
|
||||
|
||||
@@ -1764,6 +1764,10 @@ export default withEnglishFallback({
|
||||
esDeepPageJumpConfirmMessage:
|
||||
"Elasticsearch search_after doğrudan bir sayfaya atlayamaz. DBX eksik imleçleri sırayla getirmelidir ve geri gitme 1. sayfadan yeniden başlar. {page}. sayfaya atlamak için {requests} sorgu gönderilmesi bekleniyor. Bu uzun sürebilir ve küme yükünü artırabilir. Devam edilsin mi?",
|
||||
esDeepPageJumpContinue: "Devam et",
|
||||
loadAllAndGoToLastRow: "Tümünü yükle ve son satıra git",
|
||||
loadAllRowsConfirmTitle: "Tüm satırları yükleme onayı",
|
||||
loadAllRowsConfirmMessage: "Tümünü yüklemek tek istekte en fazla {count} satır daha çekebilir. Çok büyük sonuç kümeleri belleği yoğun kullanır ve uzun sürebilir. Devam edilsin mi?",
|
||||
loadAllRowsContinue: "Tümünü yükle",
|
||||
allLoaded: "tümü yüklendi",
|
||||
calculateTotalRows: "Toplam satırları say",
|
||||
calculateTotalRowsInline: "(toplam satırları say)",
|
||||
|
||||
@@ -1905,6 +1905,10 @@ export default withEnglishFallback({
|
||||
esDeepPageJumpConfirmMessage: "Elasticsearch 的 search_after 不能直接定位到指定页面。DBX 必须按顺序获取缺失的游标,跳回较小页码时还会从第 1 页重新开始。跳转到第 {page} 页预计会发送 {requests} 次查询,可能耗时较长并增加集群负载。是否继续?",
|
||||
esDeepPageJumpContinue: "继续跳转",
|
||||
allLoaded: "已全部加载",
|
||||
loadAllAndGoToLastRow: "加载全部并转到末行",
|
||||
loadAllRowsConfirmTitle: "确认加载全部行",
|
||||
loadAllRowsConfirmMessage: "加载全部将通过一次请求最多再获取 {count} 行。超大结果集会占用大量内存并可能耗时较长。是否继续?",
|
||||
loadAllRowsContinue: "继续加载",
|
||||
calculateTotalRows: "统计总行数",
|
||||
calculateTotalRowsInline: "(统计总行数)",
|
||||
calculateTotalRowsFailed: "统计失败:{message}",
|
||||
|
||||
@@ -1913,6 +1913,10 @@ export default withEnglishFallback({
|
||||
esDeepPageJumpConfirmMessage: "Elasticsearch 的 search_after 無法直接定位到指定頁面。DBX 必須依序取得缺少的游標,跳回較小頁碼時還會從第 1 頁重新開始。跳轉到第 {page} 頁預計會傳送 {requests} 次查詢,可能耗時較長並增加叢集負載。是否繼續?",
|
||||
esDeepPageJumpContinue: "繼續跳轉",
|
||||
allLoaded: "已全部載入",
|
||||
loadAllAndGoToLastRow: "載入全部並前往最後一列",
|
||||
loadAllRowsConfirmTitle: "確認載入全部資料列",
|
||||
loadAllRowsConfirmMessage: "載入全部將透過一次請求最多再取得 {count} 筆。超大型結果集會佔用大量記憶體且可能耗時較長。是否繼續?",
|
||||
loadAllRowsContinue: "繼續載入",
|
||||
calculateTotalRows: "統計總筆數",
|
||||
calculateTotalRowsInline: "(統計總筆數)",
|
||||
calculateTotalRowsFailed: "統計失敗:{message}",
|
||||
|
||||
Reference in new issue
Block a user