Skip to content

Commit 838fea8

Browse files
committed
refactor: Org and Project name
- Change name of project and organization - Change build scripts and properties - Change workflows
1 parent ebe4452 commit 838fea8

41 files changed

Lines changed: 121 additions & 121 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/_.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
test: { type: boolean, default: false, description: Run tests. }
77
publish: { type: boolean, default: false, description: Publish to nuget. Will run all tests too. }
88
secrets:
9-
nuget-key:
9+
nuget-user:
1010
jobs:
1111
pipeline:
1212
runs-on: ubuntu-latest
@@ -42,12 +42,19 @@ jobs:
4242
if: inputs.publish
4343
working-directory: src
4444
shell: pwsh
45-
run: .\pack.ps1 -output ./packages --no-restore --no-build
45+
run: .\pack.ps1 --no-restore --no-build
46+
47+
- name: Login
48+
if: inputs.publish
49+
id: login
50+
uses: NuGet/login@v1
51+
with:
52+
user: ${{ secrets.nuget-user }}
4653

4754
- name: Push
4855
if: inputs.publish
49-
working-directory: src
56+
working-directory: artifacts
5057
env:
5158
SOURCE_URL: https://api.nuget.org/v3/index.json
52-
NUGET_AUTH_TOKEN: ${{ secrets.nuget-key }}
53-
run: dotnet nuget push ./packages/*.nupkg --skip-duplicate -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }}
59+
NUGET_AUTH_TOKEN: ${{ steps.login.outputs.NUGET_API_KEY }}
60+
run: dotnet nuget push *.nupkg --skip-duplicate -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }}

.github/workflows/build.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: build
22
env: { DOTNET_NOLOGO: true }
33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- main
@@ -13,6 +14,6 @@ on:
1314
- review_requested
1415
jobs:
1516
pipeline:
16-
uses: Raven-Tail/Noctilocus/.github/workflows/_.yaml@main
17+
uses: HereticSoftware/Translate/.github/workflows/_.yaml@main
1718
with:
1819
test: true

.github/workflows/publish.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ on:
1212
- test/**
1313
jobs:
1414
pipeline:
15-
uses: Raven-Tail/Noctilocus/.github/workflows/_.yaml@main
15+
uses: HereticSoftware/Translate/.github/workflows/_.yaml@main
16+
permissions:
17+
id-token: write
1618
with:
1719
publish: true
1820
secrets:
19-
nuget-key: ${{ secrets.NUGET_API_KEY }}
21+
nuget-user: ${{ secrets.NUGET_USER }}

Directory.Build.props

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
<Project>
2-
2+
<!-- Common -->
33
<PropertyGroup>
44
<LangVersion>latest</LangVersion>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>true</ImplicitUsings>
77
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
88
<Configuration Condition="$(Configuration) == ''">Debug</Configuration>
99
<NoWarn>$(NoWarn);CS8509;IDE0039;IDE0130;IDE0290;IDE0060;RZ10012;IDE0052;BL0007;NU5128</NoWarn>
10-
<WarningsAsErrors>$(WarningsAsErrors);RZ2012;</WarningsAsErrors>
10+
<WarningsAsErrors>$(WarningsAsErrors);RZ2012</WarningsAsErrors>
1111

12-
<ArtifactsPath>$([System.IO.Path]::Combine(
13-
$(MSBuildThisFileDirectory),
14-
"artifacts",
15-
$([MSBuild]::MakeRelative($(MSBuildThisFileDirectory),$(MSBuildProjectDirectory)).Replace("$(MSBuildProjectName)", '').TrimEnd('/'))
16-
))</ArtifactsPath>
12+
<ArtifactsProjectPath>$([MSBuild]::MakeRelative($(MSBuildThisFileDirectory), $(MSBuildProjectDirectory)).Replace("$(MSBuildProjectName)", '').TrimEnd('/'))</ArtifactsProjectPath>
13+
<ArtifactsPath>$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), "artifacts", $(ArtifactsProjectPath)))</ArtifactsPath>
1714
<UseArtifactsOutput>true</UseArtifactsOutput>
1815
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1916
<IsPackable>false</IsPackable>
@@ -24,7 +21,7 @@
2421
<PropertyGroup>
2522
<Authors>Raven Tail</Authors>
2623
<Copyright>Copyright (c) $([System.DateTimeOffset]::UtcNow.ToString("yyyy")) $(Authors)</Copyright>
27-
<RepositoryUrl>https://www.github.com/raven-tail/noctilocus</RepositoryUrl>
24+
<RepositoryUrl>https://www.github.com/HereticSoftware/Translate</RepositoryUrl>
2825
<RepositoryType>git</RepositoryType>
2926
<RepositoryLicense>MIT</RepositoryLicense>
3027
<RepositoryDescription></RepositoryDescription>
@@ -41,6 +38,7 @@
4138
<!--<PackageIcon>Icon.png</PackageIcon>-->
4239
<PackageReadmeFile>README.md</PackageReadmeFile>
4340

41+
<PackageOutputPath>artifacts</PackageOutputPath>
4442
<PublishRepositoryUrl>true</PublishRepositoryUrl>
4543
<IncludeSymbols>true</IncludeSymbols>
4644
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

Noctilocus.slnx

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# Noctilocus
1+
# Translate
22

3-
[![Build Action](https://github.com/Raven-Tail/Noctilocus/actions/workflows/build.yaml/badge.svg)](https://github.com/Raven-Tail/Noctilocus/actions/workflows/build.yaml)
4-
[![Publish Action](https://github.com/Raven-Tail/Noctilocus/actions/workflows/publish.yaml/badge.svg)](https://github.com/Raven-Tail/Noctilocus/actions/workflows/publish.yaml)
5-
[![License](https://img.shields.io/github/license/raven-tail/Noctilocus?style=flat)](https://github.com/raven-tail/Noctilocus/blob/main/LICENSE)
3+
[![Build Action](https://github.com/HereticSoftware/Translate/actions/workflows/build.yaml/badge.svg)](https://github.com/HereticSoftware/Translate/actions/workflows/build.yaml)
4+
[![Publish Action](https://github.com/HereticSoftware/Translate/actions/workflows/publish.yaml/badge.svg)](https://github.com/HereticSoftware/Translate/actions/workflows/publish.yaml)
5+
[![License](https://img.shields.io/github/license/HereticSoftware/Translate?style=flat)](https://github.com/HereticSoftware/Translate/blob/main/LICENSE)
66
[![.NET 8](https://img.shields.io/badge/.NET%208-%23512bd4?style=flat)](https://dotnet.microsoft.com/)
77
[![.NET 9](https://img.shields.io/badge/.NET%209-%23512bd4?style=flat)](https://dotnet.microsoft.com/)
8-
[![Downloads](https://img.shields.io/nuget/dt/Noctilocus?style=flat)](https://www.nuget.org/packages/Noctilocus.Contracts/)
8+
[![Downloads](https://img.shields.io/nuget/dt/Translate?style=flat)](https://www.nuget.org/packages/Translate.Contracts/)
99

10-
A C# port of the [ngx-translate](https://github.com/ngx-translate/core). The port is not one to one and also aims to be more C# friendly where possible.
10+
A C# port of the [ngx-Translate](https://github.com/ngx-Translate/core). The port is not one to one and also aims to be more C# friendly where possible.
1111

1212
The library provides you with a `TranslateService` which combined with a `TranslateLoader` (HttpLoader built in) enables you to load, compile and display your translations using formatting with keys. For much stronger formatting there exists a supporting package that uses the awesome [SmartFormat](https://github.com/axuno/SmartFormat/) package.
1313

1414
## Packages
1515

1616
| Package | Stable | Pre |
1717
|:--|:--|:--|
18-
| **Noctilocus** | [![Noctilocus](https://img.shields.io/nuget/v/Noctilocus)](https://www.nuget.org/packages/Noctilocus) | [![Noctilocus](https://img.shields.io/nuget/vpre/Noctilocus)](https://www.nuget.org/packages/Noctilocus) |
19-
| **Noctilocus.SmartFormat** | [![Noctilocus.SmartFormat](https://img.shields.io/nuget/v/Noctilocus.SmartFormat)](https://www.nuget.org/packages/Noctilocus.SmartFormat) | [![Noctilocus.SmartFormat](https://img.shields.io/nuget/vpre/Noctilocus.SmartFormat)](https://www.nuget.org/packages/Noctilocus.SmartFormat) |
18+
| **Translate** | [![Translate](https://img.shields.io/nuget/v/Translate)](https://www.nuget.org/packages/Translate) | [![Translate](https://img.shields.io/nuget/vpre/Translate)](https://www.nuget.org/packages/Translate) |
19+
| **Translate.SmartFormat** | [![Translate.SmartFormat](https://img.shields.io/nuget/v/Translate.SmartFormat)](https://www.nuget.org/packages/Translate.SmartFormat) | [![Translate.SmartFormat](https://img.shields.io/nuget/vpre/Translate.SmartFormat)](https://www.nuget.org/packages/Translate.SmartFormat) |
2020

2121
# Usage
2222

2323
Description
24-
- Noctilocus
24+
- Translate
2525
- Contains the `abstractions`, `defaults`, `primitives`, `http loader` and the `service`.
26-
- Noctilocus.SmartFormat
26+
- Translate.SmartFormat
2727
- Contains the `SmartFormatParser`.
2828

2929
Installation:
30-
- `Noctilocus` in projects that you want to use the service or any of the primitives.
31-
- `Noctilocus.SmartFormat` in projects that use the service and you want to replace the default parser.
30+
- `Translate` in projects that you want to use the service or any of the primitives.
31+
- `Translate.SmartFormat` in projects that use the service and you want to replace the default parser.
3232

3333
# Getting Started
3434

35-
The section will describe how to get started with Noctilocus in a `Blazor Wasm` using the `HttpLoader` storing the language files at `wwwroot/i18n`.
35+
The section will describe how to get started with Translate in a `Blazor Wasm` using the `HttpLoader` storing the language files at `wwwroot/i18n`.
3636

37-
1. Add the `Noctilocus` package.
37+
1. Add the `Translate` package.
3838
```console
39-
dotnet add package Noctilocus
39+
dotnet add package Translate
4040
```
4141
2. Add the appropriate services to the service provider.
4242
```csharp
@@ -50,19 +50,19 @@ services.AddScoped<TranslateService>(); // This will use the default parser
5050

5151
For the tanslation `key: hello` and `value: Hello` you can do:
5252
```csharp
53-
translate.Instant("hello") // prints "Hello"
54-
translate | "hello" // prints "Hello"
53+
Translate.Instant("hello") // prints "Hello"
54+
Translate | "hello" // prints "Hello"
5555
```
5656

5757
For the translation `key: welcome`, `value: Welcome {user}!` and `param: user`.
5858
```csharp
59-
translate.Instant("hello", new { user = "panos" }) // prints "Welcome panos"!
60-
translate | "hello" | new { user = "panos" } // prints "Welcome panos"!
59+
Translate.Instant("hello", new { user = "panos" }) // prints "Welcome panos"!
60+
Translate | "hello" | new { user = "panos" } // prints "Welcome panos"!
6161
```
6262

6363
# Contributing
6464

65-
For general contribution information you can read the [Raven Tail Contributing document](https://github.com/Raven-Tail/.github/blob/main/CONTRIBUTING.md).
65+
For general contribution information you can read the [Raven Tail Contributing document](https://github.com/HereticSoftware/.github/blob/main/CONTRIBUTING.md).
6666

6767
## Local Development
6868

Translate.slnx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Solution>
2+
<Folder Name="/src/" Id="02ea681e-c7d8-13c7-8484-4ac65e1b71e8">
3+
<Project Path="src/Translate.SmartFormat/Translate.SmartFormat.csproj" Id="f53eae23-f085-43da-9d3b-73684be7f8a2" />
4+
<Project Path="src/Translate/Translate.csproj" />
5+
</Folder>
6+
<Folder Name="/test/" Id="f76ce143-01e0-4094-8904-4ecfabc005a2">
7+
<Project Path="test/Translate.Test/Translate.Test.csproj" />
8+
</Folder>
9+
</Solution>

src/Noctilocus.SmartFormat/SmartFormatParser.cs renamed to src/Translate.SmartFormat/SmartFormatParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using Noctilocus.Abstract;
1+
using Translate.Abstract;
22
using SmartFormat;
33
using SmartFormat.Core.Settings;
44

5-
namespace Noctilocus.SmartFormat;
5+
namespace Translate.SmartFormat;
66

77
/// <summary>
88
/// A parser for interpolating strings using SmartFormat.

src/Noctilocus.SmartFormat/Noctilocus.SmartFormat.csproj renamed to src/Translate.SmartFormat/Translate.SmartFormat.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<ProjectReference Include="..\Noctilocus\Noctilocus.csproj" />
13+
<ProjectReference Include="..\Translate\Translate.csproj" />
1414
</ItemGroup>
1515

1616
</Project>

src/Noctilocus/Abstract/TranslateCompiler.cs renamed to src/Translate/Abstract/TranslateCompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using Noctilocus.Primitives;
1+
using Translate.Primitives;
22

3-
namespace Noctilocus.Abstract;
3+
namespace Translate.Abstract;
44

55
/// <summary>
66
/// Class for compiling translations.

0 commit comments

Comments
 (0)