Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Fix asset links #220

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/code-first.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `code-first` approach let´s you specify ordinary, **strongly typed** `Inter
These `typealized interfaces` then get picked up by the `source-generator`, which generates an implementing class that then can be used f.e. in conjuntion with ordinary `dependency-injection`.
This way, devlepors do not need to leave their natural habitat (the code-editor), which comes with the benefit of automatic code-refactorings, ultimatley optimizing the [inner-loop](https://notes.serverlessfirst.com/public/The+inner+and+outer+loops+of+software+development+workflow#Inner+loop), even during i18n-tasks.

![GenerateMethod](../assets/demo_TypealizedInterface_GenerateMethod.gif)
![GenerateMethod](https://github.com/earloc/TypealizR/blob/main/docs/assets/demo_TypealizedInterface_GenerateMethod.gif)

## pre-requisits
The consuming target project should at least reference a suitable version of [Microsoft.Extensions.Localization.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Localization.Abstractions)
Expand All @@ -16,7 +16,7 @@ The consuming target project should at least reference a suitable version of [Mi
- install [TypealizR.CodeFirst.Abstractions](https://www.nuget.org/packages/TypealizR.CodeFirst.Abstractions) via [![NuGet](https://img.shields.io/nuget/v/TypealizR.CodeFirst.Abstractions)](https://www.nuget.org/packages/TypealizR.CodeFirst.Abstractions)
- Author a `Typealized-Interface` which basically is just an ordinary `interface`, marked with `CodeFirstTypealizedAttribute` somewhere within your project.

![demo_TypealizedInterface](../assets/demo_TypealizedInterface.png)
![demo_TypealizedInterface](https://github.com/earloc/TypealizR/blob/main/docs/assets/demo_TypealizedInterface.png)
```csharp
using TypealizR.CodeFirst.Abstractions;
namespace Sample;
Expand Down Expand Up @@ -104,7 +104,7 @@ The consuming target project should at least reference a suitable version of [Mi
> `dotnet tr cf ex some/path/to/a.csproj`

This will extract the following `resx`-file for above sample:
![TypealizedInterface_Resx](../assets//demo_TypealizedInterface_Resx.png?raw=true)
![TypealizedInterface_Resx](https://github.com/earloc/TypealizR/blob/main/docs/assets//demo_TypealizedInterface_Resx.png?raw=true)
```xml
<data name="Hello">
<value>Hello, fellow developer!</value>
Expand All @@ -113,4 +113,4 @@ The consuming target project should at least reference a suitable version of [Mi
<value>Hey {0}, welcome to {1} 👍!</value>
</data>
```
> executing this will OVERWRITE any existing file at the moment. In the future, TypealizR will be aware of existing files and provide a way to synchronize code with those files, in order to not loose any customizations done within them. Follow [the discussion](https://github.com/earloc/TypealizR/discussions/78) and let´s define together, what workflows would be needed to make code-first-i18n a real game-changer in the future!
> executing this will OVERWRITE any existing file at the moment. In the future, TypealizR will be aware of existing files and provide a way to synchronize code with those files, in order to not loose any customizations done within them. Follow [the discussion](https://github.com/earloc/TypealizR/discussions/78) and let´s define together, what workflows would be needed to make code-first-i18n a real game-changer in the future!