<commit_before><h1><%= _('Profile settings for %s') % profile.name %></h1>

<%= error_messages_for :profile_data %>

<%= labelled_form_for :profile_data, :html => { :id => 'profile-data', :multipart => true } do |f| %>

  <% if user.has_permission?('manage_environment_templates', profile.environment) %>
    <div id="profile-is-template">
      <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
    </div>
  <% end %>

  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

  <div id="profile_change_picture_title">
    <h2><%= _('Change picture') %></h2>
    <span><%= unchangeable_privacy_field @profile %></span>
  </div>
  <div id="profile_change_picture">
    <%= f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
    <% end %>
  </div>

  <h2><%= _('Privacy options') %></h2>

  <% if profile.person? %>
    <div>
      <%= labelled_radio_button _('Public &mdash; show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
    </div>
    <div>
      <%= labelled_radio_button _('Private &mdash; show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
    </div>
  <% else %>
    <div>
       <%= labelled_check_box _('Hidden &mdash; show content of this group only to administrators'), 'profile_data[visible]', false, !@profile.visible %>
    </div>
    <br />
    <div>
      <%= labelled_radio_button _('Public &mdash; show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
    </div>
    <div>
      <%= labelled_radio_button _('Private &mdash; show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
    </div>
  <% end %>

  <% if environment.enabled?('allow_change_of_redirection_after_login') %>
    <h2><%= _('Page to redirect after login') %></h2>
    <%=  select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %>
  <% end %>

  <h2><%= _('Translations') %></h2>
  <%= labelled_check_box(
    _('Automaticaly redirect the visitor to the article translated to his/her language'),
    'profile_data[redirect_l10n]', true, @profile.redirect_l10n
  )%>

  <%=
    @plugins.dispatch(:profile_editor_extras).map do |content|
      content.kind_of?(Proc) ? self.instance_exec(&content) : content
    end.join("\n")<commit_msg>rename option label<commit_after><h1><%= _('Profile settings for %s') % profile.name %></h1>

<%= error_messages_for :profile_data %>

<%= labelled_form_for :profile_data, :html => { :id => 'profile-data', :multipart => true } do |f| %>

  <% if user.has_permission?('manage_environment_templates', profile.environment) %>
    <div id="profile-is-template">
      <%= labelled_check_box(_('This profile is a template'), 'profile_data[is_template]', true, @profile.is_template) %>
    </div>
  <% end %>

  <%= render :partial => partial_for_class(@profile.class), :locals => { :f => f } %>

  <div id="profile_change_picture_title">
    <h2><%= _('Change picture') %></h2>
    <span><%= unchangeable_privacy_field @profile %></span>
  </div>
  <div id="profile_change_picture">
    <%= f.fields_for :image_builder, @profile.image do |i| %>
      <%= file_field_or_thumbnail(_('Image:'), @profile.image, i) %><%= _("Max size: %s (.jpg, .gif, .png)")% Image.max_size.to_humanreadable %>
    <% end %>
  </div>

  <h2><%= _('Privacy options') %></h2>

  <% if profile.person? %>
    <div>
      <%= labelled_radio_button _('Public &mdash; show my contents to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
    </div>
    <div>
      <%= labelled_radio_button _('Private &mdash; show my contents only to friends'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
    </div>
  <% else %>
    <div style="border-bottom: 1px solid #e0e0e0; padding-bottom: 7px; margin-bottom: 7px;">
       <%= labelled_check_box _('Hidden &mdash; this group will be visible only by members'), 'profile_data[visible]', false, !@profile.visible %>
    </div>
    <div>
      <%= labelled_radio_button _('Public &mdash; show content of this group to all internet users'), 'profile_data[public_profile]', true, @profile.public_profile? %>
    </div>
    <div>
      <%= labelled_radio_button _('Private &mdash; show content of this group only to members'), 'profile_data[public_profile]', false, !@profile.public_profile? %>
    </div>
  <% end %>

  <% if environment.enabled?('allow_change_of_redirection_after_login') %>
    <h2><%= _('Page to redirect after login') %></h2>
    <%=  select 'profile_data', 'redirection_after_login', Environment.login_redirection_options.map{|key,value|[value,key]}, { :selected => @profile.preferred_login_redirection} %>
  <% end %>

  <h2><%= _('Translations') %></h2>
  <%= labelled_check_box(
    _('Automaticaly redirect the visitor to the article translated to his/her language'),
    'profile_data[redirect_l10n]', true, @profile.redirect_l10n
  )%>

  <%=
    @plugins.dispatch(:profile_editor_extras).map do |content|
      content.kind_of?(Proc) ? self.instance_exec(&content) : content
    end.join("\n")
{'fraction_non_alphanumeric': 0.18099218608031983, 'fraction_numerical': 0.006178448119207705, 'mean_word_length': 4.565217391304348, 'pattern_counts': {'":': 0, '<': 118, '<?xml version=': 0, '>': 130, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4425323', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1818, 'n_words': 402}