Repository: microsoft/terminal
File: src/cascadia/TerminalSettingsModel/ActionArgs.cpp (C++)

Code before:
            else
            {
                // "Decrease background opacity by {Opacity}%"
                return winrt::hstring{
                    fmt::format(std::wstring_view(RS_(L"DecreaseOpacityCommandKey")),
                                Opacity())
                };
            }
        }
        else
        {
            // "Set background opacity to {Opacity}%"
            return winrt::hstring{
                fmt::format(std::wstring_view(RS_(L"AdjustOpacityCommandKey")),
                            Opacity())
            };
        }
    }

    winrt::hstring SaveTaskArgs::GenerateName() const
    {
        std::wstring formattedString;

        if (!Name().empty() && !KeyChord().empty())
        {
            formattedString = fmt::format(L"Save Task commandline: {}, name: {}, keyChord {}", Commandline(), Name(), KeyChord());
        }
        else if (!Name().empty())
        {
            formattedString = fmt::format(L"Save Task commandline: {}, name: {}", Commandline(), Name());
        }
        else if (!KeyChord().empty())
        {
            formattedString = fmt::format(L"Save Task commandline: {}, keyChord {}", Commandline(), KeyChord());
        }
        else
        {
            formattedString = fmt::format(L"Save Task commandline: {}", Commandline());
        }

        return winrt::hstring{ formattedString };
     }

    static winrt::hstring _FormatColorString(const Control::SelectionColor& selectionColor)
    {
        if (!selectionColor)
        {
            return RS_(L"ColorSelection_defaultColor");
        }

        const auto color = selectionColor.Color();

Review comment (suggestion):
"Save Task" will almost definitely need to be in the resources.resw, and loaded with `RS_` (like the other actions)

Code after:
            if (Opacity() >= 0)
            {
                // "Increase background opacity by {Opacity}%"
                return winrt::hstring{
                    fmt::format(std::wstring_view(RS_(L"IncreaseOpacityCommandKey")),
                                Opacity())
                };
            }
            else
            {
                // "Decrease background opacity by {Opacity}%"
                return winrt::hstring{
                    fmt::format(std::wstring_view(RS_(L"DecreaseOpacityCommandKey")),
                                Opacity())
                };
            }
        }
        else
        {
            // "Set background opacity to {Opacity}%"
            return winrt::hstring{
                fmt::format(std::wstring_view(RS_(L"AdjustOpacityCommandKey")),
                            Opacity())
            };
        }
    }

    winrt::hstring SaveSnippetArgs::GenerateName() const
    {
        if (Feature_SaveSnippet::IsEnabled())
        {
            std::wstringstream ss;

            ss << RS_(L"SaveSnippetNamePrefix").c_str() << L" commandline: " << Commandline().c_str();

            if (!Name().empty())
            {
                ss << L", name: " << Name().c_str();
            }

            if (!KeyChord().empty())
            {
                ss << L", keyChord " << KeyChord().c_str();
            }

            return winrt::hstring{ ss.str() };
        }
        return L"";
    }

    static winrt::hstring _FormatColorString(const Control::SelectionColor& selectionColor)