Browse Source

Changes to enable GNU Get Text language translations to work

1. This change adds  {$I ../config.inc} to UFRMPascalCoinWalletConfig.pas so that the language option can be changed.
2. FAppParams changed to TSettings.AppParams in UFRMWallet.pas
3. USE_GNUGETTEXT Defined in config.inc.
4. Use_CryptoLib4Pascal turned on
UrbanCohortDev 4 years ago
parent
commit
6b6e2a45b2

+ 2 - 2
src/config.inc

@@ -34,7 +34,7 @@
   {.$DEFINE TESTNET}
 
   // Activate to define CryptoLib4Pascal by default on all compilations
-  {.$DEFINE Use_CryptoLib4Pascal}
+  {$DEFINE Use_CryptoLib4Pascal}
   // Add the following paths to the project Search Path is this option is used
   // .\libraries\cryptolib4pascal
   // .\libraries\simplebaselib4pascal  
@@ -68,7 +68,7 @@
   {$DEFINE USE_ABSTRACTMEM}
 
   // Activate GNUGETTEXT library
-  {.$DEFINE USE_GNUGETTEXT}
+  {$DEFINE USE_GNUGETTEXT}
   
   // Activate usage of TPCTemporalFileStream instead of TBytes in order to minimize mem usage
   // This also fixes issue #207 High memory usage on FreePascal compiler

+ 2 - 0
src/gui-classic/UFRMPascalCoinWalletConfig.pas

@@ -94,6 +94,8 @@ type
     Property WalletKeys : TWalletKeys read FWalletKeys write SetWalletKeys;
   end;
 
+  {$I ../config.inc}
+
 implementation
 
 uses

+ 1 - 1
src/gui-classic/UFRMWallet.pas

@@ -1373,7 +1373,7 @@ begin
   {$IFDEF USE_GNUGETTEXT}
   // use language from the params and retranslate if needed
   // might be better to move this a bit earlier in the formcreate routine
-  UseLanguage(FAppParams.ParamByName[CT_PARAM_UILanguage].GetAsString(GetCurrentLanguage));
+  UseLanguage(TSettings.AppParams.ParamByName[CT_PARAM_UILanguage].GetAsString(GetCurrentLanguage));
   RetranslateComponent(self);
   {$ENDIF}
   //