feat(desktop): add pinned auto-show table info panel
This commit is contained in:
14 files changed
+104
No files matched your search
@@ -0,0 +1,42 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
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>]> = [
|
||||
["en", en as Record<string, unknown>],
|
||||
["es", es],
|
||||
["it", it_],
|
||||
["ja", ja],
|
||||
["ko", ko],
|
||||
["pt-BR", ptBR],
|
||||
["tr", tr],
|
||||
["zh-CN", zhCN],
|
||||
["zh-TW", zhTW],
|
||||
];
|
||||
|
||||
function gridEntry(locale: Record<string, unknown>, key: string): unknown {
|
||||
const grid = locale["grid"];
|
||||
if (!grid || typeof grid !== "object") return undefined;
|
||||
return (grid as Record<string, unknown>)[key];
|
||||
}
|
||||
|
||||
describe("table-info pin i18n messages", () => {
|
||||
it.each(["pinTableInfo", "unpinTableInfo"] as const)("en resolves grid.%s to text", (key) => {
|
||||
expect(gridEntry(en as Record<string, unknown>, key), `grid.${key} missing from locales/en.ts`).toBeTypeOf("string");
|
||||
});
|
||||
|
||||
it.each(locales.slice(1))("%s translates table-info pin labels instead of using the English fallback", (_name, locale) => {
|
||||
for (const key of ["pinTableInfo", "unpinTableInfo"] as const) {
|
||||
const value = gridEntry(locale, key);
|
||||
expect(value, `${_name} grid.${key}`).toBeTypeOf("string");
|
||||
expect(value).not.toBe(gridEntry(en as Record<string, unknown>, key));
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -2160,6 +2160,8 @@ export default {
|
||||
rowsPerPageShort: " rows",
|
||||
columnDetails: "Column Details",
|
||||
tableInfo: "Table Info",
|
||||
pinTableInfo: "Pin table info panel",
|
||||
unpinTableInfo: "Unpin table info panel",
|
||||
tableInfoColumns: "Columns",
|
||||
tableInfoIndexes: "Indexes",
|
||||
columnPrimaryIndex: "Primary key index",
|
||||
|
||||
@@ -2020,6 +2020,8 @@ export default withEnglishFallback({
|
||||
searchColumn: "Buscar columna/comentario...",
|
||||
noColumnsFound: "No se encontraron columnas",
|
||||
tableInfo: "Información de tabla",
|
||||
pinTableInfo: "Fijar el panel de información de la tabla",
|
||||
unpinTableInfo: "Desfijar el panel de información de la tabla",
|
||||
tableInfoColumns: "Columnas",
|
||||
tableInfoIndexes: "Índices",
|
||||
columnPrimaryIndex: "Índice de clave primaria",
|
||||
|
||||
@@ -2007,6 +2007,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " righe",
|
||||
columnDetails: "Dettagli Colonna",
|
||||
tableInfo: "Informazioni Tabella",
|
||||
pinTableInfo: "Blocca il pannello delle informazioni sulla tabella",
|
||||
unpinTableInfo: "Sblocca il pannello delle informazioni sulla tabella",
|
||||
tableInfoColumns: "Colonne",
|
||||
tableInfoIndexes: "Indici",
|
||||
columnPrimaryIndex: "Indice chiave primaria",
|
||||
|
||||
@@ -2019,6 +2019,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " 行",
|
||||
columnDetails: "列詳細",
|
||||
tableInfo: "テーブル情報",
|
||||
pinTableInfo: "テーブル情報パネルを固定",
|
||||
unpinTableInfo: "テーブル情報パネルの固定を解除",
|
||||
tableInfoColumns: "列",
|
||||
tableInfoIndexes: "インデックス",
|
||||
columnPrimaryIndex: "主キーインデックス",
|
||||
|
||||
@@ -1983,6 +1983,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: "행",
|
||||
columnDetails: "컬럼 상세",
|
||||
tableInfo: "테이블 정보",
|
||||
pinTableInfo: "테이블 정보 패널 고정",
|
||||
unpinTableInfo: "테이블 정보 패널 고정 해제",
|
||||
tableInfoColumns: "컬럼",
|
||||
tableInfoIndexes: "인덱스",
|
||||
columnPrimaryIndex: "기본 키 인덱스",
|
||||
|
||||
@@ -2009,6 +2009,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " linhas",
|
||||
columnDetails: "Detalhes da Coluna",
|
||||
tableInfo: "Informações da Tabela",
|
||||
pinTableInfo: "Fixar painel de informações da tabela",
|
||||
unpinTableInfo: "Desafixar painel de informações da tabela",
|
||||
tableInfoColumns: "Colunas",
|
||||
tableInfoIndexes: "Índices",
|
||||
columnPrimaryIndex: "Índice de chave primária",
|
||||
|
||||
@@ -2154,6 +2154,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " satır",
|
||||
columnDetails: "Sütun Ayrıntıları",
|
||||
tableInfo: "Tablo Bilgisi",
|
||||
pinTableInfo: "Tablo bilgileri panelini sabitle",
|
||||
unpinTableInfo: "Tablo bilgileri panelinin sabitlemesini kaldır",
|
||||
tableInfoColumns: "Sütunlar",
|
||||
tableInfoIndexes: "Dizinler",
|
||||
columnPrimaryIndex: "Birincil anahtar dizini",
|
||||
|
||||
@@ -2084,6 +2084,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " 行/页",
|
||||
columnDetails: "列详情",
|
||||
tableInfo: "表属性",
|
||||
pinTableInfo: "固定表属性面板",
|
||||
unpinTableInfo: "取消固定表属性面板",
|
||||
tableInfoColumns: "字段",
|
||||
tableInfoIndexes: "索引",
|
||||
columnPrimaryIndex: "主键索引",
|
||||
|
||||
@@ -2012,6 +2012,8 @@ export default withEnglishFallback({
|
||||
rowsPerPageShort: " 筆/頁",
|
||||
columnDetails: "欄位詳情",
|
||||
tableInfo: "資料表屬性",
|
||||
pinTableInfo: "固定資料表屬性面板",
|
||||
unpinTableInfo: "取消固定資料表屬性面板",
|
||||
tableInfoColumns: "欄位",
|
||||
tableInfoIndexes: "索引",
|
||||
columnPrimaryIndex: "主鍵索引",
|
||||
|
||||
Reference in new issue
Block a user