Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
liberty
host
Smilodon
Commits
66ab0d0d
Commit
66ab0d0d
authored
Nov 28, 2016
by
Eugen Rochko
Browse files
Enabling portuguese and hungarian translations, which are awfully incomplete
parent
ea05fdaa
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/assets/javascripts/components/containers/mastodon.jsx
View file @
66ab0d0d
...
...
@@ -39,6 +39,7 @@ import en from 'react-intl/locale-data/en';
import
de
from
'
react-intl/locale-data/de
'
;
import
es
from
'
react-intl/locale-data/es
'
;
import
fr
from
'
react-intl/locale-data/fr
'
;
import
pt
from
'
react-intl/locale-data/pt
'
;
import
getMessagesForLocale
from
'
../locales
'
;
const
store
=
configureStore
();
...
...
@@ -47,7 +48,7 @@ const browserHistory = useRouterHistory(createBrowserHistory)({
basename
:
'
/web
'
});
addLocaleData
([...
en
,
...
de
,
...
es
,
...
fr
]);
addLocaleData
([...
en
,
...
de
,
...
es
,
...
fr
,
...
pt
]);
const
Mastodon
=
React
.
createClass
({
...
...
app/helpers/settings_helper.rb
View file @
66ab0d0d
...
...
@@ -5,7 +5,9 @@ module SettingsHelper
en:
'English'
,
de:
'Deutsch'
,
es:
'Español'
,
pt:
'Português'
,
fr:
'Français'
,
hu:
'Magyar'
,
}.
freeze
def
human_locale
(
locale
)
...
...
config/application.rb
View file @
66ab0d0d
...
...
@@ -20,7 +20,7 @@ module Mastodon
# The default locale is :en and 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
,
:de
,
:es
,
:
hu
,
:fr
]
config
.
i18n
.
available_locales
=
[
:en
,
:de
,
:es
,
:
pt
,
:fr
,
:hu
]
config
.
i18n
.
default_locale
=
:en
# config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
...
...
Write
Preview
Supports
Markdown
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