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

Express: i18n default namespace is 'express'

parent a0ec8904
{
"p": {
"welcome": {
"title": "Grin global application"
}
}
"appName": "GRIN-Global CE"
}
\ No newline at end of file
{
"p": {
"welcome":{
"title": "Grin global application"
}
}
"appName": "GRIN-Global CE"
}
......@@ -9,7 +9,7 @@ class WelcomePage extends React.Component<WithTranslation> {
const { t } = this.props;
return (
<>
<h1>{ t('p.welcome.title') }</h1>
<h1>{ t('client:appName') }</h1>
<ul>
<li><Link to="/user">To user list</Link></li>
<li><Link to="/cooperator">To cooperator list</Link></li>
......
......@@ -53,7 +53,7 @@ import theme from 'core/ui/theme';
// Configure axios for client
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);
console.log('Here we are!', i18nC);
......
......@@ -103,7 +103,7 @@ app.use(express.static(path.join('../assets'), {
immutable: true,
}));
const localeModules = ['client', 'common', 'express'];
const localeModules = ['express', 'client', 'common'];
const i18nS = i18nServer(localeModules);
......
......@@ -35,7 +35,7 @@ class CooperatorBrowsePage extends React.Component<IBrowsePageProps> {
return (
<>
<h3>{ t('express:cooperator.public.p.browse.title') }</h3>
<h3>{ t('cooperator.public.p.browse.title') }</h3>
<ul>
{ cooperators && cooperators.content && cooperators.content.length > 0 && cooperators.content.map((cooperator) => (
<li key={ cooperator.id }>
......
......@@ -30,7 +30,7 @@ class CooperatorDetailsPage extends React.Component<ICooperatorDetailsPage> {
const { cooperator, t } = this.props;
return cooperator ? (
<div>
<h3>{ t('express:cooperator.public.p.details.title') }</h3>
<h3>{ t('cooperator.public.p.details.title') }</h3>
<pre>
{ JSON.stringify(cooperator, null, '\t') }
</pre>
......
......@@ -44,7 +44,7 @@ class UserDetailsPage extends React.Component<ILoginPageProps> {
) : (
<span>
<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>
</div>
<BackButton/>
......
......@@ -35,7 +35,7 @@ class UserBrowsePage extends React.Component<IBrowsePageProps> {
return (
<>
<h3>{ t('express:user.admin.p.browse.title') }</h3>
<h3>{ t('user.admin.p.browse.title') }</h3>
<ul>
{ users && users.content && users.content.length > 0 && users.content.map((user) => (
<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