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

Feature: Rename the "Path:" text to "Location:" #12243

Merged
merged 14 commits into from
May 1, 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
7 changes: 5 additions & 2 deletions src/Files.App/Strings/en-US/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
<data name="PropertiesDriveItemTypeDifferent" xml:space="preserve">
<value>Different types</value>
</data>
<data name="PropertiesCombinedItemPath" xml:space="preserve">
<data name="PropertiesCombinedItemLocation" xml:space="preserve">
<value>All in {0}</value>
</data>
<data name="PropertiesDriveUsedSpace.Text" xml:space="preserve">
Expand Down Expand Up @@ -3205,4 +3205,7 @@
<data name="RedoDescription" xml:space="preserve">
<value>Redo the last file operation</value>
</data>
</root>
<data name="Location" xml:space="preserve">
<value>Location:</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void GetBaseProperties()
(Path.IsPathRooted(Item.ItemPath) ? Path.GetDirectoryName(Item.ItemPath) : Item.ItemPath));

if (itemsPath.Distinct().Count() == 1)
ViewModel.ItemPath = string.Format("PropertiesCombinedItemPath".GetLocalizedResource(), itemsPath.First());
ViewModel.ItemLocation = string.Format("PropertiesCombinedItemLocation".GetLocalizedResource(), itemsPath.First());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override void GetBaseProperties()
ViewModel.ItemName = Item.Name;
ViewModel.OriginalItemName = Item.Name;
ViewModel.ItemType = Item.ItemType;
ViewModel.ItemPath = (Item as RecycleBinItem)?.ItemOriginalFolder ??
ViewModel.ItemLocation = (Item as RecycleBinItem)?.ItemOriginalFolder ??
(Path.IsPathRooted(Item.ItemPath) ? Path.GetDirectoryName(Item.ItemPath) : Item.ItemPath);
ViewModel.ItemModifiedTimestamp = Item.ItemDateModified;
ViewModel.ItemCreatedTimestamp = Item.ItemDateCreated;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override void GetBaseProperties()
ViewModel.ItemName = Item.Name;
ViewModel.OriginalItemName = Item.Name;
ViewModel.ItemType = Item.ItemType;
ViewModel.ItemPath = (Item as RecycleBinItem)?.ItemOriginalFolder ??
ViewModel.ItemLocation = (Item as RecycleBinItem)?.ItemOriginalFolder ??
(Path.IsPathRooted(Item.ItemPath) ? Path.GetDirectoryName(Item.ItemPath) : Item.ItemPath);
ViewModel.ItemModifiedTimestamp = Item.ItemDateModified;
ViewModel.ItemCreatedTimestamp = Item.ItemDateCreated;
Expand Down
18 changes: 9 additions & 9 deletions src/Files.App/ViewModels/SelectedItemsPropertiesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,22 +122,22 @@ public bool DriveFileSystemVisibility
set => SetProperty(ref driveFileSystemVisibility, value);
}

private string itemPath;
public string ItemPath
private string itemLocation;
public string ItemLocation
{
get => itemPath;
get => itemLocation;
set
{
ItemPathVisibility = true;
SetProperty(ref itemPath, value);
ItemLocationVisibility = true;
SetProperty(ref itemLocation, value);
}
}

private bool itemPathVisibility = false;
public bool ItemPathVisibility
private bool itemLocationVisibility = false;
public bool ItemLocationVisibility
{
get => itemPathVisibility;
set => SetProperty(ref itemPathVisibility, value);
get => itemLocationVisibility;
set => SetProperty(ref itemLocationVisibility, value);
}

private string itemSize;
Expand Down
14 changes: 7 additions & 7 deletions src/Files.App/Views/Properties/GeneralPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
x:Name="ItemDetails"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
x:Load="{x:Bind ViewModel.ItemPathVisibility, Mode=OneWay}"
x:Load="{x:Bind ViewModel.ItemLocationVisibility, Mode=OneWay}"
Header="{helpers:ResourceString Name=MoreDetails}"
IsExpanded="True">
<Expander.Content>
Expand All @@ -166,23 +166,23 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<!-- Item Path -->
<!-- Item Location -->
<TextBlock
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Left"
Style="{StaticResource PropertyName}"
Text="{helpers:ResourceString Name=Path}"
Visibility="{x:Bind ViewModel.ItemPathVisibility, Mode=OneWay}" />
Text="{helpers:ResourceString Name=Location}"
Visibility="{x:Bind ViewModel.ItemLocationVisibility, Mode=OneWay}" />

<TextBlock
x:Name="itemPathValue"
x:Name="itemLocationValue"
Grid.Row="0"
Grid.Column="1"
Style="{StaticResource PropertyValueTextBlock}"
Text="{x:Bind ViewModel.ItemPath, Mode=OneWay}"
Text="{x:Bind ViewModel.ItemLocation, Mode=OneWay}"
TextWrapping="Wrap"
Visibility="{x:Bind ViewModel.ItemPathVisibility, Mode=OneWay}" />
Visibility="{x:Bind ViewModel.ItemLocationVisibility, Mode=OneWay}" />

<!-- Item Size -->
<TextBlock
Expand Down