Skip to content

Commit

Permalink
auto gen i18n on build
Browse files Browse the repository at this point in the history
  • Loading branch information
0xor1 committed Jun 9, 2024
1 parent 71c8289 commit 61759da
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Dnsk.I18n/Dnsk.I18n.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@
<PackageReference Include="Fluid.Core" Version="2.5.0" />
</ItemGroup>

<Target Name="GenerateI18n" BeforeTargets="BeforeBuild">
<Exec Command="dotnet tool restore"/>
<Exec Command="dotnet tool run dotnet-common-cmds i18n &quot;$(MSBuildProjectDirectory)&quot; $(MSBuildProjectName) false"/>
</Target>

</Project>
4 changes: 3 additions & 1 deletion Dnsk.I18n/Keys.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

namespace Dnsk.I18n;

Expand Down
4 changes: 3 additions & 1 deletion Dnsk.I18n/SDE.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

Expand Down
4 changes: 3 additions & 1 deletion Dnsk.I18n/SEN.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

Expand Down
4 changes: 3 additions & 1 deletion Dnsk.I18n/SES.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

Expand Down
4 changes: 3 additions & 1 deletion Dnsk.I18n/SFR.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

Expand Down
4 changes: 3 additions & 1 deletion Dnsk.I18n/SIT.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Generated Code File, Do Not Edit.
// This file is generated with Common.I18nCodeGen.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

Expand Down
9 changes: 7 additions & 2 deletions Dnsk.I18n/SZLibrary.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using Common.Shared;
// Generated Code File, Do Not Edit.
// This file is generated with Common.Cmds.
// see https://github.com/0xor1/common/blob/main/Common.Cmds/I18n.cs
// executed with arguments: i18n <abs_file_path_to>/Dnsk.I18n Dnsk.I18n false

using Common.Shared;

namespace Dnsk.I18n;

Expand All @@ -11,6 +16,6 @@ public static partial class S
{ Common.Shared.I18n.S.ES, ES_Strings },
{ Common.Shared.I18n.S.FR, FR_Strings },
{ Common.Shared.I18n.S.DE, DE_Strings },
{ Common.Shared.I18n.S.IT, IT_Strings }
{ Common.Shared.I18n.S.IT, IT_Strings },
};
}
12 changes: 12 additions & 0 deletions Dnsk.I18n/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"0xor1.common.cmds": {
"version": "3.0.27",
"commands": [
"dotnet-common-cmds"
]
}
}
}

0 comments on commit 61759da

Please sign in to comment.