summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2010-07-15 15:28:34 +0300
committerMike Antipov <mantipov@productengine.com>2010-07-15 15:28:34 +0300
commit0def4c60c2978204c460974110be649e05fd3390 (patch)
treee06164bb65f26dfe8b1a50dbdeb9705a6d244557
parenta880243f34a77549478e76c0606d69c953928e45 (diff)
EXT-8372 FIXED Added possibility to localize some system device names.
All device names including "No Device" are get from the Vivox plugin. So, just common names are added to localize table. * "Default system device" * "No device" "Microphone" is a part of device name and can not be localized without a hack. NOTE: this code will only work on English OS. On other system locales devices will be shown on system language independent on viewer locale. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/767/ --HG-- branch : product-engine
-rw-r--r--indra/newview/llfloatervoicedevicesettings.cpp36
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml8
2 files changed, 42 insertions, 2 deletions
diff --git a/indra/newview/llfloatervoicedevicesettings.cpp b/indra/newview/llfloatervoicedevicesettings.cpp
index 63365e3461..48095ff200 100644
--- a/indra/newview/llfloatervoicedevicesettings.cpp
+++ b/indra/newview/llfloatervoicedevicesettings.cpp
@@ -227,7 +227,23 @@ void LLPanelVoiceDeviceSettings::refresh()
iter != LLVoiceClient::getInstance()->getCaptureDevices().end();
iter++)
{
- mCtrlInputDevices->add( *iter, ADD_BOTTOM );
+ // Lets try to localize some system device names. EXT-8375
+ std::string device_name = *iter;
+ LLStringUtil::toLower(device_name); //compare in low case
+ if ("default system device" == device_name)
+ {
+ device_name = getString(device_name);
+ }
+ else if ("no device" == device_name)
+ {
+ device_name = getString(device_name);
+ }
+ else
+ {
+ // restore original value
+ device_name = *iter;
+ }
+ mCtrlInputDevices->add(device_name, ADD_BOTTOM );
}
if(!mCtrlInputDevices->setSimple(mInputDevice))
@@ -244,7 +260,23 @@ void LLPanelVoiceDeviceSettings::refresh()
for(iter= LLVoiceClient::getInstance()->getRenderDevices().begin();
iter != LLVoiceClient::getInstance()->getRenderDevices().end(); iter++)
{
- mCtrlOutputDevices->add( *iter, ADD_BOTTOM );
+ // Lets try to localize some system device names. EXT-8375
+ std::string device_name = *iter;
+ LLStringUtil::toLower(device_name); //compare in low case
+ if ("default system device" == device_name)
+ {
+ device_name = getString(device_name);
+ }
+ else if ("no device" == device_name)
+ {
+ device_name = getString(device_name);
+ }
+ else
+ {
+ // restore original value
+ device_name = *iter;
+ }
+ mCtrlOutputDevices->add(device_name, ADD_BOTTOM );
}
if(!mCtrlOutputDevices->setSimple(mOutputDevice))
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 65c78ad333..aa760edad3 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -408,6 +408,14 @@
name="default_text">
Default
</panel.string>
+ <panel.string
+ name="default system device">
+ Default system device
+ </panel.string>
+ <panel.string
+ name="no device">
+ No device
+ </panel.string>
<icon
height="18"
image_name="Microphone_On"