Skip to content

Commit

Permalink
Cleanup (#1209)
Browse files Browse the repository at this point in the history
* Remove redundant styling

* Change string.Replace to string.Format

* Fix cut off status in queue
  • Loading branch information
ScrubN authored Sep 5, 2024
1 parent 34a7d61 commit 50a0859
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 26 deletions.
4 changes: 2 additions & 2 deletions TwitchDownloaderWPF/PageQueue.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<StackPanel Grid.Column="1" Orientation="Vertical" Margin="8,0,0,0" >
<emoji:TextBlock Text="{Binding Info.Title, StringFormat=Title: {0}}" TextWrapping="Wrap" Foreground="{DynamicResource AppText}"></emoji:TextBlock>
<TextBlock Text="{Binding TaskType, StringFormat=Task Type: {0}}" Foreground="{DynamicResource AppText}"></TextBlock>
<TextBlock Text="{Binding DisplayStatus, StringFormat=Status: {0}, Mode=OneWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}" Foreground="{DynamicResource AppText}"></TextBlock>
<TextBlock Text="{Binding DisplayStatus, StringFormat=Status: {0}, Mode=OneWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" Foreground="{DynamicResource AppText}" />
<StackPanel Orientation="Horizontal" Margin="1,1,0,1">
<Button Content="{lex:Loc TaskCancel}" Margin="0,0,4,0" MinWidth="60" Height="28" FontSize="12" Click="BtnCancelTask_Click" Visibility="{Binding CanCancel, Converter={StaticResource Boolean2VisibilityConverter}}" Background="{DynamicResource ActionButtonBackground}" Foreground="{DynamicResource ActionButtonText}" BorderBrush="{DynamicResource ActionButtonBorder}" />
<Button Content="{lex:Loc TaskRetry}" Margin="0,0,4,0" MinWidth="60" Height="28" FontSize="12" Click="BtnRetryTask_Click" Visibility="{Binding CanReinitialize, Converter={StaticResource Boolean2VisibilityConverter}}" Background="{DynamicResource ActionButtonBackground}" Foreground="{DynamicResource ActionButtonText}" BorderBrush="{DynamicResource ActionButtonBorder}" />
Expand All @@ -94,7 +94,7 @@
<Button Padding="0" VerticalAlignment="Top" Width="22" Height="22" Margin="0, 0, 2, 0" Click="BtnMoveTaskDown_Click" Background="{DynamicResource AppElementBackground}" BorderBrush="{DynamicResource AppElementBorder}">
<fa:SvgAwesome Icon="Solid_CaretDown" Foreground="{DynamicResource AppTextDisabled}" />
</Button>
<Button Padding="3" VerticalAlignment="Top" Width="22" Height="22" FontSize="12" Click="BtnRemoveTask_Click" Background="{DynamicResource AppElementBackground}" Foreground="{DynamicResource AppTextDisabled}" BorderBrush="{DynamicResource AppElementBorder}">
<Button Padding="3" VerticalAlignment="Top" Width="22" Height="22" Click="BtnRemoveTask_Click" Background="{DynamicResource AppElementBackground}" BorderBrush="{DynamicResource AppElementBorder}">
<fa:SvgAwesome Icon="Solid_Times" Foreground="{DynamicResource AppTextDisabled}" />
</Button>
</StackPanel>
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderWPF/Services/ThemeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ThemeService(App app, WindowsThemeService windowsThemeService)
if (!Settings.Default.GuiTheme.Equals("System", StringComparison.OrdinalIgnoreCase) && !File.Exists(Path.Combine("Themes", $"{Settings.Default.GuiTheme}.xaml")))
{
MessageBox.Show(
Translations.Strings.ThemeNotFoundMessage.Replace("{theme}", $"{Settings.Default.GuiTheme}.xaml"),
string.Format(Translations.Strings.ThemeNotFoundMessage, $"{Settings.Default.GuiTheme}.xaml"),
Translations.Strings.ThemeNotFound,
MessageBoxButton.OK,
MessageBoxImage.Information);
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderWPF/Translations/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.es.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Tema no encontrado</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} no se ha encontrado. Revertir tema a Sistema</value>
<comment>No traducir {theme}</comment>
<value>{0} no se ha encontrado. Revertir tema a Sistema</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dispersion </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Le thème n'a pas été trouvé</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} n'a pas été trouvé. Passage au thème système</value>
<comment>Do not translate {theme}</comment>
<value>{0} n'a pas été trouvé. Passage au thème système</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dispersion </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Tema non trovato</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} non è stato trovato. Ripristina tema a Sistema</value>
<comment>Non tradurre {theme}</comment>
<value>{0} non è stato trovato. Ripristina tema a Sistema</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dispersione </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>テーマが見つかりませんでした</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} が見つかりませんでした。 テーマをシステムに戻す。</value>
<comment>Do not translate {theme}</comment>
<value>{0} が見つかりませんでした。 テーマをシステムに戻す。</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>分散 </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Motyw nie znaleziony</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} nie został znaleziony. Przywracanie Systemowego motywu</value>
<comment>Do not translate {theme}</comment>
<value>{0} nie został znaleziony. Przywracanie Systemowego motywu</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Rozproszenie </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.pt-br.resx
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,7 @@
<value>Tema não encontrado</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} não foi encontrado. Revertendo tema pro Sistema</value>
<comment>Não Traduza {theme}</comment>
<value>{0} não foi encontrado. Revertendo tema pro Sistema</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dispersação </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Theme not found</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} was not found. Reverting theme to System</value>
<comment>Do not translate {theme}</comment>
<value>{0} was not found. Reverting theme to System</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dispersion </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Тема не найденна</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} не найденна. Откат на системную</value>
<comment>Do not translate {theme}</comment>
<value>{0} не найденна. Откат на системную</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Разбиение </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.tr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,7 @@
<value>Tema bulunamadı</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} bulunamadı. Sistem temasına geri döndürülüyor</value>
<comment>Do not translate {theme}</comment>
<value>{0} bulunamadı. Sistem temasına geri döndürülüyor</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Dağıtma </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.uk.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>Тему не знайдено</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>{theme} не знайдено. Повертаємо тему до системної</value>
<comment>Do not translate {theme}</comment>
<value>{0} не знайдено. Повертаємо тему до системної</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>Розсіювання </value>
Expand Down
3 changes: 1 addition & 2 deletions TwitchDownloaderWPF/Translations/Strings.zh-cn.resx
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,7 @@
<value>未找到主题</value>
</data>
<data name="ThemeNotFoundMessage" xml:space="preserve">
<value>未找到 {theme}。将主题还原为系统。</value>
<comment>Do not translate {theme}</comment>
<value>未找到 {0}。将主题还原为系统。</value>
</data>
<data name="MessageDispersion" xml:space="preserve">
<value>散布 </value>
Expand Down

0 comments on commit 50a0859

Please sign in to comment.