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

Use custom application name in tray popup menu #106

Merged
merged 3 commits into from
Mar 2, 2018

Conversation

minlexx
Copy link
Contributor

@minlexx minlexx commented Feb 15, 2018

  • Use parameter {appname} for tray icon lang strings
  • Update mainwindow.cpp to use parametrized lang calls

Should I update other lang files like lang_de.strings?
"lng_mac_menu_show" change in mac specific section may be unrelated, cannot test with MacOS

Update mainwindow.cpp to use parametrized lang calls
@crackedmind
Copy link
Member

@@ -1427,6 +1427,6 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
"lng_mac_menu_add_contact" = "Add Contact";
"lng_mac_menu_new_group" = "New Group";
"lng_mac_menu_new_channel" = "New Channel";
"lng_mac_menu_show" = "Show Telegram";
"lng_mac_menu_show" = "Show {telegram}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{telegram}{appname}?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mac-specific section contains the following strings:

"lng_mac_menu_hide_telegram" = "Hide {telegram}";
"lng_mac_menu_quit_telegram" = "Quit {telegram}";
"lng_mac_menu_about_telegram" = "About {telegram}";

So I decided to use {telegram} for "lng_mac_menu_show" too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still suggest to replace if with {appname}. Guys, what would you say?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not work, this line change change is bad because mac compilation should fail. Code calling this translation should be fixed as well, both with {telegram} constant or {appname} constant. I can't test build on Mac :)

@ForNeVeR
Copy link
Member

ForNeVeR commented Feb 15, 2018

Alright, it looks ok to me 👍
But fix the build, please.

@crackedmind
Copy link
Member

it requires to change Mac-specific code
@crackedmind
Copy link
Member

@leha-bot leha-bot added this to the Refactoring milestone Feb 15, 2018
@leha-bot leha-bot added category:Enhancement This is a proposed improvement category:Infrastructure Related to build tools, automation category:Refactoring Related to code refactoring labels Feb 15, 2018
@minlexx
Copy link
Contributor Author

minlexx commented Feb 19, 2018

lang.strings file may be needed to be loaded manually, by opening application settings and typing loadlang there, then select this file to test this PR.

@leha-bot leha-bot self-assigned this Mar 2, 2018
@leha-bot leha-bot merged commit 747e8b3 into procxx:dev Mar 2, 2018
@minlexx minlexx deleted the appname_in_tray_menu branch March 2, 2018 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:Enhancement This is a proposed improvement category:Infrastructure Related to build tools, automation category:Refactoring Related to code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants