remoção de frase e sintonia de idioma
This commit is contained in:
45
fix_app.cjs
Normal file
45
fix_app.cjs
Normal file
@@ -0,0 +1,45 @@
|
||||
const fs = require('fs');
|
||||
|
||||
let content = fs.readFileSync('src/App.jsx', 'utf8');
|
||||
let lines = content.split('\n');
|
||||
|
||||
// 1312 is index 1311.
|
||||
// 1327 is index 1326.
|
||||
// We want to remove from index 1311 up to (but not including) index 1326.
|
||||
// Count to remove = 1326 - 1311 = 15 lines.
|
||||
|
||||
const newContent = ` <label className="flex items-center gap-3 p-4 rounded-xl border border-gray-100 dark:border-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors">
|
||||
<input type="checkbox" name="isWishlist" defaultChecked={editingItem?.status === 'wishlist'} className="w-5 h-5 text-primary-600 focus:ring-primary-500 rounded-lg" />
|
||||
<div>
|
||||
<span className="font-bold text-sm text-inherit">{t('wishlistDesc')}</span>
|
||||
<p className="text-[10px] uppercase tracking-widest opacity-50">{t('addFuturePurchase')}</p>
|
||||
</div>
|
||||
</label>
|
||||
<div className="space-y-2">
|
||||
<label className="text-[10px] font-black uppercase opacity-40 tracking-widest ml-1 text-inherit">{t('color')} *</label>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => {
|
||||
const translatedColor = c === 'Vermelho' ? t('colorRed') : c === 'Azul' ? t('colorBlue') : c === 'Amarelo' ? t('colorYellow') : c === 'Verde' ? t('colorGreen') : c === 'Laranja' ? t('colorOrange') : c === 'Roxo' ? t('colorPurple') : c === 'Branco' ? t('colorWhite') : c === 'Preto' ? t('colorBlack') : c === 'Cinzento' ? t('colorGray') : c === 'Bege' ? t('colorBeige') : c;
|
||||
return (
|
||||
<button
|
||||
key={c}
|
||||
type="button"
|
||||
onClick={() => {
|
||||
if (itemColors.includes(c)) setItemColors(itemColors.filter(color => color !== c));
|
||||
else setItemColors([...itemColors, c]);
|
||||
}}
|
||||
className={\`px-4 py-2 rounded-xl text-xs font-bold transition-all border-2 \${itemColors.includes(c) ? 'border-primary-600 bg-primary-600 text-white shadow-lg shadow-primary-600/30' : 'border-transparent bg-gray-100 dark:bg-gray-800 text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700'}\`}
|
||||
>
|
||||
{translatedColor}
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
<input type="hidden" name="color" value={itemColors.join(', ')} />
|
||||
{itemColors.length === 0 && <p className="text-[10px] text-red-500 uppercase tracking-widest font-black mt-2">Selecione pelo menos uma cor</p>}
|
||||
</div>`.split('\n');
|
||||
|
||||
lines.splice(1311, 16, ...newContent);
|
||||
|
||||
fs.writeFileSync('src/App.jsx', lines.join('\n'));
|
||||
console.log('App.jsx fixed successfully!');
|
||||
86
patch_app.cjs
Normal file
86
patch_app.cjs
Normal file
@@ -0,0 +1,86 @@
|
||||
const fs = require('fs');
|
||||
let code = fs.readFileSync('src/App.jsx', 'utf8');
|
||||
|
||||
const replacements = [
|
||||
// Laundry message remove
|
||||
[`<p className="opacity-60 font-medium">{t('laundryMsg')}</p>`, ``],
|
||||
|
||||
// Create Section
|
||||
[`<Plus size={10} /> Criar Secção`, `<Plus size={10} /> {t('createSection')}`],
|
||||
[`Ainda não tem secções criadas`, `{t('noSectionsCreated')}`],
|
||||
|
||||
// Look card share tooltip
|
||||
[`{copiedLookId === look.id ? 'Link copiado!' : 'Partilhar'}`, `{copiedLookId === look.id ? t('linkCopied') : t('share')}`],
|
||||
|
||||
// Laundry looks
|
||||
[`peça(s) na lavandaria`, `{t('piecesInLaundry')}`],
|
||||
[`A ser lavados`, `{t('toBeWashed')}`],
|
||||
[`Indisponíveis`, `{t('unavailable')}`],
|
||||
[`Disponíveis (`, `{t('availableLooks')} (`],
|
||||
[`Nenhum look disponível`, `{t('noLooksAvailable')}`],
|
||||
|
||||
// Profile
|
||||
[`<Input label="Localidade"`, `<Input label={t('location')}`],
|
||||
[`placeholder="Ex: Lisboa, Portugal"`, `placeholder={t('locationEx')}`],
|
||||
|
||||
// Feedback
|
||||
[`<Input label="Ideia / Sugestão"`, `<Input label={t('ideaSuggestion')}`],
|
||||
[`<Input label="Bug / Erro"`, `<Input label={t('bugError')}`],
|
||||
[`placeholder="Escreva aqui a sua mensagem..."`, `placeholder={t('writeMessage')}`],
|
||||
[`Enviar Mensagem</button>`, `{t('sendMessage')}</button>`],
|
||||
[`'Mensagem enviada com sucesso!'`, `t('msgSentSuccess')`],
|
||||
[`'Erro ao enviar mensagem. Verifica a tua ligação.'`, `t('msgSendError')`],
|
||||
|
||||
// Notifications
|
||||
[`Notificações</h3>`, `{t('notificationsModal')}</h3>`],
|
||||
[`Sem Notificações`, `{t('noNotifications')}`],
|
||||
[`O utilizador <span`, `{t('userTitle')} <span`],
|
||||
[`guardou o seu look`, `{t('userSavedLook')}`],
|
||||
[`no armário dele!`, `{t('inTheirCloset')}`],
|
||||
|
||||
// Shared Look Modal
|
||||
[`Look Partilhado`, `{t('sharedLookTitle')}`],
|
||||
[`Partilhado por`, `{t('sharedBy')}`],
|
||||
[`'alguém'`, `t('someone')`],
|
||||
[`Peças incluídas`, `{t('includedPieces')}`],
|
||||
[`Ignorar`, `{t('ignore')}`],
|
||||
[`A copiar...`, `{t('copying')}`],
|
||||
[`Copiar para o meu armário`, `{t('copyToMyCloset')}`],
|
||||
|
||||
// Add Item wishlist
|
||||
[`<p className="text-[10px] uppercase tracking-widest opacity-50">Adicionar peça como compra futura</p>`, `<p className="text-[10px] uppercase tracking-widest opacity-50">{t('addFuturePurchase')}</p>`],
|
||||
[`<span className="font-bold text-sm text-inherit">Lista de Desejos</span>`, `<span className="font-bold text-sm text-inherit">{t('wishlistDesc')}</span>`],
|
||||
|
||||
// Settings
|
||||
[`<h4 className="font-bold text-inherit">Suporte e Feedback</h4>`, `<h4 className="font-bold text-inherit">{t('feedbackTitle')}</h4>`],
|
||||
[`<p className="text-xs text-inherit opacity-60">Tem alguma ideia, sugestão ou encontrou algum problema? Envie uma mensagem diretamente para nós!</p>`, `<p className="text-xs text-inherit opacity-60">{t('feedbackDesc')}</p>`],
|
||||
[`<h4 className="font-bold text-inherit">Cor do Tema</h4>`, `<h4 className="font-bold text-inherit">{t('themeColorTitle')}</h4>`],
|
||||
[`<p className="text-xs text-inherit opacity-60">Personalize a cor</p>`, `<p className="text-xs text-inherit opacity-60">{t('personalizeColorDesc')}</p>`],
|
||||
[`Guardar Alterações`, `{t('saveChanges')}`]
|
||||
];
|
||||
|
||||
for (const [oldText, newText] of replacements) {
|
||||
code = code.split(oldText).join(newText);
|
||||
}
|
||||
|
||||
// Color map replacement
|
||||
const colorMapReplace = `['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => (`;
|
||||
if(code.includes(colorMapReplace)) {
|
||||
code = code.replace(
|
||||
colorMapReplace,
|
||||
`['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => {\n const translatedColor = c === 'Vermelho' ? t('colorRed') : c === 'Azul' ? t('colorBlue') : c === 'Amarelo' ? t('colorYellow') : c === 'Verde' ? t('colorGreen') : c === 'Laranja' ? t('colorOrange') : c === 'Roxo' ? t('colorPurple') : c === 'Branco' ? t('colorWhite') : c === 'Preto' ? t('colorBlack') : c === 'Cinzento' ? t('colorGray') : c === 'Bege' ? t('colorBeige') : c;\n return (`
|
||||
);
|
||||
// Be very precise replacing `{c}` to `{translatedColor}`
|
||||
code = code.replace(
|
||||
/className=\{\`px-4 py-2 rounded-xl text-xs font-bold transition-all border-2 \$\{itemColors\.includes\(c\) \? 'border-primary-600 bg-primary-600 text-white shadow-lg shadow-primary-600\/30' : 'border-transparent bg-gray-100 dark:bg-gray-800 text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700'\}\`\}\n\s*>\n\s*\{c\}\n\s*<\/button>/,
|
||||
match => match.replace('{c}', '{translatedColor}')
|
||||
);
|
||||
// Replace the closing block
|
||||
code = code.replace(
|
||||
/<\/button>\n\s*\)\)/,
|
||||
`</button>\n )})`
|
||||
);
|
||||
}
|
||||
|
||||
fs.writeFileSync('src/App.jsx', code);
|
||||
console.log('App.jsx updated successfully');
|
||||
85
safe_patch.cjs
Normal file
85
safe_patch.cjs
Normal file
@@ -0,0 +1,85 @@
|
||||
const fs = require('fs');
|
||||
let code = fs.readFileSync('src/App.jsx', 'utf8');
|
||||
|
||||
const replacements = [
|
||||
// 1. Remove the laundry message exactly
|
||||
[`<p className="opacity-60 font-medium">{t('laundryMsg')}</p>`, ``],
|
||||
|
||||
// 2. Simple exact text string replacements without modifying complex tags or logic
|
||||
[`> Criar Secção`, `> {t('createSection')}`],
|
||||
[`Ainda não tem secções criadas`, `{t('noSectionsCreated')}`],
|
||||
|
||||
[`{copiedLookId === look.id ? 'Link copiado!' : 'Partilhar'}`, `{copiedLookId === look.id ? t('linkCopied') : t('share')}`],
|
||||
|
||||
[`peça(s) na lavandaria`, `{t('piecesInLaundry')}`],
|
||||
[`>A ser lavados<`, `>{t('toBeWashed')}<`],
|
||||
[`— Indisponíveis (`, `— {t('unavailable')} (`],
|
||||
[`— Disponíveis (`, `— {t('availableLooks')} (`],
|
||||
[`Nenhum look disponível`, `{t('noLooksAvailable')}`],
|
||||
|
||||
[`<Input label="Localidade"`, `<Input label={t('location')}`],
|
||||
[`placeholder="Ex: Lisboa, Portugal"`, `placeholder={t('locationEx')}`],
|
||||
|
||||
[`<Input label="Ideia / Sugestão"`, `<Input label={t('ideaSuggestion')}`],
|
||||
[`<Input label="Bug / Erro"`, `<Input label={t('bugError')}`],
|
||||
[`placeholder="Escreva aqui a sua mensagem..."`, `placeholder={t('writeMessage')}`],
|
||||
[`Enviar Mensagem</button>`, `{t('sendMessage')}</button>`],
|
||||
[`'Mensagem enviada com sucesso!'`, `t('msgSentSuccess')`],
|
||||
[`'Erro ao enviar mensagem. Verifica a tua ligação.'`, `t('msgSendError')`],
|
||||
|
||||
[`Notificações</h3>`, `{t('notificationsModal')}</h3>`],
|
||||
[`Sem Notificações`, `{t('noNotifications')}`],
|
||||
[`>guardou o seu look<`, `>{t('userSavedLook')}<`],
|
||||
[`no armário dele!`, `{t('inTheirCloset')}`],
|
||||
|
||||
[`Look Partilhado`, `{t('sharedLookTitle')}`],
|
||||
[`Partilhado por`, `{t('sharedBy')}`],
|
||||
[`'alguém'`, `t('someone')`],
|
||||
[`Peças incluídas`, `{t('includedPieces')}`],
|
||||
[`>Ignorar<`, `>{t('ignore')}<`],
|
||||
[`A copiar...`, `{t('copying')}`],
|
||||
[`Copiar para o meu armário`, `{t('copyToMyCloset')}`],
|
||||
|
||||
[`>Adicionar peça como compra futura<`, `>{t('addFuturePurchase')}<`],
|
||||
[`>{t('wishlist') || 'Lista de Desejos'}<`, `>{t('wishlist') || t('wishlistDesc')}<`],
|
||||
|
||||
[`>Suporte e Feedback<`, `>{t('feedbackTitle')}<`],
|
||||
[`>Tem alguma ideia, sugestão ou encontrou algum problema? Envie uma mensagem diretamente para nós!<`, `>{t('feedbackDesc')}<`],
|
||||
[`>Cor do Tema<`, `>{t('themeColorTitle')}<`],
|
||||
[`>Personalize a cor<`, `>{t('personalizeColorDesc')}<`],
|
||||
[`Guardar Alterações`, `{t('saveChanges')}`]
|
||||
];
|
||||
|
||||
for (const [oldText, newText] of replacements) {
|
||||
code = code.split(oldText).join(newText);
|
||||
}
|
||||
|
||||
// Color map safe replacement using very exact match to avoid breaking braces
|
||||
const oldMapColorCode = `['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => (
|
||||
<button`;
|
||||
const newMapColorCode = `['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => {
|
||||
const translatedColor = c === 'Vermelho' ? t('colorRed') : c === 'Azul' ? t('colorBlue') : c === 'Amarelo' ? t('colorYellow') : c === 'Verde' ? t('colorGreen') : c === 'Laranja' ? t('colorOrange') : c === 'Roxo' ? t('colorPurple') : c === 'Branco' ? t('colorWhite') : c === 'Preto' ? t('colorBlack') : c === 'Cinzento' ? t('colorGray') : c === 'Bege' ? t('colorBeige') : c;
|
||||
return (
|
||||
<button`;
|
||||
code = code.replace(oldMapColorCode, newMapColorCode);
|
||||
|
||||
// Safe replacement for {c} inside button
|
||||
const oldInnerCode = ` className={\`px-4 py-2 rounded-xl text-xs font-bold transition-all border-2 \${itemColors.includes(c) ? 'border-primary-600 bg-primary-600 text-white shadow-lg shadow-primary-600/30' : 'border-transparent bg-gray-100 dark:bg-gray-800 text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700'}\`}
|
||||
>
|
||||
{c}
|
||||
</button>
|
||||
))}`;
|
||||
const newInnerCode = ` className={\`px-4 py-2 rounded-xl text-xs font-bold transition-all border-2 \${itemColors.includes(c) ? 'border-primary-600 bg-primary-600 text-white shadow-lg shadow-primary-600/30' : 'border-transparent bg-gray-100 dark:bg-gray-800 text-gray-500 hover:bg-gray-200 dark:hover:bg-gray-700'}\`}
|
||||
>
|
||||
{translatedColor}
|
||||
</button>
|
||||
);
|
||||
})}`;
|
||||
if (code.includes(oldInnerCode)) {
|
||||
code = code.replace(oldInnerCode, newInnerCode);
|
||||
} else {
|
||||
console.log("WARNING: oldInnerCode not found!");
|
||||
}
|
||||
|
||||
fs.writeFileSync('src/App.jsx', code);
|
||||
console.log('Safe patch applied');
|
||||
50
src/App.jsx
50
src/App.jsx
@@ -1060,7 +1060,7 @@ export default function App() {
|
||||
<Droplets size={40} />
|
||||
</div>
|
||||
<h3 className="text-4xl font-black tracking-tight">{t('laundryBasket')}</h3>
|
||||
<p className="opacity-60 font-medium">{t('laundryMsg')}</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8">
|
||||
@@ -1117,12 +1117,12 @@ export default function App() {
|
||||
<Tag size={12} /> {t('assignSections')}
|
||||
</label>
|
||||
<button type="button" onClick={() => setShowSectionManager(true)} className="text-[10px] font-black uppercase tracking-widest text-primary-600 hover:text-primary-700 flex items-center gap-1">
|
||||
<Plus size={10} /> Criar Secção
|
||||
<Plus size={10} /> {t('createSection')}
|
||||
</button>
|
||||
</div>
|
||||
{sections.length === 0 ? (
|
||||
<div className="p-4 border-2 border-dashed border-gray-200 dark:border-gray-800 rounded-2xl text-center">
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40">Ainda não tem secções criadas</p>
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40">{t('noSectionsCreated')}</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
@@ -1209,7 +1209,7 @@ export default function App() {
|
||||
>
|
||||
{copiedLookId === look.id ? <Check size={18} /> : <Share2 size={18} />}
|
||||
<span className="absolute -top-8 left-1/2 -translate-x-1/2 bg-gray-900 text-white text-[9px] font-black uppercase tracking-widest px-2 py-1 rounded-lg whitespace-nowrap opacity-0 group-hover/share:opacity-100 transition-opacity pointer-events-none">
|
||||
{copiedLookId === look.id ? 'Link copiado!' : 'Partilhar'}
|
||||
{copiedLookId === look.id ? t('linkCopied') : t('share')}
|
||||
</span>
|
||||
</button>
|
||||
<button onClick={() => { setEditingLook(look); setSelectedForLook(look.items); }} className="p-2 text-gray-300 hover:text-primary-500 transition-colors"><Edit2 size={18} /></button>
|
||||
@@ -1237,7 +1237,7 @@ export default function App() {
|
||||
<div className="flex items-center gap-2 mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/20 rounded-xl">
|
||||
<Droplets size={14} className="text-blue-500 shrink-0" />
|
||||
<p className="text-[10px] font-black uppercase tracking-widest text-blue-500">
|
||||
{look.items.filter(id => { const it = clothes.find(c => c.id === id); return it?.status === 'laundry'; }).length} peça(s) na lavandaria
|
||||
{look.items.filter(id => { const it = clothes.find(c => c.id === id); return it?.status === 'laundry'; }).length} {t('piecesInLaundry')}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
@@ -1251,14 +1251,14 @@ export default function App() {
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center gap-3 px-2">
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-green-500"></div>
|
||||
<h3 className="text-2xl font-black tracking-tighter text-inherit">{t('lookHistory')} <span className="text-sm font-bold opacity-40">— Disponíveis ({availableLooks.length})</span></h3>
|
||||
<h3 className="text-2xl font-black tracking-tighter text-inherit">{t('lookHistory')} <span className="text-sm font-bold opacity-40">— {t('availableLooks')} ({availableLooks.length})</span></h3>
|
||||
</div>
|
||||
{availableLooks.length > 0 ? (
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
{availableLooks.map(renderLookCard)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="py-12 text-center opacity-20 font-black uppercase tracking-[0.3em] text-sm">Nenhum look disponível</div>
|
||||
<div className="py-12 text-center opacity-20 font-black uppercase tracking-[0.3em] text-sm">{t('noLooksAvailable')}</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -1267,7 +1267,7 @@ export default function App() {
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center gap-3 px-2">
|
||||
<div className="w-2.5 h-2.5 rounded-full bg-blue-400"></div>
|
||||
<h3 className="text-2xl font-black tracking-tighter text-inherit">A ser lavados <span className="text-sm font-bold opacity-40">— Indisponíveis ({laundryLooks.length})</span></h3>
|
||||
<h3 className="text-2xl font-black tracking-tighter text-inherit">A ser lavados <span className="text-sm font-bold opacity-40">— {t('unavailable')} ({laundryLooks.length})</span></h3>
|
||||
</div>
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
{laundryLooks.map(renderLookCard)}
|
||||
@@ -1312,8 +1312,8 @@ export default function App() {
|
||||
<label className="flex items-center gap-3 p-4 rounded-xl border border-gray-100 dark:border-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors">
|
||||
<input type="checkbox" name="isWishlist" defaultChecked={editingItem?.status === 'wishlist'} className="w-5 h-5 text-primary-600 focus:ring-primary-500 rounded-lg" />
|
||||
<div>
|
||||
<span className="font-bold text-sm text-inherit">{t('wishlist') || 'Lista de Desejos'}</span>
|
||||
<p className="text-[10px] uppercase tracking-widest opacity-50">Adicionar peça como compra futura</p>
|
||||
<span className="font-bold text-sm text-inherit">{t('wishlist') || t('wishlistDesc')}</span>
|
||||
<p className="text-[10px] uppercase tracking-widest opacity-50">{t('addFuturePurchase')}</p>
|
||||
</div>
|
||||
</label>
|
||||
<div className="space-y-2">
|
||||
@@ -1345,12 +1345,12 @@ export default function App() {
|
||||
<Tag size={12} /> {t('assignSections')}
|
||||
</label>
|
||||
<button type="button" onClick={() => setShowSectionManager(true)} className="text-[10px] font-black uppercase tracking-widest text-primary-600 hover:text-primary-700 flex items-center gap-1">
|
||||
<Plus size={10} /> Criar Secção
|
||||
<Plus size={10} /> {t('createSection')}
|
||||
</button>
|
||||
</div>
|
||||
{sections.length === 0 ? (
|
||||
<div className="p-4 border-2 border-dashed border-gray-200 dark:border-gray-800 rounded-2xl text-center">
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40">Ainda não tem secções criadas</p>
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40">{t('noSectionsCreated')}</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex flex-wrap gap-2">
|
||||
@@ -1434,7 +1434,7 @@ export default function App() {
|
||||
</div>
|
||||
</div>
|
||||
<Input label={`${t('bio')} ${t('optional')}`} name="bio" defaultValue={userProfile?.bio || ''} placeholder="..." />
|
||||
<Input label="Localidade" name="location" defaultValue={userProfile?.location || ''} placeholder="Ex: Lisboa, Portugal" />
|
||||
<Input label={t('location')} name="location" defaultValue={userProfile?.location || ''} placeholder={t('locationEx')} />
|
||||
</div>
|
||||
<button disabled={savingProfile} type="submit" className="w-full py-4 bg-primary-600 text-white rounded-xl font-black uppercase text-[10px] tracking-widest shadow-xl shadow-primary-600/30 disabled:opacity-50 hover:scale-[1.01] transition-all">
|
||||
{savingProfile ? t('saving') : t('save')}
|
||||
@@ -1548,7 +1548,7 @@ export default function App() {
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
setToastMessage('Mensagem enviada com sucesso!');
|
||||
setToastMessage(t('msgSentSuccess'));
|
||||
setTimeout(() => setToastMessage(null), 4000);
|
||||
e.target.reset();
|
||||
} else {
|
||||
@@ -1556,7 +1556,7 @@ export default function App() {
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Erro ao enviar feedback:", error);
|
||||
setToastMessage('Erro ao enviar mensagem. Verifica a tua ligação.');
|
||||
setToastMessage(t('msgSendError'));
|
||||
setTimeout(() => setToastMessage(null), 4000);
|
||||
}
|
||||
}} className="space-y-4">
|
||||
@@ -1570,7 +1570,7 @@ export default function App() {
|
||||
<span className="font-bold text-sm text-inherit">Bug / Erro</span>
|
||||
</label>
|
||||
</div>
|
||||
<textarea name="message" required placeholder="Escreva aqui a sua mensagem..." rows={4} className={`w-full p-4 rounded-xl border-none outline-none focus:ring-2 focus:ring-primary-500 font-bold resize-none ${darkMode ? 'bg-gray-800 text-white' : 'bg-gray-50'}`}></textarea>
|
||||
<textarea name="message" required placeholder={t('writeMessage')} rows={4} className={`w-full p-4 rounded-xl border-none outline-none focus:ring-2 focus:ring-primary-500 font-bold resize-none ${darkMode ? 'bg-gray-800 text-white' : 'bg-gray-50'}`}></textarea>
|
||||
<button type="submit" className="w-full py-4 bg-primary-600 text-white rounded-xl font-black uppercase text-[10px] tracking-widest shadow-xl shadow-primary-600/30 hover:scale-[1.01] transition-all">
|
||||
Enviar Mensagem
|
||||
</button>
|
||||
@@ -1631,12 +1631,12 @@ export default function App() {
|
||||
<div className="fixed inset-0 z-[200] flex items-center justify-center bg-black/60 backdrop-blur-sm p-6" onClick={() => setShowNotificationsModal(false)}>
|
||||
<Card className="w-full max-w-md p-8 animate-in zoom-in-95 flex flex-col max-h-[80vh]" darkMode={darkMode} onClick={e => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between mb-8">
|
||||
<h3 className="text-2xl font-black text-inherit flex items-center gap-3"><Bell size={24} className="text-primary-600" /> Notificações</h3>
|
||||
<h3 className="text-2xl font-black text-inherit flex items-center gap-3"><Bell size={24} className="text-primary-600" /> {t('notificationsModal')}</h3>
|
||||
<button onClick={() => setShowNotificationsModal(false)} className="p-2 bg-gray-100 dark:bg-gray-800 rounded-full hover:scale-110 transition-all text-inherit"><X size={20} /></button>
|
||||
</div>
|
||||
<div className="flex-1 overflow-y-auto space-y-4 custom-scrollbar">
|
||||
{notifications.length === 0 ? (
|
||||
<div className="py-12 text-center opacity-30 font-black uppercase tracking-[0.3em] text-sm">Sem Notificações</div>
|
||||
<div className="py-12 text-center opacity-30 font-black uppercase tracking-[0.3em] text-sm">{t('noNotifications')}</div>
|
||||
) : notifications.map(notif => (
|
||||
<div key={notif.id} className={`p-4 rounded-2xl flex items-start gap-4 ${!notif.read ? 'bg-primary-50 dark:bg-primary-900/20' : 'bg-gray-50 dark:bg-gray-800'}`}>
|
||||
<div className={`p-3 rounded-full ${!notif.read ? 'bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400' : 'bg-gray-200 text-gray-500 dark:bg-gray-700'}`}>
|
||||
@@ -1645,7 +1645,7 @@ export default function App() {
|
||||
<div className="flex-1">
|
||||
<p className="font-bold text-sm text-inherit">
|
||||
{notif.type === 'look_copied' && (
|
||||
<>O utilizador <span className="text-primary-600">{notif.copiedByEmail}</span> guardou o seu look "{notif.lookName}" no armário dele!</>
|
||||
<>O utilizador <span className="text-primary-600">{notif.copiedByEmail}</span> guardou o seu look "{notif.lookName}" {t('inTheirCloset')}</>
|
||||
)}
|
||||
</p>
|
||||
<p className="text-[10px] uppercase font-black tracking-widest opacity-40 mt-2">
|
||||
@@ -1864,7 +1864,7 @@ export default function App() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Modal de Look Partilhado */}
|
||||
{/* Modal de {t('sharedLookTitle')} */}
|
||||
{showSharedLookModal && sharedLookData && (
|
||||
<div className="fixed inset-0 z-[300] flex items-center justify-center bg-black/70 backdrop-blur-md p-6" onClick={() => { setShowSharedLookModal(false); setSharedLookData(null); }}>
|
||||
<div
|
||||
@@ -1879,16 +1879,16 @@ export default function App() {
|
||||
<div className="p-2 bg-white/20 rounded-xl backdrop-blur-sm">
|
||||
<Share2 size={20} className="text-white" />
|
||||
</div>
|
||||
<span className="text-white/80 font-black uppercase text-[10px] tracking-widest">Look Partilhado</span>
|
||||
<span className="text-white/80 font-black uppercase text-[10px] tracking-widest">{t('sharedLookTitle')}</span>
|
||||
</div>
|
||||
<h2 className="text-3xl font-black text-white tracking-tight">{sharedLookData.lookName}</h2>
|
||||
<p className="text-white/60 text-sm font-bold mt-1">{sharedLookData.items.length} peça{sharedLookData.items.length !== 1 ? 's' : ''} • Partilhado por {sharedLookData.ownerEmail?.split('@')[0] || 'alguém'}</p>
|
||||
<p className="text-white/60 text-sm font-bold mt-1">{sharedLookData.items.length} peça{sharedLookData.items.length !== 1 ? 's' : ''} • {t('sharedBy')} {sharedLookData.ownerEmail?.split('@')[0] || t('someone')}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Peças do look */}
|
||||
<div className={`p-8 ${darkMode ? 'bg-gray-900' : 'bg-white'}`}>
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40 mb-4">Peças incluídas</p>
|
||||
<p className="text-[10px] font-black uppercase tracking-widest opacity-40 mb-4">{t('includedPieces')}</p>
|
||||
<div className="flex flex-wrap gap-3 mb-8">
|
||||
{sharedLookData.items.map((item, idx) => (
|
||||
<div key={idx} className="relative group/item">
|
||||
@@ -1927,9 +1927,9 @@ export default function App() {
|
||||
style={{ background: 'linear-gradient(135deg, hsl(var(--primary-600)), hsl(var(--primary-500)))' }}
|
||||
>
|
||||
{sharedLookCopying ? (
|
||||
<><Loader2 size={16} className="animate-spin" /> A copiar...</>
|
||||
<><Loader2 size={16} className="animate-spin" /> {t('copying')}</>
|
||||
) : (
|
||||
<><Check size={16} /> Copiar para o meu armário</>
|
||||
<><Check size={16} /> {t('copyToMyCloset')}</>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
185
src/lib/i18n.js
185
src/lib/i18n.js
@@ -131,7 +131,42 @@ export const translations = {
|
||||
allSections: "Todas",
|
||||
confirmDeleteSection: "Apagar esta secção?",
|
||||
sectionPlaceholder: "Ex: Trabalho, Festa...",
|
||||
emojiPlaceholder: "Ex: 💼"
|
||||
emojiPlaceholder: "Ex: 💼",
|
||||
createSection: "Criar Secção",
|
||||
noSectionsCreated: "Ainda não tem secções criadas",
|
||||
linkCopied: "Link copiado!",
|
||||
share: "Partilhar",
|
||||
piecesInLaundry: "peça(s) na lavandaria",
|
||||
toBeWashed: "A ser lavados",
|
||||
unavailable: "Indisponíveis",
|
||||
availableLooks: "Disponíveis",
|
||||
noLooksAvailable: "Nenhum look disponível",
|
||||
location: "Localidade",
|
||||
locationEx: "Ex: Lisboa, Portugal",
|
||||
ideaSuggestion: "Ideia / Sugestão",
|
||||
bugError: "Bug / Erro",
|
||||
writeMessage: "Escreva aqui a sua mensagem...",
|
||||
sendMessage: "Enviar Mensagem",
|
||||
notificationsModal: "Notificações",
|
||||
noNotifications: "Sem Notificações",
|
||||
userSavedLook: "guardou o seu look",
|
||||
inTheirCloset: "no armário dele!",
|
||||
sharedLookTitle: "Look Partilhado",
|
||||
sharedBy: "Partilhado por",
|
||||
includedPieces: "Peças incluídas",
|
||||
ignore: "Ignorar",
|
||||
copying: "A copiar...",
|
||||
copyToMyCloset: "Copiar para o meu armário",
|
||||
msgSentSuccess: "Mensagem enviada com sucesso!",
|
||||
msgSendError: "Erro ao enviar mensagem. Verifica a tua ligação.",
|
||||
addFuturePurchase: "Adicionar peça como compra futura",
|
||||
wishlistDesc: "Lista de Desejos",
|
||||
someone: "alguém",
|
||||
feedbackTitle: "Suporte e Feedback",
|
||||
feedbackDesc: "Tem alguma ideia, sugestão ou encontrou algum problema? Envie uma mensagem diretamente para nós!",
|
||||
themeColorTitle: "Cor do Tema",
|
||||
personalizeColorDesc: "Personalize a cor",
|
||||
saveChanges: "Guardar Alterações",
|
||||
},
|
||||
EN: {
|
||||
loginModeIntro: "The Future of Your Style",
|
||||
@@ -265,7 +300,42 @@ export const translations = {
|
||||
allSections: "All",
|
||||
confirmDeleteSection: "Delete this section?",
|
||||
sectionPlaceholder: "E.g.: Work, Party...",
|
||||
emojiPlaceholder: "E.g.: 💼"
|
||||
emojiPlaceholder: "E.g.: 💼",
|
||||
createSection: "Create Section",
|
||||
noSectionsCreated: "No sections created yet",
|
||||
linkCopied: "Link copied!",
|
||||
share: "Share",
|
||||
piecesInLaundry: "piece(s) in laundry",
|
||||
toBeWashed: "To be washed",
|
||||
unavailable: "Unavailable",
|
||||
availableLooks: "Available",
|
||||
noLooksAvailable: "No look available",
|
||||
location: "Location",
|
||||
locationEx: "E.g.: Lisbon, Portugal",
|
||||
ideaSuggestion: "Idea / Suggestion",
|
||||
bugError: "Bug / Error",
|
||||
writeMessage: "Write your message here...",
|
||||
sendMessage: "Send Message",
|
||||
notificationsModal: "Notifications",
|
||||
noNotifications: "No Notifications",
|
||||
userSavedLook: "saved your look",
|
||||
inTheirCloset: "in their closet!",
|
||||
sharedLookTitle: "Shared Look",
|
||||
sharedBy: "Shared by",
|
||||
includedPieces: "Included Pieces",
|
||||
ignore: "Ignore",
|
||||
copying: "Copying...",
|
||||
copyToMyCloset: "Copy to my closet",
|
||||
msgSentSuccess: "Message sent successfully!",
|
||||
msgSendError: "Error sending message. Check your connection.",
|
||||
addFuturePurchase: "Add piece as future purchase",
|
||||
wishlistDesc: "Wishlist",
|
||||
someone: "someone",
|
||||
feedbackTitle: "Support and Feedback",
|
||||
feedbackDesc: "Do you have any ideas, suggestions, or found a problem? Send a message directly to us!",
|
||||
themeColorTitle: "Theme Color",
|
||||
personalizeColorDesc: "Personalize the color",
|
||||
saveChanges: "Save Changes",
|
||||
},
|
||||
ES: {
|
||||
loginModeIntro: "El Futuro de Tu Estilo",
|
||||
@@ -399,7 +469,42 @@ export const translations = {
|
||||
allSections: "Todas",
|
||||
confirmDeleteSection: "¿Eliminar esta sección?",
|
||||
sectionPlaceholder: "Ej: Trabajo, Fiesta...",
|
||||
emojiPlaceholder: "Ej: 💼"
|
||||
emojiPlaceholder: "Ej: 💼",
|
||||
createSection: "Crear Sección",
|
||||
noSectionsCreated: "Aún no hay secciones creadas",
|
||||
linkCopied: "¡Enlace copiado!",
|
||||
share: "Compartir",
|
||||
piecesInLaundry: "pieza(s) en la lavandería",
|
||||
toBeWashed: "Por lavar",
|
||||
unavailable: "No disponibles",
|
||||
availableLooks: "Disponibles",
|
||||
noLooksAvailable: "Ningún look disponible",
|
||||
location: "Ubicación",
|
||||
locationEx: "Ej: Lisboa, Portugal",
|
||||
ideaSuggestion: "Idea / Sugerencia",
|
||||
bugError: "Error / Fallo",
|
||||
writeMessage: "Escribe aquí tu mensaje...",
|
||||
sendMessage: "Enviar Mensaje",
|
||||
notificationsModal: "Notificaciones",
|
||||
noNotifications: "Sin Notificaciones",
|
||||
userSavedLook: "guardó tu look",
|
||||
inTheirCloset: "en su armario!",
|
||||
sharedLookTitle: "Look Compartido",
|
||||
sharedBy: "Compartido por",
|
||||
includedPieces: "Piezas incluidas",
|
||||
ignore: "Ignorar",
|
||||
copying: "Copiando...",
|
||||
copyToMyCloset: "Copiar a mi armario",
|
||||
msgSentSuccess: "¡Mensaje enviado con éxito!",
|
||||
msgSendError: "Error al enviar. Revisa tu conexión.",
|
||||
addFuturePurchase: "Añadir pieza como compra futura",
|
||||
wishlistDesc: "Lista de Deseos",
|
||||
someone: "alguien",
|
||||
feedbackTitle: "Soporte y Comentarios",
|
||||
feedbackDesc: "¿Tienes alguna idea, sugerencia o encontraste un problema? ¡Envíanos un mensaje directamente!",
|
||||
themeColorTitle: "Color del Tema",
|
||||
personalizeColorDesc: "Personaliza el color",
|
||||
saveChanges: "Guardar Cambios",
|
||||
},
|
||||
FR: {
|
||||
loginModeIntro: "Le Futur de Ton Style",
|
||||
@@ -533,7 +638,42 @@ export const translations = {
|
||||
allSections: "Toutes",
|
||||
confirmDeleteSection: "Supprimer cette section ?",
|
||||
sectionPlaceholder: "Ex: Travail, Fête...",
|
||||
emojiPlaceholder: "Ex: 💼"
|
||||
emojiPlaceholder: "Ex: 💼",
|
||||
createSection: "Créer une Section",
|
||||
noSectionsCreated: "Aucune section créée",
|
||||
linkCopied: "Lien copié !",
|
||||
share: "Partager",
|
||||
piecesInLaundry: "pièce(s) à la blanchisserie",
|
||||
toBeWashed: "À laver",
|
||||
unavailable: "Indisponibles",
|
||||
availableLooks: "Disponibles",
|
||||
noLooksAvailable: "Aucun look disponible",
|
||||
location: "Emplacement",
|
||||
locationEx: "Ex: Lisbonne, Portugal",
|
||||
ideaSuggestion: "Idée / Suggestion",
|
||||
bugError: "Bug / Erreur",
|
||||
writeMessage: "Écrivez votre message ici...",
|
||||
sendMessage: "Envoyer le Message",
|
||||
notificationsModal: "Notifications",
|
||||
noNotifications: "Aucune Notification",
|
||||
userSavedLook: "a sauvegardé votre look",
|
||||
inTheirCloset: "dans son placard !",
|
||||
sharedLookTitle: "Look Partagé",
|
||||
sharedBy: "Partagé par",
|
||||
includedPieces: "Pièces incluses",
|
||||
ignore: "Ignorer",
|
||||
copying: "Copie en cours...",
|
||||
copyToMyCloset: "Copier dans mon placard",
|
||||
msgSentSuccess: "Message envoyé avec succès !",
|
||||
msgSendError: "Erreur d'envoi. Vérifiez votre connexion.",
|
||||
addFuturePurchase: "Ajouter comme achat futur",
|
||||
wishlistDesc: "Liste de Souhaits",
|
||||
someone: "quelqu'un",
|
||||
feedbackTitle: "Support et Commentaires",
|
||||
feedbackDesc: "Avez-vous des idées, des suggestions ou trouvé un problème ? Envoyez-nous un message directement !",
|
||||
themeColorTitle: "Couleur du Thème",
|
||||
personalizeColorDesc: "Personnaliser la couleur",
|
||||
saveChanges: "Enregistrer les Modifications",
|
||||
},
|
||||
DE: {
|
||||
loginModeIntro: "Die Zukunft deines Stils",
|
||||
@@ -667,6 +807,41 @@ export const translations = {
|
||||
allSections: "Alle",
|
||||
confirmDeleteSection: "Diesen Bereich löschen?",
|
||||
sectionPlaceholder: "Zb: Arbeit, Party...",
|
||||
emojiPlaceholder: "Zb: 💼"
|
||||
emojiPlaceholder: "Zb: 💼",
|
||||
createSection: "Bereich erstellen",
|
||||
noSectionsCreated: "Noch keine Bereiche erstellt",
|
||||
linkCopied: "Link kopiert!",
|
||||
share: "Teilen",
|
||||
piecesInLaundry: "Stück(e) in der Wäsche",
|
||||
toBeWashed: "Zum Waschen",
|
||||
unavailable: "Nicht verfügbar",
|
||||
availableLooks: "Verfügbar",
|
||||
noLooksAvailable: "Kein Look verfügbar",
|
||||
location: "Ort",
|
||||
locationEx: "Z.B.: Lissabon, Portugal",
|
||||
ideaSuggestion: "Idee / Vorschlag",
|
||||
bugError: "Fehler / Bug",
|
||||
writeMessage: "Schreibe hier deine Nachricht...",
|
||||
sendMessage: "Nachricht Senden",
|
||||
notificationsModal: "Benachrichtigungen",
|
||||
noNotifications: "Keine Benachrichtigungen",
|
||||
userSavedLook: "hat deinen Look gespeichert",
|
||||
inTheirCloset: "in seinem Schrank!",
|
||||
sharedLookTitle: "Geteilter Look",
|
||||
sharedBy: "Geteilt von",
|
||||
includedPieces: "Enthaltene Stücke",
|
||||
ignore: "Ignorieren",
|
||||
copying: "Kopieren...",
|
||||
copyToMyCloset: "In meinen Schrank kopieren",
|
||||
msgSentSuccess: "Nachricht erfolgreich gesendet!",
|
||||
msgSendError: "Fehler beim Senden. Überprüfe deine Verbindung.",
|
||||
addFuturePurchase: "Als zukünftigen Kauf hinzufügen",
|
||||
wishlistDesc: "Wunschzettel",
|
||||
someone: "jemand",
|
||||
feedbackTitle: "Support und Feedback",
|
||||
feedbackDesc: "Hast du Ideen, Vorschläge oder ein Problem gefunden? Sende uns direkt eine Nachricht!",
|
||||
themeColorTitle: "Themenfarbe",
|
||||
personalizeColorDesc: "Farbe anpassen",
|
||||
saveChanges: "Änderungen Speichern",
|
||||
}
|
||||
};
|
||||
|
||||
211
update_i18n.cjs
Normal file
211
update_i18n.cjs
Normal file
@@ -0,0 +1,211 @@
|
||||
const fs = require('fs');
|
||||
let code = fs.readFileSync('src/lib/i18n.js', 'utf8');
|
||||
|
||||
const newKeys = {
|
||||
PT: {
|
||||
createSection: "Criar Secção",
|
||||
noSectionsCreated: "Ainda não tem secções criadas",
|
||||
linkCopied: "Link copiado!",
|
||||
share: "Partilhar",
|
||||
piecesInLaundry: "peça(s) na lavandaria",
|
||||
toBeWashed: "A ser lavados",
|
||||
unavailable: "Indisponíveis",
|
||||
availableLooks: "Disponíveis",
|
||||
noLooksAvailable: "Nenhum look disponível",
|
||||
location: "Localidade",
|
||||
locationEx: "Ex: Lisboa, Portugal",
|
||||
ideaSuggestion: "Ideia / Sugestão",
|
||||
bugError: "Bug / Erro",
|
||||
writeMessage: "Escreva aqui a sua mensagem...",
|
||||
sendMessage: "Enviar Mensagem",
|
||||
notificationsModal: "Notificações",
|
||||
noNotifications: "Sem Notificações",
|
||||
userSavedLook: "guardou o seu look",
|
||||
inTheirCloset: "no armário dele!",
|
||||
sharedLookTitle: "Look Partilhado",
|
||||
sharedBy: "Partilhado por",
|
||||
includedPieces: "Peças incluídas",
|
||||
ignore: "Ignorar",
|
||||
copying: "A copiar...",
|
||||
copyToMyCloset: "Copiar para o meu armário",
|
||||
msgSentSuccess: "Mensagem enviada com sucesso!",
|
||||
msgSendError: "Erro ao enviar mensagem. Verifica a tua ligação.",
|
||||
addFuturePurchase: "Adicionar peça como compra futura",
|
||||
wishlistDesc: "Lista de Desejos",
|
||||
someone: "alguém",
|
||||
feedbackTitle: "Suporte e Feedback",
|
||||
feedbackDesc: "Tem alguma ideia, sugestão ou encontrou algum problema? Envie uma mensagem diretamente para nós!",
|
||||
themeColorTitle: "Cor do Tema",
|
||||
personalizeColorDesc: "Personalize a cor",
|
||||
saveChanges: "Guardar Alterações"
|
||||
},
|
||||
EN: {
|
||||
createSection: "Create Section",
|
||||
noSectionsCreated: "No sections created yet",
|
||||
linkCopied: "Link copied!",
|
||||
share: "Share",
|
||||
piecesInLaundry: "piece(s) in laundry",
|
||||
toBeWashed: "To be washed",
|
||||
unavailable: "Unavailable",
|
||||
availableLooks: "Available",
|
||||
noLooksAvailable: "No look available",
|
||||
location: "Location",
|
||||
locationEx: "E.g.: Lisbon, Portugal",
|
||||
ideaSuggestion: "Idea / Suggestion",
|
||||
bugError: "Bug / Error",
|
||||
writeMessage: "Write your message here...",
|
||||
sendMessage: "Send Message",
|
||||
notificationsModal: "Notifications",
|
||||
noNotifications: "No Notifications",
|
||||
userSavedLook: "saved your look",
|
||||
inTheirCloset: "in their closet!",
|
||||
sharedLookTitle: "Shared Look",
|
||||
sharedBy: "Shared by",
|
||||
includedPieces: "Included Pieces",
|
||||
ignore: "Ignore",
|
||||
copying: "Copying...",
|
||||
copyToMyCloset: "Copy to my closet",
|
||||
msgSentSuccess: "Message sent successfully!",
|
||||
msgSendError: "Error sending message. Check your connection.",
|
||||
addFuturePurchase: "Add piece as future purchase",
|
||||
wishlistDesc: "Wishlist",
|
||||
someone: "someone",
|
||||
feedbackTitle: "Support and Feedback",
|
||||
feedbackDesc: "Do you have any ideas, suggestions, or found a problem? Send a message directly to us!",
|
||||
themeColorTitle: "Theme Color",
|
||||
personalizeColorDesc: "Personalize the color",
|
||||
saveChanges: "Save Changes"
|
||||
},
|
||||
ES: {
|
||||
createSection: "Crear Sección",
|
||||
noSectionsCreated: "Aún no hay secciones creadas",
|
||||
linkCopied: "¡Enlace copiado!",
|
||||
share: "Compartir",
|
||||
piecesInLaundry: "pieza(s) en la lavandería",
|
||||
toBeWashed: "Por lavar",
|
||||
unavailable: "No disponibles",
|
||||
availableLooks: "Disponibles",
|
||||
noLooksAvailable: "Ningún look disponible",
|
||||
location: "Ubicación",
|
||||
locationEx: "Ej: Lisboa, Portugal",
|
||||
ideaSuggestion: "Idea / Sugerencia",
|
||||
bugError: "Error / Fallo",
|
||||
writeMessage: "Escribe aquí tu mensaje...",
|
||||
sendMessage: "Enviar Mensaje",
|
||||
notificationsModal: "Notificaciones",
|
||||
noNotifications: "Sin Notificaciones",
|
||||
userSavedLook: "guardó tu look",
|
||||
inTheirCloset: "en su armario!",
|
||||
sharedLookTitle: "Look Compartido",
|
||||
sharedBy: "Compartido por",
|
||||
includedPieces: "Piezas incluidas",
|
||||
ignore: "Ignorar",
|
||||
copying: "Copiando...",
|
||||
copyToMyCloset: "Copiar a mi armario",
|
||||
msgSentSuccess: "¡Mensaje enviado con éxito!",
|
||||
msgSendError: "Error al enviar. Revisa tu conexión.",
|
||||
addFuturePurchase: "Añadir pieza como compra futura",
|
||||
wishlistDesc: "Lista de Deseos",
|
||||
someone: "alguien",
|
||||
feedbackTitle: "Soporte y Comentarios",
|
||||
feedbackDesc: "¿Tienes alguna idea, sugerencia o encontraste un problema? ¡Envíanos un mensaje directamente!",
|
||||
themeColorTitle: "Color del Tema",
|
||||
personalizeColorDesc: "Personaliza el color",
|
||||
saveChanges: "Guardar Cambios"
|
||||
},
|
||||
FR: {
|
||||
createSection: "Créer une Section",
|
||||
noSectionsCreated: "Aucune section créée",
|
||||
linkCopied: "Lien copié !",
|
||||
share: "Partager",
|
||||
piecesInLaundry: "pièce(s) à la blanchisserie",
|
||||
toBeWashed: "À laver",
|
||||
unavailable: "Indisponibles",
|
||||
availableLooks: "Disponibles",
|
||||
noLooksAvailable: "Aucun look disponible",
|
||||
location: "Emplacement",
|
||||
locationEx: "Ex: Lisbonne, Portugal",
|
||||
ideaSuggestion: "Idée / Suggestion",
|
||||
bugError: "Bug / Erreur",
|
||||
writeMessage: "Écrivez votre message ici...",
|
||||
sendMessage: "Envoyer le Message",
|
||||
notificationsModal: "Notifications",
|
||||
noNotifications: "Aucune Notification",
|
||||
userSavedLook: "a sauvegardé votre look",
|
||||
inTheirCloset: "dans son placard !",
|
||||
sharedLookTitle: "Look Partagé",
|
||||
sharedBy: "Partagé par",
|
||||
includedPieces: "Pièces incluses",
|
||||
ignore: "Ignorer",
|
||||
copying: "Copie en cours...",
|
||||
copyToMyCloset: "Copier dans mon placard",
|
||||
msgSentSuccess: "Message envoyé avec succès !",
|
||||
msgSendError: "Erreur d'envoi. Vérifiez votre connexion.",
|
||||
addFuturePurchase: "Ajouter comme achat futur",
|
||||
wishlistDesc: "Liste de Souhaits",
|
||||
someone: "quelqu'un",
|
||||
feedbackTitle: "Support et Commentaires",
|
||||
feedbackDesc: "Avez-vous des idées, des suggestions ou trouvé un problème ? Envoyez-nous un message directement !",
|
||||
themeColorTitle: "Couleur du Thème",
|
||||
personalizeColorDesc: "Personnaliser la couleur",
|
||||
saveChanges: "Enregistrer les Modifications"
|
||||
},
|
||||
DE: {
|
||||
createSection: "Bereich erstellen",
|
||||
noSectionsCreated: "Noch keine Bereiche erstellt",
|
||||
linkCopied: "Link kopiert!",
|
||||
share: "Teilen",
|
||||
piecesInLaundry: "Stück(e) in der Wäsche",
|
||||
toBeWashed: "Zum Waschen",
|
||||
unavailable: "Nicht verfügbar",
|
||||
availableLooks: "Verfügbar",
|
||||
noLooksAvailable: "Kein Look verfügbar",
|
||||
location: "Ort",
|
||||
locationEx: "Z.B.: Lissabon, Portugal",
|
||||
ideaSuggestion: "Idee / Vorschlag",
|
||||
bugError: "Fehler / Bug",
|
||||
writeMessage: "Schreibe hier deine Nachricht...",
|
||||
sendMessage: "Nachricht Senden",
|
||||
notificationsModal: "Benachrichtigungen",
|
||||
noNotifications: "Keine Benachrichtigungen",
|
||||
userSavedLook: "hat deinen Look gespeichert",
|
||||
inTheirCloset: "in seinem Schrank!",
|
||||
sharedLookTitle: "Geteilter Look",
|
||||
sharedBy: "Geteilt von",
|
||||
includedPieces: "Enthaltene Stücke",
|
||||
ignore: "Ignorieren",
|
||||
copying: "Kopieren...",
|
||||
copyToMyCloset: "In meinen Schrank kopieren",
|
||||
msgSentSuccess: "Nachricht erfolgreich gesendet!",
|
||||
msgSendError: "Fehler beim Senden. Überprüfe deine Verbindung.",
|
||||
addFuturePurchase: "Als zukünftigen Kauf hinzufügen",
|
||||
wishlistDesc: "Wunschzettel",
|
||||
someone: "jemand",
|
||||
feedbackTitle: "Support und Feedback",
|
||||
feedbackDesc: "Hast du Ideen, Vorschläge oder ein Problem gefunden? Sende uns direkt eine Nachricht!",
|
||||
themeColorTitle: "Themenfarbe",
|
||||
personalizeColorDesc: "Farbe anpassen",
|
||||
saveChanges: "Änderungen Speichern"
|
||||
}
|
||||
};
|
||||
|
||||
for (const lang in newKeys) {
|
||||
const keys = newKeys[lang];
|
||||
const langRegex = new RegExp(`${lang}: \\{([\\s\\S]*?)\\}`, 'g');
|
||||
let match = langRegex.exec(code);
|
||||
if (match) {
|
||||
let currentKeys = match[1];
|
||||
let newKeysString = "";
|
||||
for (const [k, v] of Object.entries(keys)) {
|
||||
if (!currentKeys.includes(`${k}:`)) {
|
||||
newKeysString += ` ${k}: "${v}",\n`;
|
||||
}
|
||||
}
|
||||
if (newKeysString.length > 0) {
|
||||
code = code.replace(currentKeys, currentKeys.trimEnd() + ",\n" + newKeysString);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fs.writeFileSync('src/lib/i18n.js', code);
|
||||
console.log('i18n.js updated successfully');
|
||||
Reference in New Issue
Block a user