aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js
blob: c3027b566a8eefce17863f120c42c03bb0c22763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * SonarQube
 * Copyright (C) 2009-2017 SonarSource SA
 * mailto:info AT sonarsource DOT com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
// @flow
import React from 'react';
import { translate } from '../../../helpers/l10n';

const languages = [
  { name: 'Java', url: 'https://redirect.sonarsource.com/plugins/java.html' },
  { name: 'C/C++', url: 'https://redirect.sonarsource.com/plugins/cpp.html' },
  { name: 'C#', url: 'https://redirect.sonarsource.com/plugins/csharp.html' },
  { name: 'COBOL', url: 'https://redirect.sonarsource.com/plugins/cobol.html' },
  { name: 'ABAP', url: 'https://redirect.sonarsource.com/plugins/abap.html' },
  { name: 'HTML', url: 'https://redirect.sonarsource.com/plugins/web.html' },
  { name: 'RPG', url: 'https://redirect.sonarsource.com/plugins/rpg.html' },
  { name: 'JavaScript', url: 'https://redirect.sonarsource.com/plugins/javascript.html' },
  { name: 'TypeScript', url: 'https://redirect.sonarsource.com/plugins/typescript.html' },
  { name: 'Objective C', url: 'https://redirect.sonarsource.com/plugins/objectivec.html' },
  { name: 'XML', url: 'https://redirect.sonarsource.com/plugins/xml.html' },
  { name: 'VB.NET', url: 'https://redirect.sonarsource.com/plugins/vbnet.html' },
  { name: 'PL/SQL', url: 'https://redirect.sonarsource.com/plugins/plsql.html' },
  { name: 'T-SQL', url: 'https://redirect.sonarsource.com/plugins/tsql.html' },
  { name: 'Flex', url: 'https://redirect.sonarsource.com/plugins/flex.html' },
  { name: 'Python', url: 'https://redirect.sonarsource.com/plugins/python.html' },
  { name: 'Groovy', url: 'https://redirect.sonarsource.com/plugins/groovy.html' },
  { name: 'PHP', url: 'https://redirect.sonarsource.com/plugins/php.html' },
  { name: 'Swift', url: 'https://redirect.sonarsource.com/plugins/swift.html' },
  { name: 'Visual Basic', url: 'https://redirect.sonarsource.com/plugins/vb.html' },
  { name: 'PL/I', url: 'https://redirect.sonarsource.com/plugins/pli.html' }
];

const half = (languages.length + 1) / 2;

export default function AboutLanguages() {
  return (
    <div className="boxed-group">
      <h2>{translate('about_page.languages')}</h2>
      <div className="boxed-group-inner">
        <p className="about-page-text">{translate('about_page.languages.text')}</p>
        <ul className="about-page-languages">
          {languages.slice(0, half).map((language, index) => (
            <li key={index}>
              <a href={languages[index].url}>{languages[index].name}</a>
              <br />
              {index + half < languages.length && (
                <a href={languages[index + half].url}>{languages[index + half].name}</a>
              )}
            </li>
          ))}
        </ul>
      </div>
    </div>
  );
}