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

added friendly message to display when there are no other languages t… #1997

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/lang/en-us.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ export default {
language: {
cultureCode: 'Culture Code',
displayName: 'Culture Name',
noFallbackLanguages: 'There are no other languages to choose from',
},
lockout: {
lockoutWillOccur: "You've been idle and logout will automatically occur in",
Expand Down
1 change: 1 addition & 0 deletions src/assets/lang/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,7 @@ export default {
language: {
cultureCode: 'Culture Code',
displayName: 'Culture Name',
noFallbackLanguages: 'There are no other languages to choose from',
},
lockout: {
lockoutWillOccur: "You've been idle and logout will automatically occur in",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class UmbLanguagePickerModalElement extends UmbModalBaseElement<
render() {
return html`<umb-body-layout headline="Select languages">
<uui-box>
${repeat(
${this.#filteredLanguages.length > 0 ? repeat(
this.#filteredLanguages,
(item) => item.unique,
(item) => html`
Expand All @@ -64,7 +64,9 @@ export class UmbLanguagePickerModalElement extends UmbModalBaseElement<
<uui-icon slot="icon" name="icon-globe"></uui-icon>
</uui-menu-item>
`,
)}
) : html`<umb-localize key="language_noFallbackLanguages">
There are no other languages to choose from
</umb-localize>`}
</uui-box>
<div slot="actions">
<uui-button label="Close" @click=${this.#close}></uui-button>
Expand Down