Skip to content

Make the names of the { key label } types overridable / globally-overridable  #5

@gmiserez

Description

@gmiserez

Currently, the generated resource types are always named TranslatedResourceOf{NameOfOriginalType}.
It should be possible to override the default naming.

services
   .AddRouting()
  .AddGraphQLServer()
  .AddTranslation(c => c
        .AddTranslatableType<HairColor>()
        ...
        .SetNamingConvention("Translated{Name}") // ...or something like that
   )

Additionally it could be interesting to be able to override these names on each field:

    public class Human
    {
        [Translate<MaritalStatus>(resourceKeyPrefix: "MaritalStatus", typeName: "TranslatedMaritalStatus")]
        public MaritalStatus MaritalStatus { get; }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    TranslationsThis concerns the Translations PackageenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions