Skip to content
Snippets Groups Projects
Unverified Commit 68b38a00 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fixed issues with locales (#4261)

parent 4ad750b0
No related branches found
No related tags found
No related merge requests found
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
# frozen_string_literal: true
class LocalesController < ApplicationController
def show
language = params[:name].tr('-', '_')
render json: File.read(Rails.root.join('app', 'assets', 'locales', "#{language}.json"))
rescue StandardError
head :not_acceptable
end
end
......@@ -21,11 +21,11 @@ export default function UpdateUserForm({ user }) {
const LOCALES = {
cs: 'Čeština',
de: 'Deutsch',
'el-GR': 'ελληνικά',
el_GR: 'ελληνικά',
en: 'English',
'fa-IR': 'فارسی',
fa_IR: 'فارسی',
fr: 'Français',
'hu-HU': 'magyar',
hu_HU: 'magyar',
ru: 'русский',
tr: 'Türkçe',
};
......
......@@ -4,6 +4,8 @@ Rails.application.routes.draw do
root 'components#index', via: :all
mount ActionCable.server => '/cable'
resources :locales, only: :show, param: :name
# External requests
get '/auth/:provider/callback', to: 'external#create_user'
get '/meeting_ended', to: 'external#meeting_ended'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment