"""
This file provides configuration for 'translation_xml_to_c' script
"""
# Execution flags whether to print for debug
DEBUG_LOGGING = True
OUTPUT_LOGGING = False

# Encoding the data as UTF-8
# NOTE: Other Encodings (e.g. for non-latin alphabet) are currently not supported
OUTPUT_ENCODING = "utf-8"
# Define the name of the struct to hold the strings "typedef struct {0} { ... } {0};"
OUTPUT_STRUCT_TYPENAME =  "gui_strings_t"
# Define the name pattern to hold a language dictionary
OUTPUT_LANGUAGES_VARNAME = "gui_strings_{0}"

# Boolean: whether application want the support of default language string
#          in case a string is not defined for a specific language - it can use the default one
GENERATE_DEFAULT = True
# which language shall be the default (only used if GENERATE_DEFAULT is True)
DEFAULT_LANGUAGE = "En"

# input and output file names (or format)
OUTPUT_HEADER_FILE_NAME = "strings.h"
OUTPUT_SOURCE_FILE_NAME = "strings_{0}.c"
INPUT_LANGUAGES_XML_FILES = {
                    # English (US)
                    "En": "strings.xml",
                    # French (Canadian)
                    "Fr": "strings-fre.xml",
                    # Spanish
                    "Es": "strings-spa-ES.xml",
                    # German
                    "De": "strings-ger.xml",
                    }

SOURCE_FILES_EOL = "\n"

OUTPUT_SOURCE_PROLOG = "//#####################################################################" + SOURCE_FILES_EOL +\
                       "//#  Language strings file autogenerated by translation_xml_to_c.py   #" + SOURCE_FILES_EOL +\
                       "//#  Please Do not manually change, but change script or it's config  #" + SOURCE_FILES_EOL +\
                       "//#####################################################################" + 2*SOURCE_FILES_EOL +\
                       "// Include " + SOURCE_FILES_EOL +\
                       "#include \"" + OUTPUT_HEADER_FILE_NAME + "\"" + 2*SOURCE_FILES_EOL+\
                       "// Constants " + SOURCE_FILES_EOL +\
                       "const " + OUTPUT_STRUCT_TYPENAME + " " + OUTPUT_LANGUAGES_VARNAME + " = " + SOURCE_FILES_EOL

OUTPUT_HEADER_PROLOG = "//#####################################################################" + SOURCE_FILES_EOL +\
                       "//#  Language strings header file created by translation_xml_to_c.py  #" + SOURCE_FILES_EOL +\
                       "//#  Please Do not manually change, but change script or it's config  #" + SOURCE_FILES_EOL +\
                       "//#####################################################################" + 2*SOURCE_FILES_EOL

