Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Requests/App/Workspace/StoreWorkspaceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function rules(): array
'text_color' => $hex,
'brand_font' => ['sometimes', 'string', Rule::in(BrandFont::values())],
'image_style' => ['sometimes', 'string', Rule::in(ImageStyle::values())],
'content_language' => ['nullable', 'string', 'in:en,pt-BR,es'],
'content_language' => ['nullable', 'string', 'in:en,pt-BR,es,fr,de,it,nl,pl,el,ja,ko,zh,ru,tr,ar'],
'logo_url' => ['nullable', 'url', 'max:1024'],
];
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/App/Workspace/UpdateWorkspaceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function rules(): array
'text_color' => $hex,
'brand_font' => ['sometimes', 'required', 'string', Rule::in(BrandFont::values())],
'image_style' => ['sometimes', 'required', 'string', Rule::in(ImageStyle::values())],
'content_language' => ['sometimes', 'string', 'in:en,pt-BR,es'],
'content_language' => ['sometimes', 'string', 'in:en,pt-BR,es,fr,de,it,nl,pl,el,ja,ko,zh,ru,tr,ar'],
];
}

Expand Down
12 changes: 12 additions & 0 deletions app/Services/Brand/HomepageMetaExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,18 @@ private function extractLanguage(Crawler $crawler): ?string
str_starts_with($lower, 'pt') => 'pt-BR',
str_starts_with($lower, 'es') => 'es',
str_starts_with($lower, 'en') => 'en',
str_starts_with($lower, 'fr') => 'fr',
str_starts_with($lower, 'de') => 'de',
str_starts_with($lower, 'it') => 'it',
str_starts_with($lower, 'nl') => 'nl',
str_starts_with($lower, 'pl') => 'pl',
str_starts_with($lower, 'el') => 'el',
str_starts_with($lower, 'ja') => 'ja',
str_starts_with($lower, 'ko') => 'ko',
str_starts_with($lower, 'zh') => 'zh',
str_starts_with($lower, 'ru') => 'ru',
str_starts_with($lower, 'tr') => 'tr',
str_starts_with($lower, 'ar') => 'ar',
default => null,
};
}
Expand Down
24 changes: 24 additions & 0 deletions resources/js/components/BrandForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,18 @@ const languageLabel = computed(() => {
en: 'English',
'pt-BR': 'Português (Brasil)',
es: 'Español',
fr: 'Français',
de: 'Deutsch',
it: 'Italiano',
nl: 'Nederlandse',
pl: 'Polski',
el: 'Ελληνικά',
ja: '日本語',
ko: '한국어',
zh: '现代标准汉语',
ru: 'Русский',
tr: 'Türkçe',
ar: 'العربية',
};
return map[props.fields.content_language] ?? '';
});
Expand Down Expand Up @@ -200,6 +212,18 @@ const runAutofill = async () => {
<SelectItem value="en">English</SelectItem>
<SelectItem value="pt-BR">Português (Brasil)</SelectItem>
<SelectItem value="es">Español</SelectItem>
<SelectItem value="fr">Français</SelectItem>
<SelectItem value="de">Deutsch</SelectItem>
<SelectItem value="it">Italiano</SelectItem>
<SelectItem value="nl">Nederlandse</SelectItem>
<SelectItem value="pl">Polski</SelectItem>
<SelectItem value="el">Ελληνικά</SelectItem>
<SelectItem value="ja">日本語</SelectItem>
<SelectItem value="ko">한국어</SelectItem>
<SelectItem value="zh">现代标准汉语</SelectItem>
<SelectItem value="ru">Русский</SelectItem>
<SelectItem value="tr">Türkçe</SelectItem>
<SelectItem value="ar">العربية</SelectItem>
</SelectContent>
</Select>
<p class="text-xs font-medium text-foreground/60">
Expand Down