Open Closed

About Localization #1630


User avatar
0
gvnuysal created
  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular):no Hi support, I have 2 question:
  1. I am authorized to everything, but I cannot see the buttons related to the actions.

  2. How can I translate the red area into Turkish? I could not find the localization key information. Our login screen is the custom login page.

Thanks your answer.


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I am authorized to everything, but I cannot see the buttons related to the actions.

    Can you confim your current user permissions?

    Our login screen is the custom login page.

    Please share your code of login page.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    About question 1:

    See https://support.abp.io/QA/Questions/1571/Can-edit-language-Texts-only-as-host-admin-not-possible-as-tenant-admin

    For now, you can try:

    Find default-language-texts-entity-actions.ts and replace LanguageManagement.Languages.Edit to LanguageManagement.LanguageTexts.Edit

  • User Avatar
    0
    gvnuysal created

    Hi @maliming

    
    using Microsoft.AspNetCore.Authentication;
    using Microsoft.AspNetCore.Identity;
    using Microsoft.Extensions.Options;
    using Owl.reCAPTCHA;
    using Volo.Abp.Account.ExternalProviders;
    using Volo.Abp.Account.Public.Web;
    using Volo.Abp.Account.Public.Web.Pages.Account;
    using Volo.Abp.Account.Security.Recaptcha;
    using Volo.Abp.Security.Claims;
    
    namespace AbpView.Pages.Account
    {
        public class CustomLoginModel : LoginModel
        {
            public CustomLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions, IAbpRecaptchaValidatorFactory recaptchaValidatorFactory,
                IAccountExternalProviderAppService accountExternalProviderAppService, ICurrentPrincipalAccessor currentPrincipalAccessor, IOptions<IdentityOptions> identityOptions, IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions) : base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor,identityOptions,reCaptchaOptions)
            {
            }
        }
    }
    
    
    @page
    @using Microsoft.AspNetCore.Mvc.Localization
    @using Volo.Abp.Account.Localization
    @using Volo.Abp.Account.Settings
    @using Volo.Abp.Settings
    @model AbpView.Pages.Account.CustomLoginModel
    @inject IHtmlLocalizer<AccountResource> L
    @inject Volo.Abp.Settings.ISettingProvider SettingProvider
    @using Microsoft.Extensions.Configuration
    @inject IConfiguration Configuration
    
     
    
    
    <h4>@L["Login"]</h4>
    @if (await SettingProvider.IsTrueAsync(AccountSettingNames.IsSelfRegistrationEnabled))
    {
        <strong>
            @L["AreYouANewUser"]
            <a href="@Url.Page("./Register", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})" class="text-decoration-none">@L["Register"]</a>
        </strong>
    }
    @if (Model.EnableLocalLogin)
    {
        <form method="post" class="mt-4">
            <input asp-for="ReturnUrl" />
            <input asp-for="ReturnUrlHash" />
            <div class="form-group">
                <label asp-for="LoginInput.UserNameOrEmailAddress"></label>
                <input asp-for="LoginInput.UserNameOrEmailAddress" class="form-control" />
                <span asp-validation-for="LoginInput.UserNameOrEmailAddress" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="LoginInput.Password"></label>
                <input asp-for="LoginInput.Password" class="form-control" />
                <span asp-validation-for="LoginInput.Password" class="text-danger"></span>
            </div>
            <abp-row>
                <abp-column>
                    <abp-input asp-for="LoginInput.RememberMe" class="mb-4" />
                </abp-column>
                <abp-column class="text-right">
                    <a href="@Url.Page("./ForgotPassword", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["ForgotPassword"]</a>
                </abp-column>
            </abp-row>
            <abp-button type="submit" button-type="Primary" name="Action" value="Login" class="btn-block btn-lg mt-3">@L["Login"]</abp-button>
            @if (Model.ShowCancelButton)
            {
                <abp-button type="submit" button-type="Secondary" formnovalidate="formnovalidate" name="Action" value="Cancel" class="btn-block btn-lg mt-3">@L["Cancel"]</abp-button>
            }
        </form>
    }
    
    @if (Model.VisibleExternalProviders.Any())
    {
        <div class="mt-2">
            
            <form asp-page="./Login" asp-page-handler="ExternalLogin" asp-route-returnUrl="@Model.ReturnUrl" asp-route-returnUrlHash="@Model.ReturnUrlHash" method="post">
                <input asp-for="ReturnUrl" />
                <input asp-for="ReturnUrlHash" />
                @foreach (var provider in Model.VisibleExternalProviders)
                {
                    <button type="submit" id="loginAzureAd" class="btn btn-primary m-1" name="provider" value="@provider.AuthenticationScheme" title="@L["LogInUsingYourProviderAccount", provider.DisplayName]">@provider.DisplayName</button>
                }
            </form>
        </div>
    }
    
    @if (!Model.EnableLocalLogin && !Model.VisibleExternalProviders.Any())
    {
        <div class="alert alert-warning">
            <strong>@L["InvalidLoginRequest"]</strong>
            @L["ThereAreNoLoginSchemesConfiguredForThisClient"]
        </div>
    }
    
     
    
    
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    See https://support.abp.io/QA/Questions/1630#answer-9df23f97-dc74-a2b2-702c-39fdf9ec5d3b

    AreYouANewUser belongs open-source account module instead of account pro module. https://github.com/abpframework/abp/search?q=AreYouANewUser

    Your tenant name we forgot to translate this, I will do it in 4.4.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    abp/lepton-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton/Themes/Lepton/Layouts/Account/Default.cshtml

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09