1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

Support Coriolis as an option for Ship link

Also switch to common loadout format with E:D Shipyard.
This commit is contained in:
Jonathan Harris 2016-11-22 00:52:30 +00:00
parent 8471bb3198
commit 1f6a5883b7
18 changed files with 192 additions and 118 deletions

View File

@ -422,7 +422,6 @@ class AppWindow:
# Finally - the data looks sane and we're docked at a station # Finally - the data looks sane and we're docked at a station
(station_id, has_market, has_outfitting, has_shipyard) = EDDB.station(self.system['text'], self.station['text']) (station_id, has_market, has_outfitting, has_shipyard) = EDDB.station(self.system['text'], self.station['text'])
# No EDDN output? # No EDDN output?
if (config.getint('output') & config.OUT_MKT_EDDN) and not (data['lastStarport'].get('commodities') or data['lastStarport'].get('modules')): # Ignore possibly missing shipyard info if (config.getint('output') & config.OUT_MKT_EDDN) and not (data['lastStarport'].get('commodities') or data['lastStarport'].get('modules')): # Ignore possibly missing shipyard info
if not self.status['text']: if not self.status['text']:
@ -681,7 +680,13 @@ class AppWindow:
self.status['text'] = _('Error: Server is lagging') # Raised when Companion API server is returning old data, e.g. when the servers are too busy self.status['text'] = _('Error: Server is lagging') # Raised when Companion API server is returning old data, e.g. when the servers are too busy
else: else:
self.status['text'] = '' self.status['text'] = ''
if config.getint('shipyard') == config.SHIPYARD_EDSHIPYARD:
return edshipyard.url(data) return edshipyard.url(data)
elif config.getint('shipyard') == config.SHIPYARD_CORIOLIS:
return coriolis.url(data)
else:
assert False, config.getint('shipyard')
return False
def system_url(self, text): def system_url(self, text):
return text and self.edsm.result['url'] return text and self.edsm.result['url']

View File

@ -71,10 +71,10 @@
"Competent" = "Competent"; "Competent" = "Competent";
/* Tab heading in settings. [prefs.py] */ /* Tab heading in settings. [prefs.py] */
"Configuration" = "Konfigurace"; "Configuration" = "Nastavení";
/* Update button in main window. [EDMarketConnector.py] */ /* Update button in main window. [EDMarketConnector.py] */
"cooldown {SS}s" = "Čekej {SS}s"; "cooldown {SS}s" = "Počkej ještě {SS}s";
/* As in Copy and Paste. [EDMarketConnector.py] */ /* As in Copy and Paste. [EDMarketConnector.py] */
"Copy" = "Kopírovat"; "Copy" = "Kopírovat";
@ -92,7 +92,7 @@
"Dangerous" = "Dangerous"; "Dangerous" = "Dangerous";
/* Appearance theme setting. [prefs.py] */ /* Appearance theme setting. [prefs.py] */
"Dark" = "Tmavý"; "Dark" = "Tmavé";
/* Combat rank. [stats.py] */ /* Combat rank. [stats.py] */
"Deadly" = "Deadly"; "Deadly" = "Deadly";
@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Chyba: Server je mimo provoz"; "Error: Server is down" = "Chyba: Server je mimo provoz";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Chyba: Server není dostupný"; "Error: Server is lagging" = "Chyba: Server není dostupný";
/* [companion.py] */ /* [companion.py] */
@ -194,7 +194,7 @@
"Hotkey" = "Klávesová zkratka"; "Hotkey" = "Klávesová zkratka";
/* [prefs.py] */ /* [prefs.py] */
"How do you want to be identified in the saved data" = "Zvolte identitu zobrazenou v uložených datech"; "How do you want to be identified in the saved data" = "Zvolte identitu zobrazenou v uložených dat";
/* Tab heading in settings. [prefs.py] */ /* Tab heading in settings. [prefs.py] */
"Identity" = "Identita"; "Identity" = "Identita";
@ -212,7 +212,7 @@
"Language" = "Jazyk"; "Language" = "Jazyk";
/* [EDMarketConnector.py] */ /* [EDMarketConnector.py] */
"Last updated at {HH}:{MM}:{SS}" = "Naposledy aktualizováno {HH}:{MM}:{SS}"; "Last updated at {HH}:{MM}:{SS}" = "Poslední aktualizace {HH}:{MM}:{SS}";
/* Federation rank. [stats.py] */ /* Federation rank. [stats.py] */
"Lieutenant" = "Lieutenant"; "Lieutenant" = "Lieutenant";
@ -314,7 +314,7 @@
"Please enter the code into the box below." = "Prosím, zadejte kód do pole níže."; "Please enter the code into the box below." = "Prosím, zadejte kód do pole níže.";
/* Use same text as E:D Launcher's login dialog. [prefs.py] */ /* Use same text as E:D Launcher's login dialog. [prefs.py] */
"Please log in with your Elite: Dangerous account details" = "Přihlašte se pomocí účtu Elite: Dangerous"; "Please log in with your Elite: Dangerous account details" = "Přihlaste se pomocí účtu Elite: Dangerous";
/* Federation rank. [stats.py] */ /* Federation rank. [stats.py] */
"Post Captain" = "Post Captain"; "Post Captain" = "Post Captain";
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Nastavení"; "Preferences" = "Nastavení";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Preferovaný konfigurátor";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Nastavení"; "Settings" = "Nastavení";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Loď"; "Ship" = "Loď";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Konfigurace lodi ve formátu Coriolis"; "Ship loadout" = "Konfigurace lodi";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Konfigurace lodi ve formátu E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Lodě"; "Ships" = "Lodě";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Fehler: Server nicht erreichbar"; "Error: Server is down" = "Fehler: Server nicht erreichbar";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Fehler: Server ist überlastet"; "Error: Server is lagging" = "Fehler: Server ist überlastet";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Einstellungen"; "Preferences" = "Einstellungen";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Favorisierte Werft";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prinz"; "Prince" = "Prinz";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Einstellungen"; "Settings" = "Einstellungen";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Schiff"; "Ship" = "Schiff";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Schiffsausstattung im Coriolis-Dateiformat"; "Ship loadout" = "Schiffsausstattung";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Schiffsausstattung im E:D-Shipyard-Dateiformat";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Schiffe"; "Ships" = "Schiffe";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Error: Server is down"; "Error: Server is down" = "Error: Server is down";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Error: Server is lagging"; "Error: Server is lagging" = "Error: Server is lagging";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Preferences"; "Preferences" = "Preferences";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Preferred Shipyard";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Settings"; "Settings" = "Settings";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Ship"; "Ship" = "Ship";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Ship loadout in Coriolis format file"; "Ship loadout" = "Ship loadout";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Ship loadout in E:D Shipyard format file";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Ships"; "Ships" = "Ships";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Error: El Servidor está caído"; "Error: Server is down" = "Error: El Servidor está caído";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Error: El servidor va con retraso"; "Error: Server is lagging" = "Error: El servidor va con retraso";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Preferencias"; "Preferences" = "Preferencias";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Astillero preferido";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Príncipe"; "Prince" = "Príncipe";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Configuración"; "Settings" = "Configuración";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Nave"; "Ship" = "Nave";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Equipamiento de la Nave en formato Coriolis"; "Ship loadout" = "Equipamiento de la Nave";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Equipamiento de la Nave en formato E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Naves"; "Ships" = "Naves";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Erreur : Le serveur est indisponible"; "Error: Server is down" = "Erreur : Le serveur est indisponible";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Erreur : Le serveur ne répond pas"; "Error: Server is lagging" = "Erreur : Le serveur ne répond pas";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Préférences"; "Preferences" = "Préférences";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Chantier naval préféré";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Paramètres"; "Settings" = "Paramètres";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Vaisseau"; "Ship" = "Vaisseau";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Équipements du vaisseau au format Coriolis"; "Ship loadout" = "Équipements du vaisseau";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Équipements du vaisseau au format E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Vaisseaux"; "Ships" = "Vaisseaux";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */ /* Tab heading in settings. [prefs.py] */
"Appearance" = "Aspetto"; "Appearance" = "Aspetto";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Auto-aggiornamento all'ormeggio";
/* Cmdr stats. [stats.py] */ /* Cmdr stats. [stats.py] */
"Balance" = "Saldo"; "Balance" = "Saldo";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */ /* Appearance theme and language setting. [l10n.py] */
"Default" = "Predefinito"; "Default" = "Predefinito";
/* Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2. [prefs.py] */
"Delay sending until docked" = "Ritarda l'invio fino a che si è ormeggiati";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Duke" = "Duke"; "Duke" = "Duke";
/* Location of the new Journal file in E:D 2.2. [EDMarketConnector.py] */
"E:D journal file location" = "locazione del file E:D journal";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Earl" = "Earl"; "Earl" = "Earl";
@ -139,6 +148,9 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Errore: Il Server è offline"; "Error: Server is down" = "Errore: Il Server è offline";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Errore: il server sta laggando";
/* [companion.py] */ /* [companion.py] */
"Error: Verification failed" = "Errore: fallita Verifica"; "Error: Verification failed" = "Errore: fallita Verifica";
@ -316,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Preferenze"; "Preferences" = "Preferenze";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Shipyard preferito";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */ /* Output setting. [prefs.py] */
"Send station data to the Elite Dangerous Data Network" = "Manda i dati della stazione a Elite Dangerous Data Network"; "Send station data to the Elite Dangerous Data Network" = "Manda i dati della stazione a Elite Dangerous Data Network";
/* Output setting new in E:D 2.2. [prefs.py] */
"Send system and scan data to the Elite Dangerous Data Network" = "Manda il sistema e i dati scansionati a EDDN";
/* [EDMarketConnector.py] */ /* [EDMarketConnector.py] */
"Sending data to EDDN..." = "Sto inviando i dati a EDDN..."; "Sending data to EDDN..." = "Sto inviando i dati a EDDN...";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Impostazioni"; "Settings" = "Impostazioni";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Nave"; "Ship" = "Nave";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Fit della nave in formato Coriolis"; "Ship loadout" = "Fit della nave";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Fit della nave in formato E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Navi"; "Ships" = "Navi";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "エラー: サーバがダウンしています"; "Error: Server is down" = "エラー: サーバがダウンしています";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "エラー: サーバが混雑しています"; "Error: Server is lagging" = "エラー: サーバが混雑しています";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "環境設定"; "Preferences" = "環境設定";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "行きつけの造船所";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "設定"; "Settings" = "設定";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "船"; "Ship" = "船";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "船の装備をCoriolis形式で保存する"; "Ship loadout" = "船の装備構成";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "船の装備をE:D Shipyard形式で保存する";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "所有船"; "Ships" = "所有船";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */ /* Tab heading in settings. [prefs.py] */
"Appearance" = "Izskats"; "Appearance" = "Izskats";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Automtiski atjaunoties nosēžoties.";
/* Cmdr stats. [stats.py] */ /* Cmdr stats. [stats.py] */
"Balance" = "Bilance"; "Balance" = "Bilance";
@ -62,7 +65,7 @@
"Combat" = "Combat"; "Combat" = "Combat";
/* EDSM setting. [prefs.py] */ /* EDSM setting. [prefs.py] */
"Commander Name" = "Commander vārds"; "Commander Name" = "Komandiera vārds";
/* Combat rank. [stats.py] */ /* Combat rank. [stats.py] */
"Competent" = "Competent"; "Competent" = "Competent";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */ /* Appearance theme and language setting. [l10n.py] */
"Default" = "Noklusējuma"; "Default" = "Noklusējuma";
/* Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2. [prefs.py] */
"Delay sending until docked" = "Aizkavēt sūtīšanu līdz nosēšanai";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Duke" = "Duke"; "Duke" = "Duke";
/* Location of the new Journal file in E:D 2.2. [EDMarketConnector.py] */
"E:D journal file location" = "E:D žurnāla faila atrašanās vieta";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Earl" = "Earl"; "Earl" = "Earl";
@ -139,8 +148,11 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Kļūda: Serveris nav aktīvs"; "Error: Server is down" = "Kļūda: Serveris nav aktīvs";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Kļūda: Serveris aizkavējas";
/* [companion.py] */ /* [companion.py] */
"Error: Verification failed" = "Error: Verification failed"; "Error: Verification failed" = "Kļūda: Apstiprināšana nav izdevusies";
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Exit" = "Iziet"; "Exit" = "Iziet";
@ -176,7 +188,7 @@
"Hero" = "Varonis"; "Hero" = "Varonis";
/* Dark theme color setting. [prefs.py] */ /* Dark theme color setting. [prefs.py] */
"Highlighted text" = "Highlighted text"; "Highlighted text" = "Izceltais teksts";
/* Hotkey/Shortcut settings prompt on Windows. [prefs.py] */ /* Hotkey/Shortcut settings prompt on Windows. [prefs.py] */
"Hotkey" = "Ātrais taustiņš"; "Hotkey" = "Ātrais taustiņš";
@ -254,7 +266,7 @@
"None" = "Neviens"; "None" = "Neviens";
/* Dark theme color setting. [prefs.py] */ /* Dark theme color setting. [prefs.py] */
"Normal text" = "Normal text"; "Normal text" = "Normālais teksts";
/* Combat rank. [stats.py] */ /* Combat rank. [stats.py] */
"Novice" = "Novice"; "Novice" = "Novice";
@ -316,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Iestatījumi"; "Preferences" = "Iestatījumi";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Preferred Shipyard";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -356,7 +371,7 @@
"Recruit" = "Recruit"; "Recruit" = "Recruit";
/* Menu item. [EDMarketConnector.py] */ /* Menu item. [EDMarketConnector.py] */
"Save Raw Data..." = "Glābt Sākotnējos Datus..."; "Save Raw Data..." = "Saglabāt sākotnējos datus...";
/* Explorer rank. [stats.py] */ /* Explorer rank. [stats.py] */
"Scout" = "Scout"; "Scout" = "Scout";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */ /* Output setting. [prefs.py] */
"Send station data to the Elite Dangerous Data Network" = "Sūtīt stacijas datus uz Elite Dangerous Data Network"; "Send station data to the Elite Dangerous Data Network" = "Sūtīt stacijas datus uz Elite Dangerous Data Network";
/* Output setting new in E:D 2.2. [prefs.py] */
"Send system and scan data to the Elite Dangerous Data Network" = "Sūtīt stacijas datus uz Elite Dangerous Data Network";
/* [EDMarketConnector.py] */ /* [EDMarketConnector.py] */
"Sending data to EDDN..." = "Sūta datus uz EDDN..."; "Sending data to EDDN..." = "Sūta datus uz EDDN...";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Iestatījumi"; "Settings" = "Iestatījumi";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Kuģis"; "Ship" = "Kuģis";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Kuģa loadout Coriolis formātā"; "Ship loadout" = "Kuģa loadout";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Kuģa loadout E:D Shipyard formātā";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Kuģi"; "Ships" = "Kuģi";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Fout: Server is offline"; "Error: Server is down" = "Fout: Server is offline";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Fout: Server loopt achter"; "Error: Server is lagging" = "Fout: Server loopt achter";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Preferences"; "Preferences" = "Preferences";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Voorkeurs Shipyard";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Instellingen"; "Settings" = "Instellingen";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Schip"; "Ship" = "Schip";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Schip inrichting in Coriolis bestand formaat"; "Ship loadout" = "Schip inrichting";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Schip inrichting in E:D Shipyard bestandsformaat";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Schepen"; "Ships" = "Schepen";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Błąd: Serwer padł"; "Error: Server is down" = "Błąd: Serwer padł";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Błąd: Serwer laguje"; "Error: Server is lagging" = "Błąd: Serwer laguje";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Preferencje"; "Preferences" = "Preferencje";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Preferowany Shipyard";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Ustawienia"; "Settings" = "Ustawienia";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Statek"; "Ship" = "Statek";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Wyposażenie statku w formacie Coriolis"; "Ship loadout" = "Wyposażenie statku";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Wyposażenie statku w formacie E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Statki"; "Ships" = "Statki";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Ошибка: сервер не отвечает"; "Error: Server is down" = "Ошибка: сервер не отвечает";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Ошибка: Сервер тормозит"; "Error: Server is lagging" = "Ошибка: Сервер тормозит";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Настройки"; "Preferences" = "Настройки";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Предпочтительные верфи";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Принц"; "Prince" = "Принц";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Параметры"; "Settings" = "Параметры";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Корабль"; "Ship" = "Корабль";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Оборудование корабля в формате Coriolis"; "Ship loadout" = "Оборудование корабля";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Оборудование корабля в формате E:D Shipyard";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Корабли"; "Ships" = "Корабли";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */ /* Tab heading in settings. [prefs.py] */
"Appearance" = "Videz"; "Appearance" = "Videz";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Automatically update on docking";
/* Cmdr stats. [stats.py] */ /* Cmdr stats. [stats.py] */
"Balance" = "Ravnotežje"; "Balance" = "Ravnotežje";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */ /* Appearance theme and language setting. [l10n.py] */
"Default" = "Privzeta"; "Default" = "Privzeta";
/* Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2. [prefs.py] */
"Delay sending until docked" = "Delay sending until docked";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Duke" = "Duke"; "Duke" = "Duke";
/* Location of the new Journal file in E:D 2.2. [EDMarketConnector.py] */
"E:D journal file location" = "E:D journal file location";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Earl" = "Earl"; "Earl" = "Earl";
@ -139,6 +148,9 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Napaka: Strežnik ni na voljo"; "Error: Server is down" = "Napaka: Strežnik ni na voljo";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Error: Server is lagging";
/* [companion.py] */ /* [companion.py] */
"Error: Verification failed" = "Error: Verification failed"; "Error: Verification failed" = "Error: Verification failed";
@ -316,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Nastavitve"; "Preferences" = "Nastavitve";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Preferred Shipyard";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Prince"; "Prince" = "Prince";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */ /* Output setting. [prefs.py] */
"Send station data to the Elite Dangerous Data Network" = "Pošlji podatke postaje na EDDN"; "Send station data to the Elite Dangerous Data Network" = "Pošlji podatke postaje na EDDN";
/* Output setting new in E:D 2.2. [prefs.py] */
"Send system and scan data to the Elite Dangerous Data Network" = "Send system and scan data to the Elite Dangerous Data Network";
/* [EDMarketConnector.py] */ /* [EDMarketConnector.py] */
"Sending data to EDDN..." = "Pošiljam podatke na EDDN"; "Sending data to EDDN..." = "Pošiljam podatke na EDDN";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Nastavitve"; "Settings" = "Nastavitve";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Ladja"; "Ship" = "Ladja";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Oprema ladje v Coriolis formatu"; "Ship loadout" = "Oprema ladje";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Oprema ladje v E:D Shipyard formatu";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Ladje"; "Ships" = "Ladje";

View File

@ -148,7 +148,7 @@
/* [companion.py] */ /* [companion.py] */
"Error: Server is down" = "Помилка: Сервер недосяжний!"; "Error: Server is down" = "Помилка: Сервер недосяжний!";
/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ /* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [EDMarketConnector.py] */
"Error: Server is lagging" = "Помилка: з`єднання з Сервером нетривке"; "Error: Server is lagging" = "Помилка: з`єднання з Сервером нетривке";
/* [companion.py] */ /* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */ /* [prefs.py] */
"Preferences" = "Уподобання"; "Preferences" = "Уподобання";
/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.. [prefs.py] */
"Preferred Shipyard" = "Сайт спорядження";
/* Empire rank. [stats.py] */ /* Empire rank. [stats.py] */
"Prince" = "Принц"; "Prince" = "Принц";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */ /* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Налаштування"; "Settings" = "Налаштування";
/* Status dialog subtitle. [stats.py] */ /* Main window. [EDMarketConnector.py] */
"Ship" = "Корабель"; "Ship" = "Корабель";
/* [prefs.py] */ /* Output setting. [prefs.py] */
"Ship loadout in Coriolis format file" = "Технічні дані корабля в форматі Coriolis файлу"; "Ship loadout" = "Технічні дані корабля";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Технічні дані корабля в форматі E:D Shipyard файлу";
/* Status dialog title. [stats.py] */ /* Status dialog title. [stats.py] */
"Ships" = "Кораблі"; "Ships" = "Кораблі";

View File

@ -95,10 +95,11 @@ class Config:
OUT_MKT_BPC = 2 OUT_MKT_BPC = 2
OUT_MKT_TD = 4 OUT_MKT_TD = 4
OUT_MKT_CSV = 8 OUT_MKT_CSV = 8
OUT_SHIP_EDS = 16 OUT_SHIP = 16
OUT_SHIP_EDS = 16 # Replaced by OUT_SHIP
# OUT_SYS_FILE = 32 # No longer supported # OUT_SYS_FILE = 32 # No longer supported
# OUT_STAT = 64 # No longer available # OUT_STAT = 64 # No longer available
OUT_SHIP_CORIOLIS = 128 OUT_SHIP_CORIOLIS = 128 # Replaced by OUT_SHIP
OUT_STATION_ANY = OUT_MKT_EDDN|OUT_MKT_BPC|OUT_MKT_TD|OUT_MKT_CSV|OUT_SHIP_EDS|OUT_SHIP_CORIOLIS OUT_STATION_ANY = OUT_MKT_EDDN|OUT_MKT_BPC|OUT_MKT_TD|OUT_MKT_CSV|OUT_SHIP_EDS|OUT_SHIP_CORIOLIS
OUT_SYS_EDSM = 256 OUT_SYS_EDSM = 256
# OUT_SYS_AUTO = 512 # Now always automatic # OUT_SYS_AUTO = 512 # Now always automatic
@ -106,6 +107,10 @@ class Config:
OUT_SYS_EDDN = 2048 OUT_SYS_EDDN = 2048
OUT_SYS_DELAY = 4096 OUT_SYS_DELAY = 4096
# shipyard setting
SHIPYARD_EDSHIPYARD = 0
SHIPYARD_CORIOLIS = 1
if platform=='darwin': if platform=='darwin':
def __init__(self): def __init__(self):

View File

@ -3,13 +3,16 @@
# Export ship loadout in Coriolis format # Export ship loadout in Coriolis format
# #
import base64
from collections import OrderedDict from collections import OrderedDict
import cPickle import cPickle
import json import json
import os import os
from os.path import join from os.path import join
import re import re
import StringIO
import time import time
import gzip
from config import config from config import config
import outfitting import outfitting
@ -327,7 +330,8 @@ if __name__ == "__main__":
# Test our assumption that mount and guidance don't affect mass # Test our assumption that mount and guidance don't affect mass
assert modules[key]['mass'] == m.get('mass', 0), '%s !=\n%s' % (key, m) assert modules[key]['mass'] == m.get('mass', 0), '%s !=\n%s' % (key, m)
elif grp == 'fsd': elif grp == 'fsd':
modules[key] = { 'mass' : m['mass'], modules[key] = {
'mass' : m['mass'],
'optmass' : m['optmass'], 'optmass' : m['optmass'],
'maxfuel' : m['maxfuel'], 'maxfuel' : m['maxfuel'],
'fuelmul' : m['fuelmul'], 'fuelmul' : m['fuelmul'],
@ -341,3 +345,13 @@ if __name__ == "__main__":
cPickle.dump(modules, open('modules.p', 'wb'), protocol = cPickle.HIGHEST_PROTOCOL) cPickle.dump(modules, open('modules.p', 'wb'), protocol = cPickle.HIGHEST_PROTOCOL)
# Return a URL for the current ship
def url(data):
string = json.dumps(companion.ship(data), ensure_ascii=False, sort_keys=True, separators=(',', ':')) # most compact representation
out = StringIO.StringIO()
with gzip.GzipFile(fileobj=out, mode='w') as f:
f.write(string)
return 'https://coriolis.edcd.io/import?data=' + base64.urlsafe_b64encode(out.getvalue()).replace('=', '%3D')

View File

@ -152,4 +152,4 @@ def url(data):
out = StringIO.StringIO() out = StringIO.StringIO()
with gzip.GzipFile(fileobj=out, mode='w') as f: with gzip.GzipFile(fileobj=out, mode='w') as f:
f.write(string) f.write(string)
return 'http://www.edshipyard.com/#/I=' + base64.urlsafe_b64encode(out.getvalue()) return 'http://www.edshipyard.com/#/I=' + base64.urlsafe_b64encode(out.getvalue()).replace('=', '%3D')

View File

@ -121,7 +121,7 @@ class PreferencesDialog(tk.Toplevel):
outframe = nb.Frame(notebook) outframe = nb.Frame(notebook)
outframe.columnconfigure(0, weight=1) outframe.columnconfigure(0, weight=1)
output = config.getint('output') or (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN | config.OUT_SHIP_EDS) # default settings output = config.getint('output') or (config.OUT_MKT_EDDN | config.OUT_SYS_EDDN | config.OUT_SHIP) # default settings
nb.Label(outframe, text=_('Please choose what data to save')).grid(columnspan=2, padx=PADX, sticky=tk.W) nb.Label(outframe, text=_('Please choose what data to save')).grid(columnspan=2, padx=PADX, sticky=tk.W)
self.out_csv = tk.IntVar(value = (output & config.OUT_MKT_CSV ) and 1) self.out_csv = tk.IntVar(value = (output & config.OUT_MKT_CSV ) and 1)
@ -130,10 +130,8 @@ class PreferencesDialog(tk.Toplevel):
nb.Checkbutton(outframe, text=_("Market data in Slopey's BPC format file"), variable=self.out_bpc, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W) nb.Checkbutton(outframe, text=_("Market data in Slopey's BPC format file"), variable=self.out_bpc, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
self.out_td = tk.IntVar(value = (output & config.OUT_MKT_TD ) and 1) self.out_td = tk.IntVar(value = (output & config.OUT_MKT_TD ) and 1)
nb.Checkbutton(outframe, text=_('Market data in Trade Dangerous format file'), variable=self.out_td, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W) nb.Checkbutton(outframe, text=_('Market data in Trade Dangerous format file'), variable=self.out_td, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
self.out_ship_eds= tk.IntVar(value = (output & config.OUT_SHIP_EDS) and 1) self.out_ship= tk.IntVar(value = (output & (config.OUT_SHIP|config.OUT_SHIP_EDS|config.OUT_SHIP_CORIOLIS) and 1))
nb.Checkbutton(outframe, text=_('Ship loadout in E:D Shipyard format file'), variable=self.out_ship_eds, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, pady=(5,0), sticky=tk.W) nb.Checkbutton(outframe, text=_('Ship loadout'), variable=self.out_ship, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, pady=(5,0), sticky=tk.W) # Output setting
self.out_ship_coriolis= tk.IntVar(value = (output & config.OUT_SHIP_CORIOLIS) and 1)
nb.Checkbutton(outframe, text=_('Ship loadout in Coriolis format file'), variable=self.out_ship_coriolis, command=self.outvarchanged).grid(columnspan=2, padx=BUTTONX, sticky=tk.W)
self.out_auto = tk.IntVar(value = 0 if output & config.OUT_MKT_MANUAL else 1) # inverted self.out_auto = tk.IntVar(value = 0 if output & config.OUT_MKT_MANUAL else 1) # inverted
self.out_auto_button = nb.Checkbutton(outframe, text=_('Automatically update on docking'), variable=self.out_auto, command=self.outvarchanged) # Output setting self.out_auto_button = nb.Checkbutton(outframe, text=_('Automatically update on docking'), variable=self.out_auto, command=self.outvarchanged) # Output setting
self.out_auto_button.grid(columnspan=2, padx=BUTTONX, pady=(5,0), sticky=tk.W) self.out_auto_button.grid(columnspan=2, padx=BUTTONX, pady=(5,0), sticky=tk.W)
@ -164,7 +162,7 @@ class PreferencesDialog(tk.Toplevel):
self.eddn_system_button = nb.Checkbutton(eddnframe, text=_('Send system and scan data to the Elite Dangerous Data Network'), variable=self.eddn_system, command=self.outvarchanged) # Output setting new in E:D 2.2 self.eddn_system_button = nb.Checkbutton(eddnframe, text=_('Send system and scan data to the Elite Dangerous Data Network'), variable=self.eddn_system, command=self.outvarchanged) # Output setting new in E:D 2.2
self.eddn_system_button.grid(padx=BUTTONX, pady=(5,0), sticky=tk.W) self.eddn_system_button.grid(padx=BUTTONX, pady=(5,0), sticky=tk.W)
self.eddn_delay= tk.IntVar(value = (output & config.OUT_SYS_DELAY) and 1) self.eddn_delay= tk.IntVar(value = (output & config.OUT_SYS_DELAY) and 1)
self.eddn_delay_button = nb.Checkbutton(eddnframe, text=_('Delay sending until docked'), variable=self.eddn_delay, command=self.outvarchanged) # Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2 self.eddn_delay_button = nb.Checkbutton(eddnframe, text=_('Delay sending until docked'), variable=self.eddn_delay) # Output setting under 'Send system and scan data to the Elite Dangerous Data Network' new in E:D 2.2
self.eddn_delay_button.grid(padx=BUTTONX, sticky=tk.W) self.eddn_delay_button.grid(padx=BUTTONX, sticky=tk.W)
notebook.add(eddnframe, text='EDDN') # Not translated notebook.add(eddnframe, text='EDDN') # Not translated
@ -249,6 +247,13 @@ class PreferencesDialog(tk.Toplevel):
self.hotkey_play_btn = nb.Checkbutton(configframe, text=_('Play sound'), variable=self.hotkey_play, state = self.hotkey_code and tk.NORMAL or tk.DISABLED) # Hotkey/Shortcut setting self.hotkey_play_btn = nb.Checkbutton(configframe, text=_('Play sound'), variable=self.hotkey_play, state = self.hotkey_code and tk.NORMAL or tk.DISABLED) # Hotkey/Shortcut setting
self.hotkey_play_btn.grid(columnspan=3, padx=PADX, sticky=tk.W) self.hotkey_play_btn.grid(columnspan=3, padx=PADX, sticky=tk.W)
ttk.Separator(configframe, orient=tk.HORIZONTAL).grid(columnspan=3, padx=PADX, pady=PADY*8, sticky=tk.EW)
nb.Label(configframe, text=_('Preferred Shipyard')).grid(columnspan=3, padx=PADX, sticky=tk.W) # Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis.
self.shipyard = tk.IntVar(value = config.getint('shipyard'))
nb.Radiobutton(configframe, text='E:D Shipyard', variable=self.shipyard, value=config.SHIPYARD_EDSHIPYARD).grid(columnspan=3, padx=BUTTONX, pady=(5,0), sticky=tk.W)
nb.Radiobutton(configframe, text='Coriolis', variable=self.shipyard, value=config.SHIPYARD_CORIOLIS ).grid(columnspan=3, padx=BUTTONX, sticky=tk.W)
nb.Label(configframe).grid(sticky=tk.W) # big spacer
notebook.add(configframe, text=_('Configuration')) # Tab heading in settings notebook.add(configframe, text=_('Configuration')) # Tab heading in settings
self.languages = Translations().available_names() self.languages = Translations().available_names()
@ -316,7 +321,7 @@ class PreferencesDialog(tk.Toplevel):
logdir = self.logdir.get() logdir = self.logdir.get()
logvalid = logdir and exists(logdir) logvalid = logdir and exists(logdir)
local = self.out_bpc.get() or self.out_td.get() or self.out_csv.get() or self.out_ship_eds.get() or self.out_ship_coriolis.get() local = self.out_bpc.get() or self.out_td.get() or self.out_csv.get() or self.out_ship.get()
self.out_auto_button['state'] = local and logvalid and not monitor.is_beta and tk.NORMAL or tk.DISABLED self.out_auto_button['state'] = local and logvalid and not monitor.is_beta and tk.NORMAL or tk.DISABLED
self.outdir_label['state'] = local and tk.NORMAL or tk.DISABLED self.outdir_label['state'] = local and tk.NORMAL or tk.DISABLED
self.outbutton['state'] = local and tk.NORMAL or tk.DISABLED self.outbutton['state'] = local and tk.NORMAL or tk.DISABLED
@ -471,8 +476,7 @@ class PreferencesDialog(tk.Toplevel):
(self.out_td.get() and config.OUT_MKT_TD) + (self.out_td.get() and config.OUT_MKT_TD) +
(self.out_csv.get() and config.OUT_MKT_CSV) + (self.out_csv.get() and config.OUT_MKT_CSV) +
(config.OUT_MKT_MANUAL if not self.out_auto.get() else 0) + (config.OUT_MKT_MANUAL if not self.out_auto.get() else 0) +
(self.out_ship_eds.get() and config.OUT_SHIP_EDS) + (self.out_ship.get() and config.OUT_SHIP) +
(self.out_ship_coriolis.get() and config.OUT_SHIP_CORIOLIS) +
(self.eddn_station.get() and config.OUT_MKT_EDDN) + (self.eddn_station.get() and config.OUT_MKT_EDDN) +
(self.eddn_system.get() and config.OUT_SYS_EDDN) + (self.eddn_system.get() and config.OUT_SYS_EDDN) +
(self.eddn_delay.get() and config.OUT_SYS_DELAY) + (self.eddn_delay.get() and config.OUT_SYS_DELAY) +
@ -492,6 +496,7 @@ class PreferencesDialog(tk.Toplevel):
config.set('hotkey_mods', self.hotkey_mods) config.set('hotkey_mods', self.hotkey_mods)
config.set('hotkey_always', int(not self.hotkey_only.get())) config.set('hotkey_always', int(not self.hotkey_only.get()))
config.set('hotkey_mute', int(not self.hotkey_play.get())) config.set('hotkey_mute', int(not self.hotkey_play.get()))
config.set('shipyard', self.shipyard.get())
lang_codes = { v: k for k, v in self.languages.iteritems() } # Codes by name lang_codes = { v: k for k, v in self.languages.iteritems() } # Codes by name
config.set('language', lang_codes.get(self.lang.get()) or '') config.set('language', lang_codes.get(self.lang.get()) or '')