Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
1abd6d83
Verified
Commit
1abd6d83
authored
May 30, 2019
by
Sébastiaan Versteeg
Browse files
Enable localisation in sagas
parent
929eca3c
Changes
34
Hide whitespace changes
Inline
Side-by-side
.eslintignore
View file @
1abd6d83
bundle.js
app/locales
__mocks__/react-i18next-mock.js
View file @
1abd6d83
...
...
@@ -6,5 +6,6 @@ const reacti18next = jest.genMockFromModule('react-i18next');
const
withTranslation
=
()
=>
Component
=>
props
=>
<
Component
t
=
{
s
=>
s
}
{...
props
}
/>
;
reacti18next
.
withTranslation
=
withTranslation
;
reacti18next
.
initReactI18next
=
{};
module
.
exports
=
reacti18next
;
__mocks__/react-native-device-info.js
0 → 100644
View file @
1abd6d83
module
.
exports
=
{
hasNotch
:
()
=>
false
,
getDeviceLocale
:
()
=>
'
en
'
,
};
__tests__/assets/locales/__snapshots__/index.js.spec.js.snap
View file @
1abd6d83
...
...
@@ -3,10 +3,24 @@
exports[`translations should expose the translations 1`] = `
Object {
"nl": Object {
"components/errorScreen/ErrorScreen": Object {
"app": Object {
"Dismiss": "Sluiten",
"Open": "Openen",
},
"sagas/registration": Object {
"Registration successful!": "Registratie succesvol!",
"Successfully cancelled registration": "Afmelding succesvol",
"Successfully updated registration": "Registratie succesvol bijgewerkt",
},
"sagas/session": Object {
"Login failed": "Inloggen mislukt",
"Login successful": "Succesvol ingelogd",
"Logout successful": "Succesvol uitgelogd",
},
"ui/components/errorScreen/ErrorScreen": Object {
"Try again later.": "Probeer het later opnieuw.",
},
"components/sidebar/Sidebar": Object {
"
ui/
components/sidebar/Sidebar": Object {
"Are you sure you want to log out?": "Weet je zeker dat je wilt uitloggen?",
"Calendar": "Agenda",
"Log out?": "Uitloggen?",
...
...
@@ -17,7 +31,7 @@ Object {
"Welcome": "Welkom",
"Yes": "Ja",
},
"components/standardHeader/StandardHeader": Object {
"
ui/
components/standardHeader/StandardHeader": Object {
"Calendar": "Agenda",
"Event": "Evenement",
"Pizza": "Pizza",
...
...
@@ -27,16 +41,16 @@ Object {
"Settings": "Instellingen",
"Welcome": "Welkom",
},
"screens/events/CalendarItem": Object {
"
ui/
screens/events/CalendarItem": Object {
"From": "Tot",
"Until": "Van",
},
"screens/events/CalendarScreen": Object {
"
ui/
screens/events/CalendarScreen": Object {
"No events found!": "Geen evenementen gevonden!",
"Sorry, we couldn't load any data.": "Sorry, we konden geen gegevens laden.",
"day": "dag",
},
"screens/events/EventAdminScreen": Object {
"
ui/
screens/events/EventAdminScreen": Object {
"CARD": "PIN",
"CASH": "CONTANT",
"Could not load the event...": "Kon het evenement niet laden...",
...
...
@@ -50,7 +64,7 @@ Object {
"Present": "Aanwezig",
"Registrations": "Inschrijvingen",
},
"screens/events/EventScreen": Object {
"
ui/
screens/events/EventScreen": Object {
", that you understand them and that you agree to be bound by them.": "hebt gelezen, dat je ze begrijpt en dat je accepteert eraan gebonden te zijn.",
"Are you sure you want to cancel your registration?": "Weet je je zeker dat je je wilt afmelden?",
"By registering, you confirm that you have read the": "Door te registreren, bevestig je dat je de",
...
...
@@ -86,26 +100,26 @@ Object {
"registrations": "aanmeldingen",
"terms and conditions": "voorwaarden",
},
"screens/events/RegistrationScreen": Object {
"
ui/
screens/events/RegistrationScreen": Object {
"Save": "Aanpassen",
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
"This field is required and must be an integer.": "Dit veld is verplicht en moet een getal zijn.",
"This field is required.": "Dit veld is verplicht.",
},
"screens/login/LoginScreen": Object {
"
ui/
screens/login/LoginScreen": Object {
"Become a member": "Lid worden",
"Forgot password?": "Wachtwoord vergeten?",
"LOGIN": "INLOGGEN",
"Password": "Wachtwoord",
"Username": "Gebruikersnaam",
},
"screens/memberList/MemberListScreen": Object {
"
ui/
screens/memberList/MemberListScreen": Object {
"Couldn't find any members...": "Er zijn geen leden gevonden...",
"Find a member": "Zoek een lid",
"Member List": "Ledenlijst",
"Sorry! We couldn't load any data.": "Sorry, we konden geen gegevens laden.",
},
"screens/pizza/PizzaScreen": Object {
"
ui/
screens/pizza/PizzaScreen": Object {
"Changing your order": "Bestelling bewerken",
"Current order": "Huidige bestelling",
"Order pizza for {{title}}": "Bestelling voor {{title}}",
...
...
@@ -115,17 +129,17 @@ Object {
"There is currently no event for which you can order food.": "Er is geen evenement waarvoor je eten kunt bestellen.",
"You did not place an order.": "Je hebt nog geen bestelling geplaatst.",
},
"screens/profile/AchievementSection": Object {
"
ui/
screens/profile/AchievementSection": Object {
"Achievements for Thalia": "Verdiensten voor Thalia",
"Chair": "Voorzitter",
"Societies": "Gezelschappen",
"today": "heden",
},
"screens/profile/DescriptionSection": Object {
"
ui/
screens/profile/DescriptionSection": Object {
"About": "Over",
"This member has not written a description yet.": "Dit lid heeft nog geen beschrijving geschreven.",
},
"screens/profile/PersonalInfoSection": Object {
"
ui/
screens/profile/PersonalInfoSection": Object {
"Birthday": "Verjaardag",
"Cohort": "Cohort",
"Computing science": "Informatica",
...
...
@@ -134,19 +148,19 @@ Object {
"Study programme": "Studie",
"Website": "Website",
},
"screens/profile/ProfileScreen": Object {
"
ui/
screens/profile/ProfileScreen": Object {
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
},
"screens/settings/NotificationsSection": Object {
"
ui/
screens/settings/NotificationsSection": Object {
"(required)": "(verplicht)",
"Notifications": "Notificaties",
"Notifications settings could not be loaded.": "De instellingen voor notificaties konden niet worden geladen.",
},
"screens/welcome/EventDetailCard": Object {
"
ui/
screens/welcome/EventDetailCard": Object {
"MORE INFO": "MEER INFO",
"PIZZA": "PIZZA",
},
"screens/welcome/WelcomeScreen": Object {
"
ui/
screens/welcome/WelcomeScreen": Object {
"No events found!": "Geen evenementen gevonden!",
"SHOW THE ENTIRE AGENDA": "TOON DE GEHELE AGENDA",
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
...
...
__tests__/sagas/registration.spec.js
View file @
1abd6d83
...
...
@@ -4,10 +4,11 @@ import { expectSaga } from 'redux-saga-test-plan';
import
Snackbar
from
'
react-native-snackbar
'
;
import
{
select
}
from
'
redux-saga/effects
'
;
import
*
as
registrationActions
from
'
../../app/actions/registration
'
;
import
registrationSaga
,
{
eventSelector
}
from
'
../../app/sagas/registration
'
;
import
registrationSaga
from
'
../../app/sagas/registration
'
;
import
{
apiRequest
}
from
'
../../app/utils/url
'
;
import
*
as
eventActions
from
'
../../app/actions/event
'
;
import
{
tokenSelector
}
from
'
../../app/selectors/session
'
;
import
{
currentEventSelector
}
from
'
../../app/selectors/events
'
;
jest
.
mock
(
'
react-native-snackbar
'
,
()
=>
({
LENGTH_LONG
:
100
,
...
...
@@ -26,7 +27,7 @@ jest.mock('../../app/utils/url', () => ({
describe
(
'
event selector
'
,
()
=>
{
it
(
'
should select the event pk
'
,
()
=>
{
expect
(
e
ventSelector
({
event
:
{
data
:
{
pk
:
2
}
}
})).
toEqual
(
2
);
expect
(
currentE
ventSelector
({
event
:
{
data
:
{
pk
:
2
}
}
})).
toEqual
(
2
);
});
});
...
...
@@ -160,7 +161,7 @@ describe('registration saga', () => {
it
(
'
should put a fetching action
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
like
({
fn
:
apiRequest
,
args
:
[
'
registrations/1
'
]
})],
])
.
dispatch
(
registrationActions
.
cancel
(
1
))
...
...
@@ -170,7 +171,7 @@ describe('registration saga', () => {
it
(
'
should show a snackbar on success
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
like
({
fn
:
apiRequest
,
args
:
[
'
registrations/1
'
]
})],
])
.
dispatch
(
registrationActions
.
cancel
(
1
))
...
...
@@ -184,7 +185,7 @@ describe('registration saga', () => {
it
(
'
should put event action when the request succeeds
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
fn
(
apiRequest
),
{}],
])
.
dispatch
(
registrationActions
.
cancel
(
1
))
...
...
@@ -194,7 +195,7 @@ describe('registration saga', () => {
it
(
'
should put event action when the request fails
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
fn
(
apiRequest
),
throwError
(
error
)],
])
.
dispatch
(
registrationActions
.
cancel
(
1
))
...
...
@@ -203,7 +204,7 @@ describe('registration saga', () => {
it
(
'
should not show snackbar when the request fails
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
fn
(
apiRequest
),
throwError
(
error
)],
])
.
dispatch
(
registrationActions
.
cancel
(
1
))
...
...
@@ -215,7 +216,7 @@ describe('registration saga', () => {
it
(
'
should do a DELETE request
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
])
.
dispatch
(
registrationActions
.
cancel
(
2
))
.
silentRun
()
...
...
@@ -270,7 +271,7 @@ describe('registration saga', () => {
it
(
'
should put event failure action when the request fails
'
,
()
=>
expectSaga
(
registrationSaga
)
.
provide
([
[
select
(
tokenSelector
),
'
token
'
],
[
select
(
e
ventSelector
),
1
],
[
select
(
currentE
ventSelector
),
1
],
[
matchers
.
call
.
fn
(
apiRequest
),
throwError
(
error
)],
])
.
dispatch
(
eventActions
.
failure
())
...
...
__tests__/setup.js
View file @
1abd6d83
...
...
@@ -7,8 +7,3 @@ NativeModules.RNFirebase = {
NativeModules
.
RNShare
=
{
};
jest
.
mock
(
'
react-native-device-info
'
,
()
=>
({
hasNotch
:
()
=>
false
,
getDeviceLocale
:
()
=>
'
en
'
,
}));
__tests__/utils/__snapshots__/i18n.spec.js.snap
View file @
1abd6d83
This source diff could not be displayed because it is too large. You can
view the blob
instead.
__tests__/utils/i18n.spec.js
View file @
1abd6d83
import
i18n
from
'
../../app/utils/i18n
'
;
jest
.
mock
(
'
react-i18next
'
,
()
=>
({
initReactI18next
:
{},
}));
describe
(
'
i18n helper
'
,
()
=>
{
it
(
'
should export the correct i18n helper
'
,
()
=>
{
expect
(
i18n
).
toMatchSnapshot
();
...
...
app/app.js
View file @
1abd6d83
...
...
@@ -124,4 +124,4 @@ Main.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
app
/App
'
)(
Main
);
export
default
withTranslation
(
'
app
'
)(
Main
);
app/assets/locales/index.js
View file @
1abd6d83
...
...
@@ -17,26 +17,32 @@ files['app/ui/screens/login/LoginScreenNL'] = require('./nl/app/ui/screens/login
files
[
'
app/ui/components/sidebar/SidebarNL
'
]
=
require
(
'
./nl/app/ui/components/sidebar/Sidebar.json
'
);
files
[
'
app/ui/components/standardHeader/StandardHeaderNL
'
]
=
require
(
'
./nl/app/ui/components/standardHeader/StandardHeader.json
'
);
files
[
'
app/ui/components/errorScreen/ErrorScreenNL
'
]
=
require
(
'
./nl/app/ui/components/errorScreen/ErrorScreen.json
'
);
files
[
'
app/sagas/sessionNL
'
]
=
require
(
'
./nl/app/sagas/session.json
'
);
files
[
'
app/sagas/registrationNL
'
]
=
require
(
'
./nl/app/sagas/registration.json
'
);
files
[
'
app/appNL
'
]
=
require
(
'
./nl/app/app.json
'
);
export
default
{
nl
:
{
'
screens/settings/NotificationsSection
'
:
files
[
'
app/ui/screens/settings/NotificationsSectionNL
'
],
'
screens/welcome/EventDetailCard
'
:
files
[
'
app/ui/screens/welcome/EventDetailCardNL
'
],
'
screens/welcome/WelcomeScreen
'
:
files
[
'
app/ui/screens/welcome/WelcomeScreenNL
'
],
'
screens/memberList/MemberListScreen
'
:
files
[
'
app/ui/screens/memberList/MemberListScreenNL
'
],
'
screens/profile/ProfileScreen
'
:
files
[
'
app/ui/screens/profile/ProfileScreenNL
'
],
'
screens/profile/AchievementSection
'
:
files
[
'
app/ui/screens/profile/AchievementSectionNL
'
],
'
screens/profile/DescriptionSection
'
:
files
[
'
app/ui/screens/profile/DescriptionSectionNL
'
],
'
screens/profile/PersonalInfoSection
'
:
files
[
'
app/ui/screens/profile/PersonalInfoSectionNL
'
],
'
screens/events/CalendarItem
'
:
files
[
'
app/ui/screens/events/CalendarItemNL
'
],
'
screens/events/RegistrationScreen
'
:
files
[
'
app/ui/screens/events/RegistrationScreenNL
'
],
'
screens/events/EventAdminScreen
'
:
files
[
'
app/ui/screens/events/EventAdminScreenNL
'
],
'
screens/events/CalendarScreen
'
:
files
[
'
app/ui/screens/events/CalendarScreenNL
'
],
'
screens/events/EventScreen
'
:
files
[
'
app/ui/screens/events/EventScreenNL
'
],
'
screens/pizza/PizzaScreen
'
:
files
[
'
app/ui/screens/pizza/PizzaScreenNL
'
],
'
screens/login/LoginScreen
'
:
files
[
'
app/ui/screens/login/LoginScreenNL
'
],
'
components/sidebar/Sidebar
'
:
files
[
'
app/ui/components/sidebar/SidebarNL
'
],
'
components/standardHeader/StandardHeader
'
:
files
[
'
app/ui/components/standardHeader/StandardHeaderNL
'
],
'
components/errorScreen/ErrorScreen
'
:
files
[
'
app/ui/components/errorScreen/ErrorScreenNL
'
],
'
ui/screens/settings/NotificationsSection
'
:
files
[
'
app/ui/screens/settings/NotificationsSectionNL
'
],
'
ui/screens/welcome/EventDetailCard
'
:
files
[
'
app/ui/screens/welcome/EventDetailCardNL
'
],
'
ui/screens/welcome/WelcomeScreen
'
:
files
[
'
app/ui/screens/welcome/WelcomeScreenNL
'
],
'
ui/screens/memberList/MemberListScreen
'
:
files
[
'
app/ui/screens/memberList/MemberListScreenNL
'
],
'
ui/screens/profile/ProfileScreen
'
:
files
[
'
app/ui/screens/profile/ProfileScreenNL
'
],
'
ui/screens/profile/AchievementSection
'
:
files
[
'
app/ui/screens/profile/AchievementSectionNL
'
],
'
ui/screens/profile/DescriptionSection
'
:
files
[
'
app/ui/screens/profile/DescriptionSectionNL
'
],
'
ui/screens/profile/PersonalInfoSection
'
:
files
[
'
app/ui/screens/profile/PersonalInfoSectionNL
'
],
'
ui/screens/events/CalendarItem
'
:
files
[
'
app/ui/screens/events/CalendarItemNL
'
],
'
ui/screens/events/RegistrationScreen
'
:
files
[
'
app/ui/screens/events/RegistrationScreenNL
'
],
'
ui/screens/events/EventAdminScreen
'
:
files
[
'
app/ui/screens/events/EventAdminScreenNL
'
],
'
ui/screens/events/CalendarScreen
'
:
files
[
'
app/ui/screens/events/CalendarScreenNL
'
],
'
ui/screens/events/EventScreen
'
:
files
[
'
app/ui/screens/events/EventScreenNL
'
],
'
ui/screens/pizza/PizzaScreen
'
:
files
[
'
app/ui/screens/pizza/PizzaScreenNL
'
],
'
ui/screens/login/LoginScreen
'
:
files
[
'
app/ui/screens/login/LoginScreenNL
'
],
'
ui/components/sidebar/Sidebar
'
:
files
[
'
app/ui/components/sidebar/SidebarNL
'
],
'
ui/components/standardHeader/StandardHeader
'
:
files
[
'
app/ui/components/standardHeader/StandardHeaderNL
'
],
'
ui/components/errorScreen/ErrorScreen
'
:
files
[
'
app/ui/components/errorScreen/ErrorScreenNL
'
],
'
sagas/session
'
:
files
[
'
app/sagas/sessionNL
'
],
'
sagas/registration
'
:
files
[
'
app/sagas/registrationNL
'
],
app
:
files
[
'
app/appNL
'
],
},
};
app/assets/locales/nl/app.json
→
app/assets/locales/nl/app
/app
.json
View file @
1abd6d83
{
"Dismiss"
:
"Sluiten"
,
"Open"
:
"Openen"
}
\ No newline at end of file
}
app/assets/locales/nl/app/sagas/registration.json
0 → 100644
View file @
1abd6d83
{
"Registration successful!"
:
"Registratie succesvol!"
,
"Successfully updated registration"
:
"Registratie succesvol bijgewerkt"
,
"Successfully cancelled registration"
:
"Afmelding succesvol"
}
app/assets/locales/nl/app/sagas/session.json
0 → 100644
View file @
1abd6d83
{
"Login failed"
:
"Inloggen mislukt"
,
"Logout successful"
:
"Succesvol uitgelogd"
,
"Login successful"
:
"Succesvol ingelogd"
}
app/sagas/registration.js
View file @
1abd6d83
...
...
@@ -4,16 +4,16 @@ import {
}
from
'
redux-saga/effects
'
;
import
Snackbar
from
'
react-native-snackbar
'
;
import
{
Sentry
}
from
'
react-native-sentry
'
;
import
i18next
from
'
../utils/i18n
'
;
import
{
apiRequest
}
from
'
../utils/url
'
;
import
*
as
eventActions
from
'
../actions/event
'
;
import
*
as
registrationActions
from
'
../actions/registration
'
;
import
{
tokenSelector
}
from
'
../selectors/session
'
;
import
{
currentEventSelector
}
from
'
../selectors/events
'
;
export
const
eventSelector
=
state
=>
state
.
event
.
data
.
pk
;
const
t
=
i18next
.
getFixedT
(
undefined
,
'
sagas/registration
'
);
const
register
=
function
*
register
(
action
)
{
const
{
event
}
=
action
.
payload
;
...
...
@@ -37,7 +37,7 @@ const register = function* register(action) {
if
(
registration
.
fields
)
{
yield
put
(
registrationActions
.
retrieveFields
(
registration
.
pk
));
}
Snackbar
.
show
({
title
:
'
Registration successful!
'
});
Snackbar
.
show
({
title
:
t
(
'
Registration successful!
'
)
});
}
catch
(
error
)
{
Sentry
.
captureException
(
error
);
yield
put
(
eventActions
.
failure
());
...
...
@@ -70,7 +70,7 @@ const update = function* update(action) {
yield
call
(
apiRequest
,
`registrations/
${
registration
}
`
,
data
);
yield
put
(
registrationActions
.
success
());
yield
delay
(
50
);
Snackbar
.
show
({
title
:
'
Successfully updated registration
'
});
Snackbar
.
show
({
title
:
t
(
'
Successfully updated registration
'
)
});
}
catch
(
error
)
{
Sentry
.
captureException
(
error
);
yield
put
(
registrationActions
.
failure
());
...
...
@@ -80,7 +80,7 @@ const update = function* update(action) {
const
cancel
=
function
*
cancel
(
action
)
{
const
{
registration
}
=
action
.
payload
;
const
token
=
yield
select
(
tokenSelector
);
const
event
=
yield
select
(
e
ventSelector
);
const
event
=
yield
select
(
currentE
ventSelector
);
yield
put
(
eventActions
.
fetching
());
...
...
@@ -95,7 +95,7 @@ const cancel = function* cancel(action) {
try
{
yield
call
(
apiRequest
,
`registrations/
${
registration
}
`
,
data
);
Snackbar
.
show
({
title
:
'
Successfully cancelled registration
'
});
Snackbar
.
show
({
title
:
t
(
'
Successfully cancelled registration
'
)
});
}
catch
(
error
)
{
Sentry
.
captureException
(
error
);
}
...
...
app/sagas/session.js
View file @
1abd6d83
...
...
@@ -5,6 +5,7 @@ import { delay } from 'redux-saga';
import
{
AsyncStorage
}
from
'
react-native
'
;
import
Snackbar
from
'
react-native-snackbar
'
;
import
{
Sentry
}
from
'
react-native-sentry
'
;
import
i18next
from
'
../utils/i18n
'
;
import
{
apiRequest
}
from
'
../utils/url
'
;
import
*
as
sessionActions
from
'
../actions/session
'
;
...
...
@@ -23,6 +24,8 @@ const pairsToObject = (obj, pair) => {
return
obj2
;
};
const
t
=
i18next
.
getFixedT
(
undefined
,
'
sagas/session
'
);
function
*
init
()
{
try
{
const
result
=
yield
call
([
AsyncStorage
,
'
multiGet
'
],
[
...
...
@@ -77,7 +80,7 @@ function* signIn(action) {
yield
put
(
sessionActions
.
signedIn
(
user
,
token
));
yield
put
(
sessionActions
.
fetchUserInfo
());
yield
put
(
pushNotificationsActions
.
register
());
Snackbar
.
show
({
title
:
'
Login successful
'
});
Snackbar
.
show
({
title
:
t
(
'
Login successful
'
)
});
}
catch
(
e
)
{
// Delay failure to make sure animation is finished
const
now
=
Date
.
now
();
...
...
@@ -87,7 +90,7 @@ function* signIn(action) {
yield
put
(
sessionActions
.
tokenInvalid
());
Sentry
.
captureException
(
e
);
Snackbar
.
show
({
title
:
'
Login failed
'
});
Snackbar
.
show
({
title
:
t
(
'
Login failed
'
)
});
}
}
...
...
@@ -98,7 +101,7 @@ function* clearUserInfo() {
function
*
signOut
()
{
yield
call
(
clearUserInfo
);
Snackbar
.
show
({
title
:
'
Logout successful
'
});
Snackbar
.
show
({
title
:
t
(
'
Logout successful
'
)
});
}
function
*
signedIn
({
payload
})
{
...
...
app/selectors/events.js
0 → 100644
View file @
1abd6d83
export
const
eventStore
=
state
=>
state
.
event
;
export
const
currentEventSelector
=
state
=>
eventStore
(
state
).
data
.
pk
;
app/ui/components/errorScreen/ErrorScreen.js
View file @
1abd6d83
...
...
@@ -29,4 +29,4 @@ ErrorScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
components/errorScreen/ErrorScreen
'
)(
ErrorScreen
);
export
default
withTranslation
(
'
ui/
components/errorScreen/ErrorScreen
'
)(
ErrorScreen
);
app/ui/components/sidebar/Sidebar.js
View file @
1abd6d83
...
...
@@ -125,4 +125,4 @@ Sidebar.propTypes = {
openMemberList
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
components/sidebar/Sidebar
'
)(
Sidebar
);
export
default
withTranslation
(
'
ui/
components/sidebar/Sidebar
'
)(
Sidebar
);
app/ui/components/standardHeader/StandardHeader.js
View file @
1abd6d83
...
...
@@ -78,7 +78,7 @@ StandardHeader.defaultProps = {
menu
:
false
,
};
const
StandardHeaderContainer
=
withNavigation
(
withTranslation
(
'
components/standardHeader/StandardHeader
'
)(
StandardHeader
));
const
StandardHeaderContainer
=
withNavigation
(
withTranslation
(
'
ui/
components/standardHeader/StandardHeader
'
)(
StandardHeader
));
export
default
StandardHeaderContainer
;
export
function
withStandardHeader
(
Component
,
menu
)
{
...
...
app/ui/screens/events/CalendarScreen.js
View file @
1abd6d83
...
...
@@ -205,4 +205,4 @@ CalendarScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/events/CalendarScreen
'
)(
withStandardHeader
(
CalendarScreen
,
true
));
export
default
withTranslation
(
'
ui/
screens/events/CalendarScreen
'
)(
withStandardHeader
(
CalendarScreen
,
true
));
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment