-
-
Notifications
You must be signed in to change notification settings - Fork 363
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
feat: Add printer name to browser tab while printing or complete #1371
feat: Add printer name to browser tab while printing or complete #1371
Conversation
Adds the printer name to the browser tab during printing and complete statuses.
Language file analysis report:
|
Thx for your PR. I have only one question about it. What happens when the user don't set a printername in the settings? |
Language file analysis report:
|
@meteyou - good question, I updated this PR to handle that. Before it would just show the hyphen, but now I am conditionally showing the hyphen. Take a look at the PR. Here's two examples: printername not defined: |
Language file analysis report:
|
Language file analysis report:
|
hmm... maybe my "idea" with adding the |
Language file analysis report:
|
@meteyou Are you saying to force it in the getter? Like this: return i18n.t('App.Titles.PrintingETA', {
percent: percent,
filename: state.printer?.print_stats?.filename,
eta
}) + state.gui?.general.printername ? `- ${state.gui?.general.printername}` : "" If so, I feel like that's not very clean... I feel like it would be cleaner to just supply the |
i would use write it a little bit different (just for readability): let output = i18n.t('App.Titles.PrintingETA', {
percent: percent,
filename: state.printer?.print_stats?.filename,
eta
})
// add printer name if it exists
if (state.gui?.general.printername) output += ` - ${state.gui.general.printername}`
return output I just don't like to add "decorators" in a translation variable. just my 2 cents about this topic... |
@
@meteyou - I think that makes sense. I think it does all come down to style - looks clean to me. I updated this PR and removed it from the translation keys. Let me know what you think! Thanks for the clarification! |
@meteyou - anything else you need from me on this PR, or is it good to go? |
LGTM! Thanks! |
Hi, is there any way one could choose to have the machine name in front of the tab description? I would even choose not to have the filename on the tab description, maybe there could be some setting for that. |
Adds the printer name to the browser tab during printing and complete statuses.
Description
This PR addresses #1322 and adds the printer name to the browser tab while the printer is printing, or when the print is complete.
Related Tickets & Documents
#1322
Mobile & Desktop Screenshots/Recordings
[optional] Are there any post-deployment tasks we need to perform?
No post-deployment tasks.