Enabling portuguese and hungarian translations, which are awfully incomplete
This commit is contained in:
parent
ea05fdaa57
commit
66ab0d0d56
3 changed files with 5 additions and 2 deletions
|
@ -39,6 +39,7 @@ import en from 'react-intl/locale-data/en';
|
||||||
import de from 'react-intl/locale-data/de';
|
import de from 'react-intl/locale-data/de';
|
||||||
import es from 'react-intl/locale-data/es';
|
import es from 'react-intl/locale-data/es';
|
||||||
import fr from 'react-intl/locale-data/fr';
|
import fr from 'react-intl/locale-data/fr';
|
||||||
|
import pt from 'react-intl/locale-data/pt';
|
||||||
import getMessagesForLocale from '../locales';
|
import getMessagesForLocale from '../locales';
|
||||||
|
|
||||||
const store = configureStore();
|
const store = configureStore();
|
||||||
|
@ -47,7 +48,7 @@ const browserHistory = useRouterHistory(createBrowserHistory)({
|
||||||
basename: '/web'
|
basename: '/web'
|
||||||
});
|
});
|
||||||
|
|
||||||
addLocaleData([...en, ...de, ...es, ...fr]);
|
addLocaleData([...en, ...de, ...es, ...fr, ...pt]);
|
||||||
|
|
||||||
const Mastodon = React.createClass({
|
const Mastodon = React.createClass({
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,9 @@ module SettingsHelper
|
||||||
en: 'English',
|
en: 'English',
|
||||||
de: 'Deutsch',
|
de: 'Deutsch',
|
||||||
es: 'Español',
|
es: 'Español',
|
||||||
|
pt: 'Português',
|
||||||
fr: 'Français',
|
fr: 'Français',
|
||||||
|
hu: 'Magyar',
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
def human_locale(locale)
|
def human_locale(locale)
|
||||||
|
|
|
@ -20,7 +20,7 @@ module Mastodon
|
||||||
|
|
||||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
# 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.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.i18n.default_locale = :en
|
||||||
|
|
||||||
# config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
|
# config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
|
||||||
|
|
Loading…
Reference in a new issue