mirror of
https://gitlab.unicamp.br/infimecc_drupal11_modules/site_users.git
synced 2026-03-08 01:17:41 -03:00
i18n: Converte strings do módulo para en com tradução pt-br
- Altera langcode de pt-br para en em todos os field.field YAMLs - Traduz labels e descriptions dos campos para inglês - Converte strings de info.yml, permissions.yml, links.menu.yml e routing.yml para inglês - Converte todas as strings t() e @Translation em PHP para inglês - Adiciona traduções de config em config/translations/pt-br/ para os 7 campos de usuário - Adiciona arquivo translations/site_users.pt-br.po com todas as strings de interface traduzidas para pt-br Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -10,8 +10,8 @@ id: user.user.field_user_bio
|
||||
field_name: field_user_bio
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Biografia
|
||||
description: 'Uma breve descrição sobre o usuário.'
|
||||
label: Biography
|
||||
description: 'A brief description about the user.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -9,8 +9,8 @@ id: user.user.field_user_category
|
||||
field_name: field_user_category
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Categoria
|
||||
description: 'Categoria do usuário.'
|
||||
label: Category
|
||||
description: 'User category.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -11,8 +11,8 @@ id: user.user.field_user_default_photo
|
||||
field_name: field_user_default_photo
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Foto Padrão
|
||||
description: 'Selecione a foto principal do perfil.'
|
||||
label: 'Default Photo'
|
||||
description: 'Select the main profile photo.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -9,8 +9,8 @@ id: user.user.field_user_dept_code
|
||||
field_name: field_user_dept_code
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Código do Departamento
|
||||
description: 'Código do departamento do usuário.'
|
||||
label: 'Department Code'
|
||||
description: 'User department code.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -9,8 +9,8 @@ id: user.user.field_user_name
|
||||
field_name: field_user_name
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Nome
|
||||
description: 'Nome completo do usuário.'
|
||||
label: Name
|
||||
description: 'Full name of the user.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -10,8 +10,8 @@ id: user.user.field_user_phone
|
||||
field_name: field_user_phone
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Telefone
|
||||
description: 'Número de telefone do usuário.'
|
||||
label: Phone
|
||||
description: 'User phone number.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
langcode: pt-br
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
@@ -11,8 +11,8 @@ id: user.user.field_user_photos
|
||||
field_name: field_user_photos
|
||||
entity_type: user
|
||||
bundle: user
|
||||
label: Fotos
|
||||
description: 'Fotos do usuário.'
|
||||
label: Photos
|
||||
description: 'User photos.'
|
||||
required: false
|
||||
translatable: false
|
||||
default_value: { }
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
label: Biografia
|
||||
description: 'Uma breve descrição sobre o usuário.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: Categoria
|
||||
description: 'Categoria do usuário.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: 'Foto Padrão'
|
||||
description: 'Selecione a foto principal do perfil.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: 'Código do Departamento'
|
||||
description: 'Código do departamento do usuário.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: Nome
|
||||
description: 'Nome completo do usuário.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: Telefone
|
||||
description: 'Número de telefone do usuário.'
|
||||
@@ -0,0 +1,2 @@
|
||||
label: Fotos
|
||||
description: 'Fotos do usuário.'
|
||||
@@ -1,6 +1,6 @@
|
||||
name: Site Users
|
||||
type: module
|
||||
description: 'Customizações de usuários do site, incluindo campos e templates.'
|
||||
description: 'Site user customizations, including fields and templates.'
|
||||
core_version_requirement: ^10 || ^11
|
||||
package: Custom
|
||||
dependencies:
|
||||
|
||||
@@ -221,8 +221,8 @@ function site_users_update_10001() {
|
||||
'field_name' => 'field_user_default_photo',
|
||||
'entity_type' => 'user',
|
||||
'bundle' => 'user',
|
||||
'label' => 'Foto Padrão',
|
||||
'description' => 'Selecione a foto principal do perfil.',
|
||||
'label' => 'Default Photo',
|
||||
'description' => 'Select the main profile photo.',
|
||||
'required' => FALSE,
|
||||
'settings' => [
|
||||
'handler' => 'default:media',
|
||||
@@ -262,5 +262,5 @@ function site_users_update_10001() {
|
||||
$form_display->removeComponent('field_user_default_photo')->save();
|
||||
}
|
||||
|
||||
return t('Campo de foto padrão criado com sucesso.');
|
||||
return t('Default photo field created successfully.');
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
site_users.settings:
|
||||
title: 'Site Users'
|
||||
description: 'Configurações de campos e fotos de usuários.'
|
||||
description: 'User field and photo settings.'
|
||||
route_name: site_users.settings
|
||||
parent: site_tools.admin_config
|
||||
weight: 10
|
||||
|
||||
@@ -221,8 +221,8 @@ function _site_users_add_default_photo_selector(&$form, FormStateInterface $form
|
||||
if (!empty($photos)) {
|
||||
$form['default_photo_selector']['field_user_default_photo_select'] = [
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Foto padrão'),
|
||||
'#description' => t('Selecione a foto principal do perfil.'),
|
||||
'#title' => t('Default photo'),
|
||||
'#description' => t('Select the main profile photo.'),
|
||||
'#options' => $photos,
|
||||
'#default_value' => $default_photo_id,
|
||||
];
|
||||
@@ -230,8 +230,8 @@ function _site_users_add_default_photo_selector(&$form, FormStateInterface $form
|
||||
else {
|
||||
$form['default_photo_selector']['field_user_default_photo_select'] = [
|
||||
'#type' => 'item',
|
||||
'#title' => t('Foto padrão'),
|
||||
'#markup' => t('Adicione fotos para selecionar uma como padrão.'),
|
||||
'#title' => t('Default photo'),
|
||||
'#markup' => t('Add photos to select one as default.'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ function site_users_validate_photos_count(&$form, FormStateInterface $form_state
|
||||
$max_count = $config->get('photos.max_count') ?? 5;
|
||||
|
||||
if ($count > $max_count) {
|
||||
$form_state->setErrorByName('field_user_photos', t('Você pode adicionar no máximo @max fotos. Atualmente há @count fotos selecionadas.', [
|
||||
$form_state->setErrorByName('field_user_photos', t('You can add a maximum of @max photos. Currently @count photos are selected.', [
|
||||
'@max' => $max_count,
|
||||
'@count' => $count,
|
||||
]));
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
administer site_users settings:
|
||||
title: 'Administrar configurações do Site Users'
|
||||
description: 'Permite administrar as configurações do módulo Site Users.'
|
||||
title: 'Administer Site Users settings'
|
||||
description: 'Allows administering the Site Users module settings.'
|
||||
restrict access: true
|
||||
|
||||
view any user profile fields:
|
||||
title: 'Visualizar campos de perfil de qualquer usuário'
|
||||
description: 'Permite visualizar os campos customizados (nome, telefone, categoria, etc.) de qualquer usuário.'
|
||||
title: 'View any user profile fields'
|
||||
description: 'Allows viewing the custom fields (name, phone, category, etc.) of any user.'
|
||||
|
||||
view own user profile fields:
|
||||
title: 'Visualizar campos do próprio perfil'
|
||||
description: 'Permite visualizar os próprios campos customizados de perfil.'
|
||||
title: 'View own user profile fields'
|
||||
description: 'Allows viewing own custom profile fields.'
|
||||
|
||||
edit any user profile fields:
|
||||
title: 'Editar campos de perfil de qualquer usuário'
|
||||
description: 'Permite editar os campos customizados de qualquer usuário.'
|
||||
title: 'Edit any user profile fields'
|
||||
description: 'Allows editing the custom fields of any user.'
|
||||
restrict access: true
|
||||
|
||||
edit own user profile fields:
|
||||
title: 'Editar campos do próprio perfil'
|
||||
description: 'Permite editar os próprios campos customizados de perfil.'
|
||||
title: 'Edit own user profile fields'
|
||||
description: 'Allows editing own custom profile fields.'
|
||||
|
||||
manage user photos:
|
||||
title: 'Gerenciar fotos de usuários'
|
||||
description: 'Permite adicionar, editar e remover fotos de qualquer usuário.'
|
||||
title: 'Manage user photos'
|
||||
description: 'Allows adding, editing, and removing photos of any user.'
|
||||
restrict access: true
|
||||
|
||||
manage own user photos:
|
||||
title: 'Gerenciar próprias fotos'
|
||||
description: 'Permite adicionar, editar e remover as próprias fotos de perfil.'
|
||||
title: 'Manage own user photos'
|
||||
description: 'Allows adding, editing, and removing own profile photos.'
|
||||
|
||||
@@ -2,6 +2,6 @@ site_users.settings:
|
||||
path: '/admin/config/local-modules/site-users'
|
||||
defaults:
|
||||
_form: '\Drupal\site_users\Form\SiteUsersSettingsForm'
|
||||
_title: 'Configurações do Site Users'
|
||||
_title: 'Site Users Settings'
|
||||
requirements:
|
||||
_permission: 'administer site_users settings'
|
||||
|
||||
@@ -33,14 +33,14 @@ class SiteUsersSettingsForm extends ConfigFormBase {
|
||||
// Fieldset para configurações de fotos.
|
||||
$form['photos'] = [
|
||||
'#type' => 'fieldset',
|
||||
'#title' => $this->t('Configurações de Fotos'),
|
||||
'#title' => $this->t('Photo settings'),
|
||||
'#collapsible' => FALSE,
|
||||
];
|
||||
|
||||
$form['photos']['photos_max_count'] = [
|
||||
'#type' => 'number',
|
||||
'#title' => $this->t('Quantidade de fotos permitidas'),
|
||||
'#description' => $this->t('Número máximo de fotos que um usuário pode adicionar ao perfil.'),
|
||||
'#title' => $this->t('Number of photos allowed'),
|
||||
'#description' => $this->t('Maximum number of photos a user can add to the profile.'),
|
||||
'#default_value' => $config->get('photos.max_count') ?? 5,
|
||||
'#min' => 1,
|
||||
'#max' => 100,
|
||||
@@ -49,8 +49,8 @@ class SiteUsersSettingsForm extends ConfigFormBase {
|
||||
|
||||
$form['photos']['photos_ldap_attribute'] = [
|
||||
'#type' => 'textfield',
|
||||
'#title' => $this->t('Atributo LDAP da foto'),
|
||||
'#description' => $this->t('Se LDAP estiver habilitado, informe o nome do atributo que contém a foto do usuário (ex: thumbnailPhoto, jpegPhoto).'),
|
||||
'#title' => $this->t('LDAP photo attribute'),
|
||||
'#description' => $this->t('If LDAP is enabled, enter the name of the attribute that contains the user photo (e.g., thumbnailPhoto, jpegPhoto).'),
|
||||
'#default_value' => $config->get('photos.ldap_attribute') ?? 'jpegPhoto',
|
||||
'#maxlength' => 255,
|
||||
];
|
||||
|
||||
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*
|
||||
* @Block(
|
||||
* id = "site_users_info_block",
|
||||
* admin_label = @Translation("Informações do Usuário"),
|
||||
* admin_label = @Translation("User Information"),
|
||||
* category = @Translation("Site Users")
|
||||
* )
|
||||
*/
|
||||
|
||||
104
translations/site_users.pt-br.po
Normal file
104
translations/site_users.pt-br.po
Normal file
@@ -0,0 +1,104 @@
|
||||
# Portuguese (Brazil) translation for Site Users module.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: site_users\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: pt-br\n"
|
||||
|
||||
# Block annotation
|
||||
msgid "User Information"
|
||||
msgstr "Informações do Usuário"
|
||||
|
||||
msgid "Site Users"
|
||||
msgstr "Usuários do Site"
|
||||
|
||||
# Module info
|
||||
msgid "Site user customizations, including fields and templates."
|
||||
msgstr "Customizações de usuários do site, incluindo campos e templates."
|
||||
|
||||
# Permissions
|
||||
msgid "Administer Site Users settings"
|
||||
msgstr "Administrar configurações do Site Users"
|
||||
|
||||
msgid "Allows administering the Site Users module settings."
|
||||
msgstr "Permite administrar as configurações do módulo Site Users."
|
||||
|
||||
msgid "View any user profile fields"
|
||||
msgstr "Visualizar campos de perfil de qualquer usuário"
|
||||
|
||||
msgid "Allows viewing the custom fields (name, phone, category, etc.) of any user."
|
||||
msgstr "Permite visualizar os campos customizados (nome, telefone, categoria, etc.) de qualquer usuário."
|
||||
|
||||
msgid "View own user profile fields"
|
||||
msgstr "Visualizar campos do próprio perfil"
|
||||
|
||||
msgid "Allows viewing own custom profile fields."
|
||||
msgstr "Permite visualizar os próprios campos customizados de perfil."
|
||||
|
||||
msgid "Edit any user profile fields"
|
||||
msgstr "Editar campos de perfil de qualquer usuário"
|
||||
|
||||
msgid "Allows editing the custom fields of any user."
|
||||
msgstr "Permite editar os campos customizados de qualquer usuário."
|
||||
|
||||
msgid "Edit own user profile fields"
|
||||
msgstr "Editar campos do próprio perfil"
|
||||
|
||||
msgid "Allows editing own custom profile fields."
|
||||
msgstr "Permite editar os próprios campos customizados de perfil."
|
||||
|
||||
msgid "Manage user photos"
|
||||
msgstr "Gerenciar fotos de usuários"
|
||||
|
||||
msgid "Allows adding, editing, and removing photos of any user."
|
||||
msgstr "Permite adicionar, editar e remover fotos de qualquer usuário."
|
||||
|
||||
msgid "Manage own user photos"
|
||||
msgstr "Gerenciar próprias fotos"
|
||||
|
||||
msgid "Allows adding, editing, and removing own profile photos."
|
||||
msgstr "Permite adicionar, editar e remover as próprias fotos de perfil."
|
||||
|
||||
# Menu link
|
||||
msgid "User field and photo settings."
|
||||
msgstr "Configurações de campos e fotos de usuários."
|
||||
|
||||
# Route title
|
||||
msgid "Site Users Settings"
|
||||
msgstr "Configurações do Site Users"
|
||||
|
||||
# Settings form
|
||||
msgid "Photo settings"
|
||||
msgstr "Configurações de Fotos"
|
||||
|
||||
msgid "Number of photos allowed"
|
||||
msgstr "Quantidade de fotos permitidas"
|
||||
|
||||
msgid "Maximum number of photos a user can add to the profile."
|
||||
msgstr "Número máximo de fotos que um usuário pode adicionar ao perfil."
|
||||
|
||||
msgid "LDAP photo attribute"
|
||||
msgstr "Atributo LDAP da foto"
|
||||
|
||||
msgid "If LDAP is enabled, enter the name of the attribute that contains the user photo (e.g., thumbnailPhoto, jpegPhoto)."
|
||||
msgstr "Se LDAP estiver habilitado, informe o nome do atributo que contém a foto do usuário (ex: thumbnailPhoto, jpegPhoto)."
|
||||
|
||||
# Form elements (site_users.module)
|
||||
msgid "Default photo"
|
||||
msgstr "Foto padrão"
|
||||
|
||||
msgid "Select the main profile photo."
|
||||
msgstr "Selecione a foto principal do perfil."
|
||||
|
||||
msgid "Add photos to select one as default."
|
||||
msgstr "Adicione fotos para selecionar uma como padrão."
|
||||
|
||||
msgid "You can add a maximum of @max photos. Currently @count photos are selected."
|
||||
msgstr "Você pode adicionar no máximo @max fotos. Atualmente há @count fotos selecionadas."
|
||||
|
||||
# Install/update
|
||||
msgid "Default photo field created successfully."
|
||||
msgstr "Campo de foto padrão criado com sucesso."
|
||||
Reference in New Issue
Block a user