Commit 3c66c30b authored by Matija Obreza's avatar Matija Obreza
Browse files

Express: i18n default namespace is 'express'

parent a0ec8904
{ {
"p": { "appName": "GRIN-Global CE"
"welcome": {
"title": "Grin global application"
}
}
} }
\ No newline at end of file
{ {
"p": { "appName": "GRIN-Global CE"
"welcome":{
"title": "Grin global application"
}
}
} }
...@@ -9,7 +9,7 @@ class WelcomePage extends React.Component<WithTranslation> { ...@@ -9,7 +9,7 @@ class WelcomePage extends React.Component<WithTranslation> {
const { t } = this.props; const { t } = this.props;
return ( return (
<> <>
<h1>{ t('p.welcome.title') }</h1> <h1>{ t('client:appName') }</h1>
<ul> <ul>
<li><Link to="/user">To user list</Link></li> <li><Link to="/user">To user list</Link></li>
<li><Link to="/cooperator">To cooperator list</Link></li> <li><Link to="/cooperator">To cooperator list</Link></li>
......
...@@ -53,7 +53,7 @@ import theme from 'core/ui/theme'; ...@@ -53,7 +53,7 @@ import theme from 'core/ui/theme';
// Configure axios for client // Configure axios for client
configureBackendApi({ apiUrl: store.getState().applicationConfig.apiUrl || process.env.API_URL || 'http://localhost:8080' }); configureBackendApi({ apiUrl: store.getState().applicationConfig.apiUrl || process.env.API_URL || 'http://localhost:8080' });
const localeModules = ['client', 'common', 'express']; const localeModules = ['express', 'client', 'common'];
const i18nC = i18nClient(localeModules); const i18nC = i18nClient(localeModules);
console.log('Here we are!', i18nC); console.log('Here we are!', i18nC);
......
...@@ -103,7 +103,7 @@ app.use(express.static(path.join('../assets'), { ...@@ -103,7 +103,7 @@ app.use(express.static(path.join('../assets'), {
immutable: true, immutable: true,
})); }));
const localeModules = ['client', 'common', 'express']; const localeModules = ['express', 'client', 'common'];
const i18nS = i18nServer(localeModules); const i18nS = i18nServer(localeModules);
......
...@@ -35,7 +35,7 @@ class CooperatorBrowsePage extends React.Component<IBrowsePageProps> { ...@@ -35,7 +35,7 @@ class CooperatorBrowsePage extends React.Component<IBrowsePageProps> {
return ( return (
<> <>
<h3>{ t('express:cooperator.public.p.browse.title') }</h3> <h3>{ t('cooperator.public.p.browse.title') }</h3>
<ul> <ul>
{ cooperators && cooperators.content && cooperators.content.length > 0 && cooperators.content.map((cooperator) => ( { cooperators && cooperators.content && cooperators.content.length > 0 && cooperators.content.map((cooperator) => (
<li key={ cooperator.id }> <li key={ cooperator.id }>
......
...@@ -30,7 +30,7 @@ class CooperatorDetailsPage extends React.Component<ICooperatorDetailsPage> { ...@@ -30,7 +30,7 @@ class CooperatorDetailsPage extends React.Component<ICooperatorDetailsPage> {
const { cooperator, t } = this.props; const { cooperator, t } = this.props;
return cooperator ? ( return cooperator ? (
<div> <div>
<h3>{ t('express:cooperator.public.p.details.title') }</h3> <h3>{ t('cooperator.public.p.details.title') }</h3>
<pre> <pre>
{ JSON.stringify(cooperator, null, '\t') } { JSON.stringify(cooperator, null, '\t') }
</pre> </pre>
......
...@@ -44,7 +44,7 @@ class UserDetailsPage extends React.Component<ILoginPageProps> { ...@@ -44,7 +44,7 @@ class UserDetailsPage extends React.Component<ILoginPageProps> {
) : ( ) : (
<span> <span>
<div> <div>
{ t('express:public.user.p.login.youLoggedIn', { username: login.user_name })} { t('public.user.p.login.youLoggedIn', { username: login.user_name })}
<button onClick={ this.logout }>{ t('common:action.logout') }</button> <button onClick={ this.logout }>{ t('common:action.logout') }</button>
</div> </div>
<BackButton/> <BackButton/>
......
...@@ -35,7 +35,7 @@ class UserBrowsePage extends React.Component<IBrowsePageProps> { ...@@ -35,7 +35,7 @@ class UserBrowsePage extends React.Component<IBrowsePageProps> {
return ( return (
<> <>
<h3>{ t('express:user.admin.p.browse.title') }</h3> <h3>{ t('user.admin.p.browse.title') }</h3>
<ul> <ul>
{ users && users.content && users.content.length > 0 && users.content.map((user) => ( { users && users.content && users.content.length > 0 && users.content.map((user) => (
<li key={ user.uuid }> <li key={ user.uuid }>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment