Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
bridge
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
11
Issues
11
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mastodon
bridge
Commits
522e46ed
Commit
522e46ed
authored
Jun 20, 2018
by
Yamagishi Kazutoshi
Committed by
Eugen Rochko
Jun 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add available locale
parent
065de8d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
HelloWorldApp.jsx
app/javascript/bundles/HelloWorld/startup/HelloWorldApp.jsx
+6
-1
application.rb
config/application.rb
+1
-1
No files found.
app/javascript/bundles/HelloWorld/startup/HelloWorldApp.jsx
View file @
522e46ed
...
...
@@ -2,13 +2,18 @@ import React from 'react';
import
{
Provider
}
from
'react-redux'
;
import
{
IntlProvider
,
addLocaleData
}
from
'react-intl'
;
import
en
from
'react-intl/locale-data/en'
;
import
de
from
'react-intl/locale-data/de'
;
import
ja
from
'react-intl/locale-data/ja'
;
import
{
defaultLocale
}
from
'../../../locales/default'
;
import
{
translations
}
from
'../../../locales/translations'
;
import
configureStore
from
'../store/helloWorldStore'
;
import
HelloWorldContainer
from
'../containers/HelloWorldContainer'
;
addLocaleData
([
...
en
,
...
ja
]);
addLocaleData
([
...
en
,
...
de
,
...
ja
,
]);
const
locale
=
document
.
documentElement
.
lang
||
defaultLocale
;
const
messages
=
translations
[
locale
]
||
translations
[
defaultLocale
];
...
...
config/application.rb
View file @
522e46ed
...
...
@@ -24,7 +24,7 @@ module MastodonBridge
# All translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config
.
i18n
.
available_locales
=
[
:en
,
:ja
]
config
.
i18n
.
available_locales
=
[
:en
,
:
de
,
:
ja
]
config
.
active_job
.
queue_adapter
=
:sidekiq
end
...
...
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