<commit_before>'use strict';

module.exports = {
  menu: {
    sections: [
      {
        tradKey: 'menu.section.global-settings',
        items: [
            {
            slug: 'general',
            tradKey: 'menu.item.general',
            icon: 'globe'
          },
          {
            slug: 'languages',
            tradKey: 'menu.item.languages',
            icon: 'language'
          },
          {
            slug: 'advenced',
            tradKey: 'menu.item.advenced',
            icon: 'cogs'
          }
        ]
      },
      {
        tradKey: 'menu.section.environments',
        items: [
          {
            slug: 'databases',
            tradKey: 'menu.item.databases',
            icon: 'databases'
          },
          {
            slug: 'security',
            tradKey: 'menu.item.security',
            icon: 'shield'
          },
          {
            slug: 'server',
            tradKey: 'menu.item.server',
            icon: 'server'
          }
        ]
      }
    ]
  },

  general: {
    tradKey: 'form.general',
    tradKeyDesc: 'form.general.desc',
    sections: [
      {
        tradKey: '',
        items: [
          {
            tradKey: 'form.general.name',
            target: 'package.name',
            type: 'string',
            value: strapi.config.name,
            validations : {
              maxLength: 255,
              required: true
            }
          },
          {
            tradKey: 'form.general.description',
            target: 'package.name',
            type: 'string',
            value: strapi.config.description,
            validations : {
              maxLength: 255,
              required: true
            }
          },
          {
            name: 'form.general.version',
            target: 'package.name',
            type: 'string',
            value: strapi.config.version,
            validations : {
              maxLength: 255,
              required: true
            }
          }
        ]
      }
    ]
  },

  security: env => {
    return {
      tradKey: 'form.security',
      tradKeyDesc: 'form.security.desc',
      sections: [
        {
          tradKey: 'form.security.session',
          items: [
            {
              tradKey: 'form.security.session.key',
              target: 'security.session.key',
              type: 'string',
              value: strapi.config.environments[env].security.session.key
            },
            {
              tradKey: 'form.security.session.maxAge',
              target: 'security.session.maxAge',
              type: 'number',
              value: strapi.config.environments[env].security.session.maxAge
            }
          ]
        },
        {
          tradKey: '',
          items: [
            {
              tradKey: 'form.security.xframe',
              target: 'security.xframe',
              type: 'enum',
              value: strapi.config.environments[env].security.xframe,
              items: [
                {
                  tradKey: 'server.xframe.deny',
                  value: 'DENY',
                },
                {
                  tradKey: 'server.xframe.sameorigin',
                  value: 'SAMEORIGIN',
                },
                {
                  tradKey: 'server.xframe.allow-from',
                  value: 'ALLOW-FROM',
                },
              ]
            },
            {
              tradKey: 'form.security.xssProtection',
              target: 'security.xssProtection',
              type: 'boolean',
              value: strapi.config.environments[env].security.xssProtection
            }
          ]
        },
        {
          tradKey: 'form.security.cors',
          items: [
            {
              tradKey: 'form.security.cors.origin',
              target: 'security.cors.origin',
              type: 'string',
              value: strapi.config.environments[env].security.cors.origin,
            }
          ]
        }
      ]
    };
  },

  server: env => {
    return {
      tradKey: 'form.server',
      tradKeyDesc: 'form.server.desc',
      sections: [
        {
          tradKey: '',
          items: [
            {
              tradKey: 'form.server.host',
              target: 'server.host',
              type: 'string',
              value: strapi.config.environments[env].server.host
            },
            {
              tradKey: 'form.server.port',
              target: 'server.port',
              type: 'number',
              value: strapi.config.environments[env].server.port
            }
          ]
        },
        {
          tradKey: 'form.server.parser',
          items: [
            {
              tradKey: 'form.server.parser.xframe',
              target: 'server.xframe',
              type: 'enum',
              value: strapi.config.environments[env].server.xframe,
              items: [
                {
                  tradKey: 'server.xframe.deny',
                  value: 'DENY',
                },
                {
                  tradKey: 'server.xframe.sameorigin',
                  value: 'SAMEORIGIN',
                },
                {
                  tradKey: 'server.xframe.allow-from',
                  value: 'ALLOW-FROM',
                },
              ]
            },
            {
              tradKey: 'form.server.xssProtection',
              target: 'server.xssProtection',
              type: 'boolean',
              value: strapi.config.environments[env].server.xssProtection
            }
          ]
        },
        {
          tradKey: 'form.server.cors',
          items: [
            {
              tradKey: 'form.server.cors.origin',
              target: 'server.cors.origin',
              type: 'string',
              value: strapi.config.environments[env].server.cors.origin
            }<commit_msg>Change traduction keys<commit_after>'use strict';

module.exports = {
  menu: {
    sections: [
      {
        name: 'menu.section.global-settings',
        items: [
            {
            slug: 'general',
            name: 'menu.item.general',
            icon: 'globe'
          },
          {
            slug: 'languages',
            name: 'menu.item.languages',
            icon: 'language'
          },
          {
            slug: 'advenced',
            name: 'menu.item.advenced',
            icon: 'cogs'
          }
        ]
      },
      {
        name: 'menu.section.environments',
        items: [
          {
            slug: 'databases',
            name: 'menu.item.databases',
            icon: 'databases'
          },
          {
            slug: 'security',
            name: 'menu.item.security',
            icon: 'shield'
          },
          {
            slug: 'server',
            name: 'menu.item.server',
            icon: 'server'
          }
        ]
      }
    ]
  },

  general: {
    name: 'form.general',
    description: 'form.general.desc',
    sections: [
      {
        name: '',
        items: [
          {
            name: 'form.general.name',
            target: 'package.name',
            type: 'string',
            value: strapi.config.name,
            validations : {
              maxLength: 255,
              required: true
            }
          },
          {
            name: 'form.general.description',
            target: 'package.name',
            type: 'string',
            value: strapi.config.description,
            validations : {
              maxLength: 255,
              required: true
            }
          },
          {
            name: 'form.general.version',
            target: 'package.name',
            type: 'string',
            value: strapi.config.version,
            validations : {
              maxLength: 255,
              required: true
            }
          }
        ]
      }
    ]
  },

  security: env => {
    return {
      name: 'form.security',
      description: 'form.security.desc',
      sections: [
        {
          name: 'form.security.session',
          items: [
            {
              name: 'form.security.session.key',
              target: 'security.session.key',
              type: 'string',
              value: strapi.config.environments[env].security.session.key
            },
            {
              name: 'form.security.session.maxAge',
              target: 'security.session.maxAge',
              type: 'number',
              value: strapi.config.environments[env].security.session.maxAge
            }
          ]
        },
        {
          name: '',
          items: [
            {
              name: 'form.security.xframe',
              target: 'security.xframe',
              type: 'enum',
              value: strapi.config.environments[env].security.xframe,
              items: [
                {
                  name: 'server.xframe.deny',
                  value: 'DENY',
                },
                {
                  name: 'server.xframe.sameorigin',
                  value: 'SAMEORIGIN',
                },
                {
                  name: 'server.xframe.allow-from',
                  value: 'ALLOW-FROM',
                },
              ]
            },
            {
              name: 'form.security.xssProtection',
              target: 'security.xssProtection',
              type: 'boolean',
              value: strapi.config.environments[env].security.xssProtection
            }
          ]
        },
        {
          name: 'form.security.cors',
          items: [
            {
              name: 'form.security.cors.origin',
              target: 'security.cors.origin',
              type: 'string',
              value: strapi.config.environments[env].security.cors.origin,
            }
          ]
        }
      ]
    };
  },

  server: env => {
    return {
      name: 'form.server',
      description: 'form.server.desc',
      sections: [
        {
          name: '',
          items: [
            {
              name: 'form.server.host',
              target: 'server.host',
              type: 'string',
              value: strapi.config.environments[env].server.host
            },
            {
              name: 'form.server.port',
              target: 'server.port',
              type: 'number',
              value: strapi.config.environments[env].server.port
            }
          ]
        },
        {
          name: 'form.server.parser',
          items: [
            {
              name: 'form.server.parser.xframe',
              target: 'server.xframe',
              type: 'enum',
              value: strapi.config.environments[env].server.xframe,
              items: [
                {
                  name: 'server.xframe.deny',
                  value: 'DENY',
                },
                {
                  name: 'server.xframe.sameorigin',
                  value: 'SAMEORIGIN',
                },
                {
                  name: 'server.xframe.allow-from',
                  value: 'ALLOW-FROM',
                },
              ]
            },
            {
              name: 'form.server.xssProtection',
              target: 'server.xssProtection',
              type: 'boolean',
              value: strapi.config.environments[env].server.xssProtection
            }
          ]
        },
        {
          name: 'form.server.cors',
          items: [
            {
              name: 'form.server.cors.origin',
              target: 'server.cors.origin',
              type: 'string',
              value: strapi.config.environments[env].server.cors.origin
            }
{'fraction_non_alphanumeric': 0.11983151379695693, 'fraction_numerical': 0.001547322272844494, 'mean_word_length': 0.9876986160943106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2769438', 'n_tokens_mistral': 3140, 'n_tokens_neox': 3097, 'n_words': 466}