-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add settings UI string localization #7833
Conversation
NOTE: the merge conflict is trivial to resolve. But we'll resolve that after the PR gets some feedback. That way, we can still test this out as if the settings editor was its own app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few places the uid wasn't named in order (largest to smallest).
For the ones that mention a comment, I recommend looking at some of the other resw files for what that should look like.
<data name="Globals_CopyFormatting.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | ||
<value>When checked, the color and font formatting of selected text is also copied to your clipboard. When unchecked, only plain text is copied to your clipboard.</value> | ||
</data> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(note to self) Grr. We need to update the entire control to support the copy formatting array (i.e. [ "html" ]
). This is minor though, so we'll push this work off until like next month.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(same dealio with the dynamic profiles - but lets just turn those into follow-up tasks)
<value>Automatically create new profiles when new shells are installed</value> | ||
</data> | ||
<data name="Globals_DisableDynamicProfiles.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | ||
<value>Enables all of the dynamic profile generators, adding their profiles to the list of profiles on startup.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>Enables all of the dynamic profile generators, adding their profiles to the list of profiles on startup.</value> | |
<value>Disables all of the dynamic profile generators, adding their profiles to the list of profiles on startup.</value> |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It felt weird to have a "negative effect" checkbox. I think this was mentioned in my spec review for the settings UI. I was thinking we would flip the checkbox logic for this one.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all kinda just nits, but I'm blocking so GitHub will let me actually see the changes since my last review.
<value>Equal</value> | ||
</data> | ||
<data name="Globals_ForceFullRepaint.Content" xml:space="preserve"> | ||
<value>Screen redrawing</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<value>Screen redrawing</value> | |
<value>Full screen redrawing</value> |
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it only takes effect when in full screen mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good lord.
Can we call it "Disable differential drawing" or "use differential drawing" or something and not avoid negatives? The tooltip can explain what it is.
I may unsubscribe if we're already getting into individual word-by-word bikeshedding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If now's not the time for nitpicking the text, when is? When we're reviewing a 200 file mega merge of all the settings UI code? I'd rather not, and be able to mentally check "yea, we already reviewed the resources".
I think that "Disable differential drawing" is the most accurate to what this does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid using negatives for checkboxes. I can change it to "Enable differential drawing" and flip the logic of the tooltip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this is a troubleshooting option. It's only to be used when there's trouble to be shot. If the user opens this up and sees one of the troubleshooting options turned on, what are they going to think?
As a user, I would think "that's guarded with an electric fence, I should not turn it off" or "that's weird. I'll see how it works without this option that is to be used in case of trouble turned on."
I have not seen a clear articulation on why exactly we want to avoid using negatives?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some guidelines here that say we should use positive messaging:
In general, prefer positive phrasing. For example, use do instead of do not, and notify instead of do not notify.
Exception: The check box label, "Don't show this message again," is widely used.
On the flip side, we could rename it to something close to its actual name like "Force full repaint" or "Redraw entire screen when display updates".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does "disable" count as negative phrasing though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm partial to "Redraw entire screen when display updates" with a subtitle indicating that it may be helpful when troubleshooting an issue or that it will reduce performance. Every option on this page, I think, either needs that subtitle or needs the whole page to have a disclaimer about it.
We can't be surfacing these options as just normal every-day run-of-the-mill things users should be toggling. This is a product made for power users, we should treat them as though they can make decisions and the best way to enable them to do so is to inform them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue having a negative effect on a checkbox may be confusing. I'm happy to change it to "Redraw entire screen when display updates" and add a disclaimer to the top of the page.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
|
||
<muxc:NavigationViewItem.MenuItems> | ||
<muxc:NavigationViewItem Tag="GlobalProfile_Nav" > | ||
<muxc:NavigationViewItem x:Uid="Nav_GlobalProfile" | ||
Tag="GlobalProfile_Nav"> | ||
<!-- Couldn't find spaceship --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: is this <!-- Couldn't find spaceship -->
comment just a copy-paste artifact, or is it actually meaningful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was from #7370 (and the hackathon). We have a few missing icons that may need to be designed. "Spaceship" is one of them. Currently tracked in the epic.
<value>Theme</value> | ||
</data> | ||
<data name="Globals_Theme.[using:Windows.UI.Xaml.Controls]ToolTipService.ToolTip" xml:space="preserve"> | ||
<value>Sets the theme of the application. The value 'system' refers to the active Windows system theme.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to do the
<comment>{Locked="\"system\""}</comment>
thing here for "system" to prevent it from being localized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, if you can, just remove the 'system' sentence and put that on the 'system' value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple things:
- I changed this to 'default' since 'system' isn't an option on the UI
- You can't add tooltips to specific radio button items, so I'll add a comment similar to the previous ones about replacing the text with the Uid value
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw
Outdated
Show resolved
Hide resolved
Easiest way to make the name fixes is probably with a find&replace. Idk if VS lets you find and replace across the xaml and resw files, but if it doesn't, VS Code definitely does. Hope this helps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea this is way better, thanks!
I'll handle merging this into the feature branch (just need to make sure the merge conflict in the vcxproj is resolved properly). Thanks a ton @cinnamon-msft! Just for transparency, there's still one last thing that needs to be localized: the Save button. But we don't have a save button yet. We'll throw that together soon then get localization locked and ship all of this out. 😊 |
@msftbot merge this in 5 minutes |
Hello @carlos-zamora! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> Moved all strings into resources file for localization. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> <!-- Please review the items on the PR checklist before submitting--> * [ ] Closes #xxx * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
Summary of the Pull Request
Moved all strings into resources file for localization.
References
#1564 - Epic
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed