From 0def4c60c2978204c460974110be649e05fd3390 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 15 Jul 2010 15:28:34 +0300 Subject: 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 --- indra/newview/llfloatervoicedevicesettings.cpp | 36 ++++++++++++++++++++-- .../default/xui/en/panel_preferences_sound.xml | 8 +++++ 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 + + Default system device + + + No device +