From 04ef1c5be532bf92f374c1c94bbdc053d65a2931 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Mon, 29 May 2017 22:45:56 +0700 Subject: [PATCH] Use new translation service --- client/coral-framework/hocs/withMutation.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/coral-framework/hocs/withMutation.js b/client/coral-framework/hocs/withMutation.js index 940d781aa..285932372 100644 --- a/client/coral-framework/hocs/withMutation.js +++ b/client/coral-framework/hocs/withMutation.js @@ -7,9 +7,7 @@ import isEmpty from 'lodash/isEmpty'; import {getMutationOptions, resolveFragments} from 'coral-framework/services/graphqlRegistry'; import {store} from 'coral-framework/services/store'; import {getDefinitionName, getResponseErrors} from '../utils'; -import I18n from 'coral-framework/modules/i18n/i18n'; -import translations from 'coral-framework/translations.json'; -const lang = new I18n(translations); +import t from 'coral-framework/services/i18n'; class ResponseErrors extends Error { constructor(errors) { @@ -24,7 +22,7 @@ class ResponseError { } translate(...args) { - return lang.t(`error.${this.translation_key}`, ...args); + return t(`error.${this.translation_key}`, ...args); } }