1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 07:47:14 +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
(station_id, has_market, has_outfitting, has_shipyard) = EDDB.station(self.system['text'], self.station['text'])
# 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 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
else:
self.status['text'] = ''
return edshipyard.url(data)
if config.getint('shipyard') == config.SHIPYARD_EDSHIPYARD:
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):
return text and self.edsm.result['url']

View File

@ -71,10 +71,10 @@
"Competent" = "Competent";
/* Tab heading in settings. [prefs.py] */
"Configuration" = "Konfigurace";
"Configuration" = "Nastavení";
/* 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] */
"Copy" = "Kopírovat";
@ -92,7 +92,7 @@
"Dangerous" = "Dangerous";
/* Appearance theme setting. [prefs.py] */
"Dark" = "Tmavý";
"Dark" = "Tmavé";
/* Combat rank. [stats.py] */
"Deadly" = "Deadly";
@ -148,7 +148,7 @@
/* [companion.py] */
"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ý";
/* [companion.py] */
@ -194,7 +194,7 @@
"Hotkey" = "Klávesová zkratka";
/* [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] */
"Identity" = "Identita";
@ -212,7 +212,7 @@
"Language" = "Jazyk";
/* [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] */
"Lieutenant" = "Lieutenant";
@ -314,7 +314,7 @@
"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] */
"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] */
"Post Captain" = "Post Captain";
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Nastavení";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Loď";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Konfigurace lodi ve formátu Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Konfigurace lodi ve formátu E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Konfigurace lodi";
/* Status dialog title. [stats.py] */
"Ships" = "Lodě";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prinz";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Einstellungen";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Schiff";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Schiffsausstattung im Coriolis-Dateiformat";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Schiffsausstattung im E:D-Shipyard-Dateiformat";
/* Output setting. [prefs.py] */
"Ship loadout" = "Schiffsausstattung";
/* Status dialog title. [stats.py] */
"Ships" = "Schiffe";

View File

@ -148,7 +148,7 @@
/* [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] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Settings";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Ship";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Ship loadout in Coriolis format file";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Ship loadout in E:D Shipyard format file";
/* Output setting. [prefs.py] */
"Ship loadout" = "Ship loadout";
/* Status dialog title. [stats.py] */
"Ships" = "Ships";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Príncipe";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Configuración";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Nave";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Equipamiento de la Nave en formato Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Equipamiento de la Nave en formato E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Equipamiento de la Nave";
/* Status dialog title. [stats.py] */
"Ships" = "Naves";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Paramètres";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Vaisseau";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Équipements du vaisseau au format Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Équipements du vaisseau au format E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Équipements du vaisseau";
/* Status dialog title. [stats.py] */
"Ships" = "Vaisseaux";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */
"Appearance" = "Aspetto";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Auto-aggiornamento all'ormeggio";
/* Cmdr stats. [stats.py] */
"Balance" = "Saldo";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */
"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] */
"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] */
"Earl" = "Earl";
@ -139,6 +148,9 @@
/* [companion.py] */
"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] */
"Error: Verification failed" = "Errore: fallita Verifica";
@ -316,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */
"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] */
"Sending data to EDDN..." = "Sto inviando i dati a EDDN...";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Impostazioni";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Nave";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Fit della nave in formato Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Fit della nave in formato E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Fit della nave";
/* Status dialog title. [stats.py] */
"Ships" = "Navi";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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" = "エラー: サーバが混雑しています";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "設定";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "船";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "船の装備をCoriolis形式で保存する";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "船の装備をE:D Shipyard形式で保存する";
/* Output setting. [prefs.py] */
"Ship loadout" = "船の装備構成";
/* Status dialog title. [stats.py] */
"Ships" = "所有船";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */
"Appearance" = "Izskats";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Automtiski atjaunoties nosēžoties.";
/* Cmdr stats. [stats.py] */
"Balance" = "Bilance";
@ -62,7 +65,7 @@
"Combat" = "Combat";
/* EDSM setting. [prefs.py] */
"Commander Name" = "Commander vārds";
"Commander Name" = "Komandiera vārds";
/* Combat rank. [stats.py] */
"Competent" = "Competent";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */
"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] */
"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] */
"Earl" = "Earl";
@ -139,8 +148,11 @@
/* [companion.py] */
"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] */
"Error: Verification failed" = "Error: Verification failed";
"Error: Verification failed" = "Kļūda: Apstiprināšana nav izdevusies";
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Exit" = "Iziet";
@ -176,7 +188,7 @@
"Hero" = "Varonis";
/* Dark theme color setting. [prefs.py] */
"Highlighted text" = "Highlighted text";
"Highlighted text" = "Izceltais teksts";
/* Hotkey/Shortcut settings prompt on Windows. [prefs.py] */
"Hotkey" = "Ātrais taustiņš";
@ -254,7 +266,7 @@
"None" = "Neviens";
/* Dark theme color setting. [prefs.py] */
"Normal text" = "Normal text";
"Normal text" = "Normālais teksts";
/* Combat rank. [stats.py] */
"Novice" = "Novice";
@ -316,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -356,7 +371,7 @@
"Recruit" = "Recruit";
/* 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] */
"Scout" = "Scout";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */
"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] */
"Sending data to EDDN..." = "Sūta datus uz EDDN...";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Iestatījumi";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Kuģis";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Kuģa loadout Coriolis formātā";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Kuģa loadout E:D Shipyard formātā";
/* Output setting. [prefs.py] */
"Ship loadout" = "Kuģa loadout";
/* Status dialog title. [stats.py] */
"Ships" = "Kuģi";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Instellingen";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Schip";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Schip inrichting in Coriolis bestand formaat";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Schip inrichting in E:D Shipyard bestandsformaat";
/* Output setting. [prefs.py] */
"Ship loadout" = "Schip inrichting";
/* Status dialog title. [stats.py] */
"Ships" = "Schepen";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Ustawienia";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Statek";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Wyposażenie statku w formacie Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Wyposażenie statku w formacie E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Wyposażenie statku";
/* Status dialog title. [stats.py] */
"Ships" = "Statki";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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" = "Ошибка: Сервер тормозит";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Принц";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Параметры";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Корабль";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Оборудование корабля в формате Coriolis";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Оборудование корабля в формате E:D Shipyard";
/* Output setting. [prefs.py] */
"Ship loadout" = "Оборудование корабля";
/* Status dialog title. [stats.py] */
"Ships" = "Корабли";

View File

@ -25,6 +25,9 @@
/* Tab heading in settings. [prefs.py] */
"Appearance" = "Videz";
/* Output setting. [prefs.py] */
"Automatically update on docking" = "Automatically update on docking";
/* Cmdr stats. [stats.py] */
"Balance" = "Ravnotežje";
@ -100,9 +103,15 @@
/* Appearance theme and language setting. [l10n.py] */
"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] */
"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] */
"Earl" = "Earl";
@ -139,6 +148,9 @@
/* [companion.py] */
"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] */
"Error: Verification failed" = "Error: Verification failed";
@ -316,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Prince";
@ -370,6 +385,9 @@
/* Output setting. [prefs.py] */
"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] */
"Sending data to EDDN..." = "Pošiljam podatke na EDDN";
@ -382,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Nastavitve";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Ladja";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Oprema ladje v Coriolis formatu";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Oprema ladje v E:D Shipyard formatu";
/* Output setting. [prefs.py] */
"Ship loadout" = "Oprema ladje";
/* Status dialog title. [stats.py] */
"Ships" = "Ladje";

View File

@ -148,7 +148,7 @@
/* [companion.py] */
"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" = "Помилка: з`єднання з Сервером нетривке";
/* [companion.py] */
@ -328,6 +328,9 @@
/* [prefs.py] */
"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] */
"Prince" = "Принц";
@ -397,14 +400,11 @@
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Settings" = "Налаштування";
/* Status dialog subtitle. [stats.py] */
/* Main window. [EDMarketConnector.py] */
"Ship" = "Корабель";
/* [prefs.py] */
"Ship loadout in Coriolis format file" = "Технічні дані корабля в форматі Coriolis файлу";
/* [prefs.py] */
"Ship loadout in E:D Shipyard format file" = "Технічні дані корабля в форматі E:D Shipyard файлу";
/* Output setting. [prefs.py] */
"Ship loadout" = "Технічні дані корабля";
/* Status dialog title. [stats.py] */
"Ships" = "Кораблі";

View File

@ -95,10 +95,11 @@ class Config:
OUT_MKT_BPC = 2
OUT_MKT_TD = 4
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_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_SYS_EDSM = 256
# OUT_SYS_AUTO = 512 # Now always automatic
@ -106,6 +107,10 @@ class Config:
OUT_SYS_EDDN = 2048
OUT_SYS_DELAY = 4096
# shipyard setting
SHIPYARD_EDSHIPYARD = 0
SHIPYARD_CORIOLIS = 1
if platform=='darwin':
def __init__(self):

View File

@ -3,13 +3,16 @@
# Export ship loadout in Coriolis format
#
import base64
from collections import OrderedDict
import cPickle
import json
import os
from os.path import join
import re
import StringIO
import time
import gzip
from config import config
import outfitting
@ -327,11 +330,12 @@ if __name__ == "__main__":
# Test our assumption that mount and guidance don't affect mass
assert modules[key]['mass'] == m.get('mass', 0), '%s !=\n%s' % (key, m)
elif grp == 'fsd':
modules[key] = { 'mass' : m['mass'],
'optmass' : m['optmass'],
'maxfuel' : m['maxfuel'],
'fuelmul' : m['fuelmul'],
'fuelpower' : m['fuelpower'],
modules[key] = {
'mass' : m['mass'],
'optmass' : m['optmass'],
'maxfuel' : m['maxfuel'],
'fuelmul' : m['fuelmul'],
'fuelpower' : m['fuelpower'],
}
else:
modules[key] = { 'mass': m.get('mass', 0) } # Some modules don't have mass
@ -341,3 +345,13 @@ if __name__ == "__main__":
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()
with gzip.GzipFile(fileobj=out, mode='w') as f:
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.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)
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)
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)
self.out_ship_eds= tk.IntVar(value = (output & config.OUT_SHIP_EDS) 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)
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_ship= tk.IntVar(value = (output & (config.OUT_SHIP|config.OUT_SHIP_EDS|config.OUT_SHIP_CORIOLIS) and 1))
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_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.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.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_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)
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.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
self.languages = Translations().available_names()
@ -316,7 +321,7 @@ class PreferencesDialog(tk.Toplevel):
logdir = self.logdir.get()
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.outdir_label['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_csv.get() and config.OUT_MKT_CSV) +
(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_coriolis.get() and config.OUT_SHIP_CORIOLIS) +
(self.out_ship.get() and config.OUT_SHIP) +
(self.eddn_station.get() and config.OUT_MKT_EDDN) +
(self.eddn_system.get() and config.OUT_SYS_EDDN) +
(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_always', int(not self.hotkey_only.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
config.set('language', lang_codes.get(self.lang.get()) or '')