From a1abb46ff5d4d17504fc1e1b14f4321a4305d57b Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 13:37:27 +0100 Subject: [PATCH 01/22] l10n script: Fix/add some args help --- scripts/find_localised_strings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index b62ddd78..78f46157 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -270,8 +270,8 @@ if __name__ == '__main__': parser.add_argument('--ignore', action='append', help='directories to ignore', default=['venv', '.git']) group = parser.add_mutually_exclusive_group() group.add_argument('--json', action='store_true', help='JSON output') - group.add_argument('--lang', action='store_true', help='lang file outpot') - group.add_argument('--compare-lang') + group.add_argument('--lang', action='store_true', help='en.template "strings" output') + group.add_argument('--compare-lang', help='en.template file to compare against') args = parser.parse_args() From 1b3046a4f9ddad288f3522ec89d9e6d146d56c57 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:07:44 +0100 Subject: [PATCH 02/22] l10n script: Fix comparison for picking up 'before' LANG comments --- scripts/find_localised_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 78f46157..7b38aa1e 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -68,7 +68,7 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op above = call.lineno - 2 current = call.lineno - 1 - above_line = lines[above].strip() if len(lines) < above else None + above_line = lines[above].strip() if len(lines) >= above else None current_line = lines[current].strip() for line in (above_line, current_line): From 87ff0b08a1f6a2f21b58a762a48fc62380f68a72 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:17:28 +0100 Subject: [PATCH 03/22] Translations: Full phrase "Error: Check E:D journal file location" --- EDMarketConnector.py | 3 ++- L10n/en.template | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 4fc058ff..be6c59c3 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -694,7 +694,8 @@ class AppWindow(object): # (Re-)install log monitoring if not monitor.start(self.w): - self.status['text'] = f'Error: {_("Check")} {_("E:D journal file location")}' + # LANG: ED Journal file location appears to be in error + self.status['text'] = _('Error: Check E:D journal file location') if dologin and monitor.cmdr: self.login() # Login if not already logged in with this Cmdr diff --git a/L10n/en.template b/L10n/en.template index b6afcaae..018742e5 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -589,6 +589,9 @@ /* Label for 'UI Scaling' option [prefs.py] */ "UI Scale Percentage" = "UI Scale Percentage"; +/* EDMarketConnector.py: ED Journal file location appears to be in error; In files: EDMarketConnector.py:698; */ +"Error: Check E:D journal file location" = "Error: Check E:D journal file location"; + /* General 'Unknown', e.g. suit loadout */ "Unknown" = "Unknown"; From 6d0f5259d025517287ed9e78822ec75befe041f3 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:22:33 +0100 Subject: [PATCH 04/22] Translations: Use script-provided version This loads in to EDMarketConnector.py without errors, and a quick check of German in Settings appeared to show all of the correct translations. --- L10n/en.template | 1183 +++++++++++++++++++++++----------------------- 1 file changed, 584 insertions(+), 599 deletions(-) diff --git a/L10n/en.template b/L10n/en.template index 018742e5..9831bb13 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -1,635 +1,620 @@ -/* Coriolis override modes [plugins/coriolis.py] */ -"Normal" = "Normal"; - -/* Coriolis override modes [plugins/coriolis.py] */ -"Beta" = "Beta"; - -/* Coriolis override modes [plugins/coriolis.py] */ -"Auto" = "Auto"; - -/* Coriolis override label [plugins/coriolis.py] */ -"Override Beta/Normal Selection" = "Override Beta/Normal Selection"; - -/* Coriolis reset buttons [plugins/coriolis.py] */ -"Reset" = "Reset"; - -/* Coriolis Normal URL label [plugins/coriolis.py] */ -"Normal URL" = "Normal URL"; - -/* Coriolis Beta URL label [plugins/coriolis.py] */ -"Beta URL" = "Beta URL"; - -/* Coriolis config title label [plugins/coriolis.py] */ -"Set the URL to use with coriolis.io ship loadouts. Note that this MUST end with '/import?data='" = "Set the URL to use with coriolis.io ship loadouts. Note that this MUST end with '/import?data='"; - -/* Coriolis invalid mode warning [plugins/coriolis.py] */ -"Invalid Coriolis override mode!" = "Invalid Coriolis override mode!"; -/* Language name */ -"!Language" = "English"; - -/* Message next to 'UI Transparency' slider [prefs.py] */ -"100 means fully opaque.{CR}Window is updated in real time" = "100 means fully opaque.{CR}Window is updated in real time"; - -/* Text describing that value '100' means 'default', and changes require a restart [prefs.py] */ -"100 means Default{CR}Restart Required for{CR}changes to take effect!" = "100 means Default{CR}Restart Required for{CR}changes to take effect!"; - -/* App menu entry on OSX. [EDMarketConnector.py] */ -"About {APP}" = "About {APP}"; - -/* Federation rank. [stats.py] */ -"Admiral" = "Admiral"; - -/* Explorer rank. [stats.py] */ -"Aimless" = "Aimless"; - -/* Appearance setting. [EDMarketConnector.py] */ -"Always on top" = "Always on top"; - -/* CQC rank. [stats.py] */ -"Amateur" = "Amateur"; - -/* EDSM setting. [edsm.py] */ -"API Key" = "API Key"; - -/* Tab heading in settings. [prefs.py] */ -"Appearance" = "Appearance"; - -/* Successfully authenticated with the Frontier website. [EDMarketConnector.py] */ -"Authentication successful" = "Authentication successful"; - -/* Output setting. [prefs.py] */ -"Automatically update on docking" = "Automatically update on docking"; - -/* 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..." = "Browse..."; - -/* Federation rank. [stats.py] */ -"Cadet" = "Cadet"; - -/* No 'commander' data in CAPI [EDMarketConnector.py] */ -"CAPI: No commander data returned" = "CAPI: No commander data returned"; - -/* CQC rank. [stats.py] */ -"Champion" = "Champion"; - -/* Folder selection button on OSX. [prefs.py] */ -"Change..." = "Change..."; - -/* Generic 'Check', as in 'Check E:D journal file location' [EDMarketConnector.py] */ -"Check" = "Check"; - -/* Menu item. [EDMarketConnector.py] */ -"Check for Updates..." = "Check for Updates..."; - -/* 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" = "Commander Name"; - -/* Combat rank. [stats.py] */ -"Competent" = "Competent"; - -/* Tab heading in settings. [prefs.py] */ -"Configuration" = "Configuration"; - -/* Update button in main window. [EDMarketConnector.py] */ -"cooldown {SS}s" = "cooldown {SS}s"; - -/* As in Copy and Paste. [EDMarketConnector.py] */ -"Copy" = "Copy"; - -/* Empire rank. [stats.py] */ -"Count" = "Count"; - -/* Ranking. [stats.py] */ -"CQC" = "CQC"; - -/* Combat rank. [stats.py] */ -"Dangerous" = "Dangerous"; - -/* Appearance theme setting. [prefs.py] */ -"Dark" = "Dark"; - -/* Combat rank. [stats.py] */ -"Deadly" = "Deadly"; - -/* Trade rank. [stats.py] */ -"Dealer" = "Dealer"; - -/* Appearance theme and language setting. [l10n.py] */ -"Default" = "Default"; - -/* 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" = "Delay sending until docked"; - -/* Option to disabled Automatic Check For Updates whilst in-game [prefs.py] */ -"Disable Automatic Application Updates Check when in-game" = "Disable Automatic Application Updates Check when in-game"; - -/* List of plugins in settings. [prefs.py] */ -"Disabled Plugins" = "Disabled Plugins"; - -/* Help menu item. [EDMarketConnector.py] */ -"Documentation" = "Documentation"; - -/* 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"; - -/* When EDDB functionality has been killswitched. [plugins/eddb.py] */ -"EDDB Journal processing disabled. See Log." = "EDDB Journal processing disabled. See Log."; - -/* When EDDN journal handling has been killswitched [plugins/eddn.py] */ -"EDDN journal handler disabled. See Log." = "EDDN journal handler disabled. See Log."; - -/* When EDSM functionality has been killswitched [plugins/edsm.py] */ -"EDSM Handler disabled. See Log." = "EDSM Handler disabled. See Log."; - -/* Empire rank. [stats.py] */ -"Earl" = "Earl"; - -/* Menu title. [EDMarketConnector.py] */ -"Edit" = "Edit"; - -/* Popup title: Warning about plugins without Python 3.x support [EDMarketConnector.py] */ -"EDMC: Plugins Without Python 3.x Support" = "EDMC: Plugins Without Python 3.x Support"; - -/* Top rank. [stats.py] */ -"Elite" = "Elite"; - -/* Section heading in settings. [edsm.py] */ -"Elite Dangerous Star Map credentials" = "Elite Dangerous Star Map credentials"; - -/* Ranking. [stats.py] */ -"Empire" = "Empire"; - -/* List of plugins in settings. [prefs.py] */ -"Enabled Plugins" = "Enabled Plugins"; - -/* Federation rank. [stats.py] */ -"Ensign" = "Ensign"; - -/* Trade rank. [stats.py] */ -"Entrepreneur" = "Entrepreneur"; - -/* [companion.py] */ -"Error" = "Error"; - -/* [eddn.py] */ -"Error: Can't connect to EDDN" = "Error: Can't connect to EDDN"; - -/* [edsm.py] */ -"Error: Can't connect to EDSM" = "Error: Can't connect to EDSM"; - -/* [inara.py] */ -"Error: Can't connect to Inara" = "Error: Can't connect to Inara"; - -/* [companion.py] */ -"Error: Couldn't check token customer_id" = "Error: Couldn't check token customer_id"; - -/* [companion.py] */ -"Error: customer_id doesn't match!" = "Error: customer_id doesn't match!"; - -/* [edsm.py] */ -"Error: EDSM {MSG}" = "Error: EDSM {MSG}"; - - -/* Raised when cannot contact the Companion API server. [companion.py] */ +/* In files: companion.py:170; */ "Error: Frontier CAPI didn't respond" = "Error: Frontier CAPI didn't respond"; -/* OLD: Raised when cannot contact the Companion API server. [companion.py] */ -"Error: Frontier server is down" = "Error: Frontier server is down"; - -/* Raised when Companion API server is returning old data, e.g. when the servers are too busy. [companion.py] */ +/* In files: companion.py:183; */ "Error: Frontier server is lagging" = "Error: Frontier server is lagging"; -/* 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] */ +/* In files: companion.py:196; */ "Error: Frontier server SKU problem" = "Error: Frontier server SKU problem"; -/* [inara.py] */ -"Error: Inara {MSG}" = "Error: Inara {MSG}"; - -/* [companion.py] */ +/* In files: companion.py:205; */ "Error: Invalid Credentials" = "Error: Invalid Credentials"; -/* [companion.py] */ -"Error: unable to get token" = "Error: unable to get token"; - -/* 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] */ +/* In files: companion.py:220; */ "Error: Wrong Cmdr" = "Error: Wrong Cmdr"; -/* Item in the File menu on Windows. [EDMarketConnector.py] */ -"Exit" = "Exit"; +/* In files: companion.py:330; companion.py:406; */ +"Error" = "Error"; -/* Combat rank. [stats.py] */ -"Expert" = "Expert"; +/* In files: companion.py:368; companion.py:372; */ +"Error: Couldn't check token customer_id" = "Error: Couldn't check token customer_id"; -/* Ranking. [stats.py] */ -"Explorer" = "Explorer"; +/* In files: companion.py:377; */ +"Error: customer_id doesn't match!" = "Error: customer_id doesn't match!"; -/* Ranking. [stats.py] */ -"Federation" = "Federation"; +/* In files: companion.py:398; */ +"Error: unable to get token" = "Error: unable to get token"; -/* [EDMarketConnector.py] */ -"Fetching data..." = "Fetching data..."; - -/* Multicrew role. [EDMarketConnector.py] */ -"Fighter" = "Fighter"; - -/* Menu title. [EDMarketConnector.py] */ -"File" = "File"; - -/* Section heading in settings. [prefs.py] */ -"File location" = "File location"; - -/* Failures to access Frontier CAPI endpoints [companion.py] */ +/* In files: companion.py:542; */ "Frontier CAPI query failure" = "Frontier CAPI query failure"; -/* Server errors from Frontier CAPI server [companion.py] */ +/* In files: companion.py:557; */ "Frontier CAPI server error" = "Frontier CAPI server error"; -/* CQC rank. [stats.py] */ -"Gladiator" = "Gladiator"; +/* EDMarketConnector.py: Update button in main window; In files: EDMarketConnector.py:418; EDMarketConnector.py:711; EDMarketConnector.py:1259; */ +"Update" = "Update"; -/* Multicrew role. [EDMarketConnector.py] */ -"Gunner" = "Gunner"; +/* In files: EDMarketConnector.py:500; prefs.py:788; */ +"Always on top" = "Always on top"; -/* Combat rank. [stats.py] */ -"Harmless" = "Harmless"; - -/* Multicrew role. [EDMarketConnector.py] */ -"Helm" = "Helm"; - -/* Menu title. [EDMarketConnector.py] */ -"Help" = "Help"; - -/* CQC rank. [stats.py] */ -"Helpless" = "Helpless"; - -/* CQC rank. [stats.py] */ -"Hero" = "Hero"; - -/* Dark theme color setting. [prefs.py] */ -"Highlighted text" = "Highlighted text"; - -/* Hotkey/Shortcut settings prompt on Windows. [prefs.py] */ -"Hotkey" = "Hotkey"; - -/* Changed journal update_lock failed [monitor.py] */ -"Ignore" = "Ignore"; - -/* Section heading in settings. [inara.py] */ -"Inara credentials" = "Inara credentials"; - -/* When Inara support has been killswitched [plugins/inara.py] */ -"Inara disabled. See Log." = "Inara disabled. See Log."; - -/* Settings>Plugins>Information on migrating plugins [prefs.py] */ -"Information on migrating plugins" = "Information on migrating plugins"; - -/* Changed journal update_lock failed [monitor.py] */ -"Journal directory already locked" = "Journal directory already locked"; - -/* Hotkey/Shortcut settings prompt on OSX. [prefs.py] */ -"Keyboard shortcut" = "Keyboard shortcut"; - -/* Empire rank. [stats.py] */ -"King" = "King"; - -/* Empire rank. [stats.py] */ -"Knight" = "Knight"; - -/* Appearance setting prompt. [prefs.py] */ -"Language" = "Language"; - -/* [EDMarketConnector.py] - Leave '%H:%M:%S' as-is */ -"Last updated at %H:%M:%S" = "Last updated at %H:%M:%S"; - -/* Federation rank. [stats.py] */ -"Lieutenant" = "Lieutenant"; - -/* Federation rank. [stats.py] */ -"Lieutenant Commander" = "Lieutenant Commander"; - -/* Cmdr stats. [stats.py] */ -"Loan" = "Loan"; - -/* Label for user configured level of logging [prefs.py] */ -"Log Level" = "Log Level"; - -/* [EDMarketConnector.py] */ -"Logging in..." = "Logging in..."; - -/* Empire rank. [stats.py] */ -"Lord" = "Lord"; - -/* Label for 'UI Transparency' option in [prefs.py] */ -"Main window transparency" = "Main window transparency"; - -/* [prefs.py] */ -"Market data in CSV format file" = "Market data in CSV format file"; - -/* [prefs.py] */ -"Market data in Trade Dangerous format file" = "Market data in Trade Dangerous format file"; - -/* Empire rank. [stats.py] */ -"Marquis" = "Marquis"; - -/* Combat rank. [stats.py] */ -"Master" = "Master"; - -/* Trade rank. [stats.py] */ -"Merchant" = "Merchant"; - -/* Federation rank. [stats.py] */ -"Midshipman" = "Midshipman"; - -/* Appearance setting. [EDMarketConnector.py] */ -"Minimize to system tray" = "Minimize to system tray"; - -/* 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" = "None"; - -/* Dark theme color setting. [prefs.py] */ -"Normal text" = "Normal text"; - -/* Combat rank. [stats.py] */ -"Novice" = "Novice"; - -/* [prefs.py] */ -"OK" = "OK"; - -/* 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." = "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."; - -/* Hotkey/Shortcut setting. [prefs.py] */ -"Only when Elite: Dangerous is the active app" = "Only when Elite: Dangerous is the active app"; - -/* Button that opens a folder in Explorer/Finder. [prefs.py] */ -"Open" = "Open"; - -/* Shortcut settings button on OSX. [prefs.py] */ -"Open System Preferences" = "Open System Preferences"; - -/* 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" = "Play sound"; - -/* [prefs.py] */ -"Please choose what data to save" = "Please choose what data to save"; - -/* Tab heading in settings. [prefs.py] */ -"Plugins" = "Plugins"; - -/* Section heading in settings. [prefs.py] */ -"Plugins folder" = "Plugins folder"; - -/* Settings>Plugins>Plugins without Python 3.x support [prefs.py] */ -"Plugins Without Python 3.x Support:" = "Plugins Without Python 3.x Support:"; - -/* Federation rank. [stats.py] */ -"Post Captain" = "Post Captain"; - -/* Federation rank. [stats.py] */ -"Post Commander" = "Post Commander"; - -/* Ranking. [stats.py] */ -"Powerplay" = "Powerplay"; - -/* [prefs.py] */ -"Preferences" = "Preferences"; - -/* Settings prompt for preferred ship loadout, system and station info websites. [prefs.py] */ -"Preferred websites" = "Preferred websites"; - -/* 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" = "Re-start {APP} to use shortcuts"; - -/* Federation rank. [stats.py] */ -"Rear Admiral" = "Rear Admiral"; - -/* Federation rank. [stats.py] */ -"Recruit" = "Recruit"; - -/* Help menu item. [EDMarketConnector.py] */ -"Release Notes" = "Release Notes"; - -/* Changed journal update_lock failed [monitor.py] */ -"Retry" = "Retry"; - -/* Multicrew role label in main window. [EDMarketConnector.py] */ -"Role" = "Role"; - -/* Menu item. [EDMarketConnector.py] */ -"Save Raw Data..." = "Save Raw 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" = "Send flight log and Cmdr status to EDSM"; - -/* [inara.py] */ -"Send flight log and Cmdr status to Inara" = "Send flight log and Cmdr status to Inara"; - -/* Output setting. [eddn.py] */ -"Send station data to the Elite Dangerous Data Network" = "Send station data to the 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" = "Send system and scan data to the Elite Dangerous Data Network"; - -/* [eddn.py] */ -"Sending data to EDDN..." = "Sending data to EDDN..."; - -/* Empire rank. [stats.py] */ -"Serf" = "Serf"; - -/* Item in the File menu on Windows. [EDMarketConnector.py] */ -"Settings" = "Settings"; - -/* Main window. [EDMarketConnector.py] */ -"Ship" = "Ship"; - -/* Output setting. [prefs.py] */ -"Ship loadout" = "Ship loadout"; - -/* Status dialog title. [stats.py] */ -"Ships" = "Ships"; - -/* Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis. [prefs.py] */ -"Shipyard" = "Shipyard"; - -/* Status line text that appears when process exit sequence starts [EDMarketConnector.py] */ -"Shutting down..." = "Shutting down..."; - -/* Empire rank. [stats.py] */ -"Squire" = "Squire"; - -/* Main window. [EDMarketConnector.py] */ -"Station" = "Station"; - -/* [EDMarketConnector.py] */ -"Station doesn't have a market!" = "Station doesn't have a market!"; - -/* [EDMarketConnector.py] */ -"Station doesn't have anything!" = "Station doesn't have anything!"; - -/* Menu item. [EDMarketConnector.py] */ -"Status" = "Status"; - -/* 'Suit' label in main UI' [EDMarketConnector.py] */ -"Suit" = "Suit"; - -/* Explorer rank. [stats.py] */ -"Surveyor" = "Surveyor"; - -/* Main window. [EDMarketConnector.py] */ -"System" = "System"; - -/* Changed journal update_lock failed [monitor.py] */ -"The new Journal Directory location is already locked.{CR}You can either attempt to resolve this and then Retry, or choose to Ignore this." = "The new Journal Directory location is already locked.{CR}You can either attempt to resolve this and then Retry, or choose to Ignore this."; - -/* Appearance setting. [prefs.py] */ -"Theme" = "Theme"; - -/* Help text in settings. [prefs.py] */ -"Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name" = "Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name"; - -/* Ranking. [stats.py] */ -"Trade" = "Trade"; - -/* Explorer rank. [stats.py] */ -"Trailblazer" = "Trailblazer"; - -/* Appearance theme setting. [prefs.py] */ -"Transparent" = "Transparent"; - -/* Trade rank. [stats.py] */ -"Tycoon" = "Tycoon"; - -/* Label for 'UI Scaling' option [prefs.py] */ -"UI Scale Percentage" = "UI Scale Percentage"; +/* EDMarketConnector.py: Unknown suit; In files: EDMarketConnector.py:629; */ +"Unknown" = "Unknown"; /* EDMarketConnector.py: ED Journal file location appears to be in error; In files: EDMarketConnector.py:698; */ "Error: Check E:D journal file location" = "Error: Check E:D journal file location"; -/* General 'Unknown', e.g. suit loadout */ -"Unknown" = "Unknown"; +/* EDMarketConnector.py: Main window; stats.py: Cmdr stats; In files: EDMarketConnector.py:705; edsm.py:216; stats.py:50; theme.py:226; */ +"Cmdr" = "Cmdr"; -/* Update button in main window. [EDMarketConnector.py] */ -"Update" = "Update"; +/* EDMarketConnector.py: Multicrew role label in main window; In files: EDMarketConnector.py:707; EDMarketConnector.py:1029; */ +"Role" = "Role"; -/* Option to use alternate URL method on shipyard links [prefs.py] */ -"Use alternate URL method" = "Use alternate URL method"; +/* EDMarketConnector.py: Main window; stats.py: Status dialog subtitle; In files: EDMarketConnector.py:707; EDMarketConnector.py:1039; EDMarketConnector.py:1062; stats.py:362; */ +"Ship" = "Ship"; -/* Status dialog subtitle - CR value of ship. [stats.py] */ -"Value" = "Value"; +/* EDMarketConnector.py: Main window; In files: EDMarketConnector.py:708; */ +"Suit" = "Suit"; -/* Federation rank. [stats.py] */ -"Vice Admiral" = "Vice Admiral"; +/* EDMarketConnector.py: Main window; stats.py: Main window; In files: EDMarketConnector.py:709; prefs.py:567; stats.py:364; */ +"System" = "System"; -/* Menu title on OSX. [EDMarketConnector.py] */ +/* EDMarketConnector.py: Main window; stats.py: Status dialog subtitle; In files: EDMarketConnector.py:710; prefs.py:584; prefs.py:688; stats.py:365; */ +"Station" = "Station"; + +/* EDMarketConnector.py: Menu title on OSX; EDMarketConnector.py: Menu title; EDMarketConnector.py: words for use in python 2 plugin error; In files: EDMarketConnector.py:713; EDMarketConnector.py:726; EDMarketConnector.py:729; EDMarketConnector.py:1736; */ +"File" = "File"; + +/* EDMarketConnector.py: Menu title on OSX; EDMarketConnector.py: Menu title; In files: EDMarketConnector.py:714; EDMarketConnector.py:727; EDMarketConnector.py:730; */ +"Edit" = "Edit"; + +/* EDMarketConnector.py: Menu title on OSX; In files: EDMarketConnector.py:715; */ "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?!" = "What are you flying?!"; - -/* Shouldn't happen. [EDMarketConnector.py] */ -"Where are you?!" = "Where are you?!"; - -/* Shouldn't happen. [EDMarketConnector.py] */ -"Who are you?!" = "Who are you?!"; - -/* Menu title on OSX. [EDMarketConnector.py] */ +/* EDMarketConnector.py: Menu title on OSX; In files: EDMarketConnector.py:716; */ "Window" = "Window"; -/* [EDMarketConnector.py] */ +/* EDMarketConnector.py: Menu title on OSX; EDMarketConnector.py: Menu title; In files: EDMarketConnector.py:717; EDMarketConnector.py:728; EDMarketConnector.py:731; */ +"Help" = "Help"; + +/* EDMarketConnector.py: Menu title on OSX; EDMarketConnector.py: App menu entry; In files: EDMarketConnector.py:718; EDMarketConnector.py:744; EDMarketConnector.py:1303; */ +"About {APP}" = "About {APP}"; + +/* EDMarketConnector.py: Menu item; In files: EDMarketConnector.py:720; EDMarketConnector.py:743; */ +"Check for Updates..." = "Check for Updates..."; + +/* EDMarketConnector.py: Menu item; In files: EDMarketConnector.py:721; EDMarketConnector.py:735; */ +"Save Raw Data..." = "Save Raw Data..."; + +/* EDMarketConnector.py: Menu item; stats.py: Status dialog title; In files: EDMarketConnector.py:722; EDMarketConnector.py:734; stats.py:359; */ +"Status" = "Status"; + +/* EDMarketConnector.py: Help menu item; In files: EDMarketConnector.py:723; EDMarketConnector.py:741; */ +"Privacy Policy" = "Privacy Policy"; + +/* EDMarketConnector.py: Help menu item; In files: EDMarketConnector.py:724; EDMarketConnector.py:742; EDMarketConnector.py:1336; */ +"Release Notes" = "Release Notes"; + +/* EDMarketConnector.py: Item in the File menu on Windows; EDMarketConnector.py: words for use in python 2 plugin error; In files: EDMarketConnector.py:736; EDMarketConnector.py:1736; prefs.py:248; */ +"Settings" = "Settings"; + +/* EDMarketConnector.py: Item in the File menu on Windows; In files: EDMarketConnector.py:737; */ +"Exit" = "Exit"; + +/* EDMarketConnector.py: Help menu item; In files: EDMarketConnector.py:740; */ +"Documentation" = "Documentation"; + +/* EDMarketConnector.py: As in Copy and Paste; In files: EDMarketConnector.py:747; ttkHyperlinkLabel.py:41; */ +"Copy" = "Copy"; + +/* In files: EDMarketConnector.py:752; */ +"Logging in..." = "Logging in..."; + +/* EDMarketConnector.py: Successfully authenticated with the Frontier website; In files: EDMarketConnector.py:768; EDMarketConnector.py:1172; */ +"Authentication successful" = "Authentication successful"; + +/* In files: EDMarketConnector.py:798; */ "You're not docked at a station!" = "You're not docked at a station!"; -/* Shortcut settings prompt on OSX. [prefs.py] */ +/* In files: EDMarketConnector.py:805; */ +"Station doesn't have anything!" = "Station doesn't have anything!"; + +/* In files: EDMarketConnector.py:809; */ +"Station doesn't have a market!" = "Station doesn't have a market!"; + +/* In files: EDMarketConnector.py:853; EDMarketConnector.py:1381; stats.py:278; */ +"Fetching data..." = "Fetching data..."; + +/* In files: EDMarketConnector.py:865; */ +"CAPI: No commander data returned" = "CAPI: No commander data returned"; + +/* stats.py: Unknown commander; In files: EDMarketConnector.py:868; stats.py:296; */ +"Who are you?!" = "Who are you?!"; + +/* stats.py: Unknown location; In files: EDMarketConnector.py:873; stats.py:306; */ +"Where are you?!" = "Where are you?!"; + +/* stats.py: Unknown ship; In files: EDMarketConnector.py:876; stats.py:311; */ +"What are you flying?!" = "What are you flying?!"; + +/* In files: EDMarketConnector.py:983; */ +"Last updated at %H:%M:%S" = "Last updated at %H:%M:%S"; + +/* EDMarketConnector.py: Multicrew role; In files: EDMarketConnector.py:1009; */ +"Fighter" = "Fighter"; + +/* EDMarketConnector.py: Multicrew role; In files: EDMarketConnector.py:1010; */ +"Gunner" = "Gunner"; + +/* EDMarketConnector.py: Multicrew role; In files: EDMarketConnector.py:1011; */ +"Helm" = "Helm"; + +/* In files: EDMarketConnector.py:1255; */ +"cooldown {SS}s" = "cooldown {SS}s"; + +/* In files: EDMarketConnector.py:1361; prefs.py:297; */ +"OK" = "OK"; + +/* In files: EDMarketConnector.py:1441; */ +"Shutting down..." = "Shutting down..."; + +/* In files: EDMarketConnector.py:1726:1732; */ +"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." = "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."; + +/* EDMarketConnector.py: words for use in python 2 plugin error; In files: EDMarketConnector.py:1736; prefs.py:888; */ +"Plugins" = "Plugins"; + +/* In files: EDMarketConnector.py:1743; */ +"EDMC: Plugins Without Python 3.x Support" = "EDMC: Plugins Without Python 3.x Support"; + +/* In files: journal_lock.py:205; */ +"Journal directory already locked" = "Journal directory already locked"; + +/* In files: journal_lock.py:221:222; */ +"The new Journal Directory location is already locked.{CR}You can either attempt to resolve this and then Retry, or choose to Ignore this." = "The new Journal Directory location is already locked.{CR}You can either attempt to resolve this and then Retry, or choose to Ignore this."; + +/* In files: journal_lock.py:225; */ +"Retry" = "Retry"; + +/* In files: journal_lock.py:228; */ +"Ignore" = "Ignore"; + +/* In files: l10n.py:193; prefs.py:438; prefs.py:636; prefs.py:664; */ +"Default" = "Default"; + +/* In files: coriolis.py:51; coriolis.py:51; coriolis.py:88; coriolis.py:104; coriolis.py:110; */ +"Auto" = "Auto"; + +/* In files: coriolis.py:51; coriolis.py:88; coriolis.py:102; */ +"Normal" = "Normal"; + +/* In files: coriolis.py:51; coriolis.py:88; coriolis.py:103; */ +"Beta" = "Beta"; + +/* In files: coriolis.py:64:66; */ +"Set the URL to use with coriolis.io ship loadouts. Note that this MUST end with '/import?data='" = "Set the URL to use with coriolis.io ship loadouts. Note that this MUST end with '/import?data='"; + +/* In files: coriolis.py:69; */ +"Normal URL" = "Normal URL"; + +/* In files: coriolis.py:71; coriolis.py:78; */ +"Reset" = "Reset"; + +/* In files: coriolis.py:76; */ +"Beta URL" = "Beta URL"; + +/* In files: coriolis.py:83; */ +"Override Beta/Normal Selection" = "Override Beta/Normal Selection"; + +/* In files: coriolis.py:120; */ +"Invalid Coriolis override mode!" = "Invalid Coriolis override mode!"; + +/* In files: eddb.py:99; */ +"EDDB Journal processing disabled. See Log." = "EDDB Journal processing disabled. See Log."; + +/* In files: eddn.py:215; eddn.py:593; eddn.py:940; */ +"Sending data to EDDN..." = "Sending data to EDDN..."; + +/* In files: eddn.py:260; eddn.py:878; eddn.py:913; eddn.py:952; */ +"Error: Can't connect to EDDN" = "Error: Can't connect to EDDN"; + +/* In files: eddn.py:672; */ +"Send station data to the Elite Dangerous Data Network" = "Send station data to the Elite Dangerous Data Network"; + +/* In files: eddn.py:682; */ +"Send system and scan data to the Elite Dangerous Data Network" = "Send system and scan data to the Elite Dangerous Data Network"; + +/* In files: eddn.py:692; */ +"Delay sending until docked" = "Delay sending until docked"; + +/* In files: eddn.py:756; */ +"EDDN journal handler disabled. See Log." = "EDDN journal handler disabled. See Log."; + +/* In files: edsm.py:197; */ +"Send flight log and Cmdr status to EDSM" = "Send flight log and Cmdr status to EDSM"; + +/* In files: edsm.py:206; */ +"Elite Dangerous Star Map credentials" = "Elite Dangerous Star Map credentials"; + +/* In files: edsm.py:223; */ +"Commander Name" = "Commander Name"; + +/* In files: edsm.py:230; inara.py:233; */ +"API Key" = "API Key"; + +/* stats.py: No rank; In files: edsm.py:256; prefs.py:487; prefs.py:1091; prefs.py:1123; stats.py:117; stats.py:136; stats.py:155; stats.py:172; */ +"None" = "None"; + +/* In files: edsm.py:351; */ +"EDSM Handler disabled. See Log." = "EDSM Handler disabled. See Log."; + +/* In files: edsm.py:632; edsm.py:734; */ +"Error: EDSM {MSG}" = "Error: EDSM {MSG}"; + +/* In files: edsm.py:668; edsm.py:730; */ +"Error: Can't connect to EDSM" = "Error: Can't connect to EDSM"; + +/* In files: inara.py:215; */ +"Send flight log and Cmdr status to Inara" = "Send flight log and Cmdr status to Inara"; + +/* In files: inara.py:225; */ +"Inara credentials" = "Inara credentials"; + +/* In files: inara.py:331; */ +"Inara disabled. See Log." = "Inara disabled. See Log."; + +/* In files: inara.py:1537; inara.py:1549; */ +"Error: Inara {MSG}" = "Error: Inara {MSG}"; + +/* In files: prefs.py:248; */ +"Preferences" = "Preferences"; + +/* In files: prefs.py:338; */ +"Please choose what data to save" = "Please choose what data to save"; + +/* In files: prefs.py:344; */ +"Market data in CSV format file" = "Market data in CSV format file"; + +/* In files: prefs.py:353; */ +"Market data in Trade Dangerous format file" = "Market data in Trade Dangerous format file"; + +/* In files: prefs.py:363; */ +"Ship loadout" = "Ship loadout"; + +/* In files: prefs.py:373; */ +"Automatically update on docking" = "Automatically update on docking"; + +/* In files: prefs.py:381; prefs.py:391; */ +"File location" = "File location"; + +/* In files: prefs.py:390; prefs.py:429; */ +"Change..." = "Change..."; + +/* In files: prefs.py:390; prefs.py:429; */ +"Browse..." = "Browse..."; + +/* In files: prefs.py:397; */ +"Output" = "Output"; + +/* In files: prefs.py:422; prefs.py:430; */ +"E:D journal file location" = "E:D journal file location"; + +/* In files: prefs.py:454; */ +"Keyboard shortcut" = "Keyboard shortcut"; + +/* In files: prefs.py:456; */ +"Hotkey" = "Hotkey"; + +/* In files: prefs.py:464; */ +"Re-start {APP} to use shortcuts" = "Re-start {APP} to use shortcuts"; + +/* In files: prefs.py:472; */ "{APP} needs permission to use shortcuts" = "{APP} needs permission to use shortcuts"; + +/* In files: prefs.py:477; */ +"Open System Preferences" = "Open System Preferences"; + +/* In files: prefs.py:497; */ +"Only when Elite: Dangerous is the active app" = "Only when Elite: Dangerous is the active app"; + +/* In files: prefs.py:507; */ +"Play sound" = "Play sound"; + +/* In files: prefs.py:521; */ +"Disable Automatic Application Updates Check when in-game" = "Disable Automatic Application Updates Check when in-game"; + +/* In files: prefs.py:533; */ +"Preferred websites" = "Preferred websites"; + +/* In files: prefs.py:543; */ +"Shipyard" = "Shipyard"; + +/* In files: prefs.py:554; */ +"Use alternate URL method" = "Use alternate URL method"; + +/* In files: prefs.py:604; */ +"Log Level" = "Log Level"; + +/* In files: prefs.py:631; */ +"Configuration" = "Configuration"; + +/* In files: prefs.py:642; */ +"Normal text" = "Normal text"; + +/* In files: prefs.py:643; */ +"Highlighted text" = "Highlighted text"; + +/* In files: prefs.py:651; */ +"Language" = "Language"; + +/* In files: prefs.py:660; */ +"Theme" = "Theme"; + +/* In files: prefs.py:669; */ +"Dark" = "Dark"; + +/* In files: prefs.py:675; */ +"Transparent" = "Transparent"; + +/* In files: prefs.py:719; */ +"UI Scale Percentage" = "UI Scale Percentage"; + +/* In files: prefs.py:739; */ +"100 means Default{CR}Restart Required for{CR}changes to take effect!" = "100 means Default{CR}Restart Required for{CR}changes to take effect!"; + +/* In files: prefs.py:748; */ +"Main window transparency" = "Main window transparency"; + +/* In files: prefs.py:767:770; */ +"100 means fully opaque.{CR}Window is updated in real time" = "100 means fully opaque.{CR}Window is updated in real time"; + +/* In files: prefs.py:804; */ +"Appearance" = "Appearance"; + +/* In files: prefs.py:815; */ +"Plugins folder" = "Plugins folder"; + +/* In files: prefs.py:823; */ +"Open" = "Open"; + +/* In files: prefs.py:830; */ +"Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name" = "Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name"; + +/* In files: prefs.py:840; */ +"Enabled Plugins" = "Enabled Plugins"; + +/* In files: prefs.py:859; */ +"Plugins Without Python 3.x Support:" = "Plugins Without Python 3.x Support:"; + +/* In files: prefs.py:866; */ +"Information on migrating plugins" = "Information on migrating plugins"; + +/* In files: prefs.py:880; */ +"Disabled Plugins" = "Disabled Plugins"; + +/* stats.py: Cmdr stats; In files: stats.py:51; */ +"Balance" = "Balance"; + +/* stats.py: Cmdr stats; In files: stats.py:52; */ +"Loan" = "Loan"; + +/* stats.py: Ranking; In files: stats.py:57; */ +"Combat" = "Combat"; + +/* stats.py: Ranking; In files: stats.py:58; */ +"Trade" = "Trade"; + +/* stats.py: Ranking; In files: stats.py:59; */ +"Explorer" = "Explorer"; + +/* stats.py: Ranking; In files: stats.py:60; */ +"CQC" = "CQC"; + +/* stats.py: Ranking; In files: stats.py:61; */ +"Federation" = "Federation"; + +/* stats.py: Ranking; In files: stats.py:62; */ +"Empire" = "Empire"; + +/* stats.py: Ranking; In files: stats.py:63; */ +"Powerplay" = "Powerplay"; + +/* stats.py: Combat rank; In files: stats.py:71; */ +"Harmless" = "Harmless"; + +/* stats.py: Combat rank; In files: stats.py:72; */ +"Mostly Harmless" = "Mostly Harmless"; + +/* stats.py: Combat rank; In files: stats.py:73; */ +"Novice" = "Novice"; + +/* stats.py: Combat rank; In files: stats.py:74; */ +"Competent" = "Competent"; + +/* stats.py: Combat rank; In files: stats.py:75; */ +"Expert" = "Expert"; + +/* stats.py: Combat rank; stats.py: Empire rank; In files: stats.py:76; stats.py:139; */ +"Master" = "Master"; + +/* stats.py: Combat rank; In files: stats.py:77; */ +"Dangerous" = "Dangerous"; + +/* stats.py: Combat rank; In files: stats.py:78; */ +"Deadly" = "Deadly"; + +/* stats.py: Top rank; In files: stats.py:79; stats.py:90; stats.py:101; stats.py:112; */ +"Elite" = "Elite"; + +/* stats.py: Trade rank; In files: stats.py:82; */ +"Penniless" = "Penniless"; + +/* stats.py: Trade rank; In files: stats.py:83; */ +"Mostly Penniless" = "Mostly Penniless"; + +/* stats.py: Trade rank; In files: stats.py:84; */ +"Peddler" = "Peddler"; + +/* stats.py: Trade rank; In files: stats.py:85; */ +"Dealer" = "Dealer"; + +/* stats.py: Trade rank; In files: stats.py:86; */ +"Merchant" = "Merchant"; + +/* stats.py: Trade rank; In files: stats.py:87; */ +"Broker" = "Broker"; + +/* stats.py: Trade rank; In files: stats.py:88; */ +"Entrepreneur" = "Entrepreneur"; + +/* stats.py: Trade rank; In files: stats.py:89; */ +"Tycoon" = "Tycoon"; + +/* stats.py: Explorer rank; In files: stats.py:93; */ +"Aimless" = "Aimless"; + +/* stats.py: Explorer rank; In files: stats.py:94; */ +"Mostly Aimless" = "Mostly Aimless"; + +/* stats.py: Explorer rank; In files: stats.py:95; */ +"Scout" = "Scout"; + +/* stats.py: Explorer rank; In files: stats.py:96; */ +"Surveyor" = "Surveyor"; + +/* stats.py: Explorer rank; In files: stats.py:97; */ +"Trailblazer" = "Trailblazer"; + +/* stats.py: Explorer rank; In files: stats.py:98; */ +"Pathfinder" = "Pathfinder"; + +/* stats.py: Explorer rank; In files: stats.py:99; */ +"Ranger" = "Ranger"; + +/* stats.py: Explorer rank; In files: stats.py:100; */ +"Pioneer" = "Pioneer"; + +/* stats.py: CQC rank; In files: stats.py:104; */ +"Helpless" = "Helpless"; + +/* stats.py: CQC rank; In files: stats.py:105; */ +"Mostly Helpless" = "Mostly Helpless"; + +/* stats.py: CQC rank; In files: stats.py:106; */ +"Amateur" = "Amateur"; + +/* stats.py: CQC rank; In files: stats.py:107; */ +"Semi Professional" = "Semi Professional"; + +/* stats.py: CQC rank; In files: stats.py:108; */ +"Professional" = "Professional"; + +/* stats.py: CQC rank; In files: stats.py:109; */ +"Champion" = "Champion"; + +/* stats.py: CQC rank; In files: stats.py:110; */ +"Hero" = "Hero"; + +/* stats.py: CQC rank; In files: stats.py:111; */ +"Gladiator" = "Gladiator"; + +/* stats.py: Federation rank; In files: stats.py:118; */ +"Recruit" = "Recruit"; + +/* stats.py: Federation rank; In files: stats.py:119; */ +"Cadet" = "Cadet"; + +/* stats.py: Federation rank; In files: stats.py:120; */ +"Midshipman" = "Midshipman"; + +/* stats.py: Federation rank; In files: stats.py:121; */ +"Petty Officer" = "Petty Officer"; + +/* stats.py: Federation rank; In files: stats.py:122; */ +"Chief Petty Officer" = "Chief Petty Officer"; + +/* stats.py: Federation rank; In files: stats.py:123; */ +"Warrant Officer" = "Warrant Officer"; + +/* stats.py: Federation rank; In files: stats.py:124; */ +"Ensign" = "Ensign"; + +/* stats.py: Federation rank; In files: stats.py:125; */ +"Lieutenant" = "Lieutenant"; + +/* stats.py: Federation rank; In files: stats.py:126; */ +"Lieutenant Commander" = "Lieutenant Commander"; + +/* stats.py: Federation rank; In files: stats.py:127; */ +"Post Commander" = "Post Commander"; + +/* stats.py: Federation rank; In files: stats.py:128; */ +"Post Captain" = "Post Captain"; + +/* stats.py: Federation rank; In files: stats.py:129; */ +"Rear Admiral" = "Rear Admiral"; + +/* stats.py: Federation rank; In files: stats.py:130; */ +"Vice Admiral" = "Vice Admiral"; + +/* stats.py: Federation rank; In files: stats.py:131; */ +"Admiral" = "Admiral"; + +/* stats.py: Empire rank; In files: stats.py:137; */ +"Outsider" = "Outsider"; + +/* stats.py: Empire rank; In files: stats.py:138; */ +"Serf" = "Serf"; + +/* stats.py: Empire rank; In files: stats.py:140; */ +"Squire" = "Squire"; + +/* stats.py: Empire rank; In files: stats.py:141; */ +"Knight" = "Knight"; + +/* stats.py: Empire rank; In files: stats.py:142; */ +"Lord" = "Lord"; + +/* stats.py: Empire rank; In files: stats.py:143; */ +"Baron" = "Baron"; + +/* stats.py: Empire rank; In files: stats.py:144; */ +"Viscount" = "Viscount"; + +/* stats.py: Empire rank; In files: stats.py:145; */ +"Count" = "Count"; + +/* stats.py: Empire rank; In files: stats.py:146; */ +"Earl" = "Earl"; + +/* stats.py: Empire rank; In files: stats.py:147; */ +"Marquis" = "Marquis"; + +/* stats.py: Empire rank; In files: stats.py:148; */ +"Duke" = "Duke"; + +/* stats.py: Empire rank; In files: stats.py:149; */ +"Prince" = "Prince"; + +/* stats.py: Empire rank; In files: stats.py:150; */ +"King" = "King"; + +/* stats.py: Power rank; In files: stats.py:156; */ +"Rating 1" = "Rating 1"; + +/* stats.py: Power rank; In files: stats.py:157; */ +"Rating 2" = "Rating 2"; + +/* stats.py: Power rank; In files: stats.py:158; */ +"Rating 3" = "Rating 3"; + +/* stats.py: Power rank; In files: stats.py:159; */ +"Rating 4" = "Rating 4"; + +/* stats.py: Power rank; In files: stats.py:160; */ +"Rating 5" = "Rating 5"; + +/* stats.py: Status dialog subtitle - CR value of ship; In files: stats.py:366; */ +"Value" = "Value"; + +/* stats.py: Status dialog title; In files: stats.py:375; */ +"Ships" = "Ships"; From 82fd3cd57782c3816c08dcdd2ed386efbd4aa095 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:34:12 +0100 Subject: [PATCH 05/22] l10n script: With --lang output the !Language header --- scripts/find_localised_strings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 7b38aa1e..fe33327d 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -239,7 +239,10 @@ def generate_lang_template(data: dict[pathlib.Path, list[ast.Call]]) -> str: entries.append(LangEntry([FileLocation.from_call(path, c)], get_arg(c), [getattr(c, 'comment')])) deduped = dedupe_lang_entries(entries) - out = '' + out = ''' +/* Language name */ +"!Language" = "English"; +''' print(f'Done Deduping entries {len(entries)=} {len(deduped)=}', file=sys.stderr) for entry in deduped: assert len(entry.comments) == len(entry.locations) From be46c47c1c98082eeb1ed54bc89634a672536908 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 14:50:18 +0100 Subject: [PATCH 06/22] l10n script: Adjust !Language header --- scripts/find_localised_strings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index fe33327d..8d19bb68 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -239,9 +239,9 @@ def generate_lang_template(data: dict[pathlib.Path, list[ast.Call]]) -> str: entries.append(LangEntry([FileLocation.from_call(path, c)], get_arg(c), [getattr(c, 'comment')])) deduped = dedupe_lang_entries(entries) - out = ''' -/* Language name */ + out = '''/* Language name */ "!Language" = "English"; + ''' print(f'Done Deduping entries {len(entries)=} {len(deduped)=}', file=sys.stderr) for entry in deduped: From 32101bdba557bf00570debc93fc7701d7fc22e36 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:03:46 +0100 Subject: [PATCH 07/22] Translations: auto-generated file now has !Language header --- L10n/en.template | 3 +++ 1 file changed, 3 insertions(+) diff --git a/L10n/en.template b/L10n/en.template index 9831bb13..3be9753f 100644 --- a/L10n/en.template +++ b/L10n/en.template @@ -1,3 +1,6 @@ +/* Language name */ +"!Language" = "English"; + /* In files: companion.py:170; */ "Error: Frontier CAPI didn't respond" = "Error: Frontier CAPI didn't respond"; From 06725467f9c30bfcbf1eab5296832eafcae0b52d Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:05:26 +0100 Subject: [PATCH 08/22] l10n script: --lang takes a filename argument now This allows for forcing unix-style line endings to the file, rather than needing to mess with dos2unix after on a Windows system. --- scripts/find_localised_strings.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 8d19bb68..c65e383e 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -273,7 +273,7 @@ if __name__ == '__main__': parser.add_argument('--ignore', action='append', help='directories to ignore', default=['venv', '.git']) group = parser.add_mutually_exclusive_group() group.add_argument('--json', action='store_true', help='JSON output') - group.add_argument('--lang', action='store_true', help='en.template "strings" output') + group.add_argument('--lang', help='en.template "strings" output to specified file, "-" for stdout') group.add_argument('--compare-lang', help='en.template file to compare against') args = parser.parse_args() @@ -313,7 +313,12 @@ if __name__ == '__main__': print(json.dumps(to_print_data, indent=2)) elif args.lang: - print(generate_lang_template(res)) + if args.lang == '-': + print(generate_lang_template(res)) + + else: + with open(args.lang, mode='w+', newline='\n') as langfile: + langfile.writelines(generate_lang_template(res)) else: for path, calls in res.items(): From 1b58e91fa2704cb81104dec051dfc88b035f481e Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:27:09 +0100 Subject: [PATCH 09/22] l10n script: Only report 'Unknown comment' if we didn't find a LANG one So if we have a before LANG comment, then don't report the actual line for a bad comment. And if we have a current_line valid LANG comment, then don't report the above_line as unknown. --- scripts/find_localised_strings.py | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index c65e383e..3f1e347c 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -64,38 +64,36 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op :param file: The path to the file this call node came from :return: The first comment that matches the rules, or None """ - out: list[Optional[str]] = [] + out: Optional[str] = None above = call.lineno - 2 current = call.lineno - 1 above_line = lines[above].strip() if len(lines) >= above else None current_line = lines[current].strip() + bad_comment: Optional[str] = None for line in (above_line, current_line): if line is None or '#' not in line: - out.append(None) continue match = COMMENT_RE.match(line) if not match: print(line) - out.append(None) continue comment = match.group(1).strip() if not comment.startswith('# LANG:'): - print(f'Unknown comment for {file}:{current} {line}', file=sys.stderr) - out.append(None) + bad_comment = f'Unknown comment for {file}:{current} {line}' continue - out.append(comment.replace('# LANG:', '').strip()) + out = comment.replace('# LANG:', '').strip() + bad_comment = None + break - if out[1] is not None: - return out[1] - elif out[0] is not None: - return out[0] + if bad_comment is not None: + print(bad_comment, file=sys.stderr) - return None + return out def scan_file(path: pathlib.Path) -> list[ast.Call]: From 2351ee0f0241d1e614982aa0cd90e118dd56dd9b Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:32:52 +0100 Subject: [PATCH 10/22] EDMarketConnector: LANG comment pass --- EDMarketConnector.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index be6c59c3..b3e48b00 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -703,7 +703,7 @@ class AppWindow(object): def set_labels(self): """Set main window labels, e.g. after language change.""" self.cmdr_label['text'] = _('Cmdr') + ':' # LANG: Main window - # Multicrew role label in main window + # LANG: 'Ship' or multi-crew role label in main window, as applicable self.ship_label['text'] = (monitor.state['Captain'] and _('Role') or _('Ship')) + ':' # Main window self.suit_label['text'] = _('Suit') + ':' # LANG: Main window self.system_label['text'] = _('System') + ':' # LANG: Main window @@ -764,7 +764,7 @@ class AppWindow(object): self.w.update_idletasks() try: if companion.session.login(monitor.cmdr, monitor.is_beta): - # Successfully authenticated with the Frontier website + # LANG: Successfully authenticated with the Frontier website self.status['text'] = _('Authentication successful') if platform == 'darwin': @@ -795,6 +795,7 @@ class AppWindow(object): if not self.status['text']: # Signal as error because the user might actually be docked # but the server hosting the Companion API hasn't caught up + # LANG: Player is not docked at a station, when we expect them to be self.status['text'] = _("You're not docked at a station!") return False @@ -862,17 +863,21 @@ class AppWindow(object): # Validation if 'commander' not in data: # This can happen with EGS Auth if no commander created yet + # LANG: No data was returned for the commander from the Frontier CAPI err = self.status['text'] = _('CAPI: No commander data returned') elif not data.get('commander', {}).get('name'): + # LANG: We didn't have the commander name when we should have err = self.status['text'] = _("Who are you?!") # Shouldn't happen elif (not data.get('lastSystem', {}).get('name') or (data['commander'].get('docked') and not data.get('lastStarport', {}).get('name'))): + # LANG: We don't know where the commander is, when we should err = self.status['text'] = _("Where are you?!") # Shouldn't happen elif not data.get('ship', {}).get('name') or not data.get('ship', {}).get('modules'): + # LANG: We don't know what ship the commander is in, when we should err = self.status['text'] = _("What are you flying?!") # Shouldn't happen elif monitor.cmdr and data['commander']['name'] != monitor.cmdr: @@ -980,6 +985,7 @@ class AppWindow(object): play_bad = True if not err: # not self.status['text']: # no errors + # LANG: Time when we last obtained Frontier CAPI data self.status['text'] = strftime(_('Last updated at %H:%M:%S'), localtime(querytime)) if play_sound and play_bad: @@ -1438,6 +1444,7 @@ class AppWindow(object): config.set('geometry', f'+{x}+{y}') # Let the user know we're shutting down. + # LANG: The application is shutting down self.status['text'] = _('Shutting down...') self.w.update_idletasks() logger.info('Starting shutdown procedures...') From cc0e39b7c20eb15223e74ec3f2122901f79323dd Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:34:14 +0100 Subject: [PATCH 11/22] l10n.py: LANG comment pass --- l10n.py | 1 + 1 file changed, 1 insertion(+) diff --git a/l10n.py b/l10n.py index d6e4677e..7ffed54b 100755 --- a/l10n.py +++ b/l10n.py @@ -190,6 +190,7 @@ class _Translations: def available_names(self) -> Dict[Optional[str], str]: """Available language names by code.""" names: Dict[Optional[str], str] = OrderedDict([ + # LANG: The system default language choice in Settings > Appearance (None, _('Default')), # Appearance theme and language setting ]) names.update(sorted( From a412ec13820b4eff067eebb48dc78b56d29c1d60 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:35:24 +0100 Subject: [PATCH 12/22] plugins/coriolis.py: LANG comment pass --- plugins/coriolis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/coriolis.py b/plugins/coriolis.py index c276eff4..e28ce0d8 100644 --- a/plugins/coriolis.py +++ b/plugins/coriolis.py @@ -99,9 +99,9 @@ def prefs_changed(cmdr: str, is_beta: bool) -> None: beta_url = beta_textvar.get() override_mode = override_textvar.get() override_mode = { # Convert to unlocalised names - _('Normal'): 'normal', - _('Beta'): 'beta', - _('Auto'): 'auto', + _('Normal'): 'normal', # LANG: Coriolis normal/beta selection - normal + _('Beta'): 'beta', # LANG: Coriolis normal/beta selection - beta + _('Auto'): 'auto', # LANG: Coriolis normal/beta selection - auto }.get(override_mode, override_mode) if override_mode not in ('beta', 'normal', 'auto'): From 4fa0521438e16f09749087aad379048ca5f6c30c Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:43:32 +0100 Subject: [PATCH 13/22] other core plugins: LANG comment pass --- plugins/eddn.py | 2 +- plugins/edsm.py | 6 +++++- plugins/inara.py | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/eddn.py b/plugins/eddn.py index feeb0e5c..693f01fc 100644 --- a/plugins/eddn.py +++ b/plugins/eddn.py @@ -590,7 +590,7 @@ Msg:\n{msg}''' else: # Can't access replay file! Send immediately. - self.parent.children['status']['text'] = _('Sending data to EDDN...') + self.parent.children['status']['text'] = _('Sending data to EDDN...') # LANG: Data is being sent to EDDN self.parent.update_idletasks() self.send(cmdr, msg) self.parent.children['status']['text'] = '' diff --git a/plugins/edsm.py b/plugins/edsm.py index 9519d83f..458b1740 100644 --- a/plugins/edsm.py +++ b/plugins/edsm.py @@ -213,6 +213,7 @@ def plugin_prefs(parent: tk.Tk, cmdr: str, is_beta: bool) -> tk.Frame: this.label.grid(columnspan=2, padx=PADX, sticky=tk.W) + # LANG: Game Commander name label in EDSM settings this.cmdr_label = nb.Label(frame, text=_('Cmdr')) # Main window this.cmdr_label.grid(row=cur_row, padx=PADX, sticky=tk.W) this.cmdr_text = nb.Label(frame) @@ -220,6 +221,7 @@ def plugin_prefs(parent: tk.Tk, cmdr: str, is_beta: bool) -> tk.Frame: cur_row += 1 + # LANG: EDSM Commander name label in EDSM settings this.user_label = nb.Label(frame, text=_('Commander Name')) # EDSM setting this.user_label.grid(row=cur_row, padx=PADX, sticky=tk.W) this.user = nb.Entry(frame) @@ -227,6 +229,7 @@ def plugin_prefs(parent: tk.Tk, cmdr: str, is_beta: bool) -> tk.Frame: cur_row += 1 + # LANG: EDSM API key label this.apikey_label = nb.Label(frame, text=_('API Key')) # EDSM setting this.apikey_label.grid(row=cur_row, padx=PADX, sticky=tk.W) this.apikey = nb.Entry(frame) @@ -253,7 +256,8 @@ def prefs_cmdr_changed(cmdr: str, is_beta: bool) -> None: this.apikey.insert(0, cred[1]) else: - this.cmdr_text['text'] = _('None') # No hotkey/shortcut currently defined + # LANG: We have no data on the current commander + this.cmdr_text['text'] = _('None') to_set = tk.DISABLED if cmdr and not is_beta and this.log.get(): diff --git a/plugins/inara.py b/plugins/inara.py index 5e216007..f4db0098 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -230,6 +230,7 @@ def plugin_prefs(parent: tk.Tk, cmdr: str, is_beta: bool) -> tk.Frame: this.label.grid(columnspan=2, padx=x_padding, sticky=tk.W) + # LANG: Inara API key label this.apikey_label = nb.Label(frame, text=_('API Key')) # Inara setting this.apikey_label.grid(row=12, padx=x_padding, sticky=tk.W) this.apikey = nb.Entry(frame) From fc96c6362f73a220825836e08e51e2e6109799c9 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:54:20 +0100 Subject: [PATCH 14/22] prefs.py: Initial LANG comment pass Pausing for a possible bug fix --- prefs.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/prefs.py b/prefs.py index 31c5f6b6..2a7ed3ac 100644 --- a/prefs.py +++ b/prefs.py @@ -294,6 +294,7 @@ class PreferencesDialog(tk.Toplevel): buttonframe.grid(padx=self.PADX, pady=self.PADX, sticky=tk.NSEW) buttonframe.columnconfigure(0, weight=1) ttk.Label(buttonframe).grid(row=0, column=0) # spacer + # LANG: 'OK' button on Settings/Preferences window button = ttk.Button(buttonframe, text=_('OK'), command=self.apply) button.grid(row=0, column=1, sticky=tk.E) button.bind("", lambda event: self.apply()) @@ -378,6 +379,7 @@ class PreferencesDialog(tk.Toplevel): self.outdir = tk.StringVar() self.outdir.set(str(config.get_str('outdir'))) + # LANG: Label for "where files are located" self.outdir_label = nb.Label(output_frame, text=_('File location')+':') # Section heading in settings # Type ignored due to incorrect type annotation. a 2 tuple does padding for each side self.outdir_label.grid(padx=self.PADX, pady=(5, 0), sticky=tk.W, row=row.get()) # type: ignore @@ -394,7 +396,8 @@ class PreferencesDialog(tk.Toplevel): nb.Frame(output_frame).grid(row=row.get()) # bottom spacer # TODO: does nothing? - root_notebook.add(output_frame, text=_('Output')) # Tab heading in settings + # LANG: Label for 'Output' Settings tab + root_notebook.add(output_frame, text=_('Output')) # Tab heading in settings def __setup_plugin_tabs(self, notebook: Notebook) -> None: for plugin in plug.PLUGINS: @@ -451,9 +454,9 @@ class PreferencesDialog(tk.Toplevel): self.hotkey_play = tk.IntVar(value=not config.get_int('hotkey_mute')) nb.Label( config_frame, - text=_('Keyboard shortcut') if # Hotkey/Shortcut settings prompt on OSX + text=_('Keyboard shortcut') if # LANG: Hotkey/Shortcut settings prompt on OSX platform == 'darwin' else - _('Hotkey') # Hotkey/Shortcut settings prompt on Windows + _('Hotkey') # LANG: Hotkey/Shortcut settings prompt on Windows ).grid(padx=self.PADX, sticky=tk.W, row=row.get()) if platform == 'darwin' and not was_accessible_at_launch: @@ -473,7 +476,7 @@ class PreferencesDialog(tk.Toplevel): foreground='firebrick' ).grid(columnspan=4, padx=self.PADX, sticky=tk.W, row=row.get()) - # Shortcut settings button on OSX + # LANG: Shortcut settings button on OSX nb.Button(config_frame, text=_('Open System Preferences'), command=self.enableshortcuts).grid( padx=self.PADX, sticky=tk.E, row=row.get() ) @@ -484,6 +487,7 @@ class PreferencesDialog(tk.Toplevel): 0, # No hotkey/shortcut currently defined # TODO: display Only shows up on darwin or windows + # LANG: No hotkey/shortcut set hotkeymgr.display(self.hotkey_code, self.hotkey_mods) if self.hotkey_code else _('None') ) @@ -530,6 +534,7 @@ class PreferencesDialog(tk.Toplevel): ) # Settings prompt for preferred ship loadout, system and station info websites + # LANG: Label for preferred shipyard, system and station 'providers' nb.Label(config_frame, text=_('Preferred websites')).grid( columnspan=4, padx=self.PADX, sticky=tk.W, row=row.get() ) @@ -540,6 +545,7 @@ class PreferencesDialog(tk.Toplevel): value=str(shipyard_provider if shipyard_provider in plug.provides('shipyard_url') else 'EDSY') ) # Setting to decide which ship outfitting website to link to - either E:D Shipyard or Coriolis + # LANG: Label for Shipyard provider selection nb.Label(config_frame, text=_('Shipyard')).grid(padx=self.PADX, pady=2*self.PADY, sticky=tk.W, row=cur_row) self.shipyard_button = nb.OptionMenu( config_frame, self.shipyard_provider, self.shipyard_provider.get(), *plug.provides('shipyard_url') @@ -551,6 +557,7 @@ class PreferencesDialog(tk.Toplevel): self.alt_shipyard_open = tk.IntVar(value=config.get_int('use_alt_shipyard_open')) self.alt_shipyard_open_btn = nb.Checkbutton( config_frame, + # LANG: Label for checkbox to utilise alternative Coriolis URL method text=_('Use alternate URL method'), variable=self.alt_shipyard_open, command=self.alt_shipyard_open_changed, @@ -628,18 +635,22 @@ class PreferencesDialog(tk.Toplevel): # Big spacer nb.Label(config_frame).grid(sticky=tk.W, row=row.get()) - notebook.add(config_frame, text=_('Configuration')) # Tab heading in settings + # LANG: Label for 'Configuration' tab in Settings + notebook.add(config_frame, text=_('Configuration')) def __setup_appearance_tab(self, notebook: Notebook) -> None: self.languages = Translations.available_names() # Appearance theme and language setting + # LANG: The system default language choice in Settings > Appearance self.lang = tk.StringVar(value=self.languages.get(config.get_str('language'), _('Default'))) self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop'))) # self.minimize_system_tray = tk.BooleanVar(value=config.get_bool('minimize_system_tray')) self.theme = tk.IntVar(value=config.get_int('theme')) self.theme_colors = [config.get_str('dark_text'), config.get_str('dark_highlight')] self.theme_prompts = [ + # LANG: Label for Settings > Appeareance > selection of 'normal' text colour _('Normal text'), # Dark theme color setting + # LANG: Label for Settings > Appeareance > selection of 'highlightes' text colour _('Highlighted text'), # Dark theme color setting ] @@ -657,21 +668,25 @@ class PreferencesDialog(tk.Toplevel): ) # Appearance setting + # LANG: Label for Settings > Appearance > Theme selection nb.Label(appearance_frame, text=_('Theme')).grid(columnspan=3, padx=self.PADX, sticky=tk.W, row=row.get()) # Appearance theme and language setting nb.Radiobutton( + # LANG: Label for 'Default' theme radio button appearance_frame, text=_('Default'), variable=self.theme, value=0, command=self.themevarchanged ).grid(columnspan=3, padx=self.BUTTONX, sticky=tk.W, row=row.get()) # Appearance theme setting nb.Radiobutton( + # LANG: Label for 'Dark' theme radio button appearance_frame, text=_('Dark'), variable=self.theme, value=1, command=self.themevarchanged ).grid(columnspan=3, padx=self.BUTTONX, sticky=tk.W, row=row.get()) if platform == 'win32': nb.Radiobutton( appearance_frame, + # LANG: Label for 'Transparent' theme radio button text=_('Transparent'), # Appearance theme setting variable=self.theme, value=2, @@ -801,6 +816,7 @@ class PreferencesDialog(tk.Toplevel): nb.Label(appearance_frame).grid(sticky=tk.W) # big spacer + # LANG: Label for Settings > Appearance tab notebook.add(appearance_frame, text=_('Appearance')) # Tab heading in settings def __setup_plugin_tab(self, notebook: Notebook) -> None: @@ -812,6 +828,7 @@ class PreferencesDialog(tk.Toplevel): row = AutoInc(1) # Section heading in settings + # LANG: Label for nb.Label(plugins_frame, text=_('Plugins folder')+':').grid(padx=self.PADX, sticky=tk.W) plugdirentry = nb.Entry(plugins_frame, justify=tk.LEFT) self.displaypath(plugdir, plugdirentry) From 1495ba920651982afdf958f6742afbfd71ea4342 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 15:56:50 +0100 Subject: [PATCH 15/22] prefs.py: Properly .grid() the 'Plugins folder' label --- prefs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prefs.py b/prefs.py index 2a7ed3ac..a01a34d7 100644 --- a/prefs.py +++ b/prefs.py @@ -827,12 +827,13 @@ class PreferencesDialog(tk.Toplevel): plugdir.set(config.plugin_dir) row = AutoInc(1) - # Section heading in settings - # LANG: Label for - nb.Label(plugins_frame, text=_('Plugins folder')+':').grid(padx=self.PADX, sticky=tk.W) plugdirentry = nb.Entry(plugins_frame, justify=tk.LEFT) self.displaypath(plugdir, plugdirentry) with row as cur_row: + # Section heading in settings + # LANG: Label for location of third-party plugins folder + nb.Label(plugins_frame, text=_('Plugins folder') + ':').grid(padx=self.PADX, sticky=tk.W, row=cur_row) + plugdirentry.grid(padx=self.PADX, sticky=tk.EW, row=cur_row) nb.Button( From f4af278a805013b8d4f39925e73b301dd59d5fba Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:00:28 +0100 Subject: [PATCH 16/22] prefs.py: Contiuning LANG comment pass --- prefs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/prefs.py b/prefs.py index a01a34d7..ab067b6d 100644 --- a/prefs.py +++ b/prefs.py @@ -838,6 +838,7 @@ class PreferencesDialog(tk.Toplevel): nb.Button( plugins_frame, + # LANG: Label on button used to open a filesystem folder text=_('Open'), # Button that opens a folder in Explorer/Finder command=lambda: webbrowser.open(f'file:///{config.plugin_dir_path}') ).grid(column=1, padx=(0, self.PADX), sticky=tk.NSEW, row=cur_row) @@ -845,6 +846,7 @@ class PreferencesDialog(tk.Toplevel): nb.Label( plugins_frame, # Help text in settings + # LANG: Tip/label about how to disable plugins text=_("Tip: You can disable a plugin by{CR}adding '{EXT}' to its folder name").format(EXT='.disabled') ).grid(columnspan=2, padx=self.PADX, pady=10, sticky=tk.NSEW, row=row.get()) @@ -855,6 +857,7 @@ class PreferencesDialog(tk.Toplevel): ) nb.Label( plugins_frame, + # LANG: Label on list of enabled plugins text=_('Enabled Plugins')+':' # List of plugins in settings ).grid(padx=self.PADX, sticky=tk.W, row=row.get()) @@ -895,6 +898,7 @@ class PreferencesDialog(tk.Toplevel): ) nb.Label( plugins_frame, + # LANG: Lable on list of user-disabled plugins text=_('Disabled Plugins')+':' # List of plugins in settings ).grid(padx=self.PADX, sticky=tk.W, row=row.get()) @@ -903,6 +907,7 @@ class PreferencesDialog(tk.Toplevel): columnspan=2, padx=self.PADX*2, sticky=tk.W, row=row.get() ) + # LANG: Label on Settings > Plugins tab notebook.add(plugins_frame, text=_('Plugins')) # Tab heading in settings def cmdrchanged(self, event=None): @@ -1105,7 +1110,7 @@ class PreferencesDialog(tk.Toplevel): event.widget.delete(0, tk.END) self.hotkey_text.insert( 0, - # No hotkey/shortcut currently defined + # LANG: No hotkey/shortcut set hotkeymgr.display(self.hotkey_code, self.hotkey_mods) if self.hotkey_code else _('None')) def hotkeylisten(self, event: 'tk.Event[Any]') -> str: @@ -1138,7 +1143,8 @@ class PreferencesDialog(tk.Toplevel): self.hotkey_play_btn['state'] = tk.NORMAL else: - event.widget.insert(0, _('None')) # No hotkey/shortcut currently defined + # LANG: No hotkey/shortcut set + event.widget.insert(0, _('None')) self.hotkey_only_btn['state'] = tk.DISABLED self.hotkey_play_btn['state'] = tk.DISABLED From 631446f619642be76510068f69beec2e6f8af371 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:02:39 +0100 Subject: [PATCH 17/22] Translations: Final LANG comments The script now outputs nothing about Unknown comments --- EDMarketConnector.py | 2 +- theme.py | 1 + ttkHyperlinkLabel.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index b3e48b00..cd75a2bf 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -702,7 +702,7 @@ class AppWindow(object): def set_labels(self): """Set main window labels, e.g. after language change.""" - self.cmdr_label['text'] = _('Cmdr') + ':' # LANG: Main window + self.cmdr_label['text'] = _('Cmdr') + ':' # LANG: Label for commander name in main window # LANG: 'Ship' or multi-crew role label in main window, as applicable self.ship_label['text'] = (monitor.state['Captain'] and _('Role') or _('Ship')) + ':' # Main window self.suit_label['text'] = _('Suit') + ':' # LANG: Main window diff --git a/theme.py b/theme.py index 702edf3c..cac65ba7 100644 --- a/theme.py +++ b/theme.py @@ -223,6 +223,7 @@ class _Theme(object): 'disabledforeground' : '#%02x%02x%02x' % (int(r/384), int(g/384), int(b/384)), 'highlight' : config.get_str('dark_highlight'), # Font only supports Latin 1 / Supplement / Extended, and a few General Punctuation and Mathematical Operators + # LANG: Label for commander name in main window 'font' : (theme > 1 and not 0x250 < ord(_('Cmdr')[0]) < 0x3000 and tkFont.Font(family='Euro Caps', size=10, weight=tkFont.NORMAL) or 'TkDefaultFont'), diff --git a/ttkHyperlinkLabel.py b/ttkHyperlinkLabel.py index c731ffac..2f64ab74 100644 --- a/ttkHyperlinkLabel.py +++ b/ttkHyperlinkLabel.py @@ -38,7 +38,8 @@ class HyperlinkLabel(platform == 'darwin' and tk.Label or ttk.Label, object): self.bind('', self._click) self.menu = tk.Menu(None, tearoff=tk.FALSE) - self.menu.add_command(label=_('Copy'), command = self.copy) # As in Copy and Paste + # LANG: Label for 'Copy' as in 'Copy and Paste' + self.menu.add_command(label=_('Copy'), command = self.copy) # As in Copy and Paste self.bind(platform == 'darwin' and '' or '', self._contextmenu) self.bind('', self._enter) From 9e8bd1926b37d35789f618d04679c1db2396e416 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:37:53 +0100 Subject: [PATCH 18/22] pre-commit: Run `scripts/find_localised_strings.py` This will report on any missing LANG comments at commit time. NB: set to run on all files in case of L10n/en.template changes. --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 25f65352..8c517ecf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,6 +66,15 @@ repos: args: [check, --bare, -r] language: system +# Check translation comments are up to date +- repo: local + hooks: + - id: LANG_comments + name: 'LANG comments' + language: system + entry: python scripts/find_localised_strings.py --compare-lang L10n/en.template --directory . --ignore coriolis-data --ignore dist.win32 + pass_filenames: false + default_language_version: python: python3.9 From 3f3e007305eac9e1fe4f98869c6ef9168bec724c Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:39:19 +0100 Subject: [PATCH 19/22] pre-commit: *Ensure* the LANG_comments always runs --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c517ecf..a8bfb90c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -74,6 +74,7 @@ repos: language: system entry: python scripts/find_localised_strings.py --compare-lang L10n/en.template --directory . --ignore coriolis-data --ignore dist.win32 pass_filenames: false + always_run: true default_language_version: python: python3.9 From 2de39f60ab39ace8a996a8b73f44fe8d89127988 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:50:28 +0100 Subject: [PATCH 20/22] l10n script: Complain if there's no current/prev LANG comment --- scripts/find_localised_strings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 3f1e347c..ac38c263 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -93,6 +93,9 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op if bad_comment is not None: print(bad_comment, file=sys.stderr) + if out is None: + print(f'No comment for {file}:{current} {line}') + return out From eb8b357e2728078785a122d8a7d8085e734bec40 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:51:08 +0100 Subject: [PATCH 21/22] l10n script: 'No comment for' on stderr --- scripts/find_localised_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index ac38c263..60b1a03e 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -94,7 +94,7 @@ def extract_comments(call: ast.Call, lines: list[str], file: pathlib.Path) -> Op print(bad_comment, file=sys.stderr) if out is None: - print(f'No comment for {file}:{current} {line}') + print(f'No comment for {file}:{current} {line}', file=sys.stderr) return out From efbc51c7142bbb39dd370f332f90950ac00fa759 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Mon, 7 Jun 2021 16:56:53 +0100 Subject: [PATCH 22/22] EDMarketConnector: Improve legacy LANG comments --- EDMarketConnector.py | 62 ++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index cd75a2bf..49984ea2 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -705,43 +705,43 @@ class AppWindow(object): self.cmdr_label['text'] = _('Cmdr') + ':' # LANG: Label for commander name in main window # LANG: 'Ship' or multi-crew role label in main window, as applicable self.ship_label['text'] = (monitor.state['Captain'] and _('Role') or _('Ship')) + ':' # Main window - self.suit_label['text'] = _('Suit') + ':' # LANG: Main window - self.system_label['text'] = _('System') + ':' # LANG: Main window - self.station_label['text'] = _('Station') + ':' # LANG: Main window + self.suit_label['text'] = _('Suit') + ':' # LANG: Label for 'Suit' line in main UI + self.system_label['text'] = _('System') + ':' # LANG: Label for 'System' line in main UI + self.station_label['text'] = _('Station') + ':' # LANG: Label for 'Station' line in main UI self.button['text'] = self.theme_button['text'] = _('Update') # LANG: Update button in main window if platform == 'darwin': - self.menubar.entryconfigure(1, label=_('File')) # LANG: Menu title on OSX - self.menubar.entryconfigure(2, label=_('Edit')) # LANG: Menu title on OSX - self.menubar.entryconfigure(3, label=_('View')) # LANG: Menu title on OSX - self.menubar.entryconfigure(4, label=_('Window')) # LANG: Menu title on OSX - self.menubar.entryconfigure(5, label=_('Help')) # LANG: Menu title on OSX + self.menubar.entryconfigure(1, label=_('File')) # LANG: 'File' menu title on OSX + self.menubar.entryconfigure(2, label=_('Edit')) # LANG: 'Edit' menu title on OSX + self.menubar.entryconfigure(3, label=_('View')) # LANG: 'View' menu title on OSX + self.menubar.entryconfigure(4, label=_('Window')) # LANG: 'Window' menu title on OSX + self.menubar.entryconfigure(5, label=_('Help')) # LANG: Help' menu title on OSX self.system_menu.entryconfigure(0, label=_("About {APP}").format( APP=applongname)) # LANG: App menu entry on OSX - self.system_menu.entryconfigure(1, label=_("Check for Updates...")) # LANG: Menu item - self.file_menu.entryconfigure(0, label=_('Save Raw Data...')) # LANG: Menu item - self.view_menu.entryconfigure(0, label=_('Status')) # LANG: Menu item - self.help_menu.entryconfigure(1, label=_('Privacy Policy')) # LANG: Help menu item - self.help_menu.entryconfigure(2, label=_('Release Notes')) # LANG: Help menu item + self.system_menu.entryconfigure(1, label=_("Check for Updates...")) # LANG: Help > Check for Updates + self.file_menu.entryconfigure(0, label=_('Save Raw Data...')) # LANG: File > Save Raw Data... + self.view_menu.entryconfigure(0, label=_('Status')) # LANG: File > Status + self.help_menu.entryconfigure(1, label=_('Privacy Policy')) # LANG: Help > Privacy Policy + self.help_menu.entryconfigure(2, label=_('Release Notes')) # LANG: Help > Release Notes else: - self.menubar.entryconfigure(1, label=_('File')) # LANG: Menu title - self.menubar.entryconfigure(2, label=_('Edit')) # LANG: Menu title - self.menubar.entryconfigure(3, label=_('Help')) # LANG: Menu title - self.theme_file_menu['text'] = _('File') # LANG: Menu title - self.theme_edit_menu['text'] = _('Edit') # LANG: Menu title - self.theme_help_menu['text'] = _('Help') # LANG: Menu title + self.menubar.entryconfigure(1, label=_('File')) # LANG: 'File' menu title + self.menubar.entryconfigure(2, label=_('Edit')) # LANG: 'Edit' menu title + self.menubar.entryconfigure(3, label=_('Help')) # LANG: 'Help' menu title + self.theme_file_menu['text'] = _('File') # LANG: 'File' menu title + self.theme_edit_menu['text'] = _('Edit') # LANG: 'Edit' menu title + self.theme_help_menu['text'] = _('Help') # LANG: 'Help' menu title # File menu - self.file_menu.entryconfigure(0, label=_('Status')) # LANG: Menu item - self.file_menu.entryconfigure(1, label=_('Save Raw Data...')) # LANG: Menu item - self.file_menu.entryconfigure(2, label=_('Settings')) # LANG: Item in the File menu on Windows - self.file_menu.entryconfigure(4, label=_('Exit')) # LANG: Item in the File menu on Windows + self.file_menu.entryconfigure(0, label=_('Status')) # LANG: File > Status + self.file_menu.entryconfigure(1, label=_('Save Raw Data...')) # LANG: File > Save Raw Data... + self.file_menu.entryconfigure(2, label=_('Settings')) # LANG: File > Settings (Windows) + self.file_menu.entryconfigure(4, label=_('Exit')) # LANG: File > Exit # Help menu - self.help_menu.entryconfigure(0, label=_('Documentation')) # LANG: Help menu item - self.help_menu.entryconfigure(1, label=_('Privacy Policy')) # LANG: Help menu item - self.help_menu.entryconfigure(2, label=_('Release Notes')) # LANG: Help menu item - self.help_menu.entryconfigure(3, label=_('Check for Updates...')) # LANG: Menu item - self.help_menu.entryconfigure(4, label=_("About {APP}").format(APP=applongname)) # LANG: App menu entry + self.help_menu.entryconfigure(0, label=_('Documentation')) # LANG: Help > Documentation + self.help_menu.entryconfigure(1, label=_('Privacy Policy')) # LANG: Help > Privacy Policy + self.help_menu.entryconfigure(2, label=_('Release Notes')) # LANG: Help > Release Notes + self.help_menu.entryconfigure(3, label=_('Check for Updates...')) # LANG: Help > Check for Updates... + self.help_menu.entryconfigure(4, label=_("About {APP}").format(APP=applongname)) # LANG: Help > About App # Edit menu self.edit_menu.entryconfigure(0, label=_('Copy')) # LANG: As in Copy and Paste @@ -1042,7 +1042,7 @@ class AppWindow(object): else: self.cmdr['text'] = monitor.cmdr - self.ship_label['text'] = _('Ship') + ':' # LANG: Main window + self.ship_label['text'] = _('Ship') + ':' # LANG: 'Ship' label in main UI # TODO: Show something else when on_foot if monitor.state['ShipName']: @@ -1065,7 +1065,7 @@ class AppWindow(object): else: self.cmdr['text'] = '' - self.ship_label['text'] = _('Ship') + ':' # LANG: Main window + self.ship_label['text'] = _('Ship') + ':' # LANG: 'Ship' label in main UI self.ship['text'] = '' if monitor.cmdr and monitor.is_beta: @@ -1739,7 +1739,7 @@ sys.path: {sys.path}''' ) # Substitute in the other words. - # LANG: words for use in python 2 plugin error + # LANG: 'Plugins' tab / 'File' menu / 'File' > 'Settings' popup_text = popup_text.format(PLUGINS=_('Plugins'), FILE=_('File'), SETTINGS=_('Settings'), DISABLED='.disabled') # And now we do need these to be actual \r\n