Skip to content
Open
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: 6 additions & 1 deletion CompactGUI/Components/Converters/IValueConverters.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ Public Class DecimalToPercentageConverter : Implements IValueConverter
'IF = invert and format, to show the "percentage smaller" text
If parameter = "IF" Then Return CInt(100 - (CType(value, Decimal) * 100)) & "%"
If parameter = "I" Then Return CInt(100 - (CType(value, Decimal) * 100))
If parameter = "D" Then
Dim percentage = CInt(CType(value, Decimal) * 100)
Dim decayedText = LanguageHelper.GetString("Watcher_WatchedDecayed")
Return If(decayedText.Contains("{0}"), String.Format(culture, decayedText, percentage), percentage & "% " & decayedText)
End If
Return CInt(CType(value, Decimal) * 100)
End Function

Expand Down Expand Up @@ -493,4 +498,4 @@ Public Class EnumToIntConverter
If targetType Is Nothing OrElse Not targetType.IsEnum OrElse value Is Nothing Then Return Binding.DoNothing
Return [Enum].ToObject(targetType, value)
End Function
End Class
End Class
5 changes: 3 additions & 2 deletions CompactGUI/LanguageHelper.vb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ End Class
Public Class LanguageHelper
' Supported language list
' @i18n
Private Shared ReadOnly SupportedCultures As String() = {"en-US", "ru-RU", "zh-CN", "es-ES"}
Private Shared ReadOnly SupportedCultures As String() = {"en-US", "ru-RU", "zh-CN", "es-ES", "ko-KR"}
Private Shared resourceManager As ResourceManager = i18n.i18n.ResourceManager
Private Shared currentCulture As CultureInfo = Nothing

Expand Down Expand Up @@ -82,7 +82,8 @@ Public Class LanguageHelper
{"en", "en-US"},
{"ru", "ru-RU"},
{"zh", "zh-CN"},
{"es", "es-ES"}
{"es", "es-ES"},
{"ko", "ko-KR"}
}

Dim systemLang As String = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToLower()
Expand Down
3 changes: 2 additions & 1 deletion CompactGUI/ViewModels/SettingsViewModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ Public NotInheritable Class SettingsViewModel : Inherits ObservableObject
New LanguageItem With {.Name = "English", .CultureCode = "en-US", .ISOCountryCode = "US"},
New LanguageItem With {.Name = "Русский", .CultureCode = "ru-RU", .ISOCountryCode = "RU"},
New LanguageItem With {.Name = "简体中文", .CultureCode = "zh-CN", .ISOCountryCode = "CN"},
New LanguageItem With {.Name = "Español", .CultureCode = "es-ES", .ISOCountryCode = "ES"}
New LanguageItem With {.Name = "Español", .CultureCode = "es-ES", .ISOCountryCode = "ES"},
New LanguageItem With {.Name = "한국어", .CultureCode = "ko-KR", .ISOCountryCode = "KR"}
}


Expand Down
5 changes: 1 addition & 4 deletions CompactGUI/Views/Components/FolderWatcherCard.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@
Margin="0 -2 0 0" HorizontalAlignment="Right" VerticalAlignment="Top"
d:Text="7% decayed" FontSize="12" Foreground="#FFBFC7CE">
<TextBlock.Text>
<MultiBinding StringFormat="{}{0}% {1}">
<Binding Converter="{StaticResource DecimalToPercentageConverter}" Path="DecayPercentage" />
<Binding Source="{local:Localize Watcher_WatchedDecayed}" />
</MultiBinding>
<Binding Converter="{StaticResource DecimalToPercentageConverter}" ConverterParameter="D" Path="DecayPercentage" />
</TextBlock.Text>
</TextBlock>
<TextBlock x:Name="SavedText"
Expand Down
4 changes: 2 additions & 2 deletions CompactGUI/Views/SettingsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@

<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" />
<ColumnDefinition Width="200" />
<ColumnDefinition Width="270" />

</Grid.ColumnDefinitions>

Expand All @@ -285,7 +285,7 @@
</StackPanel>

<CheckBox x:Name="UiLockHddToOneThread"
Grid.Row="2"
Grid.Row="2" Grid.ColumnSpan="2"
Margin="-10 0"
d:Content="HDDs only use 1 thread"
Content="{local:Localize SetCompression_HDDThread}"
Expand Down
Loading