Skip to content

Commit e9458be

Browse files
author
Sascha Pfeiffer
committed
some more progress
Signed-off-by: Sascha Pfeiffer <sascha.pfeiffer@psono.com>
1 parent 80cba2c commit e9458be

39 files changed

+878
-61
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818

1919
npm-debug.log*
2020

21-
.idea
21+
.idea

.gitlab-ci.yml

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ test-vulnerability-scan:
4545
# - addons-linter ./build/firefox
4646

4747

48+
test-upload-translations:
49+
stage: test
50+
image: psono-docker.jfrog.io/python:3
51+
script:
52+
- pip install requests
53+
- python3 var/sync_translations.py
54+
only:
55+
- develop
56+
- saml
57+
58+
4859
build-docker-image:
4960
except:
5061
- schedules
@@ -55,6 +66,7 @@ build-docker-image:
5566
variables:
5667
DOCKER_HOST: 'tcp://docker:2375'
5768
script:
69+
- sh ./var/download_translations_from_artifactory.sh
5870
- sh ./var/build-ubuntu.sh
5971
- curl -fSL "https://download.docker.com/linux/static/stable/x86_64/docker-17.12.1-ce.tgz" -o docker.tgz && echo "1270dce1bd7e1838d62ae21d2505d87f16efc1d9074645571daaefdfd0c14054 *docker.tgz" | sha256sum -c - && tar -xzvf docker.tgz && mv docker/* /usr/local/bin/ && rm -Rf docker*
6072
- docker info
@@ -119,6 +131,7 @@ build-webclient:
119131
stage: build
120132
image: psono-docker.jfrog.io/ubuntu:16.04
121133
script:
134+
- sh ./var/download_translations_from_artifactory.sh
122135
- sh ./var/build-ubuntu.sh
123136
- sh ./var/package-webclient.sh
124137
- curl -fL https://getcli.jfrog.io | sh

package-lock.json

+100-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
"enzyme-adapter-react-16": "^1.1.1",
1919
"font-awesome": "^4.7.0",
2020
"husky": "^0.14.3",
21+
"i18next": "^15.1.0",
22+
"i18next-browser-languagedetector": "^3.0.1",
23+
"i18next-xhr-backend": "^2.0.1",
2124
"js-sha256": "^0.9.0",
2225
"js-sha512": "^0.7.1",
2326
"lint-staged": "^7.0.5",
@@ -26,17 +29,18 @@
2629
"npm-run-all": "^4.1.1",
2730
"perfect-scrollbar": "^1.3.0",
2831
"prettier": "^1.11.0",
29-
"react": "^16.2.0",
32+
"react": "^16.8.6",
3033
"react-chartist": "^0.13.1",
31-
"react-dom": "^16.2.0",
34+
"react-dom": "^16.8.6",
3235
"react-fontawesome": "^1.6.1",
3336
"react-google-maps": "^9.4.5",
37+
"react-i18next": "^10.9.0",
3438
"react-redux": "^5.0.7",
3539
"react-router-dom": "^4.2.2",
3640
"react-scripts": "^2.1.8",
3741
"react-spinners": "^0.2.6",
3842
"react-swipeable-views": "^0.12.12",
39-
"react-test-renderer": "^16.2.0",
43+
"react-test-renderer": "^16.8.6",
4044
"react-timeout": "^1.0.1",
4145
"redux": "^3.7.2",
4246
"redux-logger": "^3.0.6",

public/config.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"backend_servers": [{
3+
"title": "Psono.pw",
4+
"url": "https://www.psono.pw/server"
5+
}],
6+
"base_url": "https://www.psono.pw/",
7+
"allow_custom_server": true,
8+
"allow_registration": true,
9+
"allow_lost_password": true,
10+
"authentication_methods": ["SAML"],
11+
"saml_provider": [{
12+
"title": "Company Login",
13+
"provider_id": 1,
14+
"button_name": "SAML SSO Login"
15+
}]
16+
}

public/locales/.gitkeep

Whitespace-only changes.

public/locales/cs/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/de/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/en/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/es/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/fi/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/fr/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/hr/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/it/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/ja/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/ko/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/nl/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/pl/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/ru/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/vi/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

public/locales/zh-cn/translation.json

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{
2+
}

src/actions/actionCreators.js

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
import {
22
SET_KNOWN_HOSTS,
3+
SET_USER_USERNAME,
34
SET_USER_INFO_1,
45
SET_USER_INFO_2,
56
SET_USER_INFO_3,
67
LOGOUT,
78
SET_SERVER_URL,
89
SET_SERVER_INFO,
910
SET_CLIENT_URL,
11+
SET_ADMIN_CLIENT_CONFIG,
1012
NOTIFICATION_SEND,
1113
NOTIFICATION_SET
1214
} from './actionTypes';
1315

14-
function set_user_info_1(username, remember_me, trust_device) {
16+
function set_user_username(username) {
17+
return dispatch => {
18+
dispatch({
19+
type: SET_USER_USERNAME,
20+
username
21+
});
22+
};
23+
}
24+
25+
function set_user_info_1(remember_me, trust_device) {
1526
return dispatch => {
1627
dispatch({
1728
type: SET_USER_INFO_1,
18-
username,
1929
remember_me,
2030
trust_device
2131
});
@@ -85,6 +95,15 @@ function set_client_url(url) {
8595
};
8696
}
8797

98+
function set_admin_client_config(config) {
99+
return dispatch => {
100+
dispatch({
101+
type: SET_ADMIN_CLIENT_CONFIG,
102+
config: config
103+
});
104+
};
105+
}
106+
88107
function set_known_hosts(known_hosts) {
89108
return dispatch => {
90109
dispatch({
@@ -114,13 +133,15 @@ function set_notifications(messages) {
114133
}
115134

116135
const actionCreators = {
136+
set_user_username,
117137
set_user_info_1,
118138
set_user_info_2,
119139
set_user_info_3,
120140
logout,
121141
set_server_info,
122142
set_server_url,
123143
set_client_url,
144+
set_admin_client_config,
124145
set_known_hosts,
125146
send_notification,
126147
set_notifications

0 commit comments

Comments
 (0)