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

Specify locale for strings that may differ from the chosen display locale #5624

Merged
merged 1 commit into from
Sep 6, 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/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
>
<span
class="changeLogText"
lang="en"
v-html="updateChangelog"
/>
<ft-flex-box>
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/components/ft-select/ft-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default defineComponent({
iconColor: {
type: String,
default: null
},
isLocaleSelector: {
type: Boolean,
default: false
}
},
emits: ['change'],
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ft-select/ft-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
v-for="(name, index) in selectNames"
:key="index"
:value="selectValues[index]"
:lang="isLocaleSelector && selectValues[index] !== 'system' ? selectValues[index].replace('_', '-') : null"
>
{{ name }}
</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
:select-names="localeNames"
:select-values="localeOptions"
:icon="['fas', 'language']"
is-locale-selector
@change="updateCurrentLocale"
/>
<ft-select
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/About/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineComponent({
{
icon: ['fab', 'github'],
title: this.$t('About.Source code'),
content: `<a href="https://github.com/FreeTubeApp/FreeTube">GitHub: FreeTubeApp/FreeTube</a><br>${this.$t('About.Licensed under the')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.AGPLv3')}</a>`
content: `<a href="https://github.com/FreeTubeApp/FreeTube" lang="en">GitHub: FreeTubeApp/FreeTube</a><br>${this.$t('About.Licensed under the')} <a href="https://www.gnu.org/licenses/agpl-3.0.en.html">${this.$t('About.AGPLv3')}</a>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should lang="en" be added to other links too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any link in particular that you have in mind? I added it to this one because the display text is English, form what I can tell the rest of them on the about page either have the link itself as the display text or are translated, but I might have missed something.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh they are translated? Did not check :)

},
{
icon: ['fas', 'file-download'],
Expand Down