最近想将我们的自定义 SignUpSignin 政策翻译成意大利语。
我们可以很好地自定义 UI,并翻译大多数文本。但是,我们无法修改“电子邮件”和“密码”的翻译。电子邮件声明在其他政策(例如密码重置)中翻译得很好。
我们尝试了各种声明名称,但均未成功(signInName、电子邮件、密码……)。德语翻译也不起作用。
<UserJourney Id="SignUpOrSignIn">
<OrchestrationSteps>
<OrchestrationStep Order="1"
Type="CombinedSignInAndSignUp"
ContentDefinitionReferenceId="api.signuporsignin">
...
<ContentDefinition Id="api.signuporsignin">
<LoadUri>our_custom_ui</LoadUri>
<RecoveryUri>~/common/default_page_error.html</RecoveryUri>
<DataUri>urn:com:microsoft:aad:b2c:elements:unifiedssp:1.0.0</DataUri>
<Metadata>
<Item Key="DisplayName">Signin and Signup</Item>
</Metadata>
<LocalizedResourcesReferences>
<LocalizedResourcesReference Language="de"
LocalizedResourcesReferenceId="de" />
<LocalizedResourcesReference Language="en"
LocalizedResourcesReferenceId="en" />
<LocalizedResourcesReference Language="it"
LocalizedResourcesReferenceId="it" />
</LocalizedResourcesReferences>
</ContentDefinition>
...
<Localization>
<SupportedLanguages DefaultLanguage="en">
<SupportedLanguage>en</SupportedLanguage>
<SupportedLanguage>de</SupportedLanguage>
<SupportedLanguage>it</SupportedLanguage>
</SupportedLanguages>
<LocalizedResources Id="it">
<LocalizedStrings>
<LocalizedString ElementType="ClaimType"
ElementId="email"
StringId="DisplayName">Indirizzo e-mail</LocalizedString>
<LocalizedString ElementType="ClaimType"
ElementId="signInName"
StringId="DisplayName">Indirizzo e-mail</LocalizedString>
<LocalizedString ElementType="ClaimType"
ElementId="password"
StringId="DisplayName">Some dummy text</LocalizedString>
更新: 这是我生成的 html
<div class="entry">
<div class="entry-item">
<label for="signInName">
Indirizzo di posta elettronica
</label>
<div class="error itemLevel" aria-hidden="true" style="display: none;">
<p role="alert"></p>
</div>
<input id="signInName" name="Indirizzo e-mail" pattern="^...$" placeholder="Indirizzo di posta elettronica" value="" tabindex="1" type="email">
</div>
<div class="entry-item">
<div class="password-label">
<label for="password">Password</label>
<a id="forgotPassword" tabindex="2" href="...">Password dimenticata?</a>
</div>
<div class="error itemLevel" aria-hidden="true" style="display: none;">
<p role="alert"></p>
</div>
<input id="password" name="Some dummy text" placeholder="Password" tabindex="1" type="password">
</div>
<div class="working"></div>
<div class="buttons">
<button id="next" tabindex="1">Accedi</button>
</div>
</div>