9
9
using System ;
10
10
using System . Threading ;
11
11
using System . Threading . Tasks ;
12
+ using SecureFolderFS . Sdk . Extensions ;
12
13
13
14
namespace SecureFolderFS . Sdk . ViewModels . Controls . Banners
14
15
{
@@ -30,7 +31,7 @@ public DateTime LastChecked
30
31
31
32
public UpdateBannerViewModel ( )
32
33
{
33
- _UpdateText = "Latest version installed" ;
34
+ _UpdateText = "LatestVersionInstalled" . ToLocalized ( ) ;
34
35
UpdateService . StateChanged += UpdateService_StateChanged ;
35
36
}
36
37
@@ -52,9 +53,9 @@ public void Report(double value)
52
53
var rounded = ( int ) Math . Round ( value ) ;
53
54
54
55
if ( rounded == 100 )
55
- UpdateText = "Installing..." ;
56
+ UpdateText = "Installing" . ToLocalized ( ) ;
56
57
else
57
- UpdateText = $ "Downloading { rounded } %" ;
58
+ UpdateText = string . Format ( "Downloading" . ToLocalized ( ) , rounded ) ;
58
59
}
59
60
60
61
private void UpdateService_StateChanged ( object ? sender , EventArgs e )
@@ -64,7 +65,7 @@ private void UpdateService_StateChanged(object? sender, EventArgs e)
64
65
return ;
65
66
66
67
InfoBarViewModel . IsOpen = true ;
67
- InfoBarViewModel . Title = "Error" ;
68
+ InfoBarViewModel . Title = "Error" . ToLocalized ( ) ;
68
69
InfoBarViewModel . CanBeClosed = true ;
69
70
InfoBarViewModel . Message = GetMessageForUpdateState ( args . UpdateState ) ;
70
71
InfoBarViewModel . InfoBarSeverity = InfoBarSeverityType . Error ;
@@ -87,7 +88,7 @@ private async Task UpdateAppAsync(CancellationToken cancellationToken)
87
88
if ( ! result . Successful )
88
89
{
89
90
InfoBarViewModel . IsOpen = true ;
90
- InfoBarViewModel . Title = "Error" ;
91
+ InfoBarViewModel . Title = "Error" . ToLocalized ( ) ;
91
92
InfoBarViewModel . CanBeClosed = true ;
92
93
InfoBarViewModel . Message = result . GetMessage ( ) ;
93
94
InfoBarViewModel . InfoBarSeverity = InfoBarSeverityType . Error ;
0 commit comments