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

[Nox.Solution] Localization Validations #1052

Closed
rochar opened this issue Oct 26, 2023 · 1 comment
Closed

[Nox.Solution] Localization Validations #1052

rochar opened this issue Oct 26, 2023 · 1 comment
Assignees
Labels
p-backlog The issue is being tracked also in a external backlog p-scope The issue is assigned to a non Nox Team Member

Comments

@rochar
Copy link
Collaborator

rochar commented Oct 26, 2023

Add the following validations to Localization in Nox Solution:

  1. All are valid Culture Codes, use CultureCode.From()
  2. On Apply defaults ensure (add to list if not) that supported SupportedCultures contains also DefaultCulture
  3. On Apply defaults Create a Collection of SupportedCultures of Type CultureCode
  4. Update IHttpLanguage to return CultureCode
public class Localization
{
    [Title("The list of culture codes supported by the solution.")]
    [Description("The list of culture codes that the solution supports.")]
    [Pattern(@"^[a-z]{2}-[A-Z]{2}$")]
    [Required]
    public IReadOnlyList<string> SupportedCultures { get; set; } = new List<string>() { "en-US" };

    [Title("The default culture code for the solution.")]
    [Description("The default culture code used for formatting and translation.")]
    [Pattern(@"^[a-z]{2}-[A-Z]{2}$")]
    [Required]
    public string DefaultCulture { get; set; } = "en-US";
}
@rochar rochar added this to the Localization - Nox 7.0 milestone Oct 26, 2023
@rochar rochar added p-backlog The issue is being tracked also in a external backlog p-scope The issue is assigned to a non Nox Team Member labels Oct 26, 2023
@gjorgji-grgovski-authoritypartners
Copy link
Contributor

@rochar rochar closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-backlog The issue is being tracked also in a external backlog p-scope The issue is assigned to a non Nox Team Member
Projects
None yet
Development

No branches or pull requests

2 participants