diff --git a/resources/assets/js/components/filters/FilterCard.vue b/resources/assets/js/components/filters/FilterCard.vue index 0526fcdea..25d402e02 100644 --- a/resources/assets/js/components/filters/FilterCard.vue +++ b/resources/assets/js/components/filters/FilterCard.vue @@ -9,10 +9,10 @@
·
- Expires: {{ formatExpiry(filter.expires_at) }} + {{ $t('settings.filters.expires') }}: {{ formatExpiry(filter.expires_at) }}
- Never expires + {{ $t('settings.filters.never_expires') }}
diff --git a/resources/assets/js/components/filters/FilterModal.vue b/resources/assets/js/components/filters/FilterModal.vue index 320734602..ee1d29793 100644 --- a/resources/assets/js/components/filters/FilterModal.vue +++ b/resources/assets/js/components/filters/FilterModal.vue @@ -7,7 +7,7 @@ @@ -97,7 +97,7 @@ type="text" :maxlength="40" class="form-control border-0 bg-transparent rounded-pill flex-grow-1 mb-2" - placeholder="Add a keyword..." + :placeholder=" $t('settings.filters.add_keyword') " @keydown.enter.prevent="addKeywordFromInput" style="min-width: 150px;" /> @@ -105,12 +105,12 @@
- Duplicate keywords are not allowed + {{ $t("settings.filters.duplicate_not_allowed") }}
- +
@@ -137,7 +137,7 @@ />
@@ -151,14 +151,14 @@ />
- +
@@ -170,7 +170,7 @@ v-model="formData.context" />
@@ -184,7 +184,7 @@ v-model="formData.context" />
@@ -198,7 +198,7 @@ v-model="formData.context" /> @@ -212,7 +212,7 @@ v-model="formData.context" /> @@ -226,7 +226,7 @@ v-model="formData.context" /> @@ -240,7 +240,7 @@ v-model="formData.context" /> @@ -248,16 +248,16 @@
- +
seconds @@ -277,7 +277,7 @@
@@ -328,31 +328,31 @@ -

Name Your Filter

-

Give your filter a name that will help you remember what content it filters.

+

{{ $t('settings.filters.name_your_filter') }}

+

{{ $t('settings.filters.give_your_filter_a_name') }}

- +
- +
seconds @@ -375,8 +375,8 @@ -

Add Filter Keywords

-

Add words or phrases you want to filter.
Content containing these words will be filtered according to your settings.

+

{{ $t('settings.filters.add_filter_keywords')}}

+

@@ -421,7 +421,7 @@
- {{ keyword.whole_word ? 'Whole word match - filters exact matches only (e.g. "book" won\'t match "bookstore")' : 'Partial word match - filters any content containing this text (e.g. "book" will match "bookstore")' }} + {{ keyword.whole_word ? $t('settings.filters.whole_word_match') : $t('settings.filters.partial_word_match')}}
@@ -431,12 +431,12 @@ class="btn btn-outline-primary mt-3 font-weight-light rounded-pill" @click="addKeyword" > - Add another keyword + {{ $t('settings.filters.add_another_keyword')}}
- Please remove duplicate keywords before continuing + {{ $t('settings.filters.please_remove_duplicate_keywords')}}
@@ -446,8 +446,8 @@
-

Choose Filter Action

-

How would you like to handle content that matches your filter?

+

{{ $t('settings.filters.choose_filter_action')}}

+

{{ $t('settings.filters.choose_filter_action_description')}}

@@ -459,7 +459,7 @@
Blur
-

Hide media behind a blurhash

+

{{ $t('settings.filters.hide_media_blur') }}

Warn
-

Show a warning before displaying the content

+

{{ $t('settings.filters.show_warning') }}

Hide
-

Completely hide content that matches

+

{{ $t('settings.filters.hide_completely') }}

@@ -492,8 +492,8 @@
-

Choose Where to Apply

-

Select which sections of the application should use this filter.

+

{{ $t('settings.filters.choose_where_to_apply') }}

+

{{ $t('settings.filters.choose_where_to_apply_description') }}

@@ -528,8 +528,8 @@ -

Review Your Filter

-

Here's a summary of the filter you've created.

+

{{ $t('settings.filters.review_your_filter') }}

+

{{ $t('settings.filters.review_your_filter_description') }}

@@ -537,7 +537,7 @@
-
Keywords:
+
{{ $t('settings.filters.keywords') }}:
(whole)
- No keywords specified + {{ $t('settings.filters.no_keywords_specified') }}
-
Action:
+
{{ $t('settings.filters.action') }}:
-
Duration:
+
{{ $t("settings.filters.duration") }}:
- Forever - 30 minutes - 1 hour - 6 hours - 12 hours - 1 day - 1 week + {{ $t("settings.filters.forever") }} + {{ $t("settings.filters.30_minutes") }} + {{ $t("settings.filters.1_hour") }} + {{ $t("settings.filters.6_hours") }} + {{ $t("settings.filters.12_hours") }} + {{ $t("settings.filters.1_day") }} + {{ $t("settings.filters.1_week") }} {{ customDuration }} seconds
@@ -609,7 +609,7 @@ class="btn btn-outline-danger font-weight-light rounded-pill" @click="deleteFilter()" > - Delete + {{ $t('common.delete')}}
@@ -620,7 +620,7 @@ @click="nextStep" :disabled="!canContinue" > - Continue + {{ $t('common.continue')}}
@@ -715,11 +715,11 @@ // }, ], wizardSteps: [ - { label: 'Title', field: 'title' }, - { label: 'Keywords', field: 'keywords' }, - { label: 'Action', field: 'filter_action' }, - { label: 'Context', field: 'context' }, - { label: 'Review', field: null } + { label: this.$t('settings.filters.titleAdvance'), field: 'title' }, + { label: this.$t('settings.filters.keywords'), field: 'keywords' }, + { label: this.$t('settings.filters.action'), field: 'filter_action' }, + { label: this.$t('settings.filters.context'), field: 'context' }, + { label: this.$t('settings.filters.review'), field: null } ] } }, diff --git a/resources/assets/js/components/filters/FiltersList.vue b/resources/assets/js/components/filters/FiltersList.vue index 94ff1a5f6..0349bbab8 100644 --- a/resources/assets/js/components/filters/FiltersList.vue +++ b/resources/assets/js/components/filters/FiltersList.vue @@ -3,22 +3,21 @@

- Filters + {{ $t("settings.filters.title")}}

-

Manage your custom filters.

+

{{ $t('settings.filters.manage_your_custom_filters') }}

- -

Customize your experience with powerful content filters that screen for specific words or phrases throughout your entire account - including home and public timelines, and hashtag feeds.

-

You can add up to 20 filters that can have up to 10 keywords.

-

Learn more in our Help Center.

+

{{ $t("settings.filters.customize_your_experience") }}

+

+

@@ -29,12 +28,12 @@
-

You don't have any content filters yet.

+

{{ $t("settings.filters.no_filters")}}

- Filters help you hide content containing specific words or phrases from your timelines. + {{ $t('settings.filters.no_filters_message') }}

@@ -67,12 +66,12 @@
-

You don't have any content filters that match {{searchQuery}}.

+

- Filters help you hide content containing specific words or phrases from your timelines. + {{ $t('settings.filters.no_matching_filters_message') }}

diff --git a/resources/assets/js/settings.js b/resources/assets/js/settings.js new file mode 100644 index 000000000..3fc78644a --- /dev/null +++ b/resources/assets/js/settings.js @@ -0,0 +1,19 @@ +import Vue from 'vue'; +import VueI18n from 'vue-i18n'; + +Vue.use(VueI18n); + +import en from './i18n/en.json'; +import pt from './i18n/pt.json'; +let locale = document.querySelector('html').getAttribute('lang'); + +const i18n = new VueI18n({ + locale: locale, // set locale + fallbackLocale: 'en', + messages: { en, pt } +}); + +new Vue({ + el: '#content', + i18n +}); diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index b084799be..63138d81f 100644 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -6,6 +6,7 @@ return [ 'email' => 'Email', 'invites' => 'Invites', 'media' => 'Media', + 'filters' => 'Filters', 'notifications' => 'Notifications', 'password' => 'Password', 'privacy' => 'Privacy', @@ -18,13 +19,13 @@ return [ 'export' => 'Export', 'labs' => 'Labs', 'parental_controls' => 'Parental Controls', - + 'submit' => 'Submit', 'error' => 'Error', 'cancel' => 'Cancel', 'save' => 'Save', 'download' => 'Download', - + 'home.account_settings' => 'Account Settings', 'home.change_profile_photo' => 'Change Profile Photo', 'home.select_a_profile_photo' => 'Select a profile photo', @@ -50,21 +51,21 @@ return [ 'home.storage_used' => 'Storage Used', 'home.are_you_sure_you_want_to_delete_your_profile_photo' => 'Are you sure you want to delete your profile photo?', 'home.an_error_occured_please_try_again_later' => 'An error occured, please try again later', - + 'accessibility.reduce_motion' => 'Reduce Motion', 'accessibility.prevent_animation_effects' => 'Prevent animation effects.', 'accessibility.high_contrast_mode' => 'High Contrast Mode', 'accessibility.high_contrast_mode_for_the_visually_impaired' => 'High contrast mode for the visually impaired.', 'accessibility.disable_video_autoplay' => 'Disable video autoplay', 'accessibility.prevent_videos_from_autoplaying' => 'Prevent videos from autoplaying.', - + 'email.email_settings' => 'Email Settings', 'email.email_address' => 'Email Address', 'email.verified' => 'Verified', 'email.unverified' => 'Unverified', 'email.you_need_to' => 'You need to', 'email.verify_your_email' => 'verify your email', - + 'media.default_license' => 'Default License', 'media.set_a_default_license_for_new_posts' => 'Set a default license for new posts.', 'media.sync_licenses' => 'Sync Licenses', @@ -73,7 +74,7 @@ return [ 'media.require_media_descriptions' => 'Require Media Descriptions', 'media.briefly_describe_your_media_to_improve_etc' => 'Briefly describe your media to improve accessibility for vision impaired people.', 'media.not_available_for_mobile_or_3rd_party_apps_etc' => 'Not available for mobile or 3rd party apps at this time.', - + 'password.update_password' => 'Update Password', 'password.current' => 'Current', 'password.your_current_password' => 'Your current password', @@ -81,7 +82,7 @@ return [ 'password.enter_new_password_here' => 'Enter new password here', 'password.confirm' => 'Confirm', 'password.confirm_new_password' => 'Confirm new password', - + 'privacy.privacy_settings' => 'Privacy Settings', 'privacy.private_account' => 'Private Account', 'privacy.when_your_account_is_private_only_people_you_etc' => 'When your account is private, only people you approve can see your photos and videos on pixelfed. Your existing followers won\'t be affected.', @@ -123,7 +124,7 @@ return [ 'privacy.allow_new_follow_requests' => 'Allow new follow requests', 'privacy.block_notifications_from_accounts_i_dont_follow' => 'Block notifications from accounts I don\'t follow', 'privacy.an_error_occured_please_try_again' => 'An error occured. Please try again.', - + 'relationships' => 'Relationships', 'relationships.followers' => 'Followers', 'relationships.following' => 'Following', @@ -142,7 +143,7 @@ return [ 'relationships.you_have_successfully_unfollowed_that_user' => 'You have successfully unfollowed that user', 'relationships.an_error_occured_when_attempting_to_unfollow_this_user' => 'An error occured when attempting to unfollow this user', 'relationships.you_have_successfully_unfollowed_that_hashtag' => 'You have successfully unfollowed that hashtag', - + 'security.two_factor_authentication' => 'Two-factor authentication', 'security.enabled' => 'Enabled', 'security.danger_zone' => 'Danger Zone', @@ -173,23 +174,23 @@ return [ 'security.see_reblogs_from_accounts_you_follow_in_your_home_etc' => 'See reblogs from accounts you follow in your home feed. (Home timeline only)', 'security.photo_reblogs_only' => 'Photo reblogs only', 'security.only_see_reblogs_of_photos_or_photo_albums_home_etc' => 'Only see reblogs of photos or photo albums. (Home timeline only)', - + // incomplete - // the oauth panel is loaded from elsewhere + // the oauth panel is loaded from elsewhere 'developers.oauth_has_not_been_enabled_on_this_instance' => 'OAuth has not been enabled on this instance.', - + // incomplete // import/ig.blade.php seems not in use anymore 'import.import_from_instagram' => 'Import from Instagram', - + 'export.data_export' => 'Data Export', 'export.we_generate_data_exports_once_per_hour_and_they_may_etc' => 'We generate data exports once per hour, and they may not contain the latest data if you\'ve requested them recently.', 'export.statuses' => 'Statuses', 'export.mute_block_lists' => 'Mute/Block List', - + // incomplete // some language outside the blades (in app/Http/Controllers/Settings/LabsSettings.php) 'labs' => 'Labs', 'labs.experimental_features' => 'Experimental features', 'labs.use_dark_mode_theme' => 'Use dark mode theme.', -]; \ No newline at end of file +]; diff --git a/resources/lang/en/web.php b/resources/lang/en/web.php index 69d318db4..d0127331d 100644 --- a/resources/lang/en/web.php +++ b/resources/lang/en/web.php @@ -32,6 +32,8 @@ return [ 'sensitive' => 'Sensitive', 'sensitiveContent' => 'Sensitive Content', 'sensitiveContentWarning' => 'This post may contain sensitive content', + + 'continue' => 'Continue', ], 'site' => [ @@ -262,4 +264,80 @@ return [ 'feed' => 'Feed', ], + 'settings' => [ + 'filters' => [ + 'title' => 'Filters', + 'manage_your_custom_filters' => 'Manage your custom filters.', + 'customize_your_experience' => 'Customize your experience with powerful content filters that screen for specific words or phrases throughout your entire account - including home and public timelines, and hashtag feeds.', + 'add_new_filter' => 'Add New Filter', + 'limit_message' => 'You can add up to :filters_num filters that can have up to :keywords_num keywords.', + 'learn_more_help_center' => 'Learn more in our Help Center.', + 'no_filters' => 'You don\'t have any content filters yet', + 'no_filters_message' => 'Filters help you hide content containing specific words or phrases from your timelines.', + 'create_first_filter' => 'Create Your First Filter', + 'no_matching_filters' => 'You don\'t have any content filters that match :searchQuery.', + 'no_matching_filters_message' => 'Filters help you hide content containing specific words or phrases from your timelines.', + 'create_new_filter' => 'Create new Filter', + 'filter_title' => 'Filter Title', + 'edit_filter' => 'Edit Filter', + 'create_filter' => 'Create Filter', + 'advance_mode' => 'Advanced Mode', + 'simple_mode' => 'Simple Mode', + 'keywords' => 'Keywords', + 'legend' => 'Legend', + 'whole_word' => 'Whole word', + 'partial_word' => 'Partial word', + 'duplicate_not_allowed' => 'Duplicate keywords are not allowed', + 'filter_action' => 'Filter Action', + 'hide_media_blur' => 'Hide media behind a blurbash', + 'show_warning' => 'Show warning before displaying content', + 'hide_content_completely' => 'Hide content completely', + 'apply_filters_to' => 'Apply filters to', + 'home_timeline' => 'Home Timeline', + 'notifications' => 'Notifications', + 'public_timeline' => 'Public Timeline', + 'hashtags' => 'Hashtag', + 'groups' => 'Groups', + 'conversations' => 'Conversations', + 'duration' => 'Duration', + 'forever' => 'Forever', + '30_minutes' => '30 minutes', + '1_hour' => '1 hour', + '6_hours' => '6 hours', + '12_hours' => '12 hours', + '1_day' => '1 day', + '1_week' => '1 week', + 'cutom' => 'Custom..', + 'enter_duration_in_seconds' => 'Enter duration in seconds', + 'save_changes' => 'Save Changes', + 'create_filter' => 'Create Filter', + 'name_your_filter' => 'Name your filter', + 'give_your_filter_a_name' => 'Give your filter a name that will help you remember what content it filters.', + 'my_filter_name' => 'My Filter Name', + 'filter_duration' => 'Filter Duration', + 'add_filter_keywords' => 'Add filter keywords', + 'add_word_or_phrase' => 'Add words or phrases you want to filter.
Content containing these words will be filtered according to your settings.', + 'whole_word_match' => 'Whole word match - filters exact matches only (e.g. "book" won\'t match "bookstore")', + 'partial_word_match' => 'Partial word match - filters any content containing this text (e.g. "book" will match "bookstore")', + 'add_another_keyword' => 'Add another keyword', + 'please_remove_duplicate_keywords' => 'Please remove duplicate keywords before continuing', + 'choose_filter_action' => 'Choose filter action', + 'choose_filter_action_description' => 'How would you like to handle content that matches your filter?', + 'hide_completely' => 'Completely hide content that matches', + 'choose_where_to_apply' => 'Choose Where to Apply', + 'choose_where_to_apply_description' => 'Select which sections of the application should use this filter.', + 'review_your_filter' => 'Review your filter', + 'review_your_filter_description' => 'Here\'s a summary of the filter you\'ve created.', + 'no_keywords_specified' => 'No keywords specified', + 'action' => 'Action', + 'expires' => 'Expires', + 'never_expires' => 'Never Expires', + 'titleAdvance' => 'Title', + 'context' => 'Context', + 'review' => 'Review', + 'add_keyword' => 'Add a keyword...', + 'enter_filter_title' => 'Enter filter title', + ], + + ] ]; diff --git a/resources/lang/pt/settings.php b/resources/lang/pt/settings.php index 8320fe1e8..1397e958a 100644 --- a/resources/lang/pt/settings.php +++ b/resources/lang/pt/settings.php @@ -6,6 +6,7 @@ return [ 'email' => 'Email', 'invites' => 'Convites', 'media' => 'Mídia', + 'filters' => 'Filtros', 'notifications' => 'Notificações', 'password' => 'Senha', 'privacy' => 'Privacidade', @@ -185,4 +186,6 @@ return [ 'labs' => 'Laboratórios', 'labs.experimental_features' => 'Recursos experimentais', 'labs.use_dark_mode_theme' => 'Usar tema de modo escuro.', + + ]; diff --git a/resources/lang/pt/web.php b/resources/lang/pt/web.php index d8e74d5ce..d82543d49 100644 --- a/resources/lang/pt/web.php +++ b/resources/lang/pt/web.php @@ -32,6 +32,8 @@ return [ 'sensitive' => 'Sensível', 'sensitiveContent' => 'Conteúdo sensível', 'sensitiveContentWarning' => 'Este post pode conter conteúdo sensível', + + 'continue' => 'Continuar', ], 'site' => [ @@ -253,6 +255,81 @@ return [ 'grid' => 'Grade', 'masonry' => 'Mansory', 'feed' => 'Feed' - ] + ], + 'settings' => [ + 'filters' => [ + 'title' => 'Filtros', + 'manage_your_custom_filters' => 'Gerencie seus filtros personalizados.', + 'customize_your_experience' => 'Personalize sua experiência com filtros de conteúdo poderosos que verificam palavras ou frases específicas em toda a sua conta - incluindo linhas do tempo pessoais e públicas, e feeds de hashtags.', + 'add_new_filter' => 'Adicionar Novo Filtro', + 'limit_message' => 'Você pode adicionar até :filters_num filtros que podem ter até :keywords_num palavras-chave.', + 'learn_more_help_center' => 'Saiba mais no nosso Centro de Ajuda.', + 'no_filters' => 'Você ainda não tem nenhum filtro de conteúdo', + 'no_filters_message' => 'Os filtros ajudam você a ocultar conteúdo que contém palavras ou frases específicas das suas linhas do tempo.', + 'create_first_filter' => 'Crie Seu Primeiro Filtro', + 'no_matching_filters' => 'Você não tem nenhum filtro de conteúdo que corresponda a :searchQuery.', + 'no_matching_filters_message' => 'Os filtros ajudam você a ocultar conteúdo que contém palavras ou frases específicas das suas linhas do tempo.', + 'create_new_filter' => 'Criar Novo Filtro', + 'filter_title' => 'Título do Filtro', + 'edit_filter' => 'Editar Filtro', + 'create_filter' => 'Criar Filtro', + 'advance_mode' => 'Modo Avançado', + 'simple_mode' => 'Modo Simples', + 'keywords' => 'Palavras-chave', + 'legend' => 'Legenda', + 'whole_word' => 'Palavra inteira', + 'partial_word' => 'Palavra parcial', + 'duplicate_not_allowed' => 'Palavras-chave duplicadas não são permitidas', + 'filter_action' => 'Ação do Filtro', + 'hide_media_blur' => 'Ocultar mídia atrás de um desfoque', + 'show_warning' => 'Mostrar aviso antes de exibir o conteúdo', + 'hide_content_completely' => 'Ocultar conteúdo completamente', + 'apply_filters_to' => 'Aplicar filtros a', + 'home_timeline' => 'Linha do Tempo Pessoal', + 'notifications' => 'Notificações', + 'public_timeline' => 'Linha do Tempo Pública', + 'hashtags' => 'Hashtags', + 'groups' => 'Grupos', + 'conversations' => 'Conversas', + 'duration' => 'Duração', + 'forever' => 'Para Sempre', + '30_minutes' => '30 minutos', + '1_hour' => '1 hora', + '6_hours' => '6 horas', + '12_hours' => '12 horas', + '1_day' => '1 dia', + '1_week' => '1 semana', + 'cutom' => 'Personalizado...', + 'enter_duration_in_seconds' => 'Insira a duração em segundos', + 'save_changes' => 'Salvar Alterações', + 'create_filter' => 'Criar Filtro', + 'name_your_filter' => 'Nomeie seu filtro', + 'give_your_filter_a_name' => 'Dê ao seu filtro um nome que o ajude a lembrar o que ele filtra.', + 'my_filter_name' => 'Nome do Meu Filtro', + 'filter_duration' => 'Duração do Filtro', + 'add_filter_keywords' => 'Adicionar palavras-chave ao filtro', + 'add_word_or_phrase' => 'Adicione palavras ou frases que você deseja filtrar.
Conteúdo contendo essas palavras será filtrado de acordo com suas configurações.', + 'whole_word_match' => 'Correspondência de palavra inteira - filtra apenas correspondências exatas (ex.: "livro" não corresponderá a "livraria")', + 'partial_word_match' => 'Correspondência de palavra parcial - filtra qualquer conteúdo que contenha este texto (ex.: "livro" corresponderá a "livraria")', + 'add_another_keyword' => 'Adicionar outra palavra-chave', + 'please_remove_duplicate_keywords' => 'Por favor, remova palavras-chave duplicadas antes de continuar', + 'choose_filter_action' => 'Escolha a ação do filtro', + 'choose_filter_action_description' => 'Como você gostaria de lidar com o conteúdo que corresponde ao seu filtro?', + 'hide_completely' => 'Ocultar completamente o conteúdo que corresponde', + 'choose_where_to_apply' => 'Escolha Onde Aplicar', + 'choose_where_to_apply_description' => 'Selecione quais seções do aplicativo devem usar este filtro.', + 'review_your_filter' => 'Revise seu filtro', + 'review_your_filter_description' => 'Aqui está um resumo do filtro que você criou.', + 'no_keywords_specified' => 'Nenhuma palavra-chave especificada', + 'action' => 'Ação', + 'expires' => 'Expira', + 'never_expires' => 'Nunca Expira', + 'titleAdvance' => 'Título', + 'context' => 'Contexto', + 'review' => 'Revisão', + 'add_keyword' => 'Adicionar uma palavra-chave...', + 'enter_filter_title' => 'Insira o título do filtro', + ], + ] ]; diff --git a/resources/views/settings/partial/sidebar.blade.php b/resources/views/settings/partial/sidebar.blade.php index 01a44ca60..e3cd542d4 100644 --- a/resources/views/settings/partial/sidebar.blade.php +++ b/resources/views/settings/partial/sidebar.blade.php @@ -18,7 +18,7 @@ {{__('settings.media')}} {{--