summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorFrederick Martian <fredmartian@gmail.com>2025-11-29 15:55:29 +0100
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-10 20:33:58 +0200
commitfe61aa3c8531d647c4ae2e183e73132fcbad90aa (patch)
tree988f71177cd261dcbbb95644b1c4568bc28801bb /indra/newview
parent15f9886ee779b2d014f4a386eac34700b3014bec (diff)
Fix several typos and comments
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloateruipreview.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index db98a70573..0bf0946c42 100755
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -484,47 +484,47 @@ bool LLFloaterUIPreview::postBuild()
bool found_en_us = false;
std::string language_directory;
std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim
- mLanguageSelection->removeall(); // clear out anything temporarily in list from XML
+ mLanguageSelection->removeall(); // clear out anything temporarily in list from XML
LLDirIterator iter(xui_dir, "*");
- while(found) // for every directory
+ while (found) // for every directory
{
- if((found = iter.next(language_directory))) // get next directory
+ if ((found = iter.next(language_directory))) // get next directory
{
std::string full_path = gDirUtilp->add(xui_dir, language_directory);
- if(LLFile::isfile(full_path.c_str())) // if it's not a directory, skip it
+ if (!LLFile::isdir(full_path.c_str())) // if it's not a directory, skip it
{
continue;
}
- if(strncmp("template",language_directory.c_str(),8) && -1 == language_directory.find(".")) // if it's not the template directory or a hidden directory
+ if (strncmp("template",language_directory.c_str(), 8) && -1 == language_directory.find(".")) // if it's not the template directory or a hidden directory
{
- if(!strncmp("en",language_directory.c_str(),5)) // remember if we've seen en, so we can make it default
+ if (!strncmp("en",language_directory.c_str(), 5)) // remember if we've seen en, so we can make it default
{
found_en_us = true;
}
else
{
- mLanguageSelection->add(std::string(language_directory)); // add it to the language selection dropdown menu
+ mLanguageSelection->add(std::string(language_directory)); // add it to the language selection dropdown menu
mLanguageSelection_2->add(std::string(language_directory));
}
}
}
}
- if(found_en_us)
+ if (found_en_us)
{
- mLanguageSelection->add(std::string("en"),ADD_TOP); // make en first item if we found it
- mLanguageSelection_2->add(std::string("en"),ADD_TOP);
+ mLanguageSelection->add(std::string("en"), ADD_TOP); // make en first item if we found it
+ mLanguageSelection_2->add(std::string("en"), ADD_TOP);
}
else
{
std::string warning = std::string("No EN localization found; check your XUI directories!");
popupAndPrintWarning(warning);
}
- mLanguageSelection->selectFirstItem(); // select the first item
+ mLanguageSelection->selectFirstItem(); // select the first item
mLanguageSelection_2->selectFirstItem();
- refreshList(); // refresh the list of available floaters
+ refreshList(); // refresh the list of available floaters
return true;
}
@@ -892,7 +892,7 @@ void LLFloaterUIPreview::displayFloater(bool click, S32 ID)
// Add localization to title so user knows whether it's localized or defaulted to en
std::string full_path = getLocalizedDirectory() + path;
std::string floater_lang = "EN";
- if (LLFile::isfile(full_path.c_str())) // if the file does not exist
+ if (LLFile::isfile(full_path.c_str())) // use localized language if the file exists
{
floater_lang = getLocStr(ID);
}
@@ -965,8 +965,8 @@ void LLFloaterUIPreview::onClickEditFloater()
}
file_path = getLocalizedDirectory() + file_name;
- // does it exist? (some localized versions may not have it there are no diffs, and then we try to open an nonexistent file
- if(!LLFile::isfile(file_path.c_str())) // if the file does not exist
+ // Does it exist? (Some localized versions may not have it when there are no diffs, and then we try to open a nonexistent file)
+ if (!LLFile::isfile(file_path.c_str())) // if the file does not exist
{
popupAndPrintWarning("No file for this floater exists in the selected localization. Opening the EN version instead.");
file_path = get_xui_dir() + mDelim + "en" + mDelim + file_name; // open the en version instead, by default
@@ -1115,14 +1115,14 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
std::string path_in_textfield = mDiffPathTextBox->getText(); // get file path
bool error = false;
- if(std::string("") == path_in_textfield) // check for blank file
+ if(std::string("") == path_in_textfield) // check for blank file
{
std::string warning = "Unable to highlight differences because no file was provided; fill in the relevant text field";
popupAndPrintWarning(warning);
error = true;
}
- if (!LLFile::isfile(path_in_textfield.c_str()) && !error) // check if the file exists (empty check is reduntant but useful for the informative error message)
+ if (!LLFile::isfile(path_in_textfield.c_str()) && !error) // check if the file exists (empty check is redundant but useful for the informative error message)
{
std::string warning = std::string("Unable to highlight differences because an invalid path to a difference file was provided:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);