diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-22 16:31:58 -0600 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-22 16:31:58 -0600 |
commit | c2d98c2c1f4860c11aedf43aff5e360256a89835 (patch) | |
tree | 4304f7584025477d74e5e70677c4f5a70c26bb58 /web/react/utils/client.jsx | |
parent | 6e2c1b7fd5248c6a4a91edcd59fa124c8d3c744a (diff) | |
parent | d352c5b64dddfb8e46b18edbd7352c41495078a1 (diff) | |
download | chat-c2d98c2c1f4860c11aedf43aff5e360256a89835.tar.gz chat-c2d98c2c1f4860c11aedf43aff5e360256a89835.tar.bz2 chat-c2d98c2c1f4860c11aedf43aff5e360256a89835.zip |
merging
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 07982b7be..80b29da4e 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', |