@@ -17,8 +17,8 @@ public class Configuration
17
17
18
18
public ApplicationArguments Arguments { get ; private set ; }
19
19
20
- public Localization Localization { get ; private set ; }
21
- public Dictionary < string , Localization > LocalizationsList { get ; private set ; }
20
+ public ApplicationLocalization Localization { get ; private set ; }
21
+ public Dictionary < string , ApplicationLocalization > LocalizationsList { get ; private set ; }
22
22
23
23
public string McDirectory { get ; private set ; }
24
24
public string McLauncher { get ; private set ; }
@@ -30,8 +30,8 @@ public class Configuration
30
30
public Configuration ( string [ ] args )
31
31
{
32
32
Arguments = new ApplicationArguments ( ) ;
33
- Localization = new Localization ( ) ;
34
- LocalizationsList = new Dictionary < string , Localization > ( ) ;
33
+ Localization = new ApplicationLocalization ( ) ;
34
+ LocalizationsList = new Dictionary < string , ApplicationLocalization > ( ) ;
35
35
Parser . Default . ParseArguments ( args , Arguments ) ;
36
36
McDirectory = Arguments . WorkingDirectory ??
37
37
Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) ,
@@ -47,7 +47,7 @@ public Configuration(string[] args)
47
47
48
48
public void SetLocalization ( string localizationName )
49
49
{
50
- Localization = string . IsNullOrEmpty ( localizationName ) ? new Localization ( ) : LocalizationsList [ localizationName ] ;
50
+ Localization = string . IsNullOrEmpty ( localizationName ) ? new ApplicationLocalization ( ) : LocalizationsList [ localizationName ] ;
51
51
}
52
52
53
53
public void SaveConfiguration ( )
@@ -69,7 +69,7 @@ private void LoadLocalization()
69
69
{
70
70
Assembly assembly = Assembly . GetExecutingAssembly ( ) ;
71
71
string s = new StreamReader ( assembly . GetManifestResourceStream ( "FreeLauncher.Translations.en_UK.lang.json" ) ) . ReadToEnd ( ) ;
72
- LocalizationsList . Add ( JObject . Parse ( s ) [ "LanguageTag" ] . ToString ( ) , JsonConvert . DeserializeObject < Localization > ( s ) ) ;
72
+ LocalizationsList . Add ( JObject . Parse ( s ) [ "LanguageTag" ] . ToString ( ) , JsonConvert . DeserializeObject < ApplicationLocalization > ( s ) ) ;
73
73
if ( ApplicationConfiguration . SelectedLanguage == "en-UK" ) {
74
74
Localization = LocalizationsList [ "en-UK" ] ;
75
75
}
@@ -81,7 +81,7 @@ private void LoadLocalization()
81
81
. GetFiles ( "*.json" , SearchOption . AllDirectories )
82
82
. Where ( file => file . Name . Contains ( "lang" ) )
83
83
. Select ( file => JObject . Parse ( File . ReadAllText ( file . FullName ) ) )
84
- . Select ( jo => JsonConvert . DeserializeObject < Localization > ( jo . ToString ( ) ) ) ) {
84
+ . Select ( jo => JsonConvert . DeserializeObject < ApplicationLocalization > ( jo . ToString ( ) ) ) ) {
85
85
if ( LocalizationsList . ContainsKey ( local . LanguageTag ) ) {
86
86
continue ;
87
87
}
0 commit comments