File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ static void Main(string[] args)
4747 new Upgrade_20210119_DeepL ( ) ,
4848 new Upgrade_20210205_ErrorHandling ( ) ,
4949 new Upgrade_20210210_UpgradeNugets ( ) ,
50+ new Upgrade_20210216_RegisterTranslatableRoutes ( ) ,
5051 } . Run ( uctx ) ;
5152 }
5253 }
Original file line number Diff line number Diff line change 1+ using Signum . Utilities ;
2+ using System ;
3+ using System . Collections . Generic ;
4+ using System . IO ;
5+ using System . Linq ;
6+ using System . Security . Cryptography . X509Certificates ;
7+ using System . Text ;
8+ using System . Threading . Tasks ;
9+
10+ namespace Signum . Upgrade . Upgrades
11+ {
12+ class Upgrade_20210216_RegisterTranslatableRoutes : CodeUpgradeBase
13+ {
14+ public override string Description => "add instance translation to UserQuery / UserChart / Dashboard / Toolbar" ;
15+
16+ public override void Execute ( UpgradeContext uctx )
17+ {
18+ uctx . ChangeCodeFile ( @"Southwind.Logic/Starter.cs" , file =>
19+ {
20+ file . InsertAfterFirstLine ( line => line . Contains ( "UserQueryLogic.RegisterRoleTypeCondition" ) , "UserQueryLogic.RegisterTranslatableRoutes();" ) ;
21+ file . InsertAfterFirstLine ( line => line . Contains ( "UserChartLogic.RegisterRoleTypeCondition" ) , "UserChartLogic.RegisterTranslatableRoutes();" ) ;
22+ file . InsertAfterFirstLine ( line => line . Contains ( "DashboardLogic.RegisterRoleTypeCondition" ) , "DashboardLogic.RegisterTranslatableRoutes();" ) ;
23+ file . InsertAfterFirstLine ( line => line . Contains ( "ToolbarLogic.Start(sb);" ) , "ToolbarLogic.RegisterTranslatableRoutes();" ) ;
24+ } ) ;
25+
26+ }
27+ }
28+ }
You can’t perform that action at this time.
0 commit comments