@@ -16,7 +16,9 @@ public class CmdUpdateAllMods : Cmd<string, bool, string, bool, string, IEnumera
1616 private static readonly Dictionary < string , Dictionary < string , string > > translations = new Dictionary < string , Dictionary < string , string > > {
1717 {
1818 "en" , new Dictionary < string , string > {
19- { "downloading" , "Downloading mod versions list" } ,
19+ { "downloadinglist" , "Downloading mod versions list" } ,
20+ { "downloadingfile" , "Downloading " } ,
21+ { "downloadingprogress" , "Downloading:" } ,
2022 { "checking" , "Checking for outdated mods" } ,
2123 { "updating" , "Updating" } ,
2224 { "installing" , "installing update" } ,
@@ -26,7 +28,9 @@ public class CmdUpdateAllMods : Cmd<string, bool, string, bool, string, IEnumera
2628 }
2729 } , {
2830 "fr" , new Dictionary < string , string > {
29- { "downloading" , "Téléchargement de la liste des mods" } ,
31+ { "downloadinglist" , "Téléchargement de la liste des mods" } ,
32+ { "downloadingfile" , "Téléchargement de " } ,
33+ { "downloadingprogress" , "Téléchargement -" } ,
3034 { "checking" , "Vérification des mises à jour" } ,
3135 { "updating" , "Mise à jour" } ,
3236 { "installing" , "installation en cours" } ,
@@ -49,7 +53,7 @@ private static string langGet(string lang, string key) {
4953
5054
5155 public override IEnumerator Run ( string root , bool onlyEnabled , string mirrorPreferences , bool apiMirror , string lang ) {
52- yield return $ "{ langGet ( lang , "downloading " ) } ...";
56+ yield return $ "{ langGet ( lang , "downloadinglist " ) } ...";
5357 Dictionary < string , ModUpdateInfo > modVersionList = downloadModUpdateList ( apiMirror ) ;
5458
5559 yield return $ "{ langGet ( lang , "checking" ) } ...";
@@ -85,7 +89,7 @@ public override IEnumerator Run(string root, bool onlyEnabled, string mirrorPref
8589
8690 // download from GameBanana, if that fails download from mirror
8791 string tempZip = Path . Combine ( root , "mod-update.zip" ) ;
88- foreach ( string message in new EnumeratorEnumerator { Enumerator = tryDownloadWithMirror ( update . Key , messagePrefix , tempZip , mirrorPreferences ) } ) {
92+ foreach ( string message in new EnumeratorEnumerator { Enumerator = tryDownloadWithMirror ( update . Key , messagePrefix , tempZip , mirrorPreferences , lang ) } ) {
8993 yield return message ;
9094 }
9195
@@ -145,7 +149,7 @@ private static IEnumerator<string> getAllMirrorUrls(string url, string mirrorPre
145149 }
146150 }
147151
148- private static IEnumerator tryDownloadWithMirror ( ModUpdateInfo info , string messagePrefix , string destination , string mirrorPreferences ) {
152+ private static IEnumerator tryDownloadWithMirror ( ModUpdateInfo info , string messagePrefix , string destination , string mirrorPreferences , string lang ) {
149153 Exception lastException = null ;
150154
151155 foreach ( string url in GetAllMirrorUrls ( info . URL , mirrorPreferences ) ) {
@@ -173,7 +177,9 @@ private static IEnumerator tryDownloadWithMirror(ModUpdateInfo info, string mess
173177
174178 object message = ( ( object [ ] ) download . Current ) [ 0 ] ;
175179 if ( message . ToString ( ) != "" ) {
176- yield return messagePrefix + ": " + message ;
180+ yield return messagePrefix + ": " + message . ToString ( )
181+ . Replace ( langGet ( "en" , "downloadingfile" ) , langGet ( lang , "downloadingfile" ) )
182+ . Replace ( langGet ( "en" , "downloadingprogress" ) , langGet ( lang , "downloadingprogress" ) ) ;
177183 }
178184 }
179185 }
0 commit comments