diff --git a/src/calc2/components/editorBagalg.tsx b/src/calc2/components/editorBagalg.tsx index 063b7705..88895409 100644 --- a/src/calc2/components/editorBagalg.tsx +++ b/src/calc2/components/editorBagalg.tsx @@ -444,6 +444,8 @@ export class EditorBagalg extends React.Component { ], }, ]} + clearOnReload={false} + clearOnNavigation={true} /> ); } diff --git a/src/calc2/components/editorBase.tsx b/src/calc2/components/editorBase.tsx index d839497d..afc4069d 100644 --- a/src/calc2/components/editorBase.tsx +++ b/src/calc2/components/editorBase.tsx @@ -516,7 +516,14 @@ type Props = { exampleBags?: string, - exampleRA?: string + exampleRA?: string, + + /** Optional TTL for restoring editor content (in ms). If omitted or 0, content never expires. */ + contentTtlMs?: number, + /** If true, don't restore saved content on a page reload (soft or hard). */ + clearOnReload?: boolean, + /** If true, clear saved content when opening the editor via in-app navigation (i.e. not a reload). */ + clearOnNavigation?: boolean, }; type State = { @@ -685,7 +692,102 @@ class Relation { const gutterClass = 'CodeMirror-table-edit-markers'; const eventExecSuccessfulName = 'editor.execSuccessful'; +const HISTORY_STORAGE_KEY = "@editor/history"; +const EDITOR_CONTENT_STORAGE_KEY = "@editor/content"; +function getHistoryStorageKey(editorMode: string) { + return `${HISTORY_STORAGE_KEY}/${editorMode}` +} + +function getEditorContentStorageKey(editorMode: string) { + return `${EDITOR_CONTENT_STORAGE_KEY}/${editorMode}` +} + +/** + * Load editor content from storage. + * Supports legacy plain-string values and new JSON payloads { content, savedAt }. + * If ttlMs is provided (>0), will return empty string when content is older than ttlMs. + */ +function loadEditorContentFromStorage(storage: Storage, editorMode: string, ttlMs?: number): string { + const raw = storage.getItem(getEditorContentStorageKey(editorMode)); + if (!raw) { + return ''; + } + try { + const parsed = JSON.parse(raw); + if (typeof parsed === 'string') { + // legacy format: plain content string + return parsed; + } + const content = parsed?.content as string | undefined; + const savedAt = parsed?.savedAt as number | undefined; + if (!content) { + return ''; + } + if (ttlMs && ttlMs > 0) { + if (!savedAt) { + return ''; + } + if ((Date.now() - savedAt) > ttlMs) { + return ''; + } + } + return content; + } + catch { + // not JSON, treat as legacy raw content + return raw; + } +} + +/** Save content with timestamp for optional TTL support */ +function saveEditorContentToStorage(content: string, editorMode: string, storage: Storage) { + const payload = JSON.stringify({ content, savedAt: Date.now() }); + storage.setItem(getEditorContentStorageKey(editorMode), payload); +} + +/** Best-effort detection whether current navigation is a reload (hard or soft). */ +function isReloadNavigation(): boolean { + const navEntries = (performance.getEntriesByType && performance.getEntriesByType('navigation')) as PerformanceNavigationTiming[]; + if (navEntries && navEntries.length > 0) { + return navEntries[0].type === 'reload'; + } + // Fallback to deprecated API + // @ts-ignore + if (performance && performance.navigation) { + // 1 === TYPE_RELOAD + // @ts-ignore + return performance.navigation.type === 1; + } + return false; +} + +function loadHistoryFromStorage(storage: Storage, editorMode: string): HistoryEntry[] { + const historyStr = storage.getItem(getHistoryStorageKey(editorMode)) + if (!historyStr) { + return [] + } + return (JSON.parse(historyStr) as (HistoryEntry & { time: string })[]).map(({ time, ...entry }) => ({ ...entry, time: new Date(time) })) +} + +function appendHistoryToStorage(entry: HistoryEntry, historyMaxEntries: number, editorMode: string, storage: Storage) { + /** + * append history to LocalStorage with max entries + * preventing repeated code into it + */ + const history = loadHistoryFromStorage(storage, editorMode); + const historyWithoutCurrentEntry = history.filter((h) => h.code !== entry.code); + const updatedHistory = [ + entry, + ...historyWithoutCurrentEntry + ].slice(0, historyMaxEntries); + storage.setItem(getHistoryStorageKey(editorMode), JSON.stringify(updatedHistory)); + return updatedHistory; +} + +function clearHistoryFromStorage(storage: Storage, editorMode: string) { + storage.removeItem(getHistoryStorageKey(editorMode)); +} export class EditorBase extends React.Component { private hinterCache: { @@ -779,7 +881,7 @@ export class EditorBase extends React.Component { this.state = { editor: null, codeMirrorOptions, - history: [], + history: loadHistoryFromStorage(window.localStorage, props.tab || props.mode), isSelectionSelected: false, execSuccessful: false, execErrors: [], @@ -902,6 +1004,17 @@ export class EditorBase extends React.Component { // setting example queries.. componentDidUpdate(prevProps: Readonly, prevState: Readonly, snapshot?: any) { + if (prevProps.mode !== this.props.mode || prevProps.tab !== this.props.tab) { + this.setState({ history: loadHistoryFromStorage(window.localStorage, this.props.tab || this.props.mode) }) + // Load saved content when mode changes (respect optional TTL) + const { editor } = this.state; + if (editor) { + const savedContent = loadEditorContentFromStorage(window.localStorage, this.props.mode, this.props.contentTtlMs); + if (savedContent) { + editor.setValue(savedContent); + } + } + } if(prevState.editor) { if(this.props.exampleSql && this.props.exampleSql !== '' && !this.state.addedExampleSqlQuery && this.props.tab === 'sql') { this.replaceAll(this.props.exampleSql) @@ -920,6 +1033,15 @@ export class EditorBase extends React.Component { } } + onHistoryStorageChange(event: StorageEvent) { + const keyId = this.props.tab || this.props.mode; + if (event.storageArea === window.localStorage && event.key === getHistoryStorageKey(keyId)) { + this.setState({ + history: loadHistoryFromStorage(event.storageArea, keyId) + }); + } + } + componentDidMount() { const node = findDOMNode(this) as Element; @@ -929,6 +1051,25 @@ export class EditorBase extends React.Component { } const editor = CodeMirror.fromTextArea(textarea, this.state.codeMirrorOptions); + + // Load saved content from local storage (respect optional TTL and reload/navigation preferences) + const reloaded = isReloadNavigation(); + const contentKeyId = this.props.tab || this.props.mode; + // If clearOnReload and this is a reload -> clear and start empty + if (this.props.clearOnReload && reloaded) { + window.localStorage.removeItem(getEditorContentStorageKey(contentKeyId)); + } + // If clearOnNavigation and this is NOT a reload (i.e. opened via in-app navigation) -> clear and start empty + else if (this.props.clearOnNavigation && !reloaded) { + window.localStorage.removeItem(getEditorContentStorageKey(contentKeyId)); + } + else { + const savedContent = loadEditorContentFromStorage(window.localStorage, contentKeyId, this.props.contentTtlMs); + if (savedContent) { + editor.setValue(savedContent); + } + } + this.setState({ editor, relationEditorName: '', @@ -953,12 +1094,19 @@ export class EditorBase extends React.Component { editor.on('change', (cm: CodeMirror.Editor) => { this.props.textChange(cm); + // Save content to local storage whenever it changes + const contentKeyId = this.props.tab || this.props.mode; + saveEditorContentToStorage(cm.getValue(), contentKeyId, window.localStorage); }); - + window.addEventListener("storage", this.onHistoryStorageChange); } + componentWillUnmount(): void { + window.removeEventListener("storage", this.onHistoryStorageChange); + } + render() { const { execErrors, @@ -1058,21 +1206,36 @@ export class EditorBase extends React.Component {
} - elements={history.map(h => ({ - label: ( - <> - {h.time.toLocaleTimeString()} -
{h.code}
- {/* - // colorize the code - codeNode.addClass('colorize'); - CodeMirror.colorize(codeNode, this.state.editor.getOption('mode')); - */} - - ), - value: h, - }))} - onChange={this.applyHistory} + elements={[ + ...history.map(h => ({ + label: ( + <> + {h.time.toLocaleTimeString()} +
{h.code}
+ {/* + // colorize the code + codeNode.addClass('colorize'); + CodeMirror.colorize(codeNode, this.state.editor.getOption('mode')); + */} + + ), + value: h, + })), + ...(history.length > 0 ? [ + { type: 'separator' as const }, + { + label: {t('calc.editors.button-clear-history', { defaultValue: 'Clear history' })}, + value: '__clear__', + } + ] : []) + ]} + onChange={(value: HistoryEntry | string) => { + if (value === '__clear__') { + this.clearHistory(); + return; + } + this.applyHistory(value as HistoryEntry); + }} />
) @@ -1155,21 +1318,28 @@ export class EditorBase extends React.Component { historyAddEntry(code: string) { const { historyMaxEntries = 10, historyMaxLabelLength = 20 } = this.props; + const keyId = this.props.tab || this.props.mode; const entry = { time: new Date(), label: code.length > historyMaxLabelLength ? code.substr(0, historyMaxLabelLength - 4) + ' ...' : code, - code, + code: code.trim(), }; this.setState({ - history: [ - entry, - ...this.state.history, - ].slice(0, historyMaxEntries), + history: appendHistoryToStorage(entry, historyMaxEntries, keyId, window.localStorage), }); } + clearHistory = () => { + if (!window.confirm(t('calc.editors.confirm-clear-history', { defaultValue: 'Clear all history entries?' }))) { + return; + } + const keyId = this.props.tab || this.props.mode; + clearHistoryFromStorage(window.localStorage, keyId); + this.setState({ history: [] }); + } + clearExecutionAlerts() { this.state.execErrors.splice(0, this.state.execErrors.length); toast.dismiss(); diff --git a/src/calc2/components/editorGroup.tsx b/src/calc2/components/editorGroup.tsx index 58b9451a..3f088558 100644 --- a/src/calc2/components/editorGroup.tsx +++ b/src/calc2/components/editorGroup.tsx @@ -171,6 +171,8 @@ export class EditorGroup extends React.Component { ], }, ]} + clearOnReload={false} + clearOnNavigation={true} /> ); } diff --git a/src/calc2/components/editorRelalg.tsx b/src/calc2/components/editorRelalg.tsx index dbf0295d..8fa3d294 100644 --- a/src/calc2/components/editorRelalg.tsx +++ b/src/calc2/components/editorRelalg.tsx @@ -438,6 +438,8 @@ export class EditorRelalg extends React.Component { ], }, ]} + clearOnReload={false} + clearOnNavigation={true} /> ); } diff --git a/src/calc2/components/editorSql.tsx b/src/calc2/components/editorSql.tsx index cd97ffb1..690fa0b9 100644 --- a/src/calc2/components/editorSql.tsx +++ b/src/calc2/components/editorSql.tsx @@ -207,6 +207,8 @@ export class EditorSql extends React.Component { ], }, ]} + clearOnReload={false} + clearOnNavigation={true} /> ); } diff --git a/src/calc2/components/editorTrc.tsx b/src/calc2/components/editorTrc.tsx index 4aeb0c3a..45e1e9d1 100644 --- a/src/calc2/components/editorTrc.tsx +++ b/src/calc2/components/editorTrc.tsx @@ -311,6 +311,8 @@ export class EditorTrc extends React.Component { ], }, ]} + clearOnReload={false} + clearOnNavigation={true} /> ); } diff --git a/src/locales/.json b/src/locales/.json index 2eb504da..5a1f8c01 100644 --- a/src/locales/.json +++ b/src/locales/.json @@ -86,6 +86,8 @@ "calc.maintainer-groups.saarland": "", "calc.maintainer-groups.ufes": "", "calc.editors.button-history": "", + "calc.editors.button-clear-history": "", + "calc.editors.confirm-clear-history": "", "calc.editors.insert-relation-title": "", "calc.editors.insert-relation-tooltip": "", "calc.editors.group.tab-name": "", @@ -220,5 +222,6 @@ "calc.editors.ra.inline-editor.row-name": "", "calc.editors.ra.inline-editor.row-type": "", "calc.editors.ra.inline-editor.input-relation-name": "", - "calc.navigation.imprint": "" + "calc.navigation.imprint": "", + "local.change": "" } diff --git a/src/locales/de.json b/src/locales/de.json index 45fe640d..82faf9b8 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -138,6 +138,8 @@ "calc.maintainer-groups.ufes": "Bundesuniversit\u00e4t Espirito Santo", "calc.maintainer-groups.savben": "Istituto di Istruzione Superiore Savoia Benincasa", "calc.editors.button-history": "Verlauf", + "calc.editors.button-clear-history": "Verlauf l\u00f6schen", + "calc.editors.confirm-clear-history": "Sind Sie sicher, dass Sie den Verlauf l\u00f6schen m\u00f6chten?", "calc.editors.insert-relation-title": "Einf\u00fcgen", "calc.editors.insert-relation-tooltip": "Beziehungs- oder Spaltennamen einf\u00fcgen", "calc.editors.group.tab-name": "Datensatz Editor", @@ -277,5 +279,6 @@ "calc.editors.ra.button-zoom-out": "Herauszoomen", "calc.editors.ra.button-zoom-reset": "Auf Standard-Zoomstufe zur\u00fccksetzen", "calc.menu.recently-used": "Zuletzt verwendete Gists", - "calc.result.exec.time": "Ausführungszeit: " + "calc.result.exec.time": "Ausführungszeit: ", + "local.change": "Seite neu laden um Sprache zu \u00e4ndern?" } diff --git a/src/locales/de.ts b/src/locales/de.ts index 7128776b..beeb1a29 100644 --- a/src/locales/de.ts +++ b/src/locales/de.ts @@ -103,6 +103,8 @@ export const langDE: Partial = { 'calc.maintainer-groups.ufes': 'Bundesuniversität Espírito Santo', 'calc.maintainer-groups.savben': 'Istituto di Istruzione Superiore Savoia Benincasa', 'calc.editors.button-history': 'Verlauf', + 'calc.editors.button-clear-history': 'Verlauf löschen', + 'calc.editors.confirm-clear-history': 'Sind Sie sicher, dass Sie den Verlauf löschen möchten?', 'calc.editors.insert-relation-title': 'Einfügen', 'calc.editors.insert-relation-tooltip': 'Beziehungs- oder Spaltennamen einfügen', 'calc.editors.group.tab-name': 'Datensatz Editor', diff --git a/src/locales/en.json b/src/locales/en.json index a6adec7a..d0d72614 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -138,6 +138,8 @@ "calc.maintainer-groups.ufes": "Federal University of Esp\u00edrito Santo", "calc.maintainer-groups.savben": "Istituto di Istruzione Superiore Savoia Benincasa", "calc.editors.button-history": "history", + "calc.editors.button-clear-history": "clear", + "calc.editors.confirm-clear-history": "Are you sure you want to clear the history? This action cannot be undone.", "calc.editors.insert-relation-title": "Insert", "calc.editors.insert-relation-tooltip": "Insert relation or column names", "calc.editors.group.tab-name": "Group Editor", @@ -277,5 +279,6 @@ "calc.editors.ra.button-zoom-out": "Zoom out", "calc.editors.ra.button-zoom-reset": "Reset zoom", "calc.menu.recently-used": "Recently used gists", - "calc.result.exec.time": "Execution time: " + "calc.result.exec.time": "Execution time: ", + "local.change": "Reload page to change language?" } diff --git a/src/locales/en.ts b/src/locales/en.ts index 7e9fa548..e5fdee0b 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -104,6 +104,8 @@ export const langEN = { 'calc.maintainer-groups.ufes': 'Federal University of Espírito Santo', 'calc.maintainer-groups.savben': 'Istituto di Istruzione Superiore Savoia Benincasa', 'calc.editors.button-history': 'history', + 'calc.editors.button-clear-history': 'clear', + 'calc.editors.confirm-clear-history': 'Are you sure you want to clear the history? This action cannot be undone.', 'calc.editors.insert-relation-title': 'Insert', 'calc.editors.insert-relation-tooltip': 'Insert relation or column names', 'calc.editors.group.tab-name': 'Group Editor', diff --git a/src/locales/es.json b/src/locales/es.json index 85955e65..dd3e8391 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -138,6 +138,8 @@ "calc.maintainer-groups.ufes": "Universidad Federal de Esp\u00edrito Santo", "calc.maintainer-groups.savben": "Istituto di Istruzione Superiore Savoia Benincasa", "calc.editors.button-history": "historia", + "calc.editors.button-clear-history": "borrar", + "calc.editors.confirm-clear-history": "\u00bfEst\u00e1s seguro de que deseas borrar el historial? Esta acci\u00f3n no se puede deshacer.", "calc.editors.insert-relation-title": "Insertar", "calc.editors.insert-relation-tooltip": "Insertar nombres de relaciones o columnas", "calc.editors.group.tab-name": "Editor de Grupo", @@ -277,5 +279,6 @@ "calc.editors.ra.button-zoom-out": "Alejar", "calc.editors.ra.button-zoom-reset": "Restablecer zoom", "calc.menu.recently-used": "Gists utilizados recientemente", - "calc.result.exec.time": "Tiempo de consulta: " + "calc.result.exec.time": "Tiempo de consulta: ", + "local.change": "¿Recargar la p\u00e1gina para cambiar el idioma?" } diff --git a/src/locales/es.ts b/src/locales/es.ts index e8d193cf..1a7bfe91 100644 --- a/src/locales/es.ts +++ b/src/locales/es.ts @@ -113,6 +113,8 @@ export const langES: Partial = { 'calc.maintainer-groups.ufes': 'Universidad Federal de Espírito Santo', 'calc.maintainer-groups.savben': 'Istituto di Istruzione Superiore Savoia Benincasa', 'calc.editors.button-history': 'historia', + 'calc.editors.button-clear-history': 'borrar', + 'calc.editors.confirm-clear-history': '¿Estás seguro de que deseas borrar el historial? Esta acción no se puede deshacer.', 'calc.editors.insert-relation-title': 'Insertar', 'calc.editors.insert-relation-tooltip': 'Insertar nombres de relaciones o columnas', 'calc.editors.group.tab-name': 'Editor de Grupo', diff --git a/src/locales/it.json b/src/locales/it.json index abc26ef2..e7abfdf1 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -89,6 +89,8 @@ "calc.maintainer-groups.ufes": "Universit\u00e0 Federale del Santo Spirito", "calc.maintainer-groups.savben": "Istituto di Istruzione Superiore Savoia Benincasa", "calc.editors.button-history": "cronologia", + "calc.editors.button-clear-history": "cancella", + "calc.editors.confirm-clear-history": "Sei sicuro di voler cancellare la cronologia? Questa azione non pu\u00f2 essere annullata.", "calc.editors.insert-relation-title": "Inserisci", "calc.editors.insert-relation-tooltip": "Inserisci nomi di relazioni o colonne", "calc.editors.group.tab-name": "Editor di gruppo", @@ -228,5 +230,6 @@ "calc.editors.ra.button-zoom-out": "Rimpiccolisci", "calc.editors.ra.button-zoom-reset": "Ripristina zoom", "calc.menu.recently-used": "Gists usati di recente", - "calc.result.exec.time": "Tempo di esecuzione: " + "calc.result.exec.time": "Tempo di esecuzione: ", + "local.change": "Ricaricare la pagina per cambiare la lingua?" } diff --git a/src/locales/kr.json b/src/locales/kr.json index 37a7104c..36b34026 100644 --- a/src/locales/kr.json +++ b/src/locales/kr.json @@ -138,6 +138,8 @@ "calc.maintainer-groups.ufes": "\uc5d0\uc2a4\ud53c\ub9ac\ud1a0 \uc0b0\ud1a0 \uc5f0\ubc29\ub300\ud559\uad50", "calc.maintainer-groups.savben": "Savoia Benincasa \uace0\ub4f1\uad50\uc6d0\uae30\uad00", "calc.editors.button-history": "\uae30\ub85d", + "calc.editors.button-clear-history": "\uae30\ub85d \uc0c8\ub85c\uace0\uce68", + "calc.editors.confirm-clear-history": "\uae30\ub85d\uc744 \uc0c8\ub85c\uace0\uce68 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c? \uc774 \uc791\uc5c5\uc740 \ucde8\uc18c\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.", "calc.editors.insert-relation-title": "Insert", "calc.editors.insert-relation-tooltip": "Insert relation or column names", "calc.editors.group.tab-name": "\uadf8\ub8f9 \uc5d0\ub514\ud130", @@ -277,5 +279,6 @@ "calc.editors.ra.button-zoom-out": "줌아웃", "calc.editors.ra.button-zoom-reset": "줌초기화", "calc.menu.recently-used": "Recently used gists", - "calc.result.exec.time": "Execution time: " + "calc.result.exec.time": "Execution time: ", + "local.change": "\uc5b8\uc5b4\ub97c \ubcc0\uacbd\ud558\ub824\uba74 \ud398\uc774\uc9c0\ub97c \uc0c8\ub85c\uace0\uce68\ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?" } diff --git a/src/locales/kr.ts b/src/locales/kr.ts index aecc0287..f07628c4 100644 --- a/src/locales/kr.ts +++ b/src/locales/kr.ts @@ -85,6 +85,8 @@ export const langKR = { 'calc.maintainer-groups.ufes': '에스피리토 산토 연방대학교', 'calc.maintainer-groups.savben': 'Savoia Benincasa 고등교육기관', 'calc.editors.button-history': '기록', + 'calc.editors.button-clear-history': '기록 새로고침', + 'calc.editors.confirm-clear-history': '기록을 새로고침 하시겠습니까? 이 작업은 취소할 수 없습니다.', 'calc.editors.insert-relation-title': 'Insert', 'calc.editors.insert-relation-tooltip': 'Insert relation or column names', 'calc.editors.group.tab-name': '그룹 에디터', diff --git a/src/locales/languages.csv b/src/locales/languages.csv index 5e920bb5..9579b990 100644 --- a/src/locales/languages.csv +++ b/src/locales/languages.csv @@ -121,6 +121,8 @@ calc.maintainer-groups.hsd,University of Applied Sciences Düsseldorf,Universida calc.maintainer-groups.ufes,Federal University of Espírito Santo,Universidade Federal do Espírito Santo,Bundesuniversität Espirito Santo,Universidad Federal de Espírito Santo,에스피리토 산토 연방대학교,Università Federale del Santo Spirito calc.maintainer-groups.savben,Istituto di Istruzione Superiore Savoia Benincasa,Istituto di Istruzione Superiore Savoia Benincasa,Istituto di Istruzione Superiore Savoia Benincasa,Istituto di Istruzione Superiore Savoia Benincasa,Istituto di Istruzione Superiore Savoia Benincasa,Istituto di Istruzione Superiore Savoia Benincasa calc.editors.button-history,history,Histórico,Verlauf,historia,기록,cronologia +calc.editors.button-clear-history,clear,limpar,Verlauf löschen,borrar,기록 새로고침,cancella +calc.editors.confirm-clear-history,Are you sure you want to clear the history? This action cannot be undone.,Tem certeza de que deseja limpar o histórico? Esta ação não pode ser desfeita.,"Sind Sie sicher, dass Sie den Verlauf löschen möchten?",¿Estás seguro de que deseas borrar el historial? Esta acción no se puede deshacer.,기록을 새로고침 하시겠습니까? 이 작업은 취소할 수 없습니다.,Sei sicuro di voler cancellare la cronologia? Questa azione non può essere annullata. calc.editors.insert-relation-title,Insert,Inserir,Einfügen,Insertar,Insert,Inserisci calc.editors.insert-relation-tooltip,Insert relation or column names,Inserir relação ou nomes de coluna,Beziehungs- oder Spaltennamen einfügen,Insertar nombres de relaciones o columnas,Insert relation or column names,Inserisci nomi di relazioni o colonne calc.editors.group.tab-name,Group Editor,Editor de Grupo,Datensatz Editor,Editor de Grupo,그룹 에디터,Editor di gruppo @@ -389,4 +391,5 @@ calc.editors.ra.inline-editor.button-ok,Ok,Ok,Ok,Ok,Ok,Ok calc.editors.ra.inline-editor.row-name,Name,Nome,Name,Nombre,Name,Nome calc.editors.ra.inline-editor.row-type,Type,Tipo,Typ,Escriba,Type,Tipo calc.editors.ra.inline-editor.input-relation-name,Relation Name,Nome da Relação,Relations Name,Nombre de la relación,Relation Name,Nome relazione -calc.navigation.imprint,Imprint,Impressão,Impressum,Imprimir,Imprint,Impressum \ No newline at end of file +calc.navigation.imprint,Imprint,Impressão,Impressum,Imprimir,Imprint,Impressum +local.change,Reload page to change language?,Recarregar página para alterar o idioma?,Seite neu laden um Sprache zu ändern?,¿Recargar la página para cambiar el idioma?,언어를 변경하려면 페이지를 새로고침하시겠습니까?,Ricaricare la pagina per cambiare la lingua? \ No newline at end of file diff --git a/src/locales/pt.json b/src/locales/pt.json index eed0d424..0a4f8a85 100644 --- a/src/locales/pt.json +++ b/src/locales/pt.json @@ -138,6 +138,8 @@ "calc.maintainer-groups.ufes": "Universidade Federal do Esp\u00edrito Santo", "calc.maintainer-groups.savben": "Istituto di Istruzione Superiore Savoia Benincasa", "calc.editors.button-history": "hist\u00f3rico", + "calc.editors.button-clear-history": "Limpar", + "calc.editors.confirm-clear-history": "Tem certeza de que deseja limpar o hist\u00f3rico? Esta a\u00e7\u00e3o n\u00e3o pode ser desfeita.", "calc.editors.insert-relation-title": "Inserir", "calc.editors.insert-relation-tooltip": "Inserir rela\u00e7\u00e3o ou nomes de coluna", "calc.editors.group.tab-name": "Editor de Grupo", @@ -277,5 +279,6 @@ "calc.editors.ra.button-zoom-out": "Diminuir zoom", "calc.editors.ra.button-zoom-reset": "Redefinir zoom", "calc.menu.recently-used": "Gists usados recentemente", - "calc.result.exec.time": "Tempo de execu\u00e7\u00e3o: " + "calc.result.exec.time": "Tempo de execu\u00e7\u00e3o: ", + "local.change": "Recarregar p\u00e1gina para alterar o idioma?" } diff --git a/src/locales/pt.ts b/src/locales/pt.ts index 67584b79..9eb99a03 100644 --- a/src/locales/pt.ts +++ b/src/locales/pt.ts @@ -216,6 +216,8 @@ export const langPT = { 'editor.inline-relation-editor.button-cancel': 'Cancelar', 'calc.editors.group.modal-sqldump.button-close': 'Fechar', 'calc.editors.button-history': 'Hist\u00f3rico', + 'calc.editors.button-clear-history': 'Limpar', + 'calc.editors.confirm-clear-history': 'Tem certeza de que deseja limpar o hist\u00f3rico? Esta a\u00e7\u00e3o n\u00e3o pode ser desfeita.', 'calc.editors.ra.inline-editor.button-upload-csv': 'Upload CSV', 'calc.navigation.language': 'Idioma', 'calc.menu.create-own-dataset-headline': 'Crie seu pr\u00f3prio Dataset', @@ -323,6 +325,6 @@ export const langPT = { 'calc.editors.ra.toolbar.inline-relation': 'rela\u00e7\u00e3o aninhada', 'calc.editors.group.new-group-example-group': '\u2013 este \u00e9 um exemplo\n\ngroup: nomeDoNovoGrupo \n\n\nA = {\n\ta:string, b:number\n\texemplo, 42\n}', - 'local.change': 'Recarregar página para alterar o idioma?' + 'local.change': 'Recarregar p\u00e1gina para alterar o idioma?' };