Skip to content

Commit d90f391

Browse files
committed
2.1.0
1 parent 90528e0 commit d90f391

File tree

17 files changed

+166
-40
lines changed

17 files changed

+166
-40
lines changed

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
"i18next-http-middleware": "^3.1.0",
122122
"ini": "^1.3.6",
123123
"isomorphic-unfetch": "^3.0.0",
124+
"json-schema": "0.4.0",
124125
"loadable-components": "^2.2.3",
125126
"lodash": "4.17.21",
126127
"lucene": "^2.1.1",
@@ -130,7 +131,7 @@
130131
"moment": "^2.25.3",
131132
"node-fetch": "2.6.5",
132133
"node-notifier": "8.0.1",
133-
"node-sass": "^4.13.0",
134+
"node-sass": "4.14.0",
134135
"nth-check": "2.0.1",
135136
"performant-array-to-tree": "^1.7.1",
136137
"postcss-modules-extract-imports": "3.0.0",
@@ -181,6 +182,10 @@
181182
"**/**/node-notifier": "^8.0.1",
182183
"**/**/prismjs": "^1.25.0",
183184
"**/**/url-parse": "^1.5.2",
185+
<<<<<<< HEAD
186+
=======
187+
"**/**/json-schema": "^0.4.0",
188+
>>>>>>> prod
184189
"@digg/react-ideal-image": "file:local_modules/digg_react-ideal-image-1.0.2.tgz"
185190
},
186191
"jest": {

src/assets/Illustration_1.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2+
import i18n from 'i18n';
23

34
const illustration_1 = require('./illustration_1.png');
45

5-
export const Illustration_1: React.SFC = () => <img src={illustration_1} alt="Illustration dator" />;
6+
export const Illustration_1: React.SFC = () => <img src={illustration_1} alt={i18n.t('common|illustration-1')} />;

src/assets/Illustration_2.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2+
import i18n from 'i18n';
23

34
const illustration_2 = require('./illustration_2.png');
45

5-
export const Illustration_2: React.SFC = () => <img src={illustration_2} alt="Illustration dator" />;
6+
export const Illustration_2: React.SFC = () => <img src={illustration_2} alt={i18n.t('common|illustration-2')} />;

src/assets/Illustration_3.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2+
import i18n from 'i18n';
23

34
const illustration_3 = require('./illustration_3.png');
45

5-
export const Illustration_3: React.SFC = () => <img src={illustration_3} alt="Illustration dator" />;
6+
export const Illustration_3: React.SFC = () => <img src={illustration_3} alt={i18n.t('common|illustration-3')} />;

src/assets/TopImage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react';
2+
import i18n from 'i18n';
23

34
const topimage = require('./start_bg1.jpg');
45

5-
export const TopImage: React.SFC = () => <img src={topimage} alt=" " />;
6+
export const TopImage: React.SFC = () => <img src={topimage} alt={i18n.t('common|top-image')}/>;

src/components/StartPageComponents/SearchBlock.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ export class SearchBlock extends React.Component<SearchBlockProps> {
5656
<div className="search__box">
5757
<div
5858
className="search__box--link"
59-
// onClick={(e) => {
60-
// window.location.href = `/${i18n.languages[0]}/datasets?p=1&q=&f=`;
61-
// }}
6259
>
6360
<Link
6461
className="text-5-bold"
@@ -74,19 +71,15 @@ export class SearchBlock extends React.Component<SearchBlockProps> {
7471

7572
<div
7673
className="search__box--link"
77-
// onClick={(e) => {
78-
// window.location.href = `/${i18n.languages[0]}/concepts?p=1&q=&f=`;
79-
// }}
8074
>
8175
<span className="row">
8276
<Link
8377
className="text-5-bold"
84-
aria-label="Sök efter begrepp"
78+
aria-label={i18n.t('pages|search|concepts')}
8579
to={`/${i18n.languages[0]}/concepts?p=1&q=&f=`}
8680
>
8781
{i18n.t('pages|search|concepts')}{' '}
8882
</Link>
89-
<span className="beta_badge text-7-bold"> {i18n.t('common|beta')}</span>
9083
</span>
9184

9285
<span className="text-6">
@@ -96,19 +89,15 @@ export class SearchBlock extends React.Component<SearchBlockProps> {
9689

9790
<div
9891
className="search__box--link"
99-
// onClick={(e) => {
100-
// window.location.href = `/${i18n.languages[0]}/specifications?p=1&q=&f=`;
101-
// }}
10292
>
10393
<span className="row">
10494
<Link
10595
className="text-5-bold"
106-
aria-label="Sök efter specifikationer"
96+
aria-label={i18n.t('pages|search|specifications')}
10797
to={`/${i18n.languages[0]}/specifications?p=1&q=&f=`}
10898
>
10999
{i18n.t('pages|search|specifications')}{' '}
110100
</Link>
111-
<span className="beta_badge text-7-bold"> {i18n.t('common|beta')}</span>
112101
</span>
113102

114103
<span className="text-6">

src/pages/DetailPages/ConceptPage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,10 @@ export const ConceptPage: React.FC<PageProps> = ({ env, match }) => {
666666
<div className="detailpage__wrapper">
667667
{/* Left column */}
668668
<div className="detailpage__wrapper--leftcol content">
669+
<<<<<<< HEAD
669670
<span className="text-7-bold beta_badge--xl">BETA</span>
671+
=======
672+
>>>>>>> prod
670673
<h1 className="text-2 terminology_header">
671674
<span>{entry.title}</span>
672675
</h1>

src/pages/DetailPages/SpecificationPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,12 @@ export const SpecificationPage: React.FC<PageProps> = ({
231231
<div className="detailpage__wrapper">
232232
{/* Left column */}
233233
<div className="detailpage__wrapper--leftcol content">
234+
<<<<<<< HEAD
234235
<span className="text-7-bold beta_badge--xl">BETA</span>
235236

237+
=======
238+
>>>>>>> prod
236239
<h1 className="text-2">{entry.title}</h1>
237-
238240
<script
239241
type="text/x-entryscape-handlebar"
240242
data-entryscape="true"

src/pages/NotFoundPage/NotFoundPage.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ import { Link, RouteComponentProps } from 'react-router-dom';
33
import { RouterContext } from '../../../shared/RouterContext';
44
import { PageMetadata } from '../PageMetadata';
55
import i18n from 'i18n';
6+
import { __RouterContext } from 'react-router';
67

78
export const NotFoundPage: React.FC<RouteComponentProps<any, RouterContext>> =
8-
({ staticContext }) => {
9+
({ staticContext, location }) => {
910
if (staticContext) {
1011
staticContext.statusCode = 404;
1112
}
1213

14+
if(location.pathname && location.pathname.includes("/en/"))
15+
i18n.changeLanguage("en");
16+
else
17+
i18n.changeLanguage("sv");
18+
1319
return (
1420
<>
1521
<PageMetadata

src/pages/SearchPage/SearchSpecificationsPage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,10 @@ export const SearchSpecificationsPage: React.FC<SearchProps> = ({env}) => {
145145
<h1 className="text-2 search-header">
146146
{i18n.t('common|search-specs')}
147147
</h1>
148+
<<<<<<< HEAD
148149
<span className="text-7-bold beta_badge--lg">BETA</span>
150+
=======
151+
>>>>>>> prod
149152
</div>
150153

151154
<SearchInput

0 commit comments

Comments
 (0)