diff --git a/ChangeLog.md b/ChangeLog.md index 8fbd679d..6ac71e89 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,23 @@ This is the master changelog for Elite Dangerous Market Connector. Entries are in reverse chronological order (latest first). --- +Pre-Release 3.99.1.0 +=== +Consider this as 'beta1' for the following full '4.0.0.0' release. + + * Actually include the new translations in the install: Serbian (Latin, Bosnia and Herzegovina) (175/175), Slovenian (Slovenia) (144/175). + * Fix a bug where if you copied a Journal file to the live location, resulting in a "Journal.YYMMDDHHMMss.XX - Copy.log" file, + the application would pick it up as 'new' and potentially re-send duplicate data to all of EDDN, EDSM and Inara. + + Now the only files the application will take note of must: + 1. Start with `Journal.` or `JournalBeta.`. + 1. Have the 12-digit date/timestamp, followed by a `.` + 1. Have the 2 digit serial number, followed by a `.` + 1. Nothing else before the trailing `log`. + * Fix the 'Release Note' URL in the 'About' popup to use the correct format. + * Fix the location of Registry keys for the update checker, WinSparkle, to be under `EDMarketConnector` instead + of `EDMarketConnector.py`. + Pre-Release 3.99.0.0 === Consider this as 'beta0' for the following full '4.0.0.0' release. diff --git a/EDMC.py b/EDMC.py index b76c4d2c..60687e90 100755 --- a/EDMC.py +++ b/EDMC.py @@ -80,7 +80,7 @@ try: # Get state from latest Journal file try: logdir = config.get('journaldir') or config.default_journal_dir - logfiles = sorted([x for x in os.listdir(logdir) if x.startswith('Journal') and x.endswith('.log')], + logfiles = sorted([x for x in os.listdir(logdir) if re.search('^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$', x)], key=lambda x: x.split('.')[1:]) logfile = join(logdir, logfiles[-1]) with open(logfile, 'r') as loghandle: diff --git a/EDMarketConnector.wxs b/EDMarketConnector.wxs index 3bb2055f..292cf389 100644 --- a/EDMarketConnector.wxs +++ b/EDMarketConnector.wxs @@ -18,8 +18,8 @@ Description="$(var.PRODUCTLONGNAME) installer" InstallerVersion="300" Compressed="yes" Platform="x86" - Languages="1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,1060,0" /> - + Languages="1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,1060,1053,0" /> + @@ -261,9 +261,18 @@ + + + + + + + + + @@ -561,11 +570,14 @@ + + + diff --git a/L10n/sv-SE.strings b/L10n/sv-SE.strings new file mode 100644 index 00000000..b97a8858 --- /dev/null +++ b/L10n/sv-SE.strings @@ -0,0 +1,525 @@ +/* Language name */ +"!Language" = "Svenska"; + +/* App menu entry on OSX. [EDMarketConnector.py] */ +"About {APP}" = "Om {APP}"; + +/* Federation rank. [stats.py] */ +"Admiral" = "Admiral"; + +/* Explorer rank. [stats.py] */ +"Aimless" = "Aimless"; + +/* Appearance setting. [EDMarketConnector.py] */ +"Always on top" = "Alltid överst"; + +/* CQC rank. [stats.py] */ +"Amateur" = "Amatör"; + +/* EDSM setting. [edsm.py] */ +"API Key" = "API Nyckel"; + +/* Tab heading in settings. [prefs.py] */ +"Appearance" = "Utseende"; + +/* Successfully authenticated with the Frontier website. [EDMarketConnector.py] */ +"Authentication successful" = "Autentisering lyckad"; + +/* Output setting. [prefs.py] */ +"Automatically update on docking" = "Automatisk uppdatering vid dockning"; + +/* Cmdr stats. [stats.py] */ +"Balance" = "Balance"; + +/* Empire rank. [stats.py] */ +"Baron" = "Baron"; + +/* Trade rank. [stats.py] */ +"Broker" = "Broker"; + +/* Folder selection button on Windows. [prefs.py] */ +"Browse..." = "Bläddra..."; + +/* Federation rank. [stats.py] */ +"Cadet" = "Cadet"; + +/* CQC rank. [stats.py] */ +"Champion" = "Champion"; + +/* Folder selection button on OSX. [prefs.py] */ +"Change..." = "Ändra..."; + +/* Menu item. [EDMarketConnector.py] */ +"Check for Updates..." = "Sök efter uppdateringar..."; + +/* Federation rank. [stats.py] */ +"Chief Petty Officer" = "Chief Petty Officer"; + +/* Main window. [EDMarketConnector.py] */ +"Cmdr" = "Cmdr"; + +/* Ranking. [stats.py] */ +"Combat" = "Combat"; + +/* EDSM setting. [edsm.py] */ +"Commander Name" = "CMDR namn"; + +/* Combat rank. [stats.py] */ +"Competent" = "Competent"; + +/* Tab heading in settings. [prefs.py] */ +"Configuration" = "Konfiguration"; + +/* Update button in main window. [EDMarketConnector.py] */ +"cooldown {SS}s" = "Vänta {SS}s"; + +/* As in Copy and Paste. [EDMarketConnector.py] */ +"Copy" = "Kopiera"; + +/* Empire rank. [stats.py] */ +"Count" = "Count"; + +/* Ranking. [stats.py] */ +"CQC" = "CQC"; + +/* Combat rank. [stats.py] */ +"Dangerous" = "Dangerous"; + +/* Appearance theme setting. [prefs.py] */ +"Dark" = "Mörk"; + +/* Combat rank. [stats.py] */ +"Deadly" = "Deadly"; + +/* Trade rank. [stats.py] */ +"Dealer" = "Dealer"; + +/* Appearance theme and language setting. [l10n.py] */ +"Default" = "Standard"; + +/* Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2. [eddn.py] */ +"Delay sending until docked" = "Sänd bara uppdatering när du är dockad"; + +/* Option to disabled Automatic Check For Updates whilst in-game [prefs.py] */ +"Disable Automatic Application Updates Check when in-game" = "Leta inte efter programuppdateringar när spelet körs"; + +/* List of plugins in settings. [prefs.py] */ +"Disabled Plugins" = "Avaktiverade plugins"; + +/* Help menu item. [EDMarketConnector.py] */ +"Documentation" = "Dokumentation"; + +/* Empire rank. [stats.py] */ +"Duke" = "Duke"; + +/* Location of the new Journal file in E:D 2.2. [EDMarketConnector.py] */ +"E:D journal file location" = "E:D journal-fil sökväg"; + +/* Empire rank. [stats.py] */ +"Earl" = "Earl"; + +/* Menu title. [EDMarketConnector.py] */ +"Edit" = "Ändra"; + +/* Top rank. [stats.py] */ +"Elite" = "Elite"; + +/* Section heading in settings. [edsm.py] */ +"Elite Dangerous Star Map credentials" = "Elite Dangerous Star Map användaruppgifter"; + +/* Ranking. [stats.py] */ +"Empire" = "Empire"; + +/* List of plugins in settings. [prefs.py] */ +"Enabled Plugins" = "Aktiverade plugins"; + +/* Federation rank. [stats.py] */ +"Ensign" = "Ensign"; + +/* Trade rank. [stats.py] */ +"Entrepreneur" = "Entrepreneur"; + +/* [eddn.py] */ +"Error: Can't connect to EDDN" = "Fel: Kan inte ansluta till EDDN"; + +/* [edsm.py] */ +"Error: Can't connect to EDSM" = "Fel: Kan inte ansluta till EDSM"; + +/* [inara.py] */ +"Error: Can't connect to Inara" = "Fel: Kan inte ansluta till Inara"; + +/* [edsm.py] */ +"Error: EDSM {MSG}" = "Fel: EDSM {MSG}"; + +/* Raised when cannot contact the Companion API server. [companion.py] */ +"Error: Frontier server is down" = "Fel: Frontier server okontaktbar"; + +/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ +"Error: Frontier server is lagging" = "Fel: Frontier lag på server"; + +/* Raised when the Companion API server thinks that the user has not purchased E:D. i.e. doesn't have the correct 'SKU'. [companion.py] */ +"Error: Frontier server SKU problem" = "Fel: Frontier server SKU problem (licensnyckel)"; + +/* [inara.py] */ +"Error: Inara {MSG}" = "Fel: Inara {MSG}"; + +/* [companion.py] */ +"Error: Invalid Credentials" = "Fel: ogiltligt användarnamn eller lösenord"; + +/* Raised when the user has multiple accounts and the username/password setting is not for the account they're currently playing OR the user has reset their Cmdr and the Companion API server is still returning data for the old Cmdr. [companion.py] */ +"Error: Wrong Cmdr" = "Fel: Fel användare. Har du flera konton eller en gammal API-nyckel från ett nollställt konto?"; + +/* Item in the File menu on Windows. [EDMarketConnector.py] */ +"Exit" = "Avsluta"; + +/* Combat rank. [stats.py] */ +"Expert" = "Expert"; + +/* Ranking. [stats.py] */ +"Explorer" = "Explorer"; + +/* Ranking. [stats.py] */ +"Federation" = "Federation"; + +/* [EDMarketConnector.py] */ +"Fetching data..." = "Hämtar data..."; + +/* Multicrew role. [EDMarketConnector.py] */ +"Fighter" = "Fighter"; + +/* Menu title. [EDMarketConnector.py] */ +"File" = "Fil"; + +/* Section heading in settings. [prefs.py] */ +"File location" = "Filsökväg"; + +/* CQC rank. [stats.py] */ +"Gladiator" = "Gladiator"; + +/* Multicrew role. [EDMarketConnector.py] */ +"Gunner" = "Gunner"; + +/* Combat rank. [stats.py] */ +"Harmless" = "Harmless"; + +/* Multicrew role. [EDMarketConnector.py] */ +"Helm" = "Helm"; + +/* Menu title. [EDMarketConnector.py] */ +"Help" = "Hjälp"; + +/* CQC rank. [stats.py] */ +"Helpless" = "Helpless"; + +/* CQC rank. [stats.py] */ +"Hero" = "Hero"; + +/* Dark theme color setting. [prefs.py] */ +"Highlighted text" = "Markerad text"; + +/* Hotkey/Shortcut settings prompt on Windows. [prefs.py] */ +"Hotkey" = "Snabbkommando"; + +/* Section heading in settings. [inara.py] */ +"Inara credentials" = "Inara autentiseringsuppgifter"; + +/* Hotkey/Shortcut settings prompt on OSX. [prefs.py] */ +"Keyboard shortcut" = "Genväg, tangentbord"; + +/* Empire rank. [stats.py] */ +"King" = "King"; + +/* Empire rank. [stats.py] */ +"Knight" = "Knight"; + +/* Appearance setting prompt. [prefs.py] */ +"Language" = "Språk"; + +/* [EDMarketConnector.py] */ +"Last updated at {HH}:{MM}:{SS}" = "Senaste uppdatering: {HH}:{MM}:{SS}"; + +/* Federation rank. [stats.py] */ +"Lieutenant" = "Lieutenant"; + +/* Federation rank. [stats.py] */ +"Lieutenant Commander" = "Lieutenant Commander"; + +/* Cmdr stats. [stats.py] */ +"Loan" = "Lån"; + +/* [EDMarketConnector.py] */ +"Logging in..." = "Loggar in..."; + +/* Empire rank. [stats.py] */ +"Lord" = "Lord"; + +/* [prefs.py] */ +"Market data in CSV format file" = "Marknadsdata i CSV-formaterad fil"; + +/* [prefs.py] */ +"Market data in Trade Dangerous format file" = "Marknadsdata i Trade Dangerous-formatterad fil"; + +/* Empire rank. [stats.py] */ +"Marquis" = "Marquis"; + +/* Combat rank. [stats.py] */ +"Master" = "Master"; + +/* Trade rank. [stats.py] */ +"Merchant" = "Merchant"; + +/* Federation rank. [stats.py] */ +"Midshipman" = "Midshipman"; + +/* Explorer rank. [stats.py] */ +"Mostly Aimless" = "Mostly Aimless"; + +/* Combat rank. [stats.py] */ +"Mostly Harmless" = "Mostly Harmless"; + +/* CQC rank. [stats.py] */ +"Mostly Helpless" = "Mostly Helpless"; + +/* Trade rank. [stats.py] */ +"Mostly Penniless" = "Mostly Penniless"; + +/* No hotkey/shortcut currently defined. [prefs.py] */ +"None" = "Ingen"; + +/* Dark theme color setting. [prefs.py] */ +"Normal text" = "Normal text"; + +/* Combat rank. [stats.py] */ +"Novice" = "Novice"; + +/* [prefs.py] */ +"OK" = "OK"; + +/* Hotkey/Shortcut setting. [prefs.py] */ +"Only when Elite: Dangerous is the active app" = "Bara när: Elite Dangerous är det aktiva programmet"; + +/* Button that opens a folder in Explorer/Finder. [prefs.py] */ +"Open" = "Öppna"; + +/* Shortcut settings button on OSX. [prefs.py] */ +"Open System Preferences" = "Öppna systeminställningar"; + +/* Tab heading in settings. [prefs.py] */ +"Output" = "Output"; + +/* Empire rank. [stats.py] */ +"Outsider" = "Outsider"; + +/* Explorer rank. [stats.py] */ +"Pathfinder" = "Pathfinder"; + +/* Trade rank. [stats.py] */ +"Peddler" = "Peddler"; + +/* Trade rank. [stats.py] */ +"Penniless" = "Penniless"; + +/* Federation rank. [stats.py] */ +"Petty Officer" = "Petty Officer"; + +/* Explorer rank. [stats.py] */ +"Pioneer" = "Pioneer"; + +/* Hotkey/Shortcut setting. [prefs.py] */ +"Play sound" = "Spela ljud"; + +/* [prefs.py] */ +"Please choose what data to save" = "Välj vilket data som skall lagras"; + +/* Tab heading in settings. [prefs.py] */ +"Plugins" = "Plugins"; + +/* Section heading in settings. [prefs.py] */ +"Plugins folder" = "Mapp för plugins"; + +/* Popup title: Warning about plugins without Python 3.x support [EDMarketConnector.py] */ +"EDMC: Plugins Without Python 3.x Support" = "EDMC: Plugins utan stöd för Python 3.x"; + +/* Popup body: Warning about plugins without Python 3.x support [EDMarketConnector.py] */ +"One or more of your enabled plugins do not yet have support for Python 3.x. Please see the list on the '{PLUGINS}' tab of '{FILE}' > '{SETTINGS}'. You should check if there is an updated version available, else alert the developer that they need to update the code for Python 3.x.\r\n\r\nYou can disable a plugin by renaming its folder to have '{DISABLED}' on the end of the name." = "En eller flera aktiverade plugins har inte stöd för Python 3.x. Var vänlig kontrollera listan med plugins under fliken '{PLUGINS}' under '{FILE}' > '{SETTINGS}'. Kontrollera om det finns en nyare version tillgänglig eller informera utvecklaren.\n\nDu kan också avaktivera din plugin genom att ändra slutet av namnet på mappen till '{DISABLED}'"; + +/* Settings>Plugins>Plugins without Python 3.x support [prefs.py] */ +"Plugins Without Python 3.x Support" = "Plugins utan stöd för Python 3.x"; + +/* Settings>Plugins>Information on migrating plugins [prefs.py] */ +"Information on migrating plugins" = "Information om migrering av plugins"; + +/* Federation rank. [stats.py] */ +"Post Captain" = "Post Captain"; + +/* Federation rank. [stats.py] */ +"Post Commander" = "Post Commander"; + +/* Ranking. [stats.py] */ +"Powerplay" = "Powerplay"; + +/* [prefs.py] */ +"Preferences" = "Inställningar"; + +/* Settings prompt for preferred ship loadout, system and station info websites. [prefs.py] */ +"Preferred websites" = "Föredragna webbsidor"; + +/* Empire rank. [stats.py] */ +"Prince" = "Prince"; + +/* Help menu item. [EDMarketConnector.py] */ +"Privacy Policy" = "Privacy Policy"; + +/* CQC rank. [stats.py] */ +"Professional" = "Professional"; + +/* Explorer rank. [stats.py] */ +"Ranger" = "Ranger"; + +/* Power rank. [stats.py] */ +"Rating 1" = "Rating 1"; + +/* Power rank. [stats.py] */ +"Rating 2" = "Rating 2"; + +/* Power rank. [stats.py] */ +"Rating 3" = "Rating 3"; + +/* Power rank. [stats.py] */ +"Rating 4" = "Rating 4"; + +/* Power rank. [stats.py] */ +"Rating 5" = "Rating 5"; + +/* Shortcut settings prompt on OSX. [prefs.py] */ +"Re-start {APP} to use shortcuts" = "Starta om {APP} för att använda genvägar"; + +/* Federation rank. [stats.py] */ +"Rear Admiral" = "Rear Admiral"; + +/* Federation rank. [stats.py] */ +"Recruit" = "Recruit"; + +/* Help menu item. [EDMarketConnector.py] */ +"Release Notes" = "Release Notes"; + +/* Multicrew role label in main window. [EDMarketConnector.py] */ +"Role" = "Roll"; + +/* Menu item. [EDMarketConnector.py] */ +"Save Raw Data..." = "Lagra rådata..."; + +/* Explorer rank. [stats.py] */ +"Scout" = "Scout"; + +/* CQC rank. [stats.py] */ +"Semi Professional" = "Semi Professional"; + +/* [edsm.py] */ +"Send flight log and Cmdr status to EDSM" = "Sänd flight log-data och Cmdr-status till EDSM"; + +/* [inara.py] */ +"Send flight log and Cmdr status to Inara" = "Sänd flight log-data och Cmdr-status till Inara"; + +/* Output setting. [eddn.py] */ +"Send station data to the Elite Dangerous Data Network" = "Sänd stationsdata till Elite Dangerous Data Network"; + +/* Output setting new in E:D 2.2. [eddn.py] */ +"Send system and scan data to the Elite Dangerous Data Network" = "Sänd system och scan-data till Elite Dangerous Data Network"; + +/* [eddn.py] */ +"Sending data to EDDN..." = "Sänder data till EDDN..."; + +/* Empire rank. [stats.py] */ +"Serf" = "Serf"; + +/* Item in the File menu on Windows. [EDMarketConnector.py] */ +"Settings" = "Inställningar"; + +/* Main window. [EDMarketConnector.py] */ +"Ship" = "Skepp"; + +/* Output setting. [prefs.py] */ +"Ship loadout" = "Översikt av skepp"; + +/* Status dialog title. [stats.py] */ +"Ships" = "Skepp"; + +/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis. [prefs.py] */ +"Shipyard" = "Webbsida för översikt av skepp"; + +/* Empire rank. [stats.py] */ +"Squire" = "Squire"; + +/* Main window. [EDMarketConnector.py] */ +"Station" = "Station"; + +/* [EDMarketConnector.py] */ +"Station doesn't have a market!" = "Stationen har ingen marknad!"; + +/* [EDMarketConnector.py] */ +"Station doesn't have anything!" = "Stationen är tom!"; + +/* Menu item. [EDMarketConnector.py] */ +"Status" = "Status"; + +/* Explorer rank. [stats.py] */ +"Surveyor" = "Surveyor"; + +/* Main window. [EDMarketConnector.py] */ +"System" = "System"; + +/* Appearance setting. [prefs.py] */ +"Theme" = "Tema"; + +/* Help text in settings. [prefs.py] */ +"Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name" = "Tips: du kan avaktivera en plugin genom{CR}att lägga till '{EXT}' på slutet av mappens namn"; + +/* Ranking. [stats.py] */ +"Trade" = "Trade"; + +/* Explorer rank. [stats.py] */ +"Trailblazer" = "Trailblazer"; + +/* Appearance theme setting. [prefs.py] */ +"Transparent" = "Transparent"; + +/* Trade rank. [stats.py] */ +"Tycoon" = "Tycoon"; + +/* Update button in main window. [EDMarketConnector.py] */ +"Update" = "Uppdatera"; + +/* Status dialog subtitle - CR value of ship. [stats.py] */ +"Value" = "Värde"; + +/* Federation rank. [stats.py] */ +"Vice Admiral" = "Vice Admiral"; + +/* Menu title on OSX. [EDMarketConnector.py] */ +"View" = "View"; + +/* Empire rank. [stats.py] */ +"Viscount" = "Viscount"; + +/* Federation rank. [stats.py] */ +"Warrant Officer" = "Warrant Officer"; + +/* Shouldn't happen. [EDMarketConnector.py] */ +"What are you flying?!" = "Okänt skepp? (felmeddelande)"; + +/* Shouldn't happen. [EDMarketConnector.py] */ +"Where are you?!" = "Vart är du? (felmeddelande)"; + +/* Shouldn't happen. [EDMarketConnector.py] */ +"Who are you?!" = "Vem är du? (felmeddelande)"; + +/* Menu title on OSX. [EDMarketConnector.py] */ +"Window" = "Fönster"; + +/* [EDMarketConnector.py] */ +"You're not docked at a station!" = "Du är inte dockad vid en station!"; + +/* Shortcut settings prompt on OSX. [prefs.py] */ +"{APP} needs permission to use shortcuts" = "{APP} behöver rättigheter för att använda genvägar"; + diff --git a/config.py b/config.py index 2e7f80fe..ad131ceb 100644 --- a/config.py +++ b/config.py @@ -8,7 +8,7 @@ from sys import platform appname = 'EDMarketConnector' applongname = 'E:D Market Connector' appcmdname = 'EDMC' -appversion = '3.99.0.0' +appversion = '3.99.1.0' copyright = u'© 2015-2019 Jonathan Harris, 2020 EDCD' update_feed = 'https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml' @@ -200,13 +200,17 @@ class Config(object): raise Exception() # set WinSparkle defaults - https://github.com/vslavik/winsparkle/wiki/Registry-Settings + edcdhkey = HKEY() + if RegCreateKeyEx(HKEY_CURRENT_USER, r'Software\EDCD\EDMarketConnector', 0, None, 0, KEY_ALL_ACCESS, None, ctypes.byref(edcdhkey), ctypes.byref(disposition)): + raise Exception() + sparklekey = HKEY() - if not RegCreateKeyEx(self.hkey, 'WinSparkle', 0, None, 0, KEY_ALL_ACCESS, None, ctypes.byref(sparklekey), ctypes.byref(disposition)): + if not RegCreateKeyEx(edcdhkey, 'WinSparkle', 0, None, 0, KEY_ALL_ACCESS, None, ctypes.byref(sparklekey), ctypes.byref(disposition)): if disposition.value == REG_CREATED_NEW_KEY: buf = ctypes.create_unicode_buffer('1') RegSetValueEx(sparklekey, 'CheckForUpdates', 0, 1, buf, len(buf)*2) - buf = ctypes.create_unicode_buffer(str(update_interval)) - RegSetValueEx(sparklekey, 'UpdateInterval', 0, 1, buf, len(buf)*2) + buf = ctypes.create_unicode_buffer(str(update_interval)) + RegSetValueEx(sparklekey, 'UpdateInterval', 0, 1, buf, len(buf)*2) RegCloseKey(sparklekey) if not self.get('outdir') or not isdir(self.get('outdir')): diff --git a/docs/Releasing.md b/docs/Releasing.md index 85cc9f8d..b5ca826f 100644 --- a/docs/Releasing.md +++ b/docs/Releasing.md @@ -53,6 +53,17 @@ There are other things that you should probably change, but can get away with le 1. appversion: The current version, e.g. '3.5.0.0' 1. update_feed: The URL where the application looks for current latest version information. This URL should be hosting a renamed (so the full URL doesn't change over application versions) version of the appcast_win_.xml file. The original upstream value is `https://marginal.org.uk/edmarketconnector.xml` +Pre-Packaging Steps +=== +Before you create a new install each time you should: + +1. Ensure the data sourced from coriolis.io is up to date and works: + 1. Update the `coriolis-data` repo. + 1. Run `coriolis.py` to update `modules.p` and `ships.p` + 1. XXX: Test ? +1. Ensure translations are up to date, see [Translations.md](Translations.md). +1. Increase `appversion` in `config.py` to reflect the changes. See ['Version conventions' in Contributing.md](https://github.com/EDCD/EDMarketConnector/blob/develop/Contributing.md#version-conventions). + Packaging & Installer Generation --- You'll want to do the .exe and .msi generation in a `cmd.exe` window, not e.g. a 'Git bash' window. diff --git a/docs/Translations.md b/docs/Translations.md index 678a998b..cdd2b63f 100644 --- a/docs/Translations.md +++ b/docs/Translations.md @@ -73,19 +73,43 @@ Adding a New Language === To add a new language to the app: -1. open [EDMarketConnector - Miscellaneous Manage Languages](https://marginal.oneskyapp.com/admin/project/languages/project/52710) -1. Search for the language. -1. Ensure you have the correct one if there are variants. -1. Click the `+` on the right hand side to add the language. +1. Add it to the OneSkyApp project: + 1. open [EDMarketConnector - Miscellaneous Manage Languages](https://marginal.oneskyapp.com/admin/project/languages/project/52710) + 1. Search for the language. + 1. Ensure you have the correct one if there are variants. + 1. Click the `+` on the right hand side to add the language. + 1. Be sure to go through and Finalize any phrases that shouldn't be translated. See [Translations]() in the Wiki. -Remember that until there are translations all strings will default to the English version (actually the key, which is always specified in English). + Remember that until there are translations all strings will default to the English version (actually the key, which is always specified in English). -You will also want to add it to the installer. This is simple enough, only requiring you add a number to an array in `EDMarketConnector.wxs`. +1. You need to get the new `.string` file added to the files the installer will install: + 1. Edit `EDMarketConnector.wxs` to add an appropriate section to the: + + `` + section, e.g.: + + + + ` + 1. You also need to add a line in the: + + + + section, e.g.: + + + Note how the `-` characters have been changed to `_`. If needs be run the build process once and look out for + lines like: + + \EDMarketConnector\EDMarketConnector.wxs(264) : error LGHT0204 : ICE21: Component: 'sr_Latn_BA.strings' does not belong to any Feature. + to see what the applicable string is. -1. In `EDMarketConnector.wxs` find the line beginning `Languages="1033,`, e.g. +1. You will also want to add it to the installer's languages. This is simple enough, only requiring you add a number to an array in `EDMarketConnector.wxs`. - Languages="1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,0" /> -1. Now you'll need to consult the latest [[MS-LCID]: Windows Language Code Identifier (LCID) Reference](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f) for the correct numerical code to add to the list. -1. Convert the hexadecimal Language ID to the equivalent in decimal. -1. Add the new decimal value as the last but one value in the list, keeping the `,0` at the end. -1. Update the comment on the next line to reflect what you added. + 1. In `EDMarketConnector.wxs` find the line beginning `Languages="1033,`, e.g. + + Languages="1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,0" /> + 1. Now you'll need to consult the latest [[MS-LCID]: Windows Language Code Identifier (LCID) Reference](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f) for the correct numerical code to add to the list. + 1. Convert the hexadecimal Language ID to the equivalent in decimal. + 1. Add the new decimal value as the last but one value in the list, keeping the `,0` at the end. + 1. Update the comment on the next line to reflect what you added. diff --git a/modules.p b/modules.p index e89e1d24..118464a0 100644 Binary files a/modules.p and b/modules.p differ diff --git a/monitor.py b/monitor.py index e5c8c4b2..820e2cb8 100644 --- a/monitor.py +++ b/monitor.py @@ -129,7 +129,7 @@ class EDLogs(FileSystemEventHandler): # Latest pre-existing logfile - e.g. if E:D is already running. Assumes logs sort alphabetically. # Do this before setting up the observer in case the journal directory has gone away try: - logfiles = sorted([x for x in listdir(self.currentdir) if x.startswith('Journal') and x.endswith('.log')], + logfiles = sorted([x for x in listdir(self.currentdir) if re.search('^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$', x)], key=lambda x: x.split('.')[1:]) self.logfile = logfiles and join(self.currentdir, logfiles[-1]) or None except: @@ -188,7 +188,7 @@ class EDLogs(FileSystemEventHandler): def on_created(self, event): # watchdog callback, e.g. client (re)started. - if not event.is_directory and basename(event.src_path).startswith('Journal') and basename(event.src_path).endswith('.log'): + if not event.is_directory and re.search('^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$', basename(event.src_path)): self.logfile = event.src_path def worker(self): @@ -248,7 +248,7 @@ class EDLogs(FileSystemEventHandler): else: # Poll try: - logfiles = sorted([x for x in listdir(self.currentdir) if x.startswith('Journal') and x.endswith('.log')], + logfiles = sorted([x for x in listdir(self.currentdir) if re.search('^Journal(Beta)?\.[0-9]{12}\.[0-9]{2}\.log$', x)], key=lambda x: x.split('.')[1:]) newlogfile = logfiles and join(self.currentdir, logfiles[-1]) or None except: diff --git a/theme.py b/theme.py index 515574c3..fff2daae 100644 --- a/theme.py +++ b/theme.py @@ -85,6 +85,8 @@ elif platform == 'linux': XQueryTree.argtypes = [POINTER(Display), Window, POINTER(Window), POINTER(Window), POINTER(Window), POINTER(c_uint)] XQueryTree.restype = c_int dpy = xlib.XOpenDisplay(None) + if not dpy: + raise Exception("Can't find your display, can't continue") motif_wm_hints_property = XInternAtom(dpy, b'_MOTIF_WM_HINTS', False) motif_wm_hints_normal = MotifWmHints(MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS, MWM_FUNC_RESIZE | MWM_FUNC_MOVE | MWM_FUNC_MINIMIZE | MWM_FUNC_CLOSE,