Repository: microsoft/PowerToys
File: src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.ValueGenerator/Helper/QueryHelper.cs (C#)

Code before:
﻿// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;

namespace Community.PowerToys.Run.Plugin.ValueGenerator.Helper
{
    /// <summary>
    /// Helper class to easier work with queries
    /// </summary>
    internal static class QueryHelper
    {
        /// <summary>
        /// A list that contain all of the value generators and its descriptions
        /// </summary>
        internal static readonly IReadOnlyDictionary<string, string> GeneratorList = new Dictionary<string, string>(18)
        {
            { "uuid", "Generate a random UUID" },
            { "uuidv1", "Generate a version 1 UUID - Time based" },
            { "uuidv3", "Generate a version 3 UUID - Namespace and name based, using MD5" },
            { "uuidv4", "Generate a version 4 UUID - Random value (default)" },
            { "uuidv5", "Generate a version 5 UUID - Namespace and name based, using SHA1" },
            { "md5", "Hash a string with MD5" },
            { "sha1", "Hash a string with SHA1" },
            { "sha256", "Hash a string with SHA256" },
            { "sha384", "Hash a string with SHA384" },
            { "sha512", "Hash a string with SHA512" },
            { "base64", "Encode a string with Base64" },
            { "base64d", "Decode a string with Base64" },
            { "url", "Encode a URL" },
            { "urld", "Decode a URL" },
            { "esc:data", "Escape a data string" },
            { "uesc:data", "Unescape a data string" },
            { "esc:hex", "Escape a single hex character" },
            { "uesc:hex", "Unescape a single hex character" },
        };
    }
}


Review comment (suggestion):
We should add input example to the title. Especially for the more complex features like uuidv3. Something like `uuidv3 <your domain> <your other input>`.

Code after:
﻿// Copyright (c) Microsoft Corporation
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Community.PowerToys.Run.Plugin.ValueGenerator.Properties;

namespace Community.PowerToys.Run.Plugin.ValueGenerator.Helper
{
    /// <summary>
    /// Helper class to easier work with queries
    /// </summary>
    internal static class QueryHelper
    {
        /// <summary>
        /// a list of all value generator descriptions
        /// </summary>
        private static readonly string GeneratorDescriptionUuid = Resources.generator_description_uuid;
        private static readonly string GeneratorDescriptionUuidv1 = Resources.generator_description_uuidv1;
        private static readonly string GeneratorDescriptionUuidv3 = Resources.generator_description_uuidv3;
        private static readonly string GeneratorDescriptionUuidv4 = Resources.generator_description_uuidv4;
        private static readonly string GeneratorDescriptionUuidv5 = Resources.generator_description_uuidv5;
        private static readonly string GeneratorDescriptionHash = Resources.generator_description_hash;
        private static readonly string GeneratorDescriptionBase64 = Resources.generator_description_base64;
        private static readonly string GeneratorDescriptionBase64d = Resources.generator_description_base64d;
        private static readonly string GeneratorDescriptionUrl = Resources.generator_description_url;
        private static readonly string GeneratorDescriptionUrld = Resources.generator_description_urld;
        private static readonly string GeneratorDescriptionEscData = Resources.generator_description_esc_data;
        private static readonly string GeneratorDescriptionUescData = Resources.generator_description_uesc_data;
        private static readonly string GeneratorDescriptionEscHex = Resources.generator_description_esc_hex;
        private static readonly string GeneratorDescriptionUescHex = Resources.generator_description_uesc_hex;
        private static readonly string GeneratorDescriptionYourInput = Resources.generator_description_your_input;
        private static readonly string GeneratorExample = Resources.generator_example;
        private static readonly string Or = Resources.or;

        private static string GetStringFormat(string value, string arg)
        {
            return string.Format(CultureInfo.CurrentCulture, value, arg);
        }

        private static string GetStringFormat(string value)
        {
            return string.Format(CultureInfo.CurrentCulture, value);
        }