feat: import and export element (E6)

- golem15-seo-transfer: export by dataset with a Blob download, the
  import file read in the browser and refused over 60 KB, the preview
  table (refused first, 200 rows, scrolling wrapper), Apply gated on
  refused and empty previews, a stale preview kept with the message
- en and pl copy; assets/dist rebuilt
This commit is contained in:
2026-10-27 12:35:26 +01:00
parent ab3b219fec
commit 6f69031c73
6 changed files with 669 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
// Element copy of the SEO field elements (UI-SPEC copywriting E1, E2, E3,
// E4 and E5, plus E7 for the social image), chosen by the ui-locale
// attribute. Plural
// Element copy of the SEO field elements (UI-SPEC copywriting E1 to E6,
// plus E7 for the social image), chosen by the ui-locale attribute. Plural
// texts are CLDR maps; placeholders use :name.
/** A CLDR plural map: one/other in English, one/few/many/other in Polish. */
@@ -101,6 +100,37 @@ export interface Labels {
unsaved: string
stagingNote: string
urlRequired: string
// E6
exportHeading: string
importHeading: string
dataset: string
dsRedirects: string
dsRules: string
dsRecords: string
download: string
chooseFile: string
noFile: string
summary: string
bNew: string
bChanged: string
bUnchanged: string
bRefused: string
bWarning: string
colLine: string
colChange: string
colAddress: string
colField: string
colBefore: string
colAfter: string
colNote: string
rowCap: string
refusedBlocks: string
nothing: string
discard: string
fileTooLarge: string
readFailed: string
openHistory: string
applyCount: Plural
}
const en: Labels = {
@@ -187,6 +217,36 @@ const en: Labels = {
unsaved: 'Tests the text in the editor and the AI bot switches, including unsaved changes.',
stagingNote: 'On this environment every address is blocked. The result shows the production behaviour.',
urlRequired: 'Enter an address starting with /.',
exportHeading: 'Export',
importHeading: 'Import',
dataset: 'Data',
dsRedirects: 'Redirects',
dsRules: 'URL rules',
dsRecords: 'SEO of records',
download: 'Download CSV',
chooseFile: 'Choose CSV file',
noFile: 'No file chosen',
summary: ':new new, :changed changed, :unchanged unchanged, :refused refused',
bNew: 'New',
bChanged: 'Changed',
bUnchanged: 'Unchanged',
bRefused: 'Refused',
bWarning: 'Warning',
colLine: 'Line',
colChange: 'Change',
colAddress: 'Address',
colField: 'Field',
colBefore: 'Before',
colAfter: 'After',
colNote: 'Note',
rowCap: 'Showing the first 200 of :count rows. All rows are applied.',
refusedBlocks: 'Fix the refused rows in the file and preview it again. Nothing is applied while a row is refused.',
nothing: 'The file changes nothing.',
discard: 'Discard preview',
fileTooLarge: 'This file is larger than :limit. Split it into smaller files, or import it through MCP.',
readFailed: 'The file could not be read.',
openHistory: 'Open History',
applyCount: { one: 'Apply :count change', other: 'Apply :count changes' },
}
const pl: Labels = {
@@ -283,6 +343,36 @@ const pl: Labels = {
unsaved: 'Sprawdza tekst w edytorze i przełączniki botów AI, także niezapisane zmiany.',
stagingNote: 'W tym środowisku każdy adres jest zablokowany. Wynik pokazuje zachowanie na produkcji.',
urlRequired: 'Wpisz adres zaczynający się od /.',
exportHeading: 'Eksport',
importHeading: 'Import',
dataset: 'Dane',
dsRedirects: 'Przekierowania',
dsRules: 'Reguły adresów',
dsRecords: 'SEO rekordów',
download: 'Pobierz CSV',
chooseFile: 'Wybierz plik CSV',
noFile: 'Nie wybrano pliku',
summary: 'Nowe: :new, zmienione: :changed, bez zmian: :unchanged, odrzucone: :refused',
bNew: 'Nowy',
bChanged: 'Zmieniony',
bUnchanged: 'Bez zmian',
bRefused: 'Odrzucony',
bWarning: 'Ostrzeżenie',
colLine: 'Wiersz',
colChange: 'Zmiana',
colAddress: 'Adres',
colField: 'Pole',
colBefore: 'Przed',
colAfter: 'Po',
colNote: 'Uwagi',
rowCap: 'Pokazano pierwsze 200 z :count wierszy. Zastosowane zostaną wszystkie.',
refusedBlocks: 'Popraw odrzucone wiersze w pliku i ponownie wyświetl podgląd. Nic nie zostanie zastosowane, dopóki jakiś wiersz jest odrzucony.',
nothing: 'Plik niczego nie zmienia.',
discard: 'Odrzuć podgląd',
fileTooLarge: 'Ten plik jest większy niż :limit. Podziel go na mniejsze pliki lub zaimportuj przez MCP.',
readFailed: 'Nie udało się odczytać pliku.',
openHistory: 'Otwórz Historię zmian',
applyCount: { one: 'Zastosuj :count zmianę', few: 'Zastosuj :count zmiany', many: 'Zastosuj :count zmian', other: 'Zastosuj :count zmiany' },
}
const dictionaries: Record<string, Labels> = { en, pl }