Capitalize mentions of Twitch, Chatterino, and IRC in comments and text/settings (#3274)

This commit is contained in:
Felanbird 2021-10-17 09:06:58 -04:00 committed by GitHub
parent 06245f3713
commit be3609a927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 35 additions and 35 deletions

View file

@ -129,10 +129,10 @@ namespace {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
// On macOS, programs are bundled into ".app" Application bundles, // On macOS, programs are bundled into ".app" Application bundles,
// when restarting chatterino that bundle should be opened with the "open" // when restarting Chatterino that bundle should be opened with the "open"
// terminal command instead of directly starting the underlying executable, // terminal command instead of directly starting the underlying executable,
// as those are 2 different things for the OS and i.e. do not use // as those are 2 different things for the OS and i.e. do not use
// the same dock icon (resulting in a second chatterino icon on restarting) // the same dock icon (resulting in a second Chatterino icon on restarting)
CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
CFStringRef macPath = CFStringRef macPath =
CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle);
@ -155,7 +155,7 @@ namespace {
_exit(signum); _exit(signum);
} }
// We want to restart chatterino when it crashes and the setting is set to // We want to restart Chatterino when it crashes and the setting is set to
// true. // true.
void initSignalHandler() void initSignalHandler()
{ {

View file

@ -48,7 +48,7 @@ Args::Args(const QApplication &app)
parser.addOption(QCommandLineOption( parser.addOption(QCommandLineOption(
{"c", "channels"}, {"c", "channels"},
"Joins only supplied channels on startup. Use letters with colons to " "Joins only supplied channels on startup. Use letters with colons to "
"specify platform. Only twitch channels are supported at the moment.\n" "specify platform. Only Twitch channels are supported at the moment.\n"
"If platform isn't specified, default is Twitch.", "If platform isn't specified, default is Twitch.",
"t:channel1;t:channel2;...")); "t:channel1;t:channel2;..."));

View file

@ -29,7 +29,7 @@ namespace chatterino {
enum class WindowType; enum class WindowType;
struct SplitDescriptor { struct SplitDescriptor {
// twitch or mentions or watching or whispers or irc // Twitch or mentions or watching or whispers or IRC
QString type_; QString type_;
// Twitch Channel name or IRC channel name // Twitch Channel name or IRC channel name

View file

@ -127,7 +127,7 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
auto emote = boost::optional<EmotePtr>{}; auto emote = boost::optional<EmotePtr>{};
for (int i = 2; i < words.length(); i++) for (int i = 2; i < words.length(); i++)
{ {
{ // twitch emote { // Twitch emote
auto it = accemotes.emotes.find({words[i]}); auto it = accemotes.emotes.find({words[i]});
if (it != accemotes.emotes.end()) if (it != accemotes.emotes.end())
{ {
@ -135,7 +135,7 @@ bool appendWhisperMessageWordsLocally(const QStringList &words)
MessageElementFlag::TwitchEmote); MessageElementFlag::TwitchEmote);
continue; continue;
} }
} // twitch emote } // Twitch emote
{ // bttv/ffz emote { // bttv/ffz emote
if ((emote = bttvemotes.emote({words[i]}))) if ((emote = bttvemotes.emote({words[i]})))
@ -899,7 +899,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
QString commandName = words[0]; QString commandName = words[0];
// works in a valid twitch channel and /whispers, etc... // works in a valid Twitch channel and /whispers, etc...
if (!dryRun && channel->isTwitchChannel()) if (!dryRun && channel->isTwitchChannel())
{ {
if (whisperCommands.contains(commandName, Qt::CaseInsensitive)) if (whisperCommands.contains(commandName, Qt::CaseInsensitive))
@ -935,7 +935,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
} }
} }
// works only in a valid twitch channel // works only in a valid Twitch channel
if (!dryRun && channel->isTwitchChannel()) if (!dryRun && channel->isTwitchChannel())
{ {
// check if command exists // check if command exists

View file

@ -165,7 +165,7 @@ void NotificationController::getFakeTwitchChannelLiveStatus(
if (i != fakeTwitchChannels.end()) if (i != fakeTwitchChannels.end())
{ {
// We have already pushed the live state of this stream // We have already pushed the live state of this stream
// Could not find stream in fake twitch channels! // Could not find stream in fake Twitch channels!
return; return;
} }

View file

@ -332,7 +332,7 @@ public:
MessageElementFlags flags) override; MessageElementFlags flags) override;
}; };
// contains a full message string that's split into words on space and parses irc colors that are then put into segments // contains a full message string that's split into words on space and parses IRC colors that are then put into segments
// these segments are later passed to "MultiColorTextLayoutElement" elements to be rendered :) // these segments are later passed to "MultiColorTextLayoutElement" elements to be rendered :)
class IrcTextElement : public MessageElement class IrcTextElement : public MessageElement
{ {

View file

@ -231,7 +231,7 @@ ChannelPtr AbstractIrcServer::getOrAddChannel(const QString &dirtyChannelName)
} }
})); }));
// join irc channel // join IRC channel
{ {
std::lock_guard<std::mutex> lock2(this->connectionMutex_); std::lock_guard<std::mutex> lock2(this->connectionMutex_);

View file

@ -23,7 +23,7 @@ public:
virtual ~AbstractIrcServer() = default; virtual ~AbstractIrcServer() = default;
// initializeIrc must be called from the derived class // initializeIrc must be called from the derived class
// this allows us to initialize the abstract irc server based on the derived class's parameters // this allows us to initialize the abstract IRC server based on the derived class's parameters
void initializeIrc(); void initializeIrc();
// connection // connection
@ -57,7 +57,7 @@ protected:
virtual void initializeConnectionSignals(IrcConnection *connection, virtual void initializeConnectionSignals(IrcConnection *connection,
ConnectionType type){}; ConnectionType type){};
// initializeConnection is called every time before we try to connect to the irc server // initializeConnection is called every time before we try to connect to the IRC server
virtual void initializeConnection(IrcConnection *connection, virtual void initializeConnection(IrcConnection *connection,
ConnectionType type) = 0; ConnectionType type) = 0;

View file

@ -330,7 +330,7 @@ void IrcMessageHandler::handleRoomStateMessage(Communi::IrcMessage *message)
{ {
const auto &tags = message->tags(); const auto &tags = message->tags();
// get twitch channel // get Twitch channel
QString chanName; QString chanName;
if (!trimChannelName(message->parameter(0), chanName)) if (!trimChannelName(message->parameter(0), chanName))
{ {

View file

@ -34,7 +34,7 @@ public:
void handleWhisperMessage(Communi::IrcMessage *message); void handleWhisperMessage(Communi::IrcMessage *message);
// parseUserNoticeMessage parses a single IRC USERNOTICE message into 0+ // parseUserNoticeMessage parses a single IRC USERNOTICE message into 0+
// chatterino messages // Chatterino messages
std::vector<MessagePtr> parseUserNoticeMessage( std::vector<MessagePtr> parseUserNoticeMessage(
Channel *channel, Communi::IrcMessage *message); Channel *channel, Communi::IrcMessage *message);
void handleUserNoticeMessage(Communi::IrcMessage *message, void handleUserNoticeMessage(Communi::IrcMessage *message,

View file

@ -1488,7 +1488,7 @@ void PubSub::handleMessageResponse(const rapidjson::Value &outerData)
// this message also contains per-word automod data, which could be implemented // this message also contains per-word automod data, which could be implemented
// extract sender data manually because twitch loves not being consistent // extract sender data manually because Twitch loves not being consistent
rapidjson::Value senderData; rapidjson::Value senderData;
if (!rj::getSafeObject(messageData, "sender", senderData)) if (!rj::getSafeObject(messageData, "sender", senderData))
{ {

View file

@ -81,7 +81,7 @@ namespace {
noticeMessage = "Chat has been cleared by a moderator."; noticeMessage = "Chat has been cleared by a moderator.";
} }
// rebuild the raw irc message so we can convert it back to an ircmessage again! // rebuild the raw IRC message so we can convert it back to an ircmessage again!
// this could probably be done in a smarter way // this could probably be done in a smarter way
auto s = QString(":tmi.twitch.tv NOTICE %1 :%2") auto s = QString(":tmi.twitch.tv NOTICE %1 :%2")

View file

@ -211,7 +211,7 @@ MessagePtr TwitchMessageBuilder::build()
this->bits = iterator.value().toString(); this->bits = iterator.value().toString();
} }
// twitch emotes // Twitch emotes
std::vector<TwitchEmoteOccurence> twitchEmotes; std::vector<TwitchEmoteOccurence> twitchEmotes;
iterator = this->tags.find("emotes"); iterator = this->tags.find("emotes");
@ -1365,7 +1365,7 @@ void TwitchMessageBuilder::hostingSystemMessage(const QString &channelName,
builder->message().searchText = text; builder->message().searchText = text;
} }
// irc variant // IRC variant
void TwitchMessageBuilder::deletionMessage(const MessagePtr originalMessage, void TwitchMessageBuilder::deletionMessage(const MessagePtr originalMessage,
MessageBuilder *builder) MessageBuilder *builder)
{ {

View file

@ -104,8 +104,8 @@ void Paths::initRootDirectory()
path.toStdString() + "\""); path.toStdString() + "\"");
} }
// create directory Chatterino2 instead of chatterino on windows because the // create directory Chatterino2 instead of Chatterino on windows because the
// ladder one is takes by chatterino 1 already // ladder one is takes by Chatterino 1 already
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
path.replace("chatterino", "Chatterino"); path.replace("chatterino", "Chatterino");

View file

@ -28,7 +28,7 @@ public:
// Hash of QCoreApplication::applicationFilePath() // Hash of QCoreApplication::applicationFilePath()
QString applicationFilePathHash; QString applicationFilePathHash;
// Profile avatars for twitch <appDataDirectory>/cache/twitch // Profile avatars for Twitch <appDataDirectory>/cache/twitch
QString twitchProfileAvatars; QString twitchProfileAvatars;
bool createFolder(const QString &folderPath); bool createFolder(const QString &folderPath);

View file

@ -51,7 +51,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent)
auto channel_btn = vbox.emplace<QRadioButton>("Channel").assign( auto channel_btn = vbox.emplace<QRadioButton>("Channel").assign(
&this->ui_.twitch.channel); &this->ui_.twitch.channel);
auto channel_lbl = auto channel_lbl =
vbox.emplace<QLabel>("Join a twitch channel by its name.").hidden(); vbox.emplace<QLabel>("Join a Twitch channel by its name.").hidden();
channel_lbl->setWordWrap(true); channel_lbl->setWordWrap(true);
auto channel_edit = vbox.emplace<QLineEdit>().hidden().assign( auto channel_edit = vbox.emplace<QLineEdit>().hidden().assign(
&this->ui_.twitch.channelName); &this->ui_.twitch.channelName);
@ -77,7 +77,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent)
.assign(&this->ui_.twitch.whispers); .assign(&this->ui_.twitch.whispers);
auto whispers_lbl = auto whispers_lbl =
vbox.emplace<QLabel>("Shows the whispers that you receive while " vbox.emplace<QLabel>("Shows the whispers that you receive while "
"chatterino is running.") "Chatterino is running.")
.hidden(); .hidden();
whispers_lbl->setWordWrap(true); whispers_lbl->setWordWrap(true);
@ -108,7 +108,7 @@ SelectChannelDialog::SelectChannelDialog(QWidget *parent)
auto watching_btn = vbox.emplace<QRadioButton>("Watching") auto watching_btn = vbox.emplace<QRadioButton>("Watching")
.assign(&this->ui_.twitch.watching); .assign(&this->ui_.twitch.watching);
auto watching_lbl = auto watching_lbl =
vbox.emplace<QLabel>("Requires the chatterino browser extension.") vbox.emplace<QLabel>("Requires the Chatterino browser extension.")
.hidden(); .hidden();
watching_lbl->setWordWrap(true); watching_lbl->setWordWrap(true);

View file

@ -1927,7 +1927,7 @@ void ChannelView::addContextMenuItems(
crossPlatformCopy(copyString); crossPlatformCopy(copyString);
}); });
// If is a link to a twitch user/stream // If is a link to a Twitch user/stream
if (hoveredElement->getLink().type == Link::Url) if (hoveredElement->getLink().type == Link::Url)
{ {
static QRegularExpression twitchChannelRegex( static QRegularExpression twitchChannelRegex(

View file

@ -434,14 +434,14 @@ void GeneralPage::initLayout(GeneralPageView &layout)
{ {
layout.addDescription( layout.addDescription(
"Your operating system is not officially supplied with builds. For " "Your operating system is not officially supplied with builds. For "
"updates, please rebuild chatterino from sources. Report " "updates, please rebuild Chatterino from sources. Report "
"issues <a href='https://chatterino.com/link/issues'>here</a>."); "issues <a href='https://chatterino.com/link/issues'>here</a>.");
} }
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
layout.addTitle("Browser Integration"); layout.addTitle("Browser Integration");
layout.addDescription("The browser extension replaces the default " layout.addDescription("The browser extension replaces the default "
"Twitch.tv chat with chatterino."); "Twitch.tv chat with Chatterino.");
{ {
if (auto err = nmIpcError().get()) if (auto err = nmIpcError().get())
@ -651,7 +651,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
layout.addCheckbox("Only search for username autocompletion with an @", layout.addCheckbox("Only search for username autocompletion with an @",
s.userCompletionOnlyWithAt); s.userCompletionOnlyWithAt);
layout.addCheckbox("Show twitch whispers inline", s.inlineWhispers); layout.addCheckbox("Show Twitch whispers inline", s.inlineWhispers);
layout.addCheckbox("Highlight received inline whispers", layout.addCheckbox("Highlight received inline whispers",
s.highlightInlineWhispers); s.highlightInlineWhispers);
layout.addCheckbox("Load message history on connect", layout.addCheckbox("Load message history on connect",

View file

@ -276,7 +276,7 @@ HighlightingPage::HighlightingPage()
layout.append(createCheckBox(ALWAYS_PLAY, layout.append(createCheckBox(ALWAYS_PLAY,
getSettings()->highlightAlwaysPlaySound)); getSettings()->highlightAlwaysPlaySound));
layout.append(createCheckBox( layout.append(createCheckBox(
"Flash taskbar only stops highlighting when chatterino is focused", "Flash taskbar only stops highlighting when Chatterino is focused",
getSettings()->longAlerts)); getSettings()->longAlerts));
} }

View file

@ -73,7 +73,7 @@ void addUsersTab(IgnoresPage &page, LayoutCreator<QVBoxLayout> users,
{ {
auto label = users.emplace<QLabel>(INFO); auto label = users.emplace<QLabel>(INFO);
label->setWordWrap(true); label->setWordWrap(true);
users.append(page.createCheckBox("Enable twitch blocked users", users.append(page.createCheckBox("Enable Twitch blocked users",
getSettings()->enableTwitchBlockedUsers)); getSettings()->enableTwitchBlockedUsers));
auto anyways = users.emplace<QHBoxLayout>().withoutMargin(); auto anyways = users.emplace<QHBoxLayout>().withoutMargin();

View file

@ -116,15 +116,15 @@ private:
void updateInputPlaceholder(); void updateInputPlaceholder();
/** /**
* @brief Opens twitch channel stream in a browser player (opens a formatted link) * @brief Opens Twitch channel stream in a browser player (opens a formatted link)
*/ */
void openChannelInBrowserPlayer(ChannelPtr channel); void openChannelInBrowserPlayer(ChannelPtr channel);
/** /**
* @brief Opens twitch channel stream in streamlink app (if stream is live and streamlink is installed) * @brief Opens Twitch channel stream in streamlink app (if stream is live and streamlink is installed)
*/ */
void openChannelInStreamlink(QString channelName); void openChannelInStreamlink(QString channelName);
/** /**
* @brief Opens twitch channel chat in a new chatterino tab * @brief Opens Twitch channel chat in a new Chatterino tab
*/ */
void joinChannelInNewTab(ChannelPtr channel); void joinChannelInNewTab(ChannelPtr channel);