Skip to content

Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.

feat: working on i18n

Paulo Castellano38774aaaa609
diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php
index afd63c8ff..15fd2b140 100644
--- a/app/Http/Middleware/HandleInertiaRequests.php
+++ b/app/Http/Middleware/HandleInertiaRequests.php
@@ -4,6 +4,7 @@ namespace App\Http\Middleware;
use App\Models\Language;
use Illuminate\Http\Request;
+use Illuminate\Support\Facades\App;
use Inertia\Middleware;
class HandleInertiaRequests extends Middleware
@@ -38,6 +39,10 @@ class HandleInertiaRequests extends Middleware
{
$user = $request->user();
+ if ($user) {
+ App::setLocale($user->language->code);
+ }
+
$currentWorkspace = $user?->currentWorkspace;
$currentRole = null;
diff --git a/lang/en/hashtags.php b/lang/en/hashtags.php
new file mode 100644
index 000000000..67724470d
--- /dev/null
+++ b/lang/en/hashtags.php
@@ -0,0 +1,42 @@
+<?php
+
+return [
+ 'title' => 'Hashtags',
+ 'description' => 'Create hashtag groups to quickly add to your posts',
+ 'new_group' => 'New Group',
+ 'no_groups_yet' => 'No hashtag groups yet',
+ 'no_groups_description' => 'Create hashtag groups to quickly add popular hashtags to your posts',
+ 'create_first_group' => 'Create your first group',
+ 'hashtags_count' => ':count hashtags',
+
+ 'create' => [
+ 'title' => 'Create Hashtag Group',
+ 'description' => 'Give your group a name and add hashtags separated by spaces or commas',
+ 'name' => 'Group Name',
+ 'name_placeholder' => 'e.g. Marketing, Travel, Food',
+ 'hashtags' => 'Hashtags',
+ 'hashtags_placeholder' => '#marketing #socialmedia #business #growth',
+ 'hashtags_hint' => 'Enter hashtags separated by spaces or commas. Include the # symbol.',
+ 'submit' => 'Create Group',
+ 'submitting' => 'Creating...',
+ ],
+
+ 'edit' => [
+ 'title' => 'Edit Hashtag Group',
+ 'description' => 'Update the name and hashtags for this group',
+ 'name' => 'Group Name',
+ 'name_placeholder' => 'e.g. Marketing, Travel, Food',
+ 'hashtags' => 'Hashtags',
+ 'hashtags_placeholder' => '#marketing #socialmedia #business #growth',
+ 'hashtags_hint' => 'Enter hashtags separated by spaces or commas. Include the # symbol.',
+ 'submit' => 'Save Changes',
+ 'submitting' => 'Saving...',
+ ],
+
+ 'delete' => [
+ 'title' => 'Delete Hashtag Group',
+ 'description' => 'Are you sure you want to delete this hashtag group? This action cannot be undone.',
+ 'confirm' => 'Delete',
+ 'cancel' => 'Cancel',
+ ],
+];
diff --git a/lang/en/labels.php b/lang/en/labels.php
new file mode 100644
index 000000000..034eb70c9
--- /dev/null
+++ b/lang/en/labels.php
@@ -0,0 +1,36 @@
+<?php
+
+return [
+ 'title' => 'Labels',
+ 'description' => 'Create labels to organize and categorize your posts',
+ 'new_label' => 'New Label',
+ 'no_labels_yet' => 'No labels yet',
+ 'create_first_label' => 'Create your first label',
+
+ 'create' => [
+ 'title' => 'Create Label',
+ 'description' => 'Give your label a name and pick a color',
+ 'name' => 'Name',
+ 'name_placeholder' => 'Enter label name...',
+ 'color' => 'Color',
+ 'submit' => 'Create Label',
+ 'submitting' => 'Creating...',
+ ],
+
+ 'edit' => [
+ 'title' => 'Edit Label',
+ 'description' => 'Update the name and color for this label',
+ 'name' => 'Name',
+ 'name_placeholder' => 'Enter label name...',
+ 'color' => 'Color',
+ 'submit' => 'Save Changes',
+ 'submitting' => 'Saving...',
+ ],
+
+ 'delete' => [
+ 'title' => 'Delete Label',
+ 'description' => 'Are you sure you want to delete this label? This action cannot be undone.',
+ 'confirm' => 'Delete',
+ 'cancel' => 'Cancel',
+ ],
+];
diff --git a/lang/en/sidebar.php b/lang/en/sidebar.php
new file mode 100644
index 000000000..c6a141990
--- /dev/null
+++ b/lang/en/sidebar.php
@@ -0,0 +1,48 @@
+<?php
+
+return [
+ 'select_workspace' => 'Select workspace',
+ 'create_workspace' => 'Create workspace',
+ 'create_post' => 'Create post',
+ 'profile' => 'Profile',
+ 'log_out' => 'Log out',
+
+ 'workspace' => 'Workspace: :name',
+ 'workspace_select' => 'Workspace: Select',
+
+ 'theme' => 'Theme: :name',
+ 'theme_light' => 'Light',
+ 'theme_dark' => 'Dark',
+ 'theme_system' => 'System',
+
+ 'language' => 'Language: :name',
+ 'language_select' => 'Language: Select',
+
+ 'groups' => [
+ 'posts' => 'Posts',
+ 'configuration' => 'Configurations',
+ 'support' => 'Support',
+ ],
+
+ 'posts' => [
+ 'calendar' => 'Calendar',
+ 'all' => 'All',
+ 'scheduled' => 'Scheduled',
+ 'posted' => 'Posted',
+ 'drafts' => 'Drafts',
+ ],
+
+ 'config' => [
+ 'connections' => 'Connections',
+ 'hashtags' => 'Hashtags',
+ 'labels' => 'Labels',
+ 'settings' => 'Settings',
+ ],
+
+ 'support' => [
+ 'discord' => 'Discord',
+ 'share_feedback' => 'Share feedback',
+ 'last_updates' => 'Last Updates',
+ 'docs' => 'Docs',
+ ],
+];
diff --git a/lang/php_en.json b/lang/php_en.json
new file mode 100644
index 000000000..2cac0a992
--- /dev/null
+++ b/lang/php_en.json
@@ -0,0 +1 @@
+{"auth.failed":"These credentials do not match our records.","auth.password":"The provided password is incorrect.","auth.throttle":"Too many login attempts. Please try again in :seconds seconds.","pagination.previous":"&laquo; Previous","pagination.next":"Next &raquo;","passwords.reset":"Your password has been reset.","passwords.sent":"We have emailed your password reset link.","passwords.throttled":"Please wait before retrying.","passwords.token":"This password reset token is invalid.","passwords.user":"We can't find a user with that email address.","validation.accepted":"The :attribute field must be accepted.","validation.accepted_if":"The :attribute field must be accepted when :other is :value.","validation.active_url":"The :attribute field must be a valid URL.","validation.after":"The :attribute field must be a date after :date.","validation.after_or_equal":"The :attribute field must be a date after or equal to :date.","validation.alpha":"The :attribute field must only contain letters.","validation.alpha_dash":"The :attribute field must only contain letters, numbers, dashes, and underscores.","validation.alpha_num":"The :attribute field must only contain letters and numbers.","validation.any_of":"The :attribute field is invalid.","validation.array":"The :attribute field must be an array.","validation.ascii":"The :attribute field must only contain single-byte alphanumeric characters and symbols.","validation.before":"The :attribute field must be a date before :date.","validation.before_or_equal":"The :attribute field must be a date before or equal to :date.","validation.between.array":"The :attribute field must have between :min and :max items.","validation.between.file":"The :attribute field must be between :min and :max kilobytes.","validation.between.numeric":"The :attribute field must be between :min and :max.","validation.between.string":"The :attribute field must be between :min and :max characters.","validation.boolean":"The :attribute field must be true or false.","validation.can":"The :attribute field contains an unauthorized value.","validation.confirmed":"The :attribute field confirmation does not match.","validation.contains":"The :attribute field is missing a required value.","validation.current_password":"The password is incorrect.","validation.date":"The :attribute field must be a valid date.","validation.date_equals":"The :attribute field must be a date equal to :date.","validation.date_format":"The :attribute field must match the format :format.","validation.decimal":"The :attribute field must have :decimal decimal places.","validation.declined":"The :attribute field must be declined.","validation.declined_if":"The :attribute field must be declined when :other is :value.","validation.different":"The :attribute field and :other must be different.","validation.digits":"The :attribute field must be :digits digits.","validation.digits_between":"The :attribute field must be between :min and :max digits.","validation.dimensions":"The :attribute field has invalid image dimensions.","validation.distinct":"The :attribute field has a duplicate value.","validation.doesnt_contain":"The :attribute field must not contain any of the following: :values.","validation.doesnt_end_with":"The :attribute field must not end with one of the following: :values.","validation.doesnt_start_with":"The :attribute field must not start with one of the following: :values.","validation.email":"The :attribute field must be a valid email address.","validation.encoding":"The :attribute field must be encoded in :encoding.","validation.ends_with":"The :attribute field must end with one of the following: :values.","validation.enum":"The selected :attribute is invalid.","validation.exists":"The selected :attribute is invalid.","validation.extensions":"The :attribute field must have one of the following extensions: :values.","validation.file":"The :attribute field must be a file.","validation.filled":"The :attribute field must have a value.","validation.gt.array":"The :attribute field must have more than :value items.","validation.gt.file":"The :attribute field must be greater than :value kilobytes.","validation.gt.numeric":"The :attribute field must be greater than :value.","validation.gt.string":"The :attribute field must be greater than :value characters.","validation.gte.array":"The :attribute field must have :value items or more.","validation.gte.file":"The :attribute field must be greater than or equal to :value kilobytes.","validation.gte.numeric":"The :attribute field must be greater than or equal to :value.","validation.gte.string":"The :attribute field must be greater than or equal to :value characters.","validation.hex_color":"The :attribute field must be a valid hexadecimal color.","validation.image":"The :attribute field must be an image.","validation.in":"The selected :attribute is invalid.","validation.in_array":"The :attribute field must exist in :other.","validation.in_array_keys":"The :attribute field must contain at least one of the following keys: :values.","validation.integer":"The :attribute field must be an integer.","validation.ip":"The :attribute field must be a valid IP address.","validation.ipv4":"The :attribute field must be a valid IPv4 address.","validation.ipv6":"The :attribute field must be a valid IPv6 address.","validation.json":"The :attribute field must be a valid JSON string.","validation.list":"The :attribute field must be a list.","validation.lowercase":"The :attribute field must be lowercase.","validation.lt.array":"The :attribute field must have less than :value items.","validation.lt.file":"The :attribute field must be less than :value kilobytes.","validation.lt.numeric":"The :attribute field must be less than :value.","validation.lt.string":"The :attribute field must be less than :value characters.","validation.lte.array":"The :attribute field must not have more than :value items.","validation.lte.file":"The :attribute field must be less than or equal to :value kilobytes.","validation.lte.numeric":"The :attribute field must be less than or equal to :value.","validation.lte.string":"The :attribute field must be less than or equal to :value characters.","validation.mac_address":"The :attribute field must be a valid MAC address.","validation.max.array":"The :attribute field must not have more than :max items.","validation.max.file":"The :attribute field must not be greater than :max kilobytes.","validation.max.numeric":"The :attribute field must not be greater than :max.","validation.max.string":"The :attribute field must not be greater than :max characters.","validation.max_digits":"The :attribute field must not have more than :max digits.","validation.mimes":"The :attribute field must be a file of type: :values.","validation.mimetypes":"The :attribute field must be a file of type: :values.","validation.min.array":"The :attribute field must have at least :min items.","validation.min.file":"The :attribute field must be at least :min kilobytes.","validation.min.numeric":"The :attribute field must be at least :min.","validation.min.string":"The :attribute field must be at least :min characters.","validation.min_digits":"The :attribute field must have at least :min digits.","validation.missing":"The :attribute field must be missing.","validation.missing_if":"The :attribute field must be missing when :other is :value.","validation.missing_unless":"The :attribute field must be missing unless :other is :value.","validation.missing_with":"The :attribute field must be missing when :values is present.","validation.missing_with_all":"The :attribute field must be missing when :values are present.","validation.multiple_of":"The :attribute field must be a multiple of :value.","validation.not_in":"The selected :attribute is invalid.","validation.not_regex":"The :attribute field format is invalid.","validation.numeric":"The :attribute field must be a number.","validation.password.letters":"The :attribute field must contain at least one letter.","validation.password.mixed":"The :attribute field must contain at least one uppercase and one lowercase letter.","validation.password.numbers":"The :attribute field must contain at least one number.","validation.password.symbols":"The :attribute field must contain at least one symbol.","validation.password.uncompromised":"The given :attribute has appeared in a data leak. Please choose a different :attribute.","validation.present":"The :attribute field must be present.","validation.present_if":"The :attribute field must be present when :other is :value.","validation.present_unless":"The :attribute field must be present unless :other is :value.","validation.present_with":"The :attribute field must be present when :values is present.","validation.present_with_all":"The :attribute field must be present when :values are present.","validation.prohibited":"The :attribute field is prohibited.","validation.prohibited_if":"The :attribute field is prohibited when :other is :value.","validation.prohibited_if_accepted":"The :attribute field is prohibited when :other is accepted.","validation.prohibited_if_declined":"The :attribute field is prohibited when :other is declined.","validation.prohibited_unless":"The :attribute field is prohibited unless :other is in :values.","validation.prohibits":"The :attribute field prohibits :other from being present.","validation.regex":"The :attribute field format is invalid.","validation.required":"The :attribute field is required.","validation.required_array_keys":"The :attribute field must contain entries for: :values.","validation.required_if":"The :attribute field is required when :other is :value.","validation.required_if_accepted":"The :attribute field is required when :other is accepted.","validation.required_if_declined":"The :attribute field is required when :other is declined.","validation.required_unless":"The :attribute field is required unless :other is in :values.","validation.required_with":"The :attribute field is required when :values is present.","validation.required_with_all":"The :attribute field is required when :values are present.","validation.required_without":"The :attribute field is required when :values is not present.","validation.required_without_all":"The :attribute field is required when none of :values are present.","validation.same":"The :attribute field must match :other.","validation.size.array":"The :attribute field must contain :size items.","validation.size.file":"The :attribute field must be :size kilobytes.","validation.size.numeric":"The :attribute field must be :size.","validation.size.string":"The :attribute field must be :size characters.","validation.starts_with":"The :attribute field must start with one of the following: :values.","validation.string":"The :attribute field must be a string.","validation.timezone":"The :attribute field must be a valid timezone.","validation.unique":"The :attribute has already been taken.","validation.uploaded":"The :attribute failed to upload.","validation.uppercase":"The :attribute field must be uppercase.","validation.url":"The :attribute field must be a valid URL.","validation.ulid":"The :attribute field must be a valid ULID.","validation.uuid":"The :attribute field must be a valid UUID.","validation.custom.attribute-name.rule-name":"custom-message","hashtags.title":"Hashtags","hashtags.description":"Create hashtag groups to quickly add to your posts","hashtags.new_group":"New Group","hashtags.no_groups_yet":"No hashtag groups yet","hashtags.no_groups_description":"Create hashtag groups to quickly add popular hashtags to your posts","hashtags.create_first_group":"Create your first group","hashtags.hashtags_count":":count hashtags","hashtags.create.title":"Create Hashtag Group","hashtags.create.description":"Give your group a name and add hashtags separated by spaces or commas","hashtags.create.name":"Group Name","hashtags.create.name_placeholder":"e.g. Marketing, Travel, Food","hashtags.create.hashtags":"Hashtags","hashtags.create.hashtags_placeholder":"#marketing #socialmedia #business #growth","hashtags.create.hashtags_hint":"Enter hashtags separated by spaces or commas. Include the # symbol.","hashtags.create.submit":"Create Group","hashtags.create.submitting":"Creating...","hashtags.edit.title":"Edit Hashtag Group","hashtags.edit.description":"Update the name and hashtags for this group","hashtags.edit.name":"Group Name","hashtags.edit.name_placeholder":"e.g. Marketing, Travel, Food","hashtags.edit.hashtags":"Hashtags","hashtags.edit.hashtags_placeholder":"#marketing #socialmedia #business #growth","hashtags.edit.hashtags_hint":"Enter hashtags separated by spaces or commas. Include the # symbol.","hashtags.edit.submit":"Save Changes","hashtags.edit.submitting":"Saving...","hashtags.delete.title":"Delete Hashtag Group","hashtags.delete.description":"Are you sure you want to delete this hashtag group? This action cannot be undone.","hashtags.delete.confirm":"Delete","hashtags.delete.cancel":"Cancel","labels.title":"Labels","labels.description":"Create labels to organize and categorize your posts","labels.new_label":"New Label","labels.no_labels_yet":"No labels yet","labels.create_first_label":"Create your first label","labels.create.title":"Create Label","labels.create.description":"Give your label a name and pick a color","labels.create.name":"Name","labels.create.name_placeholder":"Enter label name...","labels.create.color":"Color","labels.create.submit":"Create Label","labels.create.submitting":"Creating...","labels.edit.title":"Edit Label","labels.edit.description":"Update the name and color for this label","labels.edit.name":"Name","labels.edit.name_placeholder":"Enter label name...","labels.edit.color":"Color","labels.edit.submit":"Save Changes","labels.edit.submitting":"Saving...","labels.delete.title":"Delete Label","labels.delete.description":"Are you sure you want to delete this label? This action cannot be undone.","labels.delete.confirm":"Delete","labels.delete.cancel":"Cancel","sidebar.select_workspace":"Select workspace","sidebar.create_workspace":"Create workspace","sidebar.create_post":"Create post","sidebar.profile":"Profile","sidebar.log_out":"Log out","sidebar.workspace":"Workspace: :name","sidebar.workspace_select":"Workspace: Select","sidebar.theme":"Theme: :name","sidebar.theme_light":"Light","sidebar.theme_dark":"Dark","sidebar.theme_system":"System","sidebar.language":"Language: :name","sidebar.language_select":"Language: Select","sidebar.groups.posts":"Posts","sidebar.groups.configuration":"Configurations","sidebar.groups.support":"Support","sidebar.posts.calendar":"Calendar","sidebar.posts.all":"All","sidebar.posts.scheduled":"Scheduled","sidebar.posts.posted":"Posted","sidebar.posts.drafts":"Drafts","sidebar.config.connections":"Connections","sidebar.config.hashtags":"Hashtags","sidebar.config.labels":"Labels","sidebar.config.settings":"Settings","sidebar.support.discord":"Discord","sidebar.support.share_feedback":"Share feedback","sidebar.support.last_updates":"Last Updates","sidebar.support.docs":"Docs"}
\ No newline at end of file
diff --git a/lang/php_pt-BR.json b/lang/php_pt-BR.json
new file mode 100644
index 000000000..02b08e1c1
--- /dev/null
+++ b/lang/php_pt-BR.json
@@ -0,0 +1 @@
+{"auth.failed":"Essas credenciais não correspondem aos nossos registros.","auth.password":"A senha fornecida está incorreta.","auth.throttle":"Muitas tentativas de login. Por favor, tente novamente em :seconds segundos.","hashtags.title":"Hashtags","hashtags.description":"Crie grupos de hashtags para adicionar rapidamente aos seus posts","hashtags.new_group":"Novo Grupo","hashtags.no_groups_yet":"Nenhum grupo de hashtags ainda","hashtags.no_groups_description":"Crie grupos de hashtags para adicionar rapidamente hashtags populares aos seus posts","hashtags.create_first_group":"Crie seu primeiro grupo","hashtags.hashtags_count":":count hashtags","hashtags.create.title":"Criar Grupo de Hashtags","hashtags.create.description":"Dê um nome ao grupo e adicione hashtags separadas por espaços ou vírgulas","hashtags.create.name":"Nome do Grupo","hashtags.create.name_placeholder":"ex: Marketing, Viagem, Comida","hashtags.create.hashtags":"Hashtags","hashtags.create.hashtags_placeholder":"#marketing #redessociais #negocios #crescimento","hashtags.create.hashtags_hint":"Digite as hashtags separadas por espaços ou vírgulas. Inclua o símbolo #.","hashtags.create.submit":"Criar Grupo","hashtags.create.submitting":"Criando...","hashtags.edit.title":"Editar Grupo de Hashtags","hashtags.edit.description":"Atualize o nome e as hashtags deste grupo","hashtags.edit.name":"Nome do Grupo","hashtags.edit.name_placeholder":"ex: Marketing, Viagem, Comida","hashtags.edit.hashtags":"Hashtags","hashtags.edit.hashtags_placeholder":"#marketing #redessociais #negocios #crescimento","hashtags.edit.hashtags_hint":"Digite as hashtags separadas por espaços ou vírgulas. Inclua o símbolo #.","hashtags.edit.submit":"Salvar Alterações","hashtags.edit.submitting":"Salvando...","hashtags.delete.title":"Excluir Grupo de Hashtags","hashtags.delete.description":"Tem certeza que deseja excluir este grupo de hashtags? Esta ação não pode ser desfeita.","hashtags.delete.confirm":"Excluir","hashtags.delete.cancel":"Cancelar","labels.title":"Etiquetas","labels.description":"Crie etiquetas para organizar e categorizar seus posts","labels.new_label":"Nova Etiqueta","labels.no_labels_yet":"Nenhuma etiqueta ainda","labels.create_first_label":"Crie sua primeira etiqueta","labels.create.title":"Criar Etiqueta","labels.create.description":"Dê um nome e escolha uma cor para sua etiqueta","labels.create.name":"Nome","labels.create.name_placeholder":"Digite o nome da etiqueta...","labels.create.color":"Cor","labels.create.submit":"Criar Etiqueta","labels.create.submitting":"Criando...","labels.edit.title":"Editar Etiqueta","labels.edit.description":"Atualize o nome e a cor desta etiqueta","labels.edit.name":"Nome","labels.edit.name_placeholder":"Digite o nome da etiqueta...","labels.edit.color":"Cor","labels.edit.submit":"Salvar Alterações","labels.edit.submitting":"Salvando...","labels.delete.title":"Excluir Etiqueta","labels.delete.description":"Tem certeza que deseja excluir esta etiqueta? Esta ação não pode ser desfeita.","labels.delete.confirm":"Excluir","labels.delete.cancel":"Cancelar","pagination.previous":"&laquo; Anterior","pagination.next":"Próximo &raquo;","passwords.reset":"Sua senha foi redefinida.","passwords.sent":"Enviamos o link de redefinição de senha por e-mail.","passwords.throttled":"Por favor, aguarde antes de tentar novamente.","passwords.token":"Este token de redefinição de senha é inválido.","passwords.user":"Não conseguimos encontrar um usuário com esse endereço de e-mail.","sidebar.select_workspace":"Selecionar workspace","sidebar.create_workspace":"Criar workspace","sidebar.create_post":"Criar post","sidebar.profile":"Perfil","sidebar.log_out":"Sair","sidebar.workspace":"Workspace: :name","sidebar.workspace_select":"Workspace: Selecionar","sidebar.theme":"Tema: :name","sidebar.theme_light":"Claro","sidebar.theme_dark":"Escuro","sidebar.theme_system":"Sistema","sidebar.language":"Idioma: :name","sidebar.language_select":"Idioma: Selecionar","sidebar.groups.posts":"Posts","sidebar.groups.configuration":"Configurações","sidebar.groups.support":"Suporte","sidebar.posts.calendar":"Calendário","sidebar.posts.all":"Todos","sidebar.posts.scheduled":"Agendados","sidebar.posts.posted":"Publicados","sidebar.posts.drafts":"Rascunhos","sidebar.config.connections":"Conexões","sidebar.config.hashtags":"Hashtags","sidebar.config.labels":"Etiquetas","sidebar.config.settings":"Configurações","sidebar.support.discord":"Discord","sidebar.support.share_feedback":"Enviar feedback","sidebar.support.last_updates":"Últimas Atualizações","sidebar.support.docs":"Documentação","validation.accepted":"O campo :attribute deve ser aceito.","validation.accepted_if":"O campo :attribute deve ser aceito quando :other for :value.","validation.active_url":"O campo :attribute deve ser uma URL válida.","validation.after":"O campo :attribute deve ser uma data posterior a :date.","validation.after_or_equal":"O campo :attribute deve ser uma data posterior ou igual a :date.","validation.alpha":"O campo :attribute deve conter apenas letras.","validation.alpha_dash":"O campo :attribute deve conter apenas letras, números, hifens e underscores.","validation.alpha_num":"O campo :attribute deve conter apenas letras e números.","validation.any_of":"O campo :attribute é inválido.","validation.array":"O campo :attribute deve ser um array.","validation.ascii":"O campo :attribute deve conter apenas caracteres alfanuméricos e símbolos de um byte.","validation.before":"O campo :attribute deve ser uma data anterior a :date.","validation.before_or_equal":"O campo :attribute deve ser uma data anterior ou igual a :date.","validation.between.array":"O campo :attribute deve ter entre :min e :max itens.","validation.between.file":"O campo :attribute deve estar entre :min e :max kilobytes.","validation.between.numeric":"O campo :attribute deve estar entre :min e :max.","validation.between.string":"O campo :attribute deve estar entre :min e :max caracteres.","validation.boolean":"O campo :attribute deve ser verdadeiro ou falso.","validation.can":"O campo :attribute contém um valor não autorizado.","validation.confirmed":"A confirmação do campo :attribute não corresponde.","validation.contains":"O campo :attribute está faltando um valor obrigatório.","validation.current_password":"A senha está incorreta.","validation.date":"O campo :attribute deve ser uma data válida.","validation.date_equals":"O campo :attribute deve ser uma data igual a :date.","validation.date_format":"O campo :attribute deve corresponder ao formato :format.","validation.decimal":"O campo :attribute deve ter :decimal casas decimais.","validation.declined":"O campo :attribute deve ser recusado.","validation.declined_if":"O campo :attribute deve ser recusado quando :other for :value.","validation.different":"O campo :attribute e :other devem ser diferentes.","validation.digits":"O campo :attribute deve ter :digits dígitos.","validation.digits_between":"O campo :attribute deve ter entre :min e :max dígitos.","validation.dimensions":"O campo :attribute deve ter dimensões de imagem válidas.","validation.distinct":"O campo :attribute tem um valor duplicado.","validation.doesnt_contain":"O campo :attribute não deve conter nenhum dos seguintes: :values.","validation.doesnt_end_with":"O campo :attribute não deve terminar com nenhum dos seguintes: :values.","validation.doesnt_start_with":"O campo :attribute não deve começar com nenhum dos seguintes: :values.","validation.email":"O campo :attribute deve ser um endereço de e-mail válido.","validation.encoding":"O campo :attribute deve ser codificado em :encoding.","validation.ends_with":"O campo :attribute deve terminar com um dos seguintes: :values.","validation.enum":"O :attribute selecionado é inválido.","validation.exists":"O :attribute selecionado é inválido.","validation.extensions":"O campo :attribute deve ter uma das seguintes extensões: :values.","validation.file":"O campo :attribute deve ser um arquivo.","validation.filled":"O campo :attribute deve ter um valor.","validation.gt.array":"O campo :attribute deve ter mais de :value itens.","validation.gt.file":"O campo :attribute deve ser maior que :value kilobytes.","validation.gt.numeric":"O campo :attribute deve ser maior que :value.","validation.gt.string":"O campo :attribute deve ser maior que :value caracteres.","validation.gte.array":"O campo :attribute deve ter :value itens ou mais.","validation.gte.file":"O campo :attribute deve ser maior ou igual a :value kilobytes.","validation.gte.numeric":"O campo :attribute deve ser maior ou igual a :value.","validation.gte.string":"O campo :attribute deve ser maior ou igual a :value caracteres.","validation.hex_color":"O campo :attribute deve ser uma cor hexadecimal válida.","validation.image":"O campo :attribute deve ser uma imagem.","validation.in":"O :attribute selecionado é inválido.","validation.in_array":"O campo :attribute deve existir em :other.","validation.in_array_keys":"O campo :attribute deve conter pelo menos uma das seguintes chaves: :values.","validation.integer":"O campo :attribute deve ser um inteiro.","validation.ip":"O campo :attribute deve ser um endereço IP válido.","validation.ipv4":"O campo :attribute deve ser um endereço IPv4 válido.","validation.ipv6":"O campo :attribute deve ser um endereço IPv6 válido.","validation.json":"O campo :attribute deve ser uma string JSON válida.","validation.list":"O campo :attribute deve ser uma lista.","validation.lowercase":"O campo :attribute deve estar em minúsculas.","validation.lt.array":"O campo :attribute deve ter menos de :value itens.","validation.lt.file":"O campo :attribute deve ser menor que :value kilobytes.","validation.lt.numeric":"O campo :attribute deve ser menor que :value.","validation.lt.string":"O campo :attribute deve ser menor que :value caracteres.","validation.lte.array":"O campo :attribute deve ter :value itens ou menos.","validation.lte.file":"O campo :attribute deve ser menor ou igual a :value kilobytes.","validation.lte.numeric":"O campo :attribute deve ser menor ou igual a :value.","validation.lte.string":"O campo :attribute deve ser menor ou igual a :value caracteres.","validation.mac_address":"O campo :attribute deve ser um endereço MAC válido.","validation.max.array":"O campo :attribute deve ter no máximo :max itens.","validation.max.file":"O campo :attribute deve ter no máximo :max kilobytes.","validation.max.numeric":"O campo :attribute deve ter no máximo :max.","validation.max.string":"O campo :attribute deve ter no máximo :max caracteres.","validation.max_digits":"O campo :attribute não deve ter mais que :max dígitos.","validation.mimes":"O campo :attribute deve ser um arquivo do tipo: :values.","validation.mimetypes":"O campo :attribute deve ser um arquivo do tipo: :values.","validation.min.array":"O campo :attribute deve ter pelo menos :min itens.","validation.min.file":"O campo :attribute deve ter pelo menos :min kilobytes.","validation.min.numeric":"O campo :attribute deve ter pelo menos :min.","validation.min.string":"O campo :attribute deve ter pelo menos :min caracteres.","validation.min_digits":"O campo :attribute deve ter pelo menos :min dígitos.","validation.missing":"O campo :attribute deve estar ausente.","validation.missing_if":"O campo :attribute deve estar ausente quando :other for :value.","validation.missing_unless":"O campo :attribute deve estar ausente a menos que :other seja :value.","validation.missing_with":"O campo :attribute deve estar ausente quando :values estiver presente.","validation.missing_with_all":"O campo :attribute deve estar ausente quando :values estiverem presentes.","validation.multiple_of":"O campo :attribute deve ser um múltiplo de :value.","validation.not_in":"O :attribute selecionado é inválido.","validation.not_regex":"O formato do campo :attribute é inválido.","validation.numeric":"O campo :attribute deve ser um número.","validation.password.letters":"O campo :attribute deve conter pelo menos uma letra.","validation.password.mixed":"O campo :attribute deve conter pelo menos uma letra maiúscula e uma minúscula.","validation.password.numbers":"O campo :attribute deve conter pelo menos um número.","validation.password.symbols":"O campo :attribute deve conter pelo menos um símbolo.","validation.password.uncompromised":"O :attribute fornecido apareceu em um vazamento de dados. Por favor, escolha um :attribute diferente.","validation.present":"O campo :attribute deve estar presente.","validation.present_if":"O campo :attribute deve estar presente quando :other for :value.","validation.present_unless":"O campo :attribute deve estar presente a menos que :other seja :value.","validation.present_with":"O campo :attribute deve estar presente quando :values estiver presente.","validation.present_with_all":"O campo :attribute deve estar presente quando :values estiverem presentes.","validation.prohibited":"O campo :attribute é proibido.","validation.prohibited_if":"O campo :attribute é proibido quando :other for :value.","validation.prohibited_if_accepted":"O campo :attribute é proibido quando :other for aceito.","validation.prohibited_if_declined":"O campo :attribute é proibido quando :other for recusado.","validation.prohibited_unless":"O campo :attribute é proibido a menos que :other esteja em :values.","validation.prohibits":"O campo :attribute proíbe :other de estar presente.","validation.regex":"O formato do campo :attribute é inválido.","validation.required":"O campo :attribute é obrigatório.","validation.required_array_keys":"O campo :attribute deve conter entradas para: :values.","validation.required_if":"O campo :attribute é obrigatório quando :other for :value.","validation.required_if_accepted":"O campo :attribute é obrigatório quando :other for aceito.","validation.required_if_declined":"O campo :attribute é obrigatório quando :other for recusado.","validation.required_unless":"O campo :attribute é obrigatório a menos que :other esteja em :values.","validation.required_with":"O campo :attribute é obrigatório quando :values estiver presente.","validation.required_with_all":"O campo :attribute é obrigatório quando :values estiverem presentes.","validation.required_without":"O campo :attribute é obrigatório quando :values não estiver presente.","validation.required_without_all":"O campo :attribute é obrigatório quando nenhum dos :values estiver presente.","validation.same":"O campo :attribute deve ser igual a :other.","validation.size.array":"O campo :attribute deve conter :size itens.","validation.size.file":"O campo :attribute deve ter :size kilobytes.","validation.size.numeric":"O campo :attribute deve ser :size.","validation.size.string":"O campo :attribute deve ter :size caracteres.","validation.starts_with":"O campo :attribute deve começar com um dos seguintes: :values.","validation.string":"O campo :attribute deve ser uma string.","validation.timezone":"O campo :attribute deve ser um fuso horário válido.","validation.unique":"O :attribute já foi utilizado.","validation.uploaded":"O :attribute falhou ao ser enviado.","validation.uppercase":"O campo :attribute deve estar em maiúsculo.","validation.url":"O campo :attribute deve ser uma URL válida.","validation.ulid":"O campo :attribute deve ser um ULID válido.","validation.uuid":"O campo :attribute deve ser um UUID válido.","validation.custom.attribute-name.rule-name":"custom-message"}
\ No newline at end of file
diff --git a/lang/pt-BR/hashtags.php b/lang/pt-BR/hashtags.php
new file mode 100644
index 000000000..4ecb1e687
--- /dev/null
+++ b/lang/pt-BR/hashtags.php
@@ -0,0 +1,42 @@
+<?php
+
+return [
+ 'title' => 'Hashtags',
+ 'description' => 'Crie grupos de hashtags para adicionar rapidamente aos seus posts',
+ 'new_group' => 'Novo Grupo',
+ 'no_groups_yet' => 'Nenhum grupo de hashtags ainda',
+ 'no_groups_description' => 'Crie grupos de hashtags para adicionar rapidamente hashtags populares aos seus posts',
+ 'create_first_group' => 'Crie seu primeiro grupo',
+ 'hashtags_count' => ':count hashtags',
+
+ 'create' => [
+ 'title' => 'Criar Grupo de Hashtags',
+ 'description' => 'Dê um nome ao grupo e adicione hashtags separadas por espaços ou vírgulas',
+ 'name' => 'Nome do Grupo',
+ 'name_placeholder' => 'ex: Marketing, Viagem, Comida',
+ 'hashtags' => 'Hashtags',
+ 'hashtags_placeholder' => '#marketing #redessociais #negocios #crescimento',
+ 'hashtags_hint' => 'Digite as hashtags separadas por espaços ou vírgulas. Inclua o símbolo #.',
+ 'submit' => 'Criar Grupo',
+ 'submitting' => 'Criando...',
+ ],
+
+ 'edit' => [
+ 'title' => 'Editar Grupo de Hashtags',
+ 'description' => 'Atualize o nome e as hashtags deste grupo',
+ 'name' => 'Nome do Grupo',
+ 'name_placeholder' => 'ex: Marketing, Viagem, Comida',
+ 'hashtags' => 'Hashtags',
+ 'hashtags_placeholder' => '#marketing #redessociais #negocios #crescimento',
+ 'hashtags_hint' => 'Digite as hashtags separadas por espaços ou vírgulas. Inclua o símbolo #.',
+ 'submit' => 'Salvar Alterações',
+ 'submitting' => 'Salvando...',
+ ],
+
+ 'delete' => [
+ 'title' => 'Excluir Grupo de Hashtags',
+ 'description' => 'Tem certeza que deseja excluir este grupo de hashtags? Esta ação não pode ser desfeita.',
+ 'confirm' => 'Excluir',
+ 'cancel' => 'Cancelar',
+ ],
+];
diff --git a/lang/pt-BR/labels.php b/lang/pt-BR/labels.php
new file mode 100644
index 000000000..3b5dfecd9
--- /dev/null
+++ b/lang/pt-BR/labels.php
@@ -0,0 +1,36 @@
+<?php
+
+return [
+ 'title' => 'Etiquetas',
+ 'description' => 'Crie etiquetas para organizar e categorizar seus posts',
+ 'new_label' => 'Nova Etiqueta',
+ 'no_labels_yet' => 'Nenhuma etiqueta ainda',
+ 'create_first_label' => 'Crie sua primeira etiqueta',
+
+ 'create' => [
+ 'title' => 'Criar Etiqueta',
+ 'description' => 'Dê um nome e escolha uma cor para sua etiqueta',
+ 'name' => 'Nome',
+ 'name_placeholder' => 'Digite o nome da etiqueta...',
+ 'color' => 'Cor',
+ 'submit' => 'Criar Etiqueta',
+ 'submitting' => 'Criando...',
+ ],
+
+ 'edit' => [
+ 'title' => 'Editar Etiqueta',
+ 'description' => 'Atualize o nome e a cor desta etiqueta',
+ 'name' => 'Nome',
+ 'name_placeholder' => 'Digite o nome da etiqueta...',
+ 'color' => 'Cor',
+ 'submit' => 'Salvar Alterações',
+ 'submitting' => 'Salvando...',
+ ],
+
+ 'delete' => [
+ 'title' => 'Excluir Etiqueta',
+ 'description' => 'Tem certeza que deseja excluir esta etiqueta? Esta ação não pode ser desfeita.',
+ 'confirm' => 'Excluir',
+ 'cancel' => 'Cancelar',
+ ],
+];
diff --git a/lang/pt-BR/sidebar.php b/lang/pt-BR/sidebar.php
new file mode 100644
index 000000000..d447df403
--- /dev/null
+++ b/lang/pt-BR/sidebar.php
@@ -0,0 +1,48 @@
+<?php
+
+return [
+ 'select_workspace' => 'Selecionar workspace',
+ 'create_workspace' => 'Criar workspace',
+ 'create_post' => 'Criar post',
+ 'profile' => 'Perfil',
+ 'log_out' => 'Sair',
+
+ 'workspace' => 'Workspace: :name',
+ 'workspace_select' => 'Workspace: Selecionar',
+
+ 'theme' => 'Tema: :name',
+ 'theme_light' => 'Claro',
+ 'theme_dark' => 'Escuro',
+ 'theme_system' => 'Sistema',
+
+ 'language' => 'Idioma: :name',
+ 'language_select' => 'Idioma: Selecionar',
+
+ 'groups' => [
+ 'posts' => 'Posts',
+ 'configuration' => 'Configurações',
+ 'support' => 'Suporte',
+ ],
+
+ 'posts' => [
+ 'calendar' => 'Calendário',
+ 'all' => 'Todos',
+ 'scheduled' => 'Agendados',
+ 'posted' => 'Publicados',
+ 'drafts' => 'Rascunhos',
+ ],
+
+ 'config' => [
+ 'connections' => 'Conexões',
+ 'hashtags' => 'Hashtags',
+ 'labels' => 'Etiquetas',
+ 'settings' => 'Configurações',
+ ],
+
+ 'support' => [
+ 'discord' => 'Discord',
+ 'share_feedback' => 'Enviar feedback',
+ 'last_updates' => 'Últimas Atualizações',
+ 'docs' => 'Documentação',
+ ],
+];
diff --git a/resources/js/components/AppSidebar.vue b/resources/js/components/AppSidebar.vue
index e5ab03c7d..a2b9e41b2 100644
--- a/resources/js/components/AppSidebar.vue
+++ b/resources/js/components/AppSidebar.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { Link, router, usePage } from '@inertiajs/vue3';
import { IconBrandDiscord, IconCalendar, IconCheck, IconSelector, IconFileText, IconHash, IconLogout, IconPlus, IconSettings, IconAffiliate, IconPencil, IconFileCheck, IconTag, IconUser, IconClock, IconMessageCircle, IconBell, IconBook, IconSun, IconMoon, IconDeviceDesktop, IconLanguage } from '@tabler/icons-vue';
+import { trans } from 'laravel-vue-i18n';
import { Button } from '@/components/ui/button';
import { create as createPost } from '@/actions/App/Http/Controllers/PostController';
import { updateLanguage } from '@/actions/App/Http/Controllers/Settings/ProfileController';
@@ -72,56 +73,56 @@ const { getInitials } = useInitials();
const { appearance, updateAppearance } = useAppearance();
const { state: sidebarState } = useSidebar();
-const themeLabels: Record<string, string> = {
- light: 'Light',
- dark: 'Dark',
- system: 'System',
-};
+const themeLabels = computed(() => ({
+ light: trans('sidebar.theme_light'),
+ dark: trans('sidebar.theme_dark'),
+ system: trans('sidebar.theme_system'),
+}));
-const postsNavItems: NavItem[] = [
+const postsNavItems = computed<NavItem[]>(() => [
{
- title: 'Calendar',
+ title: trans('sidebar.posts.calendar'),
href: calendar.url(),
icon: IconCalendar,
},
{
- title: 'All',
+ title: trans('sidebar.posts.all'),
href: postsIndex.url(),
icon: IconFileText,
},
{
- title: 'Scheduled',
+ title: trans('sidebar.posts.scheduled'),
href: postsIndex.url('scheduled'),
icon: IconClock,
},
{
- title: 'Posted',
+ title: trans('sidebar.posts.posted'),
href: postsIndex.url('published'),
icon: IconFileCheck,
},
{
- title: 'Drafts',
+ title: trans('sidebar.posts.drafts'),
href: postsIndex.url('draft'),
icon: IconPencil,
},
-];
+]);
const canManageWorkspace = computed(() => auth.value.role !== 'member');
const configNavItems = computed(() => {
const items: NavItem[] = [
{
- title: 'Connections',
+ title: trans('sidebar.config.connections'),
href: accounts.url(),
icon: IconAffiliate,
},
{
- title: 'Hashtags',
+ title: trans('sidebar.config.hashtags'),
href: hashtags.url(),
icon: IconHash,
},
{
- title: 'Labels',
+ title: trans('sidebar.config.labels'),
href: labels.url(),
icon: IconTag,
},
@@ -129,7 +130,7 @@ const configNavItems = computed(() => {
if (canManageWorkspace.value) {
items.push({
- title: 'Settings',
+ title: trans('sidebar.config.settings'),
href: workspaceSettings.url(),
icon: IconSettings,
});
@@ -138,28 +139,28 @@ const configNavItems = computed(() => {
return items;
});
-const supportNavItems: NavItem[] = [
+const supportNavItems = computed<NavItem[]>(() => [
{
- title: 'Discord',
+ title: trans('sidebar.support.discord'),
href: 'https://trypost.it/discord',
icon: IconBrandDiscord,
},
{
- title: 'Share feedback',
+ title: trans('sidebar.support.share_feedback'),
href: 'https://github.com/trypost-it/trypost/discussions',
icon: IconMessageCircle,
},
{
- title: 'Last Updates',
+ title: trans('sidebar.support.last_updates'),
href: 'https://github.com/trypost-it/trypost/releases',
icon: IconBell,
},
{
- title: 'Docs',
+ title: trans('sidebar.support.docs'),
href: 'https://docs.trypost.it',
icon: IconBook,
},
-];
+]);
function switchWorkspace(workspace: Workspace) {
router.post(switchMethod.url(workspace.id), {}, {
@@ -206,7 +207,7 @@ function handleLogout() {
<div class="grid flex-1 text-left text-sm leading-tight">
<span class="truncate font-semibold">{{ auth.user.name }}</span>
<span class="truncate text-xs text-muted-foreground">{{ currentWorkspace?.name ||
- 'Select workspace' }}</span>
+ $t('sidebar.select_workspace') }}</span>
</div>
<IconSelector class="ml-auto size-4" />
</SidebarMenuButton>
@@ -237,7 +238,7 @@ function handleLogout() {
<DropdownMenuSubTrigger>
<img v-if="currentWorkspace?.logo.url" :src="currentWorkspace.logo.url"
:alt="currentWorkspace.name" class="mr-2 size-4 rounded-full object-cover" />
- <span>Workspace: {{ currentWorkspace?.name || 'Select' }}</span>
+ <span>{{ currentWorkspace ? $t('sidebar.workspace', { name: currentWorkspace.name }) : $t('sidebar.workspace_select') }}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
@@ -253,7 +254,7 @@ function handleLogout() {
<DropdownMenuSeparator />
<DropdownMenuItem class="cursor-pointer gap-2" @click="createWorkspace">
<IconPlus class="size-4" />
- <span>Create workspace</span>
+ <span>{{ $t('sidebar.create_workspace') }}</span>
</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
@@ -267,7 +268,7 @@ function handleLogout() {
<IconSun v-if="appearance === 'light'" class="mr-2 size-4" />
<IconMoon v-else-if="appearance === 'dark'" class="mr-2 size-4" />
<IconDeviceDesktop v-else class="mr-2 size-4" />
- <span>Theme: {{ themeLabels[appearance] }}</span>
+ <span>{{ $t('sidebar.theme', { name: themeLabels[appearance] }) }}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
@@ -275,15 +276,15 @@ function handleLogout() {
@update:model-value="updateAppearance">
<DropdownMenuRadioItem value="light">
<IconSun class="mr-2 size-4" />
- <span>Light</span>
+ <span>{{ $t('sidebar.theme_light') }}</span>
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="dark">
<IconMoon class="mr-2 size-4" />
- <span>Dark</span>
+ <span>{{ $t('sidebar.theme_dark') }}</span>
</DropdownMenuRadioItem>
<DropdownMenuRadioItem value="system">
<IconDeviceDesktop class="mr-2 size-4" />
- <span>System</span>
+ <span>{{ $t('sidebar.theme_system') }}</span>
</DropdownMenuRadioItem>
</DropdownMenuRadioGroup>
</DropdownMenuSubContent>
@@ -296,7 +297,7 @@ function handleLogout() {
<DropdownMenuSub>
<DropdownMenuSubTrigger>
<IconLanguage class="mr-2 size-4" />
- <span>Language: {{ currentLanguage?.name || 'Select' }}</span>
+ <span>{{ currentLanguage ? $t('sidebar.language', { name: currentLanguage.name }) : $t('sidebar.language_select') }}</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
@@ -318,7 +319,7 @@ function handleLogout() {
<DropdownMenuItem as-child>
<Link class="cursor-pointer" :href="editProfile()">
<IconUser class="mr-2 size-4" />
- Profile
+ {{ $t('sidebar.profile') }}
</Link>
</DropdownMenuItem>
</DropdownMenuGroup>
@@ -329,7 +330,7 @@ function handleLogout() {
<DropdownMenuItem as-child>
<Link class="w-full cursor-pointer" :href="logout()" @click="handleLogout" as="button">
<IconLogout class="mr-2 size-4" />
- Log out
+ {{ $t('sidebar.log_out') }}
</Link>
</DropdownMenuItem>
</DropdownMenuContent>
@@ -344,13 +345,13 @@ function handleLogout() {
<Link :href="createPost.url()">
<Button :size="sidebarState === 'collapsed' ? 'icon' : 'default'" class="w-full">
<IconPlus class="size-4" />
- <span v-if="sidebarState === 'expanded'">Create post</span>
+ <span v-if="sidebarState === 'expanded'">{{ $t('sidebar.create_post') }}</span>
</Button>
</Link>
</div>
<SidebarGroup v-if="currentWorkspace">
- <SidebarGroupLabel>Posts</SidebarGroupLabel>
+ <SidebarGroupLabel>{{ $t('sidebar.groups.posts') }}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem v-for="item in postsNavItems" :key="item.title">
@@ -367,7 +368,7 @@ function handleLogout() {
</SidebarGroup>
<SidebarGroup v-if="currentWorkspace">
- <SidebarGroupLabel>Configuration</SidebarGroupLabel>
+ <SidebarGroupLabel>{{ $t('sidebar.groups.configuration') }}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem v-for="item in configNavItems" :key="item.title">
@@ -384,7 +385,7 @@ function handleLogout() {
</SidebarGroup>
<SidebarGroup v-if="currentWorkspace">
- <SidebarGroupLabel>Support</SidebarGroupLabel>
+ <SidebarGroupLabel>{{ $t('sidebar.groups.support') }}</SidebarGroupLabel>
<SidebarGroupContent>
<SidebarMenu>
<SidebarMenuItem v-for="item in supportNavItems" :key="item.title">
diff --git a/resources/js/components/hashtags/CreateDialog.vue b/resources/js/components/hashtags/CreateDialog.vue
index 91729f5e8..1fee1e06e 100644
--- a/resources/js/components/hashtags/CreateDialog.vue
+++ b/resources/js/components/hashtags/CreateDialog.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3';
+import { trans } from 'laravel-vue-i18n';
import { Button } from '@/components/ui/button';
import {
@@ -44,18 +45,18 @@ const handleOpenChange = (value: boolean) => {
<Dialog :open="open" @update:open="handleOpenChange">
<DialogContent class="sm:max-w-md">
<DialogHeader>
- <DialogTitle>Create Hashtag Group</DialogTitle>
+ <DialogTitle>{{ $t('hashtags.create.title') }}</DialogTitle>
<DialogDescription>
- Give your group a name and add hashtags separated by spaces or commas
+ {{ $t('hashtags.create.description') }}
</DialogDescription>
</DialogHeader>
<form @submit.prevent="submit" class="space-y-4">
<div class="space-y-2">
- <Label for="create-name">Group Name</Label>
+ <Label for="create-name">{{ $t('hashtags.create.name') }}</Label>
<Input
id="create-name"
v-model="form.name"
- placeholder="e.g. Marketing, Travel, Food"
+ :placeholder="trans('hashtags.create.name_placeholder')"
:class="{ 'border-destructive': form.errors.name }"
/>
<p v-if="form.errors.name" class="text-sm text-destructive">
@@ -64,16 +65,16 @@ const handleOpenChange = (value: boolean) => {
</div>
<div class="space-y-2">
- <Label for="create-hashtags">Hashtags</Label>
+ <Label for="create-hashtags">{{ $t('hashtags.create.hashtags') }}</Label>
<Textarea
id="create-hashtags"
v-model="form.hashtags"
- placeholder="#marketing #socialmedia #business #growth"
+ :placeholder="trans('hashtags.create.hashtags_placeholder')"
rows="4"
:class="{ 'border-destructive': form.errors.hashtags }"
/>
<p class="text-sm text-muted-foreground">
- Enter hashtags separated by spaces or commas. Include the # symbol.
+ {{ $t('hashtags.create.hashtags_hint') }}
</p>
<p v-if="form.errors.hashtags" class="text-sm text-destructive">
{{ form.errors.hashtags }}
@@ -82,7 +83,7 @@ const handleOpenChange = (value: boolean) => {
<DialogFooter>
<Button type="submit" :disabled="form.processing">
- {{ form.processing ? 'Creating...' : 'Create Group' }}
+ {{ form.processing ? $t('hashtags.create.submitting') : $t('hashtags.create.submit') }}
</Button>
</DialogFooter>
</form>
diff --git a/resources/js/components/hashtags/EditDialog.vue b/resources/js/components/hashtags/EditDialog.vue
index f96a624e1..12327859c 100644
--- a/resources/js/components/hashtags/EditDialog.vue
+++ b/resources/js/components/hashtags/EditDialog.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3';
+import { trans } from 'laravel-vue-i18n';
import { watch } from 'vue';
import { Button } from '@/components/ui/button';
@@ -55,18 +56,18 @@ const submit = () => {
<Dialog v-model:open="open">
<DialogContent class="sm:max-w-md">
<DialogHeader>
- <DialogTitle>Edit Hashtag Group</DialogTitle>
+ <DialogTitle>{{ $t('hashtags.edit.title') }}</DialogTitle>
<DialogDescription>
- Update the name and hashtags for this group
+ {{ $t('hashtags.edit.description') }}
</DialogDescription>
</DialogHeader>
<form @submit.prevent="submit" class="space-y-4">
<div class="space-y-2">
- <Label for="edit-name">Group Name</Label>
+ <Label for="edit-name">{{ $t('hashtags.edit.name') }}</Label>
<Input
id="edit-name"
v-model="form.name"
- placeholder="e.g. Marketing, Travel, Food"
+ :placeholder="trans('hashtags.edit.name_placeholder')"
:class="{ 'border-destructive': form.errors.name }"
/>
<p v-if="form.errors.name" class="text-sm text-destructive">
@@ -75,16 +76,16 @@ const submit = () => {
</div>
<div class="space-y-2">
- <Label for="edit-hashtags">Hashtags</Label>
+ <Label for="edit-hashtags">{{ $t('hashtags.edit.hashtags') }}</Label>
<Textarea
id="edit-hashtags"
v-model="form.hashtags"
- placeholder="#marketing #socialmedia #business #growth"
+ :placeholder="trans('hashtags.edit.hashtags_placeholder')"
rows="4"
:class="{ 'border-destructive': form.errors.hashtags }"
/>
<p class="text-sm text-muted-foreground">
- Enter hashtags separated by spaces or commas. Include the # symbol.
+ {{ $t('hashtags.edit.hashtags_hint') }}
</p>
<p v-if="form.errors.hashtags" class="text-sm text-destructive">
{{ form.errors.hashtags }}
@@ -93,7 +94,7 @@ const submit = () => {
<DialogFooter>
<Button type="submit" :disabled="form.processing">
- {{ form.processing ? 'Saving...' : 'Save Changes' }}
+ {{ form.processing ? $t('hashtags.edit.submitting') : $t('hashtags.edit.submit') }}
</Button>
</DialogFooter>
</form>
diff --git a/resources/js/components/labels/CreateDialog.vue b/resources/js/components/labels/CreateDialog.vue
index b584729b2..55da73f23 100644
--- a/resources/js/components/labels/CreateDialog.vue
+++ b/resources/js/components/labels/CreateDialog.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3';
+import { trans } from 'laravel-vue-i18n';
import { Button } from '@/components/ui/button';
import {
@@ -56,18 +57,18 @@ const handleOpenChange = (value: boolean) => {
<Dialog :open="open" @update:open="handleOpenChange">
<DialogContent class="sm:max-w-md">
<DialogHeader>
- <DialogTitle>Create Label</DialogTitle>
+ <DialogTitle>{{ $t('labels.create.title') }}</DialogTitle>
<DialogDescription>
- Give your label a name and pick a color
+ {{ $t('labels.create.description') }}
</DialogDescription>
</DialogHeader>
<form @submit.prevent="submit" class="space-y-4">
<div class="space-y-2">
- <Label for="create-name">Name</Label>
+ <Label for="create-name">{{ $t('labels.create.name') }}</Label>
<Input
id="create-name"
v-model="form.name"
- placeholder="Enter label name..."
+ :placeholder="trans('labels.create.name_placeholder')"
:class="{ 'border-destructive': form.errors.name }"
/>
<p v-if="form.errors.name" class="text-sm text-destructive">
@@ -76,7 +77,7 @@ const handleOpenChange = (value: boolean) => {
</div>
<div class="space-y-2">
- <Label>Color</Label>
+ <Label>{{ $t('labels.create.color') }}</Label>
<div class="flex flex-wrap gap-2">
<button
v-for="color in colors"
@@ -99,7 +100,7 @@ const handleOpenChange = (value: boolean) => {
<DialogFooter>
<Button type="submit" :disabled="form.processing">
- {{ form.processing ? 'Creating...' : 'Create Label' }}
+ {{ form.processing ? $t('labels.create.submitting') : $t('labels.create.submit') }}
</Button>
</DialogFooter>
</form>
diff --git a/resources/js/components/labels/EditDialog.vue b/resources/js/components/labels/EditDialog.vue
index c48c8e440..b721a79e2 100644
--- a/resources/js/components/labels/EditDialog.vue
+++ b/resources/js/components/labels/EditDialog.vue
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3';
+import { trans } from 'laravel-vue-i18n';
import { watch } from 'vue';
import { Button } from '@/components/ui/button';
@@ -66,18 +67,18 @@ const submit = () => {
<Dialog v-model:open="open">
<DialogContent class="sm:max-w-md">
<DialogHeader>
- <DialogTitle>Edit Label</DialogTitle>
+ <DialogTitle>{{ $t('labels.edit.title') }}</DialogTitle>
<DialogDescription>
- Update the name and color for this label
+ {{ $t('labels.edit.description') }}
</DialogDescription>
</DialogHeader>
<form @submit.prevent="submit" class="space-y-4">
<div class="space-y-2">
- <Label for="edit-name">Name</Label>
+ <Label for="edit-name">{{ $t('labels.edit.name') }}</Label>
<Input
id="edit-name"
v-model="form.name"
- placeholder="Enter label name..."
+ :placeholder="trans('labels.edit.name_placeholder')"
:class="{ 'border-destructive': form.errors.name }"
/>
<p v-if="form.errors.name" class="text-sm text-destructive">
@@ -86,7 +87,7 @@ const submit = () => {
</div>
<div class="space-y-2">
- <Label>Color</Label>
+ <Label>{{ $t('labels.edit.color') }}</Label>
<div class="flex flex-wrap gap-2">
<button
v-for="color in colors"
@@ -109,7 +110,7 @@ const submit = () => {
<DialogFooter>
<Button type="submit" :disabled="form.processing">
- {{ form.processing ? 'Saving...' : 'Save Changes' }}
+ {{ form.processing ? $t('labels.edit.submitting') : $t('labels.edit.submit') }}
</Button>
</DialogFooter>
</form>
diff --git a/resources/js/pages/hashtags/Index.vue b/resources/js/pages/hashtags/Index.vue
index c23ece494..0cb0ec0fb 100644
--- a/resources/js/pages/hashtags/Index.vue
+++ b/resources/js/pages/hashtags/Index.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { Head } from '@inertiajs/vue3';
import { IconPlus, IconHash, IconPencil, IconTrash } from '@tabler/icons-vue';
+import { trans } from 'laravel-vue-i18n';
import { ref } from 'vue';
import ConfirmDeleteModal from '@/components/ConfirmDeleteModal.vue';
@@ -37,7 +38,7 @@ const isEditDialogOpen = ref(false);
const editingHashtag = ref<Hashtag | null>(null);
const breadcrumbs: BreadcrumbItemType[] = [
- { title: 'Hashtags', href: hashtagsIndex.url() },
+ { title: trans('hashtags.title'), href: hashtagsIndex.url() },
];
const openEditDialog = (hashtag: Hashtag) => {
@@ -57,20 +58,20 @@ const getHashtagCount = (hashtags: string): number => {
</script>
<template>
- <Head title="Hashtags" />
+ <Head :title="$t('hashtags.title')" />
<AppLayout :breadcrumbs="breadcrumbs">
<div class="flex flex-col gap-6 p-6">
<div v-if="hashtags.length > 0" class="flex items-center justify-between">
<div>
- <h1 class="text-2xl font-bold tracking-tight">Hashtags</h1>
+ <h1 class="text-2xl font-bold tracking-tight">{{ $t('hashtags.title') }}</h1>
<p class="text-muted-foreground">
- Create hashtag groups to quickly add to your posts
+ {{ $t('hashtags.description') }}
</p>
</div>
<Button @click="isCreateDialogOpen = true">
<IconPlus class="mr-2 h-4 w-4" />
- New Group
+ {{ $t('hashtags.new_group') }}
</Button>
</div>
@@ -78,13 +79,13 @@ const getHashtagCount = (hashtags: string): number => {
<div class="h-16 w-16 rounded-full bg-muted flex items-center justify-center mb-4">
<IconHash class="h-8 w-8 text-muted-foreground" />
</div>
- <h3 class="text-lg font-semibold mb-2">No hashtag groups yet</h3>
+ <h3 class="text-lg font-semibold mb-2">{{ $t('hashtags.no_groups_yet') }}</h3>
<p class="text-muted-foreground mb-4 text-center max-w-sm">
- Create hashtag groups to quickly add popular hashtags to your posts
+ {{ $t('hashtags.no_groups_description') }}
</p>
<Button @click="isCreateDialogOpen = true">
<IconPlus class="mr-2 h-4 w-4" />
- Create your first group
+ {{ $t('hashtags.create_first_group') }}
</Button>
</div>
@@ -113,7 +114,7 @@ const getHashtagCount = (hashtags: string): number => {
</div>
</div>
<CardDescription>
- {{ getHashtagCount(hashtag.hashtags) }} hashtags
+ {{ $t('hashtags.hashtags_count', { count: getHashtagCount(hashtag.hashtags) }) }}
</CardDescription>
</CardHeader>
<CardContent>
@@ -131,9 +132,9 @@ const getHashtagCount = (hashtags: string): number => {
<ConfirmDeleteModal
ref="deleteModal"
- title="Delete Hashtag Group"
- description="Are you sure you want to delete this hashtag group? This action cannot be undone."
- action="Delete"
- cancel="Cancel"
+ :title="$t('hashtags.delete.title')"
+ :description="$t('hashtags.delete.description')"
+ :action="$t('hashtags.delete.confirm')"
+ :cancel="$t('hashtags.delete.cancel')"
/>
</template>
diff --git a/resources/js/pages/labels/Index.vue b/resources/js/pages/labels/Index.vue
index 704fc913e..fc4073217 100644
--- a/resources/js/pages/labels/Index.vue
+++ b/resources/js/pages/labels/Index.vue
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { Head } from '@inertiajs/vue3';
import { IconPlus, IconTag, IconPencil, IconTrash } from '@tabler/icons-vue';
+import { trans } from 'laravel-vue-i18n';
import { ref } from 'vue';
import ConfirmDeleteModal from '@/components/ConfirmDeleteModal.vue';
@@ -37,7 +38,7 @@ const isEditDialogOpen = ref(false);
const editingLabel = ref<Label | null>(null);
const breadcrumbs: BreadcrumbItemType[] = [
- { title: 'Labels', href: labelsIndex.url() },
+ { title: trans('labels.title'), href: labelsIndex.url() },
];
const openEditDialog = (label: Label) => {
@@ -53,20 +54,20 @@ const handleDelete = (labelId: string) => {
</script>
<template>
- <Head title="Labels" />
+ <Head :title="$t('labels.title')" />
<AppLayout :breadcrumbs="breadcrumbs">
<div class="flex flex-col gap-6 p-6">
<div v-if="labels.length > 0" class="flex items-center justify-between">
<div>
- <h1 class="text-2xl font-bold tracking-tight">Labels</h1>
+ <h1 class="text-2xl font-bold tracking-tight">{{ $t('labels.title') }}</h1>
<p class="text-muted-foreground">
- Create labels to organize and categorize your posts
+ {{ $t('labels.description') }}
</p>
</div>
<Button @click="isCreateDialogOpen = true">
<IconPlus class="mr-2 h-4 w-4" />
- New Label
+ {{ $t('labels.new_label') }}
</Button>
</div>
@@ -74,13 +75,13 @@ const handleDelete = (labelId: string) => {
<div class="h-16 w-16 rounded-full bg-muted flex items-center justify-center mb-4">
<IconTag class="h-8 w-8 text-muted-foreground" />
</div>
- <h3 class="text-lg font-semibold mb-2">No labels yet</h3>
+ <h3 class="text-lg font-semibold mb-2">{{ $t('labels.no_labels_yet') }}</h3>
<p class="text-muted-foreground mb-4 text-center max-w-sm">
- Create labels to organize and categorize your posts
+ {{ $t('labels.description') }}
</p>
<Button @click="isCreateDialogOpen = true">
<IconPlus class="mr-2 h-4 w-4" />
- Create your first label
+ {{ $t('labels.create_first_label') }}
</Button>
</div>
@@ -125,9 +126,9 @@ const handleDelete = (labelId: string) => {
<ConfirmDeleteModal
ref="deleteModal"
- title="Delete Label"
- description="Are you sure you want to delete this label? This action cannot be undone."
- action="Delete"
- cancel="Cancel"
+ :title="$t('labels.delete.title')"
+ :description="$t('labels.delete.description')"
+ :action="$t('labels.delete.confirm')"
+ :cancel="$t('labels.delete.cancel')"
/>
</template>