{"id":13629520,"url":"https://github.com/earloc/TypealizR","last_synced_at":"2025-04-17T09:34:38.307Z","repository":{"id":62962794,"uuid":"562622793","full_name":"earloc/TypealizR","owner":"earloc","description":"Statically typed i18n support for the .NET - ecosystem","archived":false,"fork":false,"pushed_at":"2024-11-04T19:07:36.000Z","size":2136,"stargazers_count":75,"open_issues_count":22,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-04T20:20:19.628Z","etag":null,"topics":["csharp","dotnet","i18n","resx","roslyn-generator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/earloc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-06T22:20:50.000Z","updated_at":"2024-11-02T14:04:19.000Z","dependencies_parsed_at":"2023-09-26T11:05:15.301Z","dependency_job_id":"1c8adef7-d49d-487d-96e7-e789436fc428","html_url":"https://github.com/earloc/TypealizR","commit_stats":{"total_commits":530,"total_committers":2,"mean_commits":265.0,"dds":"0.037735849056603765","last_synced_commit":"8706b7bac61257bf9bc51232ac434134e1c317c7"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earloc%2FTypealizR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earloc%2FTypealizR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earloc%2FTypealizR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/earloc%2FTypealizR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/earloc","download_url":"https://codeload.github.com/earloc/TypealizR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751212,"owners_count":17196589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","i18n","resx","roslyn-generator"],"created_at":"2024-08-01T22:01:12.651Z","updated_at":"2024-11-08T20:31:11.543Z","avatar_url":"https://github.com/earloc.png","language":"C#","funding_links":[],"categories":["Contributors Welcome for those"],"sub_categories":["1. [ThisAssembly](https://ignatandrei.github.io/RSCG_Examples/v2/docs/ThisAssembly) , in the [EnhancementProject](https://ignatandrei.github.io/RSCG_Examples/v2/docs/rscg-examples#enhancementproject) category"],"readme":"\r\n[![build](https://github.com/earloc/TypealizR/actions/workflows/build.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/build.yml)\r\n[![Coverage Status](https://coveralls.io/repos/github/earloc/TypealizR/badge.svg?branch=main\u0026q=1)](https://coveralls.io/github/earloc/TypealizR?branch=main)\r\n[![CodeQL](https://github.com/earloc/TypealizR/actions/workflows/codeql.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/codeql.yml)\r\n[![Publish](https://github.com/earloc/TypealizR/actions/workflows/publish.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/publish.yml)\r\n\r\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=earloc_TypealizR\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=earloc_TypealizR)\r\n\r\n[![Samples STS](https://github.com/earloc/TypealizR/actions/workflows/samples_sts.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/samples_sts.yml)\r\n[![Samples LTS](https://github.com/earloc/TypealizR/actions/workflows/samples_lts.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/samples_lts.yml)\r\n\r\n[![NuGet](https://img.shields.io/nuget/v/TypealizR)](https://www.nuget.org/packages/TypealizR)\r\n![Nuget](https://img.shields.io/nuget/dt/TypealizR)\r\n[![NuGet (preview)](https://img.shields.io/nuget/vpre/TypealizR)]((https://www.nuget.org/packages/TypealizR))\r\n\r\n# TypealizR\r\n\u003e The **type**d internation**aliz**e**R**\r\n\r\nStatically typed i18n support for the .NET - ecosystem\r\n\r\n## [resource-first](https://github.com/earloc/TypealizR/blob/main/docs/resource-first.md)\r\n\r\n### ✔️ **DO** this:\r\n\r\n```csharp\r\n\r\n@inject IStringLocalizer\u003cHomePage\u003e localize;\r\n@inject AppUser user;\r\n\r\n\u003ch1\u003e@localize.Title()\u003ch1\u003e\r\n\u003ch2\u003e@localize.Welcome_back__userName(user.GivenName)\u003ch2\u003e\r\n\r\n```\r\n\r\n![demo_typealize_translation_initial](https://github.com/earloc/TypealizR/blob/main/docs/assets/demo_typealize_translation_initial.gif?raw=true)\r\n\r\n### ❌ **DON´T** do that:\r\n\r\n```csharp\r\n\r\n@inject IStringLocalizer\u003cHomePage\u003e localize;\r\n@inject AppUser user;\r\n\r\n\u003ch1\u003e@localize[\"Title\"]\u003ch1\u003e\r\n\u003ch2\u003e@localize[\"Welcome back, {0}\", user.GivenName]\u003ch2\u003e\r\n\r\n```\r\n\r\nSee [resource-first](https://github.com/earloc/TypealizR/blob/main/docs/resource-first.md) for more details\r\n\r\n## [code-first](https://github.com/earloc/TypealizR/blob/main/docs/code-first.md)\r\n\r\n### ✔️ **DO** this:\r\n\r\n```csharp\r\nvoid Demo(ILocalizables i18n)\r\n{\r\n    Console.WriteLine(i18n.Hello(\"Earth\")); // Hello Earth\r\n    Console.WriteLine(i18n.Farewell(\"Arthur\")); // So long, 'Arthur'. And thx for all the fish!\r\n    Console.WriteLine(i18n.WhatIsTheMeaningOfLifeTheUniverseAndEverything); // 42\r\n    Console.WriteLine(i18n.Greet(right: \"Zaphod\", left: \"Arthur\")); // Arthur greets Zaphod, and Zaphod replies: \"Hi!\".\r\n}\r\n\r\n```\r\n### ❌ **DON´T** do that:\r\n```csharp \r\nvoid Demo(IStringLocalizer i18n)\r\n{\r\n    Console.WriteLine(i18n[\"Hello\", \"Earth\"]); // Hello Earth\r\n    Console.WriteLine(i18n[\"Farewell\", \"Arthur\"]); // So long, 'Arthur'. And thx for all the fish!\r\n    Console.WriteLine(i18n[\"WhatIsTheMeaningOfLifeTheUniverseAndEverything\"]; // 42\r\n    Console.WriteLine(i18n[\"Greet\", \"Arthur\", \"Zaphod\")); // Arthur greets Zaphod, and Zaphod replies: \"Hi!\".\r\n}\r\n```\r\n\r\nSee [code-first](https://github.com/earloc/TypealizR/blob/main/docs/code-first.md) for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fearloc%2FTypealizR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fearloc%2FTypealizR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fearloc%2FTypealizR/lists"}