From 1ce1e7f9a121cad473c84fced770837da9e6e55c Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Tue, 20 Apr 2010 11:11:33 +0300 Subject: Fixed EXT-6542(normal) - [HARD CODED] - Land-Info, Medien: none/none needs to be localized Added "DefaultMimeType" string to strings.xml to make "none/none" mime type localizable. Replaced all occurrences of "none/none" string with call to static method. Reviewed by Vadim Savchuk - https://codereview.productengine.com/secondlife/r/265/ --HG-- branch : product-engine --- indra/newview/llmimetypes.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/llmimetypes.cpp') diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp index 235487cf46..7bddc0d84c 100644 --- a/indra/newview/llmimetypes.cpp +++ b/indra/newview/llmimetypes.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llmimetypes.h" +#include "lltrans.h" #include "llxmlnode.h" #include "lluictrlfactory.h" @@ -49,6 +50,7 @@ std::string sDefaultImpl; // Returned when we don't know what impl to use std::string sXMLFilename; // Squirrel away XML filename so we know how to reset +std::string DEFAULT_MIME_TYPE = "none/none"; ///////////////////////////////////////////////////////////////////////////// @@ -212,7 +214,7 @@ std::string LLMIMETypes::findIcon(const std::string& mime_type) // static std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) { - std::string mime_type = "none/none"; + std::string mime_type = getDefaultMimeType(); mime_widget_set_map_t::iterator it = sWidgetMap.find(widget_type); if(it != sWidgetMap.end()) { @@ -221,6 +223,18 @@ std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) return mime_type; } +// static +const std::string& LLMIMETypes::getDefaultMimeType() +{ + return DEFAULT_MIME_TYPE; +} + +const std::string& LLMIMETypes::getDefaultMimeTypeTranslation() +{ + static std::string mime_type = LLTrans::getString("DefaultMimeType"); + return mime_type; +} + // static std::string LLMIMETypes::findToolTip(const std::string& mime_type) { -- cgit v1.2.3