diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-21 13:54:21 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-21 13:54:21 -0600 |
commit | dea84b1892be42e8d42db8b67862b56b38c0da75 (patch) | |
tree | 2427c16e886a29870b685a90ea7e5173a217875d /web/react/utils/client.jsx | |
parent | ff9bcce42d14c3b26baf2dab2a1574a3848ea93b (diff) | |
download | chat-dea84b1892be42e8d42db8b67862b56b38c0da75.tar.gz chat-dea84b1892be42e8d42db8b67862b56b38c0da75.tar.bz2 chat-dea84b1892be42e8d42db8b67862b56b38c0da75.zip |
PLT-7 Adding react-intl libs
Diffstat (limited to 'web/react/utils/client.jsx')
-rw-r--r-- | web/react/utils/client.jsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index d60fea872..65353b70d 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -60,6 +60,18 @@ function handleError(methodName, xhr, status, err) { return e; } +export function getTranslations(locale, success, error) { + $.ajax({ + url: '/static/i18n/' + locale + '.json', + dataType: 'json', + success, + error: function onError(xhr, status, err) { + var e = handleError('getTranslations', xhr, status, err); + error(e); + } + }); +} + export function createTeamFromSignup(teamSignup, success, error) { $.ajax({ url: '/api/v1/teams/create_from_signup', |