def __build_variable_string(translation, variables) -> str:
    """
    Takes two parameters.
    - translation: the string that will be used as the format in the translation string.
    - variables: a list of variables that are used as replacement strings in the translation string.

    Returns the translation string with the variables formatted in the correct way for the stringsdict file.

    __build_variable_string("This is an ${example}", ["${example}"]) -> "This is an %#@__example__@"
    """
    for variable in variables:
        translation = translation.replace(variable, f"%#@{variable}@")

    translation = translation.replace("${", "__").replace("}", "__")
    return translation