From da723c27ca4cdd402af81a0b6f2545334119b98c Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 29 Apr 2010 17:13:56 -0700 Subject: Send Accept-Language header to localize set-display-name error msgs --- indra/newview/llviewerdisplayname.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerdisplayname.cpp b/indra/newview/llviewerdisplayname.cpp index beb1dc9c82..a6ac2587db 100644 --- a/indra/newview/llviewerdisplayname.cpp +++ b/indra/newview/llviewerdisplayname.cpp @@ -43,6 +43,7 @@ #include "llhttpclient.h" #include "llhttpnode.h" #include "llnotificationsutil.h" +#include "llui.h" // getLanguage() namespace LLViewerDisplayName { @@ -75,6 +76,11 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl return; } + // People API can return localized error messages. Indicate our + // language preference via header. + LLSD headers; + headers["Accept-Language"] = LLUI::getLanguage(); + // People API requires both the old and new value to change a variable. // Our display name will be in cache before the viewer's UI is available // to request a change, so we can use direct lookup without callback. @@ -100,7 +106,7 @@ void LLViewerDisplayName::set(const std::string& display_name, const set_name_sl // communicates with the back-end. LLSD body; body["display_name"] = change_array; - LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder); + LLHTTPClient::post(cap_url, body, new LLSetDisplayNameResponder, headers); } class LLSetDisplayNameReply : public LLHTTPNode -- cgit v1.2.3