feat(admin): product editor auto-slug, SKU helper, one-click SEO fill

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

P0 user feedback: admins did not know what SKU means, had to hand-write slugs, and left SEO empty.

- Name edits now derive the URL slug automatically (supports Cyrillic/Armenian characters); the derivation stops the moment the slug no longer matches the auto value, so a manually edited slug is never overwritten - verified in browser
- SEO title mirrors the name under the same only-while-untouched rule
- SKU field explains itself (what a stock keeping unit is, that any unique text works) and gains a Generate button producing readable codes like WIR-GAM-7K2P from the product name
- SEO tab gains 'Fill from product details': fills only empty title/description/keywords from name and short description, existing text untouched
- New adminProducts keys (slugHint, skuHint, generate, seoGenerate, seoGenerateHint) in en/ru/hy
This commit is contained in:
sdarbinyan
2026-07-19 08:30:49 +04:00
parent c452d28eca
commit b16e3002e4
7 changed files with 73 additions and 4 deletions

View File

@@ -1538,6 +1538,11 @@ export const en: Translations = {
variantsHint: 'Each variant is a purchasable option of this product, e.g. a size or color, with its own price and stock.',
variants: 'Variants',
archived: 'Archived',
slugHint: 'The web address of this product. Filled in automatically from the name - edit only if you need a custom URL.',
skuHint: 'SKU (stock keeping unit) is your internal product code, used for inventory and order lookups. Any unique text works.',
generate: 'Generate',
seoGenerate: 'Fill from product details',
seoGenerateHint: 'Fills empty fields from the product name and short description. Your existing text is kept.',
seoExplain: 'This is what shows up in search results — a clear title and description help customers find this product.',
searchTitle: 'Search title',
searchTitleHint: 'The headline shown in search results. Keep it short and descriptive.',

View File

@@ -1533,6 +1533,11 @@ export const hy: Translations = {
variantsHint: 'Յուրաքանչյուր տարբերակ այս ապրանքի առանձին գնվող տարբերակ է (օր․՝ չափս կամ գույն)՝ իր գնով և մնացորդով։',
variants: 'Տարբերակներ',
archived: 'Արխիվում',
slugHint: 'Ապրանքի վեբ-հասցեն։ Լրացվում է ինքնաշխատ անունից — փոխեք միայն, եթե պետք է հատուկ URL։',
skuHint: 'SKU (ապրանքային կոդ) — ձեր ներքին կոդն է պահեստի հաշվառման և պատվերների որոնման համար։ Ցանկացած եզակի տեքստ կաշխատի։',
generate: 'Գեներացնել',
seoGenerate: 'Լրացնել ապրանքի տվյալներից',
seoGenerateHint: 'Լրացնում է դատարկ դաշտերը անունից և կարճ նկարագրությունից։ Ձեր տեքստը չի փոխվում։',
seoExplain: 'Սա այն է, ինչ երևում է որոնման արդյունքներում․ հստակ վերնագիրն ու նկարագրությունը օգնում են գտնել այս ապրանքը։',
searchTitle: 'Որոնման վերնագիր',
searchTitleHint: 'Վերնագիրը, որ երևում է որոնման արդյունքներում։ Պահեք կարճ։',

View File

@@ -1533,6 +1533,11 @@ export const ru: Translations = {
variantsHint: 'Каждый вариант — это отдельный покупаемый вариант товара (например, размер или цвет) со своей ценой и остатком.',
variants: 'Варианты',
archived: 'В архиве',
slugHint: 'Веб-адрес этого товара. Заполняется автоматически из названия — меняйте, только если нужен особый URL.',
skuHint: 'SKU (артикул) — ваш внутренний код товара для учёта склада и поиска заказов. Подойдёт любой уникальный текст.',
generate: 'Сгенерировать',
seoGenerate: 'Заполнить из данных товара',
seoGenerateHint: 'Заполняет пустые поля из названия и краткого описания. Ваш текст не перезаписывается.',
seoExplain: 'Это то, что видно в результатах поиска — понятные заголовок и описание помогают найти товар.',
searchTitle: 'Заголовок для поиска',
searchTitleHint: 'Заголовок, показываемый в результатах поиска. Делайте его коротким.',

View File

@@ -1545,6 +1545,11 @@ export interface Translations {
variantsHint: string;
variants: string;
archived: string;
slugHint: string;
skuHint: string;
generate: string;
seoGenerate: string;
seoGenerateHint: string;
seoExplain: string;
searchTitle: string;
searchTitleHint: string;