Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed translation hook in EDSM.py and Inara.py #2086

Merged
merged 3 commits into from
Dec 6, 2023
Merged

Conversation

GLWine
Copy link
Contributor

@GLWine GLWine commented Oct 31, 2023

Corrected the text of code line 295 of the EDSM.py file and code line 355 of the Inara.py file;
The text text="Show API Key" cannot be translated as indicated, so I rewrote it as text=_('Show API Key').

Corrected the text of code line 295;
The text text="Show API Key" cannot be translated as indicated, so I rewrote it as text=_('Show API Key').
Corrected the text of code line 355;
The text text="Show API Key" cannot be translated as indicated, so I rewrote it as text=_('Show API Key').
@Athanasius
Copy link
Contributor

These lines will need LANG comments as well, as per https://github.com/EDCD/EDMarketConnector/blob/main/docs/Translations.md#add-a-lang-comment

@GLWine
Copy link
Contributor Author

GLWine commented Oct 31, 2023

These lines will need LANG comments as well, as per https://github.com/EDCD/EDMarketConnector/blob/main/docs/Translations.md#add-a-lang-comment

They are already commented above, instead of to the right of the text.
Bad

These lines will need LANG comments as well, as per https://github.com/EDCD/EDMarketConnector/blob/main/docs/Translations.md#add-a-lang-comment

Should I do this in the English language file?

@Athanasius
Copy link
Contributor

These lines will need LANG comments as well, as per main/docs/Translations.md#add-a-lang-comment

They are already commented above, instead of to the right of the text. Bad

These lines will need LANG comments as well, as per main/docs/Translations.md#add-a-lang-comment

Should I do this in the English language file?

OK, I'm obviously blind today. Yes, on the same line is preferred, so long as it fits without making the line over 120 characters long. Don't bother with en.template, because it should be auto-generated using a script that looks for the _(...) calls and associated LANG comments.

@GLWine
Copy link
Contributor Author

GLWine commented Oct 31, 2023

These lines will need LANG comments as well, as per main/docs/Translations.md#add-a-lang-comment

They are already commented above, instead of to the right of the text. Bad

These lines will need LANG comments as well, as per main/docs/Translations.md#add-a-lang-comment

Should I do this in the English language file?

OK, I'm obviously blind today. Yes, on the same line is preferred, so long as it fits without making the line over 120 characters long. Don't bother with en.template, because it should be auto-generated using a script that looks for the _(...) calls and associated LANG comments.

Forgive me, when I wrote to put them above the comments I was actually thinking of a previous version. They are actually placed to the side as done on other points. So I don't understand what you are specifically referring to.

diff --git a/plugins/edsm.py b/plugins/edsm.py
index 2f644dcb9..82324ced4 100644
--- a/plugins/edsm.py
+++ b/plugins/edsm.py
@@ -352,7 +352,7 @@ def plugin_prefs(parent: ttk.Notebook, cmdr: Optional[str], is_beta: bool) -> tk
 
     show_password_checkbox = nb.Checkbutton(
         frame,
-        text="Show API Key",
+        text=_('Show API Key'), # LANG: Text EDSM Show API Key
         variable=show_password_var,
         command=toggle_password_visibility
     )


diff --git a/plugins/inara.py b/plugins/inara.py
index efe010df6..ec034840b 100644
--- a/plugins/inara.py
+++ b/plugins/inara.py
@@ -292,7 +292,7 @@ def plugin_prefs(parent: ttk.Notebook, cmdr: str, is_beta: bool) -> tk.Frame:
     show_password_var.set(False)  # Password is initially masked
     show_password_checkbox = nb.Checkbutton(
         frame,
-        text="Show API Key",
+        text=_('Show API Key'), # LANG: Text Inara Show API key
         variable=show_password_var,
         command=toggle_password_visibility,
     )

@Rixxan
Copy link
Contributor

Rixxan commented Dec 6, 2023

Thanks for catching these!

@Rixxan Rixxan merged commit e228572 into EDCD:develop Dec 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants