"""
strings.py

ENGLISH language string literals for PyGPSClient application

Created on 12 Sep 2020

:author: semuadmin (Steve Smith)
:copyright: 2020 semuadmin
:license: BSD 3-Clause
"""

# pylint: disable=line-too-long

from pygpsclient.globals import GITHUB_URL, MAPAPI_URL

TITLE = "PyGPSClient"
COPYRIGHT = "\u00a9 2020 semuadmin (Steve Smith)\nBSD 3-Clause License"
COPYRIGHTTXT = f"{COPYRIGHT}. All Rights Reserved"
EPILOG = f"{COPYRIGHT} - {GITHUB_URL}"

INTROTXT = f"Welcome to {TITLE}!"
INTROTXTNOPORTS = INTROTXT

HELPTXT = "Help..About - display About dialog."

ABOUTTXT = (
    f"{TITLE} is a free, open-source GNSS/GPS diagnostic and configuration "
    "application written entirely in Python and tkinter. "
    "It supports NMEA, UBX, SBF, RTCM3, NTRIP & SPARTN protocols. "
    "Instructions and source code are available on GitHub at the link below."
)
NA = "N/A"

# Message text
BADJSONERROR = "ERROR! Invalid metadata file"
CONFIGBAD = "{} command rejected"
CONFIGERR = "Invalid configuration data"
CONFIGOK = "{} command accepted"
CONFIGRXM = "{} polled, {} key(s) loaded"
CONFIGTITLE = "Config File"
CONFIRM = "CONFIRM"
ENDOFFILE = "End of file reached"
FILEOPENERROR = "Error opening file {}"
INACTIVE_TIMEOUT = "Inactivity timeout"
LOADCONFIGBAD = "Configuration not loaded {} {}, using defaults"
LOADCONFIGOK = "Configuration loaded {}"
LOADCONFIGNONE = "Configuration file not found {}, using defaults"
MAPCONFIGERR = "Custom map configuration error"
MAPOPENERR = "Unable to open custom map:\n{}"
MQTTCONN = "Connecting to MQTT server {}..."
NMEAVALERROR = "Value error in NMEA message: {}"
NOCONN = "NO CONNECTION"
NOTCONN = "Not connected"
NOWEBMAP = "Unable to display map."
NOWEBMAPCONN = NOWEBMAP + "\nCheck internet connection."
NOWEBMAPFIX = NOWEBMAP + "\nNo satellite fix."
NOWEBMAPHTTP = NOWEBMAP + "\nBad HTTP response: {}.\nCheck MQAPIKEY.\n"
NOWEBMAPKEY = NOWEBMAP + f"\nMQAPIKEY not found or invalid.\n\n{MAPAPI_URL}"
NULLSEND = "Nothing to send"
OUTOFBOUNDS = "No custom map available for {}"
OPENFILEERROR = "ERROR! File could not be opened"
READTITLE = "Select File"
SAVECONFIGBAD = "Configuration not saved {}"
SAVECONFIGOK = "Configuration saved OK"
SAVEERROR = "ERROR! File could not be saved to specified directory"
SAVETITLE = "Select Directory"
SEROPENERROR = "Error opening serial port {}"
SETINITTXT = "Settings initialised"
STOPDATA = "Serial reader process stopped"
UBXPOLL = "Polling current UBX configuration..."
VALERROR = "ERROR! Please correct highlighted entries"
VERCHECK = f"Newer version of {TITLE} available:"
WAITNMEADATA = "Waiting for data..."
WAITUBXDATA = "Waiting for data..."
NOWDGSWARN = "WARNING! No widgets are enabled in config file {} - display will be blank"
HALTTAGWARN = "HALTED ON USER TAG MATCH: {}"

# Menu text
MENUABOUT = "About"
MENUCAN = "Cancel"
MENUEXIT = "Exit"
MENUFILE = "File"
MENUHELP = "Help"
MENULOAD = "Load Configuration"
MENUOPTION = "Options"
MENURESET = "Reset Layout"
MENURST = "Reset"
MENUSAVE = "Save Configuration"
MENUVIEW = "View"


# Button text
BTNCAN = "Cancel"
BTNPLOT = "PLOT"
BTNRST = "Reset"
BTNSAVE = "Save"

# Label text
LBLACCURACY = "Accuracy (cm)"
LBLCFGGENERIC = "UBX Legacy Command Configuration"
LBLCFGGENERICNMEA = "NMEA Command Configuration"
LBLCFGMSG = "CFG-MSG Message Rate Configuration"
LBLCFGPRT = "CFG-PRT Protocol Configuration"
LBLCFGRATE = "CFG-RATE Navigation Solution Rate Configuration"
LBLCFGRECORD = "CFG Configuration Load/Save/Record"
LBLCONFIGBASE = "Configure Base"
LBLCTL = "Controls"
LBLDATADISP = "Console Display"
LBLDATALOG = "Data logging"
LBLDATABASERECORD = "Database"
LBLDEGFORMAT = "Position Format"
LBLDURATIONS = "Duration (s)"
LBLGGAFIXED = "Fixed Reference"
LBLGGALIVE = "Receiver"
LBLJSONLOAD = "Load Keys From JSON"
LBLLANIP = "LAN IP"
LBLSHOWTRACK = "Track"
LBLNODATA = "No data available"
LBLNMEACONFIG = "NMEA Config"
LBLNTRIPCONFIG = "NTRIP Client"
LBLNTRIPGGAINT = "GGA Interval s"
LBLNTRIPMOUNT = "Mountpoint"
LBLNTRIPPORT = "Port"
LBLNTRIPPWD = "Password"
LBLNTRIPSERVER = "Server"
LBLNTRIPSTR = "Sourcetable"
LBLNTRIPUSER = "User"
LBLNTRIPVERSION = "Version"
LBLNMEAPRESET = "Preset NMEA Configuration Commands"
LBLUBXPRESET = "Preset UBX Configuration Commands"
LBLPROTDISP = "Protocols Shown"
LBLPUBLICIP = "Public IP"
LBLSERVERHOST = "Host IP"
LBLSERVERMODE = "Mode"
LBLSERVERPORT = "Port"
LBLSET = "Settings"
LBLSHOWUNUSED = "Show Unused Satellites"
LBLSOCKSERVE = "Socket Server /\nNTRIP Caster   "  # padded to align
LBLSPARTNCONFIG = "SPARTN Client"
LBLSPARTNGN = "GNSS RECEIVER CONFIGURATION (F9*)"
LBLSPARTNIP = "IP CORRECTION CONFIGURATION (MQTT)"
LBLSPARTNLB = "L-BAND CORRECTION CONFIGURATION (D9*)"
LBLSPTNCURR = "CURRENT SPARTN KEY:"
LBLSPTNDAT = "Valid from YYYYMMDD"
LBLSPTNFP = "Configure receiver"
LBLSPTNKEY = "Key as hexadecimal"
LBLSPTNNEXT = "NEXT SPARTN KEY:"
LBLSPTNUPLOAD = "Upload keys"
LBLSTREAM = "Stream\nfrom file"
LBLTRACKRECORD = "GPX Track"
LBLUBXCONFIG = "UBX Config"
LBLUDPORT = "USER-DEFINED PORT"
LBLSPORT = "SAVED PORT"
LBLDISNMEA = "Disable NMEA"

# Dialog text
DLG = "dlg"
DLGENABLEMONSPAN = "Enable or poll MON-SPAN message"
DLGENABLEMONSYS = "Enable or poll MON-SYS/COMMS messages"
DLGGPXERROR = "GPX Parsing Error!"
DLGGPXOPEN = "Click folder icon to open GPX Track file"
DLGGPXLOAD = "Loading GPX file ..."
DLGGPXLOADED = "GPX data processed"
DLGGPXNULL = "No <{}> elements in GPX File!"
DLGGPXOOB = "Map out of bounds\nTry increasing zoom level"
DLGGPXWAIT = "Redrawing..."
DLGGPXNOMINAL = "time and speed axes are nominal"
DLGHOWTO = f"How To Use {TITLE}"
DLGJSONERR = "Error! {}"
DLGJSONOK = "Keys loaded from {}"
DLGNOMONSPAN = "This receiver does not appear to\nsupport the MON-SPAN messages"
DLGNOMONSYS = "This receiver does not appear to support\nthe MON-SYS/COMMS messages"
DLGACTION = "Confirm Command"
DLGACTIONCONFIRM = "Are you sure?"
DLGSPARTNWARN = "WARNING! Disconnect from {} client before using {} client"
DLGWAITMONSPAN = "Waiting for MON-SPAN message..."
DLGWAITMONSYS = "Waiting for MON-SYS/COMMS messages..."
DLGSTOPRTK = "WARNING! Stop all active connections before loading configuration"
DLGTABOUT = f"About {TITLE}"
DLGTGPX = "GPX Track Viewer"
DLGTNTRIP = "NTRIP Configuration"
DLGTSPARTN = "SPARTN Configuration"
DLGTNMEA = "NMEA Configuration"
DLGTUBX = "UBX Configuration"
DLGTIMPORTMAP = "Import Custom Map"
DLGTTTY = "TTY Commands"

# UBX Preset Command Descriptions
PSTALLINFOFF = "CFG-INF - Turn OFF all non-error INF msgs"
PSTALLINFON = "CFG-INF - Turn ON all INF msgs"
PSTALLLOGOFF = "CFG-MSG - Turn OFF all LOG msgs"
PSTALLLOGON = "CFG-MSG - Turn ON all LOG msgs"
PSTALLMONOFF = "CFG-MSG - Turn OFF all MON msgs"
PSTALLMONON = "CFG-MSG - Turn ON all MON msgs"
PSTALLNMEAOFF = "CFG-MSG - Turn OFF all NMEA msgs"
PSTALLNMEAON = "CFG-MSG - Turn ON all NMEA msgs"
PSTALLRXMOFF = "CFG-MSG - Turn OFF all RXM msgs"
PSTALLRXMON = "CFG-MSG - Turn ON all RXM msgs"
PSTALLSECOFF = "CFG-MSG - Turn OFF all SEC msgs"
PSTALLSECON = "CFG-MSG - Turn ON all SEC msgs"
PSTALLUBXOFF = "CFG-MSG - Turn OFF all UBX NAV msgs"
PSTALLUBXON = "CFG-MSG - Turn ON all UBX NAV msgs"
PSTMINNMEAON = "CFG-MSG - Turn ON minimum NMEA msgs"
PSTMINUBXON = "CFG-MSG - Turn ON minimum UBX NAV msgs"
PSTPOLLALLCFG = "CFG-xxx - Poll All Configuration Messages"
PSTPOLLALLNAV = "NAV(2)-xxx - Poll All Navigation Messages"
PSTPOLLINFO = "CFG-INF - Poll Info message config"
PSTPOLLPORT = "CFG-PRT - Poll Port config"
PSTRESET = "CFG-CFG - RESTORE FACTORY DEFAULTS"
PSTSAVE = "CFG-CFG - Save configuration to non-volatile memory"
PSTUSENMEA = "CFG-MSG - Enable NMEA, Suppress UBX"
PSTUSEUBX = "CFG-MSG - Enable UBX, Suppress NMEA"
