From 8af200ad209cd35a6a4d85246d21691efe193d47 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Tue, 19 May 2020 19:05:10 +0530 Subject: [PATCH] Fix missing translations, enable dutch language (#878) * Fix missing translations, enable dutch language --- Gemfile.lock | 116 +++++++++--------- app/javascript/dashboard/i18n/index.js | 8 +- .../dashboard/i18n/locale/nl/index.js | 34 +++++ .../widget/components/AvailableAgents.vue | 5 +- .../widget/helpers/specs/utils.spec.js | 26 ---- app/javascript/widget/helpers/utils.js | 17 --- app/javascript/widget/i18n/locale/ar.json | 6 + app/javascript/widget/i18n/locale/ca.json | 6 + app/javascript/widget/i18n/locale/de.json | 6 + app/javascript/widget/i18n/locale/el.json | 6 + app/javascript/widget/i18n/locale/en.json | 6 + app/javascript/widget/i18n/locale/fr.json | 6 + app/javascript/widget/i18n/locale/nl.json | 6 + app/javascript/widget/mixins/agentMixin.js | 24 ++++ .../widget/mixins/specs/agentMixin.spec.js | 49 ++++++++ config/initializers/languages.rb | 2 +- 16 files changed, 216 insertions(+), 107 deletions(-) create mode 100644 app/javascript/dashboard/i18n/locale/nl/index.js delete mode 100644 app/javascript/widget/helpers/specs/utils.spec.js create mode 100644 app/javascript/widget/mixins/agentMixin.js create mode 100644 app/javascript/widget/mixins/specs/agentMixin.spec.js diff --git a/Gemfile.lock b/Gemfile.lock index 7c3079978..cbc3d1f6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,56 +18,56 @@ GEM specs: action-cable-testing (0.6.1) actioncable (>= 5.0) - actioncable (6.0.3) - actionpack (= 6.0.3) + actioncable (6.0.3.1) + actionpack (= 6.0.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + actionmailbox (6.0.3.1) + actionpack (= 6.0.3.1) + activejob (= 6.0.3.1) + activerecord (= 6.0.3.1) + activestorage (= 6.0.3.1) + activesupport (= 6.0.3.1) mail (>= 2.7.1) - actionmailer (6.0.3) - actionpack (= 6.0.3) - actionview (= 6.0.3) - activejob (= 6.0.3) + actionmailer (6.0.3.1) + actionpack (= 6.0.3.1) + actionview (= 6.0.3.1) + activejob (= 6.0.3.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3) - actionview (= 6.0.3) - activesupport (= 6.0.3) + actionpack (6.0.3.1) + actionview (= 6.0.3.1) + activesupport (= 6.0.3.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3) - actionpack (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + actiontext (6.0.3.1) + actionpack (= 6.0.3.1) + activerecord (= 6.0.3.1) + activestorage (= 6.0.3.1) + activesupport (= 6.0.3.1) nokogiri (>= 1.8.5) - actionview (6.0.3) - activesupport (= 6.0.3) + actionview (6.0.3.1) + activesupport (= 6.0.3.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.3) - activesupport (= 6.0.3) + activejob (6.0.3.1) + activesupport (= 6.0.3.1) globalid (>= 0.3.6) - activemodel (6.0.3) - activesupport (= 6.0.3) - activerecord (6.0.3) - activemodel (= 6.0.3) - activesupport (= 6.0.3) - activestorage (6.0.3) - actionpack (= 6.0.3) - activejob (= 6.0.3) - activerecord (= 6.0.3) + activemodel (6.0.3.1) + activesupport (= 6.0.3.1) + activerecord (6.0.3.1) + activemodel (= 6.0.3.1) + activesupport (= 6.0.3.1) + activestorage (6.0.3.1) + actionpack (= 6.0.3.1) + activejob (= 6.0.3.1) + activerecord (= 6.0.3.1) marcel (~> 0.3.1) - activesupport (6.0.3) + activesupport (6.0.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -96,8 +96,8 @@ GEM autoprefixer-rails (9.7.6) execjs aws-eventstream (1.1.0) - aws-partitions (1.315.0) - aws-sdk-core (3.95.0) + aws-partitions (1.317.0) + aws-sdk-core (3.96.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) @@ -105,8 +105,8 @@ GEM aws-sdk-kms (1.31.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.64.0) - aws-sdk-core (~> 3, >= 3.83.0) + aws-sdk-s3 (1.65.0) + aws-sdk-core (~> 3, >= 3.96.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) aws-sigv4 (1.1.3) @@ -194,7 +194,7 @@ GEM foreman (0.87.1) globalid (0.4.2) activesupport (>= 4.2.0) - google-api-client (0.39.3) + google-api-client (0.39.4) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.9) httpclient (>= 2.8.1, < 3.0) @@ -288,7 +288,7 @@ GEM mini_magick (4.10.1) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.14.0) + minitest (5.14.1) momentjs-rails (2.20.1) railties (>= 3.1) msgpack (1.3.3) @@ -312,7 +312,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.5) - puma (4.3.3) + puma (4.3.4) nio4r (~> 2.0) pundit (2.1.0) activesupport (>= 3.0.0) @@ -327,29 +327,29 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.3) - actioncable (= 6.0.3) - actionmailbox (= 6.0.3) - actionmailer (= 6.0.3) - actionpack (= 6.0.3) - actiontext (= 6.0.3) - actionview (= 6.0.3) - activejob (= 6.0.3) - activemodel (= 6.0.3) - activerecord (= 6.0.3) - activestorage (= 6.0.3) - activesupport (= 6.0.3) + rails (6.0.3.1) + actioncable (= 6.0.3.1) + actionmailbox (= 6.0.3.1) + actionmailer (= 6.0.3.1) + actionpack (= 6.0.3.1) + actiontext (= 6.0.3.1) + actionview (= 6.0.3.1) + activejob (= 6.0.3.1) + activemodel (= 6.0.3.1) + activerecord (= 6.0.3.1) + activestorage (= 6.0.3.1) + activesupport (= 6.0.3.1) bundler (>= 1.3.0) - railties (= 6.0.3) + railties (= 6.0.3.1) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3) - actionpack (= 6.0.3) - activesupport (= 6.0.3) + railties (6.0.3.1) + actionpack (= 6.0.3.1) + activesupport (= 6.0.3.1) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -388,7 +388,7 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-rails (4.0.0) + rspec-rails (4.0.1) actionpack (>= 4.2) activesupport (>= 4.2) railties (>= 4.2) diff --git a/app/javascript/dashboard/i18n/index.js b/app/javascript/dashboard/i18n/index.js index 2d34fb255..5840d00c3 100644 --- a/app/javascript/dashboard/i18n/index.js +++ b/app/javascript/dashboard/i18n/index.js @@ -1,12 +1,13 @@ import ca from './locale/ca'; -import ro from './locale/ro'; -import fr from './locale/fr'; -import pt_BR from './locale/pt_BR'; import de from './locale/de'; import el from './locale/el'; import en from './locale/en'; +import fr from './locale/fr'; +import nl from './locale/nl'; import ml from './locale/ml'; import pt from './locale/pt'; +import pt_BR from './locale/pt_BR'; +import ro from './locale/ro'; export default { ca, @@ -14,6 +15,7 @@ export default { el, en, fr, + nl, ml, pt_BR, pt, diff --git a/app/javascript/dashboard/i18n/locale/nl/index.js b/app/javascript/dashboard/i18n/locale/nl/index.js new file mode 100644 index 000000000..351906dd9 --- /dev/null +++ b/app/javascript/dashboard/i18n/locale/nl/index.js @@ -0,0 +1,34 @@ +/* eslint-disable */ +import { default as _agentMgmt } from './agentMgmt.json'; +import { default as _billing } from './billing.json'; +import { default as _cannedMgmt } from './cannedMgmt.json'; +import { default as _chatlist } from './chatlist.json'; +import { default as _contact } from './contact.json'; +import { default as _conversation } from './conversation.json'; +import { default as _inboxMgmt } from './inboxMgmt.json'; +import { default as _login } from './login.json'; +import { default as _report } from './report.json'; +import { default as _resetPassword } from './resetPassword.json'; +import { default as _setNewPassword } from './setNewPassword.json'; +import { default as _settings } from './settings.json'; +import { default as _signup } from './signup.json'; +import { default as _integrations } from './integrations.json'; +import { default as _generalSettings } from './generalSettings.json'; + +export default { + ..._agentMgmt, + ..._billing, + ..._cannedMgmt, + ..._chatlist, + ..._contact, + ..._conversation, + ..._inboxMgmt, + ..._login, + ..._report, + ..._resetPassword, + ..._setNewPassword, + ..._settings, + ..._signup, + ..._integrations, + ..._generalSettings, +}; diff --git a/app/javascript/widget/components/AvailableAgents.vue b/app/javascript/widget/components/AvailableAgents.vue index b9c8f06eb..060c9373d 100644 --- a/app/javascript/widget/components/AvailableAgents.vue +++ b/app/javascript/widget/components/AvailableAgents.vue @@ -13,11 +13,12 @@