Skip to content

Commit

Permalink
Merge pull request #400 from danactive/danactive/add-japanese
Browse files Browse the repository at this point in the history
Update Languages and Add Japanese
  • Loading branch information
danactive authored Mar 8, 2020
2 parents f659a45 + 6b8ee37 commit fb66c1b
Show file tree
Hide file tree
Showing 31 changed files with 91 additions and 512 deletions.
1 change: 1 addition & 0 deletions ui/app/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ if (!window.Intl) {
Promise.all([
import('intl/locale-data/jsonp/en.js'),
import('intl/locale-data/jsonp/de.js'),
import('intl/locale-data/jsonp/ja.js'),
]),
)
.then(() => render(translationMessages))
Expand Down
2 changes: 1 addition & 1 deletion ui/app/components/Footer/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { defineMessages } from 'react-intl';

export const scope = 'boilerplate.components.Footer';
export const scope = 'app.components.Footer';

export default defineMessages({
licenseMessage: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ exports[`<Footer /> should render and match the snapshot 1`] = `
>
de
</option>
<option
value="ja"
>
ja
</option>
</select>
</div>
</section>
Expand Down
4 changes: 2 additions & 2 deletions ui/app/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function Header() {
<HeaderLink to="/">
<FormattedMessage {...messages.home} />
</HeaderLink>
<HeaderLink to="/features">
<FormattedMessage {...messages.features} />
<HeaderLink to="/admin">
<FormattedMessage {...messages.admin} />
</HeaderLink>
</NavBar>
</div>
Expand Down
8 changes: 4 additions & 4 deletions ui/app/components/Header/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*/
import { defineMessages } from 'react-intl';

export const scope = 'boilerplate.components.Header';
export const scope = 'app.components.Header';

export default defineMessages({
home: {
id: `${scope}.home`,
defaultMessage: 'Home',
},
features: {
id: `${scope}.features`,
defaultMessage: 'Features',
admin: {
id: `${scope}.admin`,
defaultMessage: 'Admin',
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ exports[`<Header /> should render a div 1`] = `
</a>
<a
class="HeaderLink-sc-1fnrd1i-0 vhtPY"
href="/features"
href="/admin"
>
<span>
Features
Admin
</span>
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ui/app/components/Toggle/tests/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ describe('<Toggle />', () => {
const defaultDeMessage = 'someOtherContent';
const messages = defineMessages({
en: {
id: 'history.containers.LocaleToggle.en',
id: 'app.containers.LocaleToggle.en',
defaultMessage: defaultEnMessage,
},
de: {
id: 'history.containers.LocaleToggle.en',
id: 'app.containers.LocaleToggle.en',
defaultMessage: defaultDeMessage,
},
});
Expand Down
2 changes: 1 addition & 1 deletion ui/app/components/ToggleOption/tests/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('<ToggleOption />', () => {
const defaultEnMessage = 'someContent';
const message = defineMessages({
enMessage: {
id: 'history.containers.LocaleToggle.en',
id: 'app.containers.LocaleToggle.en',
defaultMessage: defaultEnMessage,
},
});
Expand Down
6 changes: 5 additions & 1 deletion ui/app/containers/AdminLandingPage/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { push } from 'connected-react-router';
import React from 'react';
import { Helmet } from 'react-helmet';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { compose } from 'redux';

import A from '../../components/A';
import messages from './messages';

export function AdminLandingPage({
navToWalk,
Expand All @@ -15,7 +17,9 @@ export function AdminLandingPage({
<title>Admin</title>
<meta name="description" content="Admin" />
</Helmet>
<h1>Admin</h1>
<h1>
<FormattedMessage {...messages.header} />
</h1>
<A onClick={navToWalk}>Walk</A>
</div>
);
Expand Down
15 changes: 15 additions & 0 deletions ui/app/containers/AdminLandingPage/messages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* HomePage Messages
*
* This contains all the text for the HomePage component.
*/
import { defineMessages } from 'react-intl';

export const scope = 'app.containers.HomePage';

export default defineMessages({
header: {
id: 'app.containers.AdminLandingPage.header',
defaultMessage: 'Admin',
},
});
2 changes: 0 additions & 2 deletions ui/app/containers/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import AdminLandingPage from '../AdminLandingPage/Loadable';
import AlbumViewPage from '../AlbumViewPage/Loadable';
import ExploreVideo from '../ExploreVideo';
import HomePage from '../HomePage/Loadable';
import FeaturePage from '../FeaturePage/Loadable';
import GalleryViewPage from '../GalleryViewPage/Loadable';
import NotFoundPage from '../NotFoundPage/Loadable';
import Header from '../../components/Header';
Expand Down Expand Up @@ -38,7 +37,6 @@ export default function App() {
<Route exact path="/" component={HomePage} />
<Route exact path="/admin" component={AdminLandingPage} />
<Route exact path="/admin/walk" component={Walk} />
<Route path="/features" component={FeaturePage} />
<Route path="/explore" component={ExploreVideo} />
<Route path="/view/:host/:gallery/:album" component={AlbumViewPage} />
<Route path="/view/:host/:gallery" component={GalleryViewPage} />
Expand Down
4 changes: 0 additions & 4 deletions ui/app/containers/App/tests/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ exports[`<App /> should render and match the snapshot 1`] = `
exact={true}
path="/admin/walk"
/>
<Route
component={[Function]}
path="/features"
/>
<Route
component={[Function]}
path="/explore"
Expand Down
8 changes: 0 additions & 8 deletions ui/app/containers/FeaturePage/List.jsx

This file was deleted.

7 changes: 0 additions & 7 deletions ui/app/containers/FeaturePage/ListItem.jsx

This file was deleted.

7 changes: 0 additions & 7 deletions ui/app/containers/FeaturePage/ListItemTitle.jsx

This file was deleted.

7 changes: 0 additions & 7 deletions ui/app/containers/FeaturePage/Loadable.jsx

This file was deleted.

72 changes: 0 additions & 72 deletions ui/app/containers/FeaturePage/index.jsx

This file was deleted.

99 changes: 0 additions & 99 deletions ui/app/containers/FeaturePage/messages.js

This file was deleted.

Loading

0 comments on commit fb66c1b

Please sign in to comment.