From d2ab41aea4ce7b1f133ab07fe4e81a4abb38e8aa Mon Sep 17 00:00:00 2001 From: Stanislav Makar Date: Thu, 8 Dec 2016 18:54:35 +0200 Subject: [PATCH] Declare Ukrainian Closes: #345 --- app/assets/javascripts/components/containers/mastodon.jsx | 3 ++- app/helpers/settings_helper.rb | 1 + config/application.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/components/containers/mastodon.jsx b/app/assets/javascripts/components/containers/mastodon.jsx index c42582bfdd..69fe2d07ff 100644 --- a/app/assets/javascripts/components/containers/mastodon.jsx +++ b/app/assets/javascripts/components/containers/mastodon.jsx @@ -41,6 +41,7 @@ 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 hu from 'react-intl/locale-data/hu'; +import uk from 'react-intl/locale-data/uk'; import getMessagesForLocale from '../locales'; const store = configureStore(); @@ -49,7 +50,7 @@ const browserHistory = useRouterHistory(createBrowserHistory)({ basename: '/web' }); -addLocaleData([...en, ...de, ...es, ...fr, ...pt, ...hu]); +addLocaleData([...en, ...de, ...es, ...fr, ...pt, ...hu, ...uk]); const Mastodon = React.createClass({ diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 26c4cd58fa..fa569e73ab 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -8,6 +8,7 @@ module SettingsHelper pt: 'Português', fr: 'Français', hu: 'Magyar', + uk: 'Українська', }.freeze def human_locale(locale) diff --git a/config/application.rb b/config/application.rb index 1e5fd9c7ca..427c0e2ba4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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, :pt, :fr, :hu] + config.i18n.available_locales = [:en, :de, :es, :pt, :fr, :hu, :uk] config.i18n.default_locale = :en # config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')