feat: Adds Lithuanian language selectable as site language (#7354)

This commit is contained in:
Sivin Varghese
2023-06-20 17:29:05 +05:30
committed by GitHub
parent 6bea2cbc4a
commit 93d8157a55
6 changed files with 75 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ import vi from './locale/vi';
import zh_CN from './locale/zh_CN';
import zh_TW from './locale/zh_TW';
import is from './locale/is';
import lt from './locale/lt';
export default {
ar,
@@ -74,4 +75,5 @@ export default {
zh_CN,
zh_TW,
is,
lt,
};

View File

@@ -0,0 +1,65 @@
import advancedFilters from './advancedFilters.json';
import agentBots from './agentBots.json';
import agentMgmt from './agentMgmt.json';
import attributesMgmt from './attributesMgmt.json';
import auditLogs from './auditLogs.json';
import automation from './automation.json';
import bulkActions from './bulkActions.json';
import campaign from './campaign.json';
import cannedMgmt from './cannedMgmt.json';
import chatlist from './chatlist.json';
import contact from './contact.json';
import contactFilters from './contactFilters.json';
import conversation from './conversation.json';
import csatMgmt from './csatMgmt.json';
import emoji from './emoji.json';
import generalSettings from './generalSettings.json';
import helpCenter from './helpCenter.json';
import inboxMgmt from './inboxMgmt.json';
import integrationApps from './integrationApps.json';
import integrations from './integrations.json';
import labelsMgmt from './labelsMgmt.json';
import login from './login.json';
import macros from './macros.json';
import report from './report.json';
import resetPassword from './resetPassword.json';
import search from './search.json';
import setNewPassword from './setNewPassword.json';
import settings from './settings.json';
import signup from './signup.json';
import teamsSettings from './teamsSettings.json';
import whatsappTemplates from './whatsappTemplates.json';
export default {
...advancedFilters,
...agentBots,
...agentMgmt,
...attributesMgmt,
...auditLogs,
...automation,
...bulkActions,
...campaign,
...cannedMgmt,
...chatlist,
...contact,
...contactFilters,
...conversation,
...csatMgmt,
...emoji,
...generalSettings,
...helpCenter,
...inboxMgmt,
...integrationApps,
...integrations,
...labelsMgmt,
...login,
...macros,
...report,
...resetPassword,
...search,
...setNewPassword,
...settings,
...signup,
...teamsSettings,
...whatsappTemplates,
};

View File

@@ -17,6 +17,7 @@ import is from './locale/is.json';
import it from './locale/it.json';
import ja from './locale/ja.json';
import ko from './locale/ko.json';
import lt from './locale/lt.json';
import lv from './locale/lv.json';
import ml from './locale/ml.json';
import nl from './locale/nl.json';
@@ -56,6 +57,7 @@ export default {
it,
ja,
ko,
lt,
lv,
ml,
nl,

View File

@@ -17,6 +17,7 @@ import is from './locale/is.json';
import it from './locale/it.json';
import ja from './locale/ja.json';
import ko from './locale/ko.json';
import lt from './locale/lt.json';
import lv from './locale/lv.json';
import ml from './locale/ml.json';
import nl from './locale/nl.json';
@@ -56,6 +57,7 @@ export default {
it,
ja,
ko,
lt,
lv,
ml,
nl,

View File

@@ -39,7 +39,8 @@ LANGUAGES_CONFIG = {
34 => { name: 'ภาษาไทย (th)', iso_639_3_code: 'tha', iso_639_1_code: 'th', enabled: true },
35 => { name: 'latviešu valoda (lv)', iso_639_3_code: 'lav', iso_639_1_code: 'lv', enabled: true },
36 => { name: 'íslenska (is)', iso_639_3_code: 'isl', iso_639_1_code: 'is', enabled: true },
37 => { name: 'עִברִית (he)', iso_639_3_code: 'heb', iso_639_1_code: 'he', enabled: true }
37 => { name: 'עִברִית (he)', iso_639_3_code: 'heb', iso_639_1_code: 'he', enabled: true },
38 => { name: 'lietuvių (lt)', iso_639_3_code: 'lit', iso_639_1_code: 'lt', enabled: true }
}.filter { |_key, val| val[:enabled] }.freeze
Rails.configuration.i18n.available_locales = LANGUAGES_CONFIG.map { |_index, lang| lang[:iso_639_1_code].to_sym }

View File

@@ -39,8 +39,8 @@ RSpec.describe Account::ContactsExportJob do
csv_data = CSV.parse(account.contacts_export.download, headers: true)
first_row = csv_data[0]
last_row = csv_data[csv_data.length - 1]
first_contact = account.contacts.first
last_contact = account.contacts.last
first_contact = account.contacts.find_by(email: 'test1@text.example')
last_contact = account.contacts.find_by(email: 'test2@text.example')
expect(csv_data.length).to eq(account.contacts.count)