Skip to content
GitLab
Menu
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
98e21f0e
Commit
98e21f0e
authored
May 30, 2019
by
Sébastiaan Versteeg
Browse files
Merge branch 'tc/locale-sagas' into 'master'
Enable localisation in sagas See merge request
!268
parents
7a7f6a6a
1abd6d83
Changes
34
Show whitespace changes
Inline
Side-by-side
app/ui/screens/events/EventAdminScreen.js
View file @
98e21f0e
...
...
@@ -343,4 +343,4 @@ EventAdminScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/events/EventAdminScreen
'
)(
EventAdminScreen
);
export
default
withTranslation
(
'
ui/
screens/events/EventAdminScreen
'
)(
EventAdminScreen
);
app/ui/screens/events/EventScreen.js
View file @
98e21f0e
...
...
@@ -556,4 +556,4 @@ EventScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/events/EventScreen
'
)(
EventScreen
);
export
default
withTranslation
(
'
ui/
screens/events/EventScreen
'
)(
EventScreen
);
app/ui/screens/events/RegistrationScreen.js
View file @
98e21f0e
...
...
@@ -218,4 +218,4 @@ RegistrationScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/events/RegistrationScreen
'
)(
withStandardHeader
(
RegistrationScreen
));
export
default
withTranslation
(
'
ui/
screens/events/RegistrationScreen
'
)(
withStandardHeader
(
RegistrationScreen
));
app/ui/screens/login/LoginScreen.js
View file @
98e21f0e
...
...
@@ -119,4 +119,4 @@ LoginScreen.propTypes = {
status
:
PropTypes
.
string
.
isRequired
,
};
export
default
withTranslation
(
[
'
screens/
user
/LoginScreen
'
]
)(
LoginScreen
);
export
default
withTranslation
(
'
ui/
screens/
login
/LoginScreen
'
)(
LoginScreen
);
app/ui/screens/memberList/MemberListScreen.js
View file @
98e21f0e
...
...
@@ -115,4 +115,4 @@ MemberListScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/memberList/MemberListScreen
'
)(
MemberListScreen
);
export
default
withTranslation
(
'
ui/
screens/memberList/MemberListScreen
'
)(
MemberListScreen
);
app/ui/screens/pizza/PizzaScreen.js
View file @
98e21f0e
...
...
@@ -281,4 +281,4 @@ PizzaScreen.defaultProps = {
order
:
null
,
};
export
default
withTranslation
(
'
screens/pizza/PizzaScreen
'
)(
withStandardHeader
(
PizzaScreen
));
export
default
withTranslation
(
'
ui/
screens/pizza/PizzaScreen
'
)(
withStandardHeader
(
PizzaScreen
));
app/ui/screens/profile/AchievementSection.js
View file @
98e21f0e
...
...
@@ -73,4 +73,4 @@ AchievementSection.propTypes = {
type
:
PropTypes
.
string
.
isRequired
,
};
export
default
withTranslation
(
'
screens/profile/AchievementSection
'
)(
AchievementSection
);
export
default
withTranslation
(
'
ui/
screens/profile/AchievementSection
'
)(
AchievementSection
);
app/ui/screens/profile/DescriptionSection.js
View file @
98e21f0e
...
...
@@ -31,4 +31,4 @@ DescriptionSection.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/profile/DescriptionSection
'
)(
DescriptionSection
);
export
default
withTranslation
(
'
ui/
screens/profile/DescriptionSection
'
)(
DescriptionSection
);
app/ui/screens/profile/PersonalInfoSection.js
View file @
98e21f0e
...
...
@@ -70,4 +70,4 @@ PersonalInfoSection.propTypes = {
openUrl
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/profile/PersonalInfoSection
'
)(
PersonalInfoSection
);
export
default
withTranslation
(
'
ui/
screens/profile/PersonalInfoSection
'
)(
PersonalInfoSection
);
app/ui/screens/profile/ProfileScreen.js
View file @
98e21f0e
...
...
@@ -230,4 +230,4 @@ ProfileScreen.propTypes = {
goBack
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/profile/ProfileScreen
'
)(
ProfileScreen
);
export
default
withTranslation
(
'
ui/
screens/profile/ProfileScreen
'
)(
ProfileScreen
);
app/ui/screens/settings/NotificationsSection.js
View file @
98e21f0e
...
...
@@ -106,4 +106,4 @@ NotificationsSection.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/settings/NotificationsSection
'
)(
NotificationsSection
);
export
default
withTranslation
(
'
ui/
screens/settings/NotificationsSection
'
)(
NotificationsSection
);
app/ui/screens/welcome/EventDetailCard.js
View file @
98e21f0e
...
...
@@ -96,4 +96,4 @@ EventDetailCard.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/welcome/EventDetailCard
'
)(
EventDetailCard
);
export
default
withTranslation
(
'
ui/
screens/welcome/EventDetailCard
'
)(
EventDetailCard
);
app/ui/screens/welcome/WelcomeScreen.js
View file @
98e21f0e
...
...
@@ -69,7 +69,7 @@ const mapDispatchToFooterProps = {
openCalendar
:
calendarActions
.
open
,
};
const
FooterComponent
=
connect
(()
=>
({}),
mapDispatchToFooterProps
)(
withTranslation
(
'
screens/welcome/WelcomeScreen
'
)(
Footer
));
const
FooterComponent
=
connect
(()
=>
({}),
mapDispatchToFooterProps
)(
withTranslation
(
'
ui/
screens/welcome/WelcomeScreen
'
)(
Footer
));
class
WelcomeScreen
extends
Component
{
handleRefresh
=
()
=>
{
...
...
@@ -160,4 +160,4 @@ WelcomeScreen.propTypes = {
t
:
PropTypes
.
func
.
isRequired
,
};
export
default
withTranslation
(
'
screens/welcome/WelcomeScreen
'
)(
withStandardHeader
(
WelcomeScreen
,
true
));
export
default
withTranslation
(
'
ui/
screens/welcome/WelcomeScreen
'
)(
withStandardHeader
(
WelcomeScreen
,
true
));
collect-locales.js
View file @
98e21f0e
...
...
@@ -23,7 +23,8 @@ function mkDirByPathSync(targetDir, { isRelativeToScript = false } = {}) {
},
initDir
);
}
const
componentsPath
=
'
app/ui
'
;
const
appPath
=
'
app
'
;
const
options
=
{
nsSeparator
:
false
,
keySeparator
:
false
,
...
...
@@ -45,12 +46,7 @@ options.lngs.forEach((lang) => {
indexFiles
[
lang
]
=
[];
});
const
components
=
execFileSync
(
'
find
'
,
[
componentsPath
]).
toString
(
'
utf8
'
)
.
split
(
'
\n
'
)
.
filter
(
p
=>
p
.
indexOf
(
'
/style
'
)
<
0
&&
p
.
length
>
0
)
.
filter
(
p
=>
fs
.
statSync
(
p
).
isFile
());
components
.
forEach
((
f
)
=>
{
const
parseAndSaveResource
=
(
f
)
=>
{
options
.
defaultNs
=
f
.
substr
(
0
,
1
).
toLowerCase
()
+
f
.
substr
(
1
,
f
.
length
-
4
);
const
parser
=
new
Parser
(
options
);
const
content
=
fs
.
readFileSync
(
path
.
join
(
f
),
'
utf-8
'
);
...
...
@@ -77,7 +73,13 @@ components.forEach((f) => {
}
});
});
});
};
execFileSync
(
'
find
'
,
[
appPath
]).
toString
(
'
utf8
'
)
.
split
(
'
\n
'
)
.
filter
(
p
=>
p
.
indexOf
(
'
/style
'
)
<
0
&&
p
.
indexOf
(
'
/assets
'
)
<
0
&&
p
.
length
>
0
)
.
filter
(
p
=>
fs
.
statSync
(
p
).
isFile
())
.
forEach
(
parseAndSaveResource
);
const
indexStream
=
fs
.
createWriteStream
(
'
app/assets/locales/index.js
'
);
indexStream
.
once
(
'
open
'
,
()
=>
{
...
...
@@ -96,7 +98,7 @@ indexStream.once('open', () => {
const
files
=
indexFiles
[
lang
];
const
langName
=
lang
.
toUpperCase
();
files
.
forEach
((
fileName
)
=>
{
const
ns
=
fileName
.
substring
(
7
);
const
ns
=
fileName
.
substring
(
4
);
indexStream
.
write
(
` '
${
ns
}
': files['
${
fileName
}${
langName
}
'],\n`
);
});
indexStream
.
write
(
'
},
\n
'
);
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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