Skip to content

Code Quality: Removed lang ids and use learn.ms.com #11941

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

Merged
merged 2 commits into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This Privacy Policy ("Policy") for Files ("we", "us", or "our") describes how an

**Diagnostic Information.** Our Application collects non-personably identifiable diagnostic data such as fault analysis and performance logs. This information may include technical details about your device, such as its make, model, operating system, and Application version. In addition, Files may store log files containing diagnostic information on the user's device. These files are not shared with us by default.

**Usage Information.** We collect non-identifiable information about your use of our Services, including but not limited to interactions within the Application, enabled user preferences (Application settings), and usage patterns. Furthermore, our Application uses certain Microsoft services including Microsoft AppCenter, and Microsoft Partner Center to collect usage data. AppCenter data is kept for 30 days. To learn more about how data is collected, used, and disclosed by Microsoft and its subsidiaries, please review the Microsoft Privacy Policy Statement available here: https://privacy.microsoft.com/en-us/privacystatement
**Usage Information.** We collect non-identifiable information about your use of our Services, including but not limited to interactions within the Application, enabled user preferences (Application settings), and usage patterns. Furthermore, our Application uses certain Microsoft services including Microsoft AppCenter, and Microsoft Partner Center to collect usage data. AppCenter data is kept for 30 days. To learn more about how data is collected, used, and disclosed by Microsoft and its subsidiaries, please review the Microsoft Privacy Policy Statement available here: https://privacy.microsoft.com/privacystatement

Please note that any information we collect is non-identifiable and does not include any personal data. We do not share collected information with any third parties.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Files also offers advanced features such as file tagging for easy organization,
- MSVC v143 - VS 2022 C++ x64/x86 or ARM64 build tools (latest)
- C++ ATL for latest v143 build tools (x86 & x64 or ARM64)
- Git for Windows
- [Windows App SDK 1.2](https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads#current-releases)
- [Windows App SDK 1.2](https://learn.microsoft.com/windows/apps/windows-app-sdk/downloads#current-releases)

### 2. Clone the repository

Expand Down
10 changes: 5 additions & 5 deletions specs/disco/spec-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ its APIs that make up a new feature in WinUI. -->
that want to evaluate and give feedback on the API, as part of
the submission process. When it's complete
it will be incorporated into the public documentation at
docs.microsoft.com (http://docs.microsoft.com/uwp/toolkits/winui/).
learn.microsoft.com (http://learn.microsoft.com/uwp/toolkits/winui/).
Hopefully we'll be able to copy it mostly verbatim.
So the second audience is everyone that reads there to learn how
and why to use this API. -->
Expand All @@ -15,7 +15,7 @@ and why to use this API. -->
in this spec. -->

<!-- This section and the appendix are the only sections that likely
do not get copied to docs.microsoft.com; they're just an aid to reading this spec. -->
do not get copied to learn.microsoft.com; they're just an aid to reading this spec. -->

<!-- If you're modifying an existing API, included a link here to the
existing page(s) -->
Expand All @@ -31,7 +31,7 @@ the reader "go read 100 pages of background information posted at ...". -->
# Description
<!-- Use this section to provide a brief description of the feature.
For an example, see the introduction to the PasswordBox control
(http://docs.microsoft.com/windows/uwp/design/controls-and-patterns/password-box). -->
(http://learn.microsoft.com/windows/uwp/design/controls-and-patterns/password-box). -->


# Examples
Expand All @@ -46,7 +46,7 @@ example code with each description. The general format is:
<!-- Code samples should be in C# and/or C++/WinRT -->

<!-- As an example of this section, see the Examples section for the PasswordBox control
(https://docs.microsoft.com/windows/uwp/design/controls-and-patterns/password-box#examples). -->
(https://learn.microsoft.com/windows/uwp/design/controls-and-patterns/password-box#examples). -->


# Remarks
Expand All @@ -68,7 +68,7 @@ isn't the type's default (for example an int-typed property that doesn't default
with a "///" comment above the member or type. -->

# API Details
<!-- The exact API, in MIDL3 format (https://docs.microsoft.com/en-us/uwp/midl-3/) -->
<!-- The exact API, in MIDL3 format (https://learn.microsoft.com/uwp/midl-3/) -->

# Appendix
<!-- Anything else that you want to write down for posterity, but
Expand Down
6 changes: 3 additions & 3 deletions specs/disco/storage-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Lastly, the current *lazy loading* pattern was introduced at a time before all l
## Description
<!-- Use this section to provide a brief description of the feature.
For an example, see the introduction to the PasswordBox control
(http://docs.microsoft.com/windows/uwp/design/controls-and-patterns/password-box). -->
(http://learn.microsoft.com/windows/uwp/design/controls-and-patterns/password-box). -->


## Examples
Expand All @@ -44,7 +44,7 @@ example code with each description. The general format is:
<!-- Code samples should be in C# and/or C++/WinRT -->

<!-- As an example of this section, see the Examples section for the PasswordBox control
(https://docs.microsoft.com/windows/uwp/design/controls-and-patterns/password-box#examples). -->
(https://learn.microsoft.com/windows/uwp/design/controls-and-patterns/password-box#examples). -->


## Remarks
Expand All @@ -66,7 +66,7 @@ isn't the type's default (for example an int-typed property that doesn't default
with a "///" comment above the member or type. -->

## API Details
<!-- The exact API, in MIDL3 format (https://docs.microsoft.com/en-us/uwp/midl-3/) -->
<!-- The exact API, in MIDL3 format (https://learn.microsoft.com/uwp/midl-3/) -->

## Appendix
<!-- Anything else that you want to write down for posterity, but
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ public static async Task<IEnumerable<IStorageItemWithPath>> GetDraggedStorageIte
}

// workaround for GetStorageItemsAsync() bug that only yields 16 items at most
// https://learn.microsoft.com/en-us/windows/win32/shell/clipboard#cf_hdrop
// https://learn.microsoft.com/windows/win32/shell/clipboard#cf_hdrop
if (packageView.Contains("FileDrop"))
{
var fileDropData = await packageView.GetDataAsync("FileDrop");
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Filesystem/LibraryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static async Task<List<LibraryLocationItem>> ListUserLibraries()
try
{
var libraryItems = new List<ShellLibraryItem>();
// https://docs.microsoft.com/en-us/windows/win32/search/-search-win7-development-scenarios#library-descriptions
// https://learn.microsoft.com/windows/win32/search/-search-win7-development-scenarios#library-descriptions
var libFiles = Directory.EnumerateFiles(ShellLibraryItem.LibrariesPath, "*" + ShellLibraryItem.EXTENSION);
foreach (var libFile in libFiles)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ CancellationToken cancellationToken
bool isHidden = ((FileAttributes)findData.dwFileAttributes & FileAttributes.Hidden) == FileAttributes.Hidden;
double opacity = isHidden ? Constants.UI.DimItemOpacity : 1;

// https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
// https://learn.microsoft.com/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
bool isReparsePoint = ((FileAttributes)findData.dwFileAttributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
bool isSymlink = isReparsePoint && findData.dwReserved0 == NativeFileOperationsHelper.IO_REPARSE_TAG_SYMLINK;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static VirtualStorageItem FromPath(string path)
IntPtr hFile = FindFirstFileExFromApp(path, findInfoLevel, out WIN32_FIND_DATA findData, FINDEX_SEARCH_OPS.FindExSearchNameMatch, IntPtr.Zero, additionalFlags);
if (hFile.ToInt64() != -1)
{
// https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
// https://learn.microsoft.com/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
bool isReparsePoint = ((System.IO.FileAttributes)findData.dwFileAttributes & System.IO.FileAttributes.ReparsePoint) == System.IO.FileAttributes.ReparsePoint;
bool isSymlink = isReparsePoint && findData.dwReserved0 == NativeFileOperationsHelper.IO_REPARSE_TAG_SYMLINK;
bool isHidden = ((System.IO.FileAttributes)findData.dwFileAttributes & System.IO.FileAttributes.Hidden) == System.IO.FileAttributes.Hidden;
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/Helpers/BitmapHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public static async Task<BitmapImage> ToBitmapAsync(this byte[]? data, int decod
/// <param name="filePath">The file path to the image.</param>
/// <param name="rotation">The rotation direction.</param>
/// <remarks>
/// https://docs.microsoft.com/en-us/uwp/api/windows.graphics.imaging.bitmapdecoder?view=winrt-22000
/// https://docs.microsoft.com/en-us/uwp/api/windows.graphics.imaging.bitmapencoder?view=winrt-22000
/// https://learn.microsoft.com/uwp/api/windows.graphics.imaging.bitmapdecoder?view=winrt-22000
/// https://learn.microsoft.com/uwp/api/windows.graphics.imaging.bitmapencoder?view=winrt-22000
/// </remarks>
public static async Task Rotate(string filePath, BitmapRotation rotation)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Helpers/FileUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static extern int RmGetList(uint dwSessionHandle,
/// <param name="path">Path of the file.</param>
/// <returns>Processes locking the file</returns>
/// <remarks>See also:
/// http://msdn.microsoft.com/en-us/library/windows/desktop/aa373661(v=vs.85).aspx
/// http://msdn.microsoft.com/library/windows/desktop/aa373661(v=vs.85).aspx
/// http://wyupdate.googlecode.com/svn-history/r401/trunk/frmFilesInUse.cs (no copyright in code at time of viewing)
///
/// </remarks>
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Helpers/NativeWinApiHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private static extern bool IsWow64Process2(
out ushort nativeMachine);

// https://stackoverflow.com/questions/54456140/how-to-detect-were-running-under-the-arm64-version-of-windows-10-in-net
// https://docs.microsoft.com/en-us/windows/win32/sysinfo/image-file-machine-constants
// https://learn.microsoft.com/windows/win32/sysinfo/image-file-machine-constants
private static bool? isRunningOnArm = null;

public static bool IsRunningOnArm
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/Helpers/NavigationHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,15 @@ private static async Task<FilesystemResult> OpenFile(string path, IShellPage ass
queryOptions.SortOrder.Add(sortEntry);
break;

//Unfortunately this is unsupported | Remarks: https://docs.microsoft.com/en-us/uwp/api/windows.storage.search.queryoptions.sortorder?view=winrt-19041
//Unfortunately this is unsupported | Remarks: https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.sortorder?view=winrt-19041
//case Enums.SortOption.Size:

//sortEntry.PropertyName = "System.TotalFileSize";
//queryOptions.SortOrder.Clear();
//queryOptions.SortOrder.Add(sortEntry);
//break;

//Unfortunately this is unsupported | Remarks: https://docs.microsoft.com/en-us/uwp/api/windows.storage.search.queryoptions.sortorder?view=winrt-19041
//Unfortunately this is unsupported | Remarks: https://learn.microsoft.com/uwp/api/windows.storage.search.queryoptions.sortorder?view=winrt-19041
//case Enums.SortOption.FileType:

//sortEntry.PropertyName = "System.FileExtension";
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/ViewModels/Properties/FileProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ private object ConvertBack(string value)
/// If you would like to add more properties, define them in the PropertiesInformation file, then
/// add the string resources to Strings/en-Us/Resources.resw file
/// A full list of file properties and their information can be found here
/// <a href="https://docs.microsoft.com/windows/win32/properties/props"/>.
/// <a href="https://learn.microsoft.com/windows/win32/properties/props"/>.
/// </summary>
/// <param name="file">The file whose properties you wish to obtain</param>
/// <param name="path">The path to the json file of properties to be loaded</param>
Expand Down
4 changes: 2 additions & 2 deletions src/Files.App/Views/BaseShellPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public BaseShellPage(CurrentInstanceViewModel instanceViewModel)
/*TODO ResourceContext.GetForCurrentView and ResourceContext.GetForViewIndependentUse do not exist in Windows App SDK
Use your ResourceManager instance to create a ResourceContext as below.If you already have a ResourceManager instance,
replace the new instance created below with correct instance.
Read: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/mrtcore
Read: https://learn.microsoft.com/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/mrtcore
*/
var flowDirectionSetting = new Microsoft.Windows.ApplicationModel.Resources.ResourceManager().CreateResourceContext().QualifierValues["LayoutDirection"];

Expand Down Expand Up @@ -214,7 +214,7 @@ public BaseShellPage(CurrentInstanceViewModel instanceViewModel)
TODO UA307 Default back button in the title bar does not exist in WinUI3 apps.
The tool has generated a custom back button in the MainWindow.xaml.cs file.
Feel free to edit its position, behavior and use the custom back button instead.
Read: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/case-study-1#restoring-back-button-functionality
Read: https://learn.microsoft.com/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/case-study-1#restoring-back-button-functionality
*/

App.DrivesManager.PropertyChanged += DrivesManager_PropertyChanged;
Expand Down
2 changes: 1 addition & 1 deletion src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public MainPropertiesPage()
// ResourceContext.GetForCurrentView and ResourceContext.GetForViewIndependentUse do not exist in Windows App SDK
// Use your ResourceManager instance to create a ResourceContext as below. If you already have a ResourceManager instance,
// replace the new instance created below with correct instance.
// Read: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/mrtcore
// Read: https://learn.microsoft.com/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/guides/mrtcore
var flowDirectionSetting = new Microsoft.Windows.ApplicationModel.Resources.ResourceManager().CreateResourceContext().QualifierValues["LayoutDirection"];
if (flowDirectionSetting == "RTL")
FlowDirection = FlowDirection.RightToLeft;
Expand Down