Skip to content

Code Quality: Refactored command titles and subtitles for clarity and consistency #17146

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Lukiluc29
Copy link
Contributor

Resolved / Related Issues

To prevent extra work, all changes to the Files codebase must link to an approved issue marked as Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.

Steps used to test these changes

Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.

  1. Reviewed updated strings

@Lukiluc29
Copy link
Contributor Author

Normally, all the changes I had in mind have been implemented. It's up to you to tell me if everything suits you or if there are any changes to be made.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors various UI command titles and subtitles to improve clarity and consistency across the Files application.

  • Updated labels and descriptions provide more context (e.g., specifying “in Windows Terminal,” “in the current view”).
  • Changes span multiple command strings to align wording and improve user comprehension.
Comments suppressed due to low confidence (3)

src/Files.App/Strings/en-US/Resources.resw:2439

  • Changing 'Cut' to 'Move' may alter the intended behavior; verify that the implementation aligns with this new terminology if the change is intentional.
<value>Move selected {0, plural, one {item} other {items}} to the clipboard</value>

src/Files.App/Strings/en-US/Resources.resw:3025

  • Changing 'Undo' to 'Revert' might modify the intended semantics of the command; please confirm that this wording accurately reflects the functionality.
<value>Revert the last file operation</value>

src/Files.App/Strings/en-US/Resources.resw:3028

  • Changing 'Redo' to 'Repeat' may lead to ambiguity in command behavior; verify that this change is consistent with the underlying functionality.
<value>Repeat the last file operation</value>

@mdtauk
Copy link
Contributor

mdtauk commented May 21, 2025

I am assuming we can't grab the name of the user's set default terminal, to make this string as accurate as we can.

@Lukiluc29
Copy link
Contributor Author

I am assuming we can't grab the name of the user's set default terminal, to make this string as accurate as we can.

No, currently it is just a fixed string

@yaira2
Copy link
Member

yaira2 commented May 21, 2025

Just to clarify, actions have two strings.
Label/Title which is used in menus and tooltips.
Description which is used in the Command Palette.

@@ -130,7 +130,7 @@
<value>Copy path with quotes</value>
</data>
<data name="CopyItemPathWithQuotes" xml:space="preserve">
<value>Copy selected item path with quotes</value>
<value>Copy item path with quotes</value>
Copy link
Member

Choose a reason for hiding this comment

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

selected helps provide a contrast with the action to copy the path of the current location.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean. I removed the word "selected" because it wasn't useful to me. Also, the subtitle is there to properly describe the action, where it was correctly mentioned that it was only the selected item, and to shorten the title.

Copy link
Member

Choose a reason for hiding this comment

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

To reemphasize, Actions don't have subtitles. This is the label used in tooltips (if we ever expose this option on the toolbar).

@@ -232,7 +232,7 @@
<value>Continue where you left off</value>
</data>
<data name="SettingsOnStartupOpenANewTab.Content" xml:space="preserve">
<value>Open a new tab</value>
<value>Open a new tab in the same window</value>
Copy link
Member

Choose a reason for hiding this comment

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

Unless 'window' is mentioned, it should be self-understood that tabs open in the same window. It's also worth noting this is a setting, not an action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this because I had no other solution to avoid having the same title and subtitle. To avoid this, I can change the subtitle to "A new tab will appear next to the current tab"

Copy link
Member

Choose a reason for hiding this comment

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

This string is used for the startup settings as well. If we do make a change here, a new string will need to be added for the action. As a sidenote, we don't have subtitles for actions, the two strings are used for different scenarios. If in a few cases the string is a duplicate, it's not a problem.

@@ -2208,7 +2208,7 @@
<value>Edit settings file</value>
</data>
<data name="EditSettingsFileDescription" xml:space="preserve">
<value>Open settings file in your default editor</value>
<value>Open the configuration file in a text editor</value>
Copy link
Member

@yaira2 yaira2 May 25, 2025

Choose a reason for hiding this comment

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

Can you share info on the change from 'settings' to 'configuration'? I would also avoid the term 'a text editor' considering the file is not a text file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We switched from "settings" to "configuration" because "configuration file" is the more common and precise term in technical contexts.
"Settings" usually refers to individual options or UI menus, while "configuration" covers the whole structure that defines how a system or program behaves.
Since we're talking about a file that controls the behavior of the application, "configuration file" felt more appropriate.
But I can revert "in a text editor" to return to "in your default editor".

@@ -2385,25 +2385,25 @@
<value>Preview popup</value>
</data>
<data name="ToggleCompactOverlay" xml:space="preserve">
<value>Toggle compact overlay</value>
<value>Compact overlay</value>
Copy link
Member

Choose a reason for hiding this comment

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

What about compact overlay? 'Toggle' seems more appropriate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is simply the title of the action, and for me, it is enough to put "Compact Overlay", because "Toggle" does not give more information about the state of the mode. Also, since I removed it from the title, I left it in the subtitle to avoid repeating "Toggle" in the title and subtitle.

Copy link
Member

Choose a reason for hiding this comment

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

'Compact Overlay' sounds like it's switching to Compact Overlay.

left it in the subtitle to avoid repeating "Toggle" in the title and subtitle.

As mentioned earlier, we don't have subtitles.

</data>
<data name="ExitCompactOverlayDescription" xml:space="preserve">
<value>Exit compact overlay mode</value>
<value>Switch to normal overlay mode</value>
Copy link
Member

Choose a reason for hiding this comment

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

The app is either in "compact overlay mode' or not, 'normal overlay' isn't a mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the name of the mode when compact mode is not enabled? In this case, it is better to give it a name rather than saying "or not."

Copy link
Member

@yaira2 yaira2 May 26, 2025

Choose a reason for hiding this comment

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

It doesn't really have a name, the window is either in the Compact Overlay state or not. The closest I can think of is 'Regular mode' of 'Full mode', but that doesn't really provide a lot of context.

</data>
<data name="EnterCompactOverlayDescription" xml:space="preserve">
<value>Enter compact overlay mode</value>
<value>Switch to compact overlay mode</value>
Copy link
Member

Choose a reason for hiding this comment

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

This change is good in theory, but it would be best to revert for consistency with 'Exit compact overlay'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but this is consistent with "switch to normal overlay mode"

</data>
<data name="RenameDescription" xml:space="preserve">
<value>Rename selected item</value>
<value>Change the name of the selected item</value>
Copy link
Member

Choose a reason for hiding this comment

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

We've been using the term 'Rename' since that start of Files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The idea behind all these changes, as I explained earlier, is to avoid having an identical title and subtitle. So I understand that some sentences could be simplified, but otherwise, it would be pointless to have a title and subtitle containing the same sentence.

Copy link
Member

Choose a reason for hiding this comment

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

Same as above, that said, we don't need duplicate strings in the resource file. If there are any duplicates, we can remove the extra one and reuse the string.

</data>
<data name="SelectAllDescription" xml:space="preserve">
<value>Select all items</value>
<value>Select all items in the current view</value>
Copy link
Member

Choose a reason for hiding this comment

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

Is this any clearer than 'Select all items'?

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's the same thing. This is to add more precision because last time, my grandmother thought she had selected all the files from the root of her key and told me that it would be better to put "in the current view" (and to avoid repetition with the title so I thought that in passing I could add precision to the description)

Copy link
Member

Choose a reason for hiding this comment

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

If we move forward with the change, it will need to update based on the context (eg. pane, column).

@@ -2499,7 +2499,7 @@
<value>Clear selected items</value>
</data>
<data name="ToggleSelectDescription" xml:space="preserve">
<value>Toggle item selection</value>
<value>Invert selection of items</value>
Copy link
Member

Choose a reason for hiding this comment

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

There is a different action for inverting selection, this action is for toggling the selection of the focused item. Please revert.

@@ -2583,28 +2583,28 @@
<value>Rotate selected {0, plural, one {image} other {images}} to the right</value>
</data>
<data name="OpenSettingsDescription" xml:space="preserve">
<value>Open settings page</value>
<value>Open the application settings page</value>
Copy link
Member

Choose a reason for hiding this comment

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

Is the term 'application' helpful? Perhaps 'Open the settings page' would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more specific as it can be confusing with Windows Settings, as Windows is often mentioned in the app from what I've seen.

</data>
<data name="LayoutDecreaseSizeDescription" xml:space="preserve">
<value>Decrease item size in the current view</value>
<value>Reduce the icon or item size in view</value>
Copy link
Member

Choose a reason for hiding this comment

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

'Decrease' and 'Increase' seem to be more commonly used for these scanrios.

Copy link
Contributor

Choose a reason for hiding this comment

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

Without context - the words "reduce size" go really well together. Just saying 😬

</data>
<data name="LayoutAdaptiveDescription" xml:space="preserve">
<value>Switch views adaptively</value>
<value>Switch to adjusting layout mode</value>
Copy link
Member

Choose a reason for hiding this comment

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

I'm not so sure about this change.

@@ -2700,19 +2700,19 @@
<value>Toggle group sort direction</value>
</data>
<data name="NewTabDescription" xml:space="preserve">
<value>Open a new tab</value>
<value>Open a new tab in the same window</value>
Copy link
Member

Choose a reason for hiding this comment

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

</data>
<data name="NavigateBackDescription" xml:space="preserve">
<value>Navigate backward</value>
<value>Navigate to the previous folder</value>
Copy link
Member

Choose a reason for hiding this comment

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

There are page types that are not folders (home, release notes, settings). I would prefer reverting to reduce the changes to localization files, but if you feel it's not clear enough, we could use the term 'location'.

Copy link
Member

Choose a reason for hiding this comment

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

It's also worth clarifying that users aren't navigating to the previous or next folder, these actions or to move backwards and forwards in the navigation history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will try to change this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suggest: "Go back to the previous location in the navigation history"

@@ -2736,19 +2736,19 @@
<value>Close tabs other than selected tab</value>
</data>
<data name="CloseAllTabsDescription" xml:space="preserve">
<value>Close all tabs including the current tab</value>
<value>Close all open tabs including the current tab</value>
Copy link
Member

Choose a reason for hiding this comment

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

'Open' seems a bit redundant as you can't close a tab that's already closed 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

By extent: "all" logically includes "current" tab 🤓

</data>
<data name="ReopenClosedTabDescription" xml:space="preserve">
<value>Reopen recently closed tab</value>
<value>Reopen the last closed tab</value>
Copy link
Member

Choose a reason for hiding this comment

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

This action isn't limited to the last tab.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but you won't open multiple tabs at once, only the last one. To reopen the last three, for example, run the action three times.

Copy link
Member

Choose a reason for hiding this comment

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

True, however the last closed tab was already reopened.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but we can't open a tab that is already open

Copy link
Contributor

@Jay-o-Way Jay-o-Way left a comment

Choose a reason for hiding this comment

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

Just saying 😬

@@ -2229,7 +2229,7 @@
<value>Settings</value>
</data>
<data name="DoubleClickBlankSpaceToGoUp" xml:space="preserve">
<value>Double click on a blank space to go up one directory</value>
<value>Double-click a blank space to navigate one level up the folder tree</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

"a blank space" makes it sound like "space" is a countable noun, like a space character.

Suggested change
<value>Double-click a blank space to navigate one level up the folder tree</value>
<value>Double-click blank space to navigate one level up the folder tree</value>

</data>
<data name="LayoutDecreaseSizeDescription" xml:space="preserve">
<value>Decrease item size in the current view</value>
<value>Reduce the icon or item size in view</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Without context - the words "reduce size" go really well together. Just saying 😬

@@ -2736,19 +2736,19 @@
<value>Close tabs other than selected tab</value>
</data>
<data name="CloseAllTabsDescription" xml:space="preserve">
<value>Close all tabs including the current tab</value>
<value>Close all open tabs including the current tab</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

By extent: "all" logically includes "current" tab 🤓

@@ -3016,16 +3016,16 @@
<value>Delete permanently</value>
</data>
<data name="DeleteItemPermanentlyDescription" xml:space="preserve">
<value>Delete selected {0, plural, one {item} other {items}} permanently</value>
<value>Delete selected {0, plural, one {item} other {items}} permanently without recovery</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems slightly redundant...

</data>
<data name="PlayAllDescription" xml:space="preserve">
<value>Play the selected media files</value>
</data>
<data name="UndoDescription" xml:space="preserve">
<value>Undo the last file operation</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought undo and redo were pretty common words.

@@ -3139,10 +3139,10 @@
<value>Properties</value>
</data>
<data name="OpenClassicProperties" xml:space="preserve">
<value>Open File Explorer properties</value>
<value>Explorer properties</value>
Copy link
Contributor

Choose a reason for hiding this comment

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

In general, it's regarded as good practice to either start with a verb, or at least include a verb. What action does this control so?

@Lukiluc29
Copy link
Contributor Author

For strings that are modified but used elsewhere than in actions, can we create new strings so that they are individual and thus make the recommended changes without any problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Redundant Titles and Subtitles in Command Labels
5 participants