From f12b9e1dc84ecb44d787959d7f01262e905a1a21 Mon Sep 17 00:00:00 2001 From: SC Date: Tue, 11 Oct 2022 10:42:49 +0000 Subject: [PATCH 01/28] Translated using Weblate (Portuguese) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/pt/ --- static/locales/pt.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/static/locales/pt.yaml b/static/locales/pt.yaml index 70873510bda8f..e616b1db73368 100644 --- a/static/locales/pt.yaml +++ b/static/locales/pt.yaml @@ -83,6 +83,9 @@ Subscriptions: perfil contém um elevado número de subscrições. A forçar a utilização do RSS para evitar que a sua rede seja bloqueada Error Channels: Canais com erros + Empty Channels: Os seus canais subscritos não têm atualmente quaisquer vídeos. + Disabled Automatic Fetching: Desativou a atualização automática de subscrições. + Atualize as subscrições para as ver aqui. Trending: Trending: 'Tendências' Trending Tabs: Guias de tendências @@ -286,6 +289,7 @@ Settings: Hide Videos on Watch: 'Ocultar vídeos visualizados' Fetch Feeds from RSS: 'Obter subscrições através de RSS' Manage Subscriptions: 'Gerir subscrições' + Fetch Automatically: Obter o feed automaticamente Data Settings: Data Settings: 'Definições de dados' Select Import Type: 'Escolher tipo de importação' @@ -333,6 +337,9 @@ Settings: importadas com êxito All playlists has been successfully exported: Todas as listas de reprodução foram exportadas com êxito + Subscription File: Ficheiro de subscrição + History File: Ficheiro de histórico + Playlist File: Ficheiro da lista de reprodução Advanced Settings: Advanced Settings: 'Definições Avançadas' Enable Debug Mode (Prints data to the console): 'Ligar Modo de Depuração (Escreve @@ -405,6 +412,7 @@ Settings: Hide Sharing Actions: Ocultar ações de partilhar Hide Live Streams: Ocultar transmissões em direto Hide Comments: Ocultar comentários + Hide Chapters: Ocultar capítulos External Player Settings: Custom External Player Arguments: Argumentos do reprodutor externo personalizado Custom External Player Executable: Executável de reprodutor externo personalizado @@ -626,6 +634,7 @@ Video: Ago: 'Há' Upcoming: 'Estreia em' Less than a minute: Menos de um minuto + In less than a minute: Em menos de um minuto Published on: 'Publicado a' # $ is replaced with the number and % with the unit (days, hours, minutes...) Publicationtemplate: 'Há $ %' @@ -697,6 +706,7 @@ Video: Buffered: Em buffer Dropped / Total Frames: Fotogramas perdidos / total de fotogramas Premieres in: Estreia em + Premieres: Estreias Videos: #& Sort By Sort By: @@ -824,6 +834,8 @@ Tooltips: através de RSS em vez do método normal. O RSS é mais rápido e impede que seja bloqueado pelo YouTube, mas não disponibiliza informações como a duração dos vídeos ou se são transmissões em direto + Fetch Automatically: Quando ativado, o FreeTube irá buscar automaticamente o seu + feed de subscrição quando uma nova janela for aberta e quando mudar de perfil. External Player Settings: Custom External Player Arguments: Quaisquer argumentos de linha de comando, separados por ponto e vírgula (';'), que quiser dar ao leitor externo. @@ -895,3 +907,13 @@ Channels: Channels: Canais Title: Lista de canais Unsubscribe Prompt: Quer mesmo deixar a subscrição de "$"? +Chapters: + 'Chapters list hidden, current chapter: {chapterName}': 'Lista de capítulos ocultos, + capítulo atual: {capítuloNoto}' + Chapters: Capítulos + 'Chapters list visible, current chapter: {chapterName}': 'Lista de capítulos visível, + capítulo atual: {chapterName}' +Clipboard: + Copy failed: A cópia para a área de transferência falhou + Cannot access clipboard without a secure connection: Não é possível aceder à área + de transferência sem uma ligação segura From bc8261d970bf62aaaddb662055269bb8d472956e Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Wed, 12 Oct 2022 08:49:12 +0200 Subject: [PATCH 02/28] Move colours from the store to the utils helper (#2710) * Move colours from the store to the utils helper * Use a single array for colours --- .../components/data-settings/data-settings.js | 11 +-- .../ft-profile-edit/ft-profile-edit.js | 4 +- .../ft-sponsor-block-category.js | 3 +- .../ft-video-player/ft-video-player.js | 10 +- .../theme-settings/theme-settings.js | 3 +- .../watch-video-live-chat.js | 38 +++----- src/renderer/helpers/utils.js | 50 ++++++++++ src/renderer/store/modules/profiles.js | 6 +- src/renderer/store/modules/utils.js | 97 ------------------- src/renderer/views/ProfileEdit/ProfileEdit.js | 9 +- 10 files changed, 86 insertions(+), 145 deletions(-) diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index c64c4b5c2cb46..14201469ada11 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -11,7 +11,7 @@ import { MAIN_PROFILE_ID } from '../../../constants' import fs from 'fs' import { opmlToJSON } from 'opml-to-json' import ytch from 'yt-channel-info' -import { calculateColorLuminance } from '../../helpers/utils' +import { calculateColorLuminance, getRandomColor } from '../../helpers/utils' // FIXME: Missing web logic branching @@ -129,7 +129,7 @@ export default Vue.extend({ }) }, - importFreeTubeSubscriptions: async function (textDecode) { + importFreeTubeSubscriptions: function (textDecode) { textDecode = textDecode.split('\n') textDecode.pop() textDecode = textDecode.map(data => JSON.parse(data)) @@ -137,7 +137,7 @@ export default Vue.extend({ const firstEntry = textDecode[0] if (firstEntry.channelId && firstEntry.channelName && firstEntry.channelThumbnail && firstEntry._id && firstEntry.profile) { // Old FreeTube subscriptions format detected, so convert it to the new one: - textDecode = await this.convertOldFreeTubeFormatToNew(textDecode) + textDecode = this.convertOldFreeTubeFormatToNew(textDecode) } textDecode.forEach((profileData) => { @@ -1085,14 +1085,14 @@ export default Vue.extend({ }) }, - async convertOldFreeTubeFormatToNew(oldData) { + convertOldFreeTubeFormatToNew(oldData) { const convertedData = [] for (const channel of oldData) { const listOfProfilesAlreadyAdded = [] for (const profile of channel.profile) { let index = convertedData.findIndex(p => p.name === profile.value) if (index === -1) { // profile doesn't exist yet - const randomBgColor = await this.getRandomColor() + const randomBgColor = getRandomColor() const contrastyTextColor = calculateColorLuminance(randomBgColor) convertedData.push({ name: profile.value, @@ -1241,7 +1241,6 @@ export default Vue.extend({ 'updateHistory', 'compactHistory', 'showToast', - 'getRandomColor', 'showOpenDialog', 'readFileFromDialog', 'showSaveDialog', diff --git a/src/renderer/components/ft-profile-edit/ft-profile-edit.js b/src/renderer/components/ft-profile-edit/ft-profile-edit.js index a2c02d0aee796..85a808e9304cb 100644 --- a/src/renderer/components/ft-profile-edit/ft-profile-edit.js +++ b/src/renderer/components/ft-profile-edit/ft-profile-edit.js @@ -6,7 +6,7 @@ import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue' import FtInput from '../../components/ft-input/ft-input.vue' import FtButton from '../../components/ft-button/ft-button.vue' import { MAIN_PROFILE_ID } from '../../../constants' -import { calculateColorLuminance } from '../../helpers/utils' +import { calculateColorLuminance, colors } from '../../helpers/utils' export default Vue.extend({ name: 'FtProfileEdit', @@ -46,7 +46,7 @@ export default Vue.extend({ return this.profileId === MAIN_PROFILE_ID }, colorValues: function () { - return this.$store.getters.getColorValues + return colors.map(color => color.value) }, profileInitial: function () { return this?.profileName?.length > 0 ? Array.from(this.profileName)[0].toUpperCase() : '' diff --git a/src/renderer/components/ft-sponsor-block-category/ft-sponsor-block-category.js b/src/renderer/components/ft-sponsor-block-category/ft-sponsor-block-category.js index f74378ffbb714..4cc6aafc5d304 100644 --- a/src/renderer/components/ft-sponsor-block-category/ft-sponsor-block-category.js +++ b/src/renderer/components/ft-sponsor-block-category/ft-sponsor-block-category.js @@ -1,5 +1,6 @@ import Vue from 'vue' import { mapActions } from 'vuex' +import { colors } from '../../helpers/utils' import FtSelect from '../ft-select/ft-select.vue' export default Vue.extend({ @@ -27,7 +28,7 @@ export default Vue.extend({ }, computed: { colorValues: function () { - return this.$store.getters.getColorNames + return colors.map(color => color.name) }, colorNames: function () { diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index e889964a7272c..1a1b2836691da 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -14,7 +14,7 @@ import 'videojs-http-source-selector' import { IpcChannels } from '../../../constants' import { sponsorBlockSkipSegments } from '../../helpers/sponsorblock' -import { calculateColorLuminance } from '../../helpers/utils' +import { calculateColorLuminance, colors } from '../../helpers/utils' export default Vue.extend({ name: 'FtVideoPlayer', @@ -1181,14 +1181,10 @@ export default Vue.extend({ if (!this.player.loop()) { const currentTheme = this.$store.state.settings.mainColor - const colorNames = this.$store.state.utils.colorNames - const colorValues = this.$store.state.utils.colorValues - const nameIndex = colorNames.findIndex((color) => { - return color === currentTheme - }) + const colorValue = colors.find(color => color.name === currentTheme).value - const themeTextColor = calculateColorLuminance(colorValues[nameIndex]) + const themeTextColor = calculateColorLuminance(colorValue) loopButton.classList.add('vjs-icon-loop-active') diff --git a/src/renderer/components/theme-settings/theme-settings.js b/src/renderer/components/theme-settings/theme-settings.js index 8098ae2f92e29..7a962b7a2bf5d 100644 --- a/src/renderer/components/theme-settings/theme-settings.js +++ b/src/renderer/components/theme-settings/theme-settings.js @@ -7,6 +7,7 @@ import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue' import FtSlider from '../ft-slider/ft-slider.vue' import FtFlexBox from '../ft-flex-box/ft-flex-box.vue' import FtPrompt from '../ft-prompt/ft-prompt.vue' +import { colors } from '../../helpers/utils' export default Vue.extend({ name: 'ThemeSettings', @@ -100,7 +101,7 @@ export default Vue.extend({ }, colorValues: function () { - return this.$store.getters.getColorNames + return colors.map(color => color.name) }, colorNames: function () { diff --git a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js index 5c1e219a1fc80..3c9c63ae67458 100644 --- a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js +++ b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js @@ -1,5 +1,4 @@ import Vue from 'vue' -import { mapActions } from 'vuex' import FtLoader from '../ft-loader/ft-loader.vue' import FtCard from '../ft-card/ft-card.vue' import FtButton from '../ft-button/ft-button.vue' @@ -7,6 +6,7 @@ import FtListVideo from '../ft-list-video/ft-list-video.vue' import autolinker from 'autolinker' import { LiveChat } from '@freetube/youtube-chat' +import { getRandomColorClass } from '../../helpers/utils' export default Vue.extend({ name: 'WatchVideoLiveChat', @@ -178,30 +178,26 @@ export default Vue.extend({ this.comments.push(comment) if (typeof (comment.superchat) !== 'undefined') { - this.getRandomColorClass().then((data) => { - comment.superchat.colorClass = data + comment.superchat.colorClass = getRandomColorClass() - this.superChatComments.unshift(comment) + this.superChatComments.unshift(comment) - setTimeout(() => { - this.removeFromSuperChat(comment.id) - }, 120000) - }) + setTimeout(() => { + this.removeFromSuperChat(comment.id) + }, 120000) } if (comment.author.name[0] === 'Ge' || comment.author.name[0] === 'Ne') { - this.getRandomColorClass().then((data) => { - comment.superChat = { - amount: '$5.00', - colorClass: data - } + comment.superChat = { + amount: '$5.00', + colorClass: getRandomColorClass() + } - this.superChatComments.unshift(comment) + this.superChatComments.unshift(comment) - setTimeout(() => { - this.removeFromSuperChat(comment.id) - }, 120000) - }) + setTimeout(() => { + this.removeFromSuperChat(comment.id) + }, 120000) } if (this.stayAtBottom) { @@ -260,10 +256,6 @@ export default Vue.extend({ preventDefault: function (event) { event.stopPropagation() event.preventDefault() - }, - - ...mapActions([ - 'getRandomColorClass' - ]) + } } }) diff --git a/src/renderer/helpers/utils.js b/src/renderer/helpers/utils.js index 46fb35678fe3c..201bcb6dcf4ec 100644 --- a/src/renderer/helpers/utils.js +++ b/src/renderer/helpers/utils.js @@ -1,3 +1,53 @@ +export const colors = [ + { name: 'Red', value: '#d50000' }, + { name: 'Pink', value: '#C51162' }, + { name: 'Purple', value: '#AA00FF' }, + { name: 'DeepPurple', value: '#6200EA' }, + { name: 'Indigo', value: '#304FFE' }, + { name: 'Blue', value: '#2962FF' }, + { name: 'LightBlue', value: '#0091EA' }, + { name: 'Cyan', value: '#00B8D4' }, + { name: 'Teal', value: '#00BFA5' }, + { name: 'Green', value: '#00C853' }, + { name: 'LightGreen', value: '#64DD17' }, + { name: 'Lime', value: '#AEEA00' }, + { name: 'Yellow', value: '#FFD600' }, + { name: 'Amber', value: '#FFAB00' }, + { name: 'Orange', value: '#FF6D00' }, + { name: 'DeepOrange', value: '#DD2C00' }, + { name: 'DraculaCyan', value: '#8BE9FD' }, + { name: 'DraculaGreen', value: '#50FA7B' }, + { name: 'DraculaOrange', value: '#FFB86C' }, + { name: 'DraculaPink', value: '#FF79C6' }, + { name: 'DraculaPurple', value: '#BD93F9' }, + { name: 'DraculaRed', value: '#FF5555' }, + { name: 'DraculaYellow', value: '#F1FA8C' }, + { name: 'CatppuccinMochaRosewater', value: '#F5E0DC' }, + { name: 'CatppuccinMochaFlamingo', value: '#F2CDCD' }, + { name: 'CatppuccinMochaPink', value: '#F5C2E7' }, + { name: 'CatppuccinMochaMauve', value: '#CBA6F7' }, + { name: 'CatppuccinMochaRed', value: '#F38BA8' }, + { name: 'CatppuccinMochaMaroon', value: '#EBA0AC' }, + { name: 'CatppuccinMochaPeach', value: '#FAB387' }, + { name: 'CatppuccinMochaYellow', value: '#F9E2AF' }, + { name: 'CatppuccinMochaGreen', value: '#A6E3A1' }, + { name: 'CatppuccinMochaTeal', value: '#94E2D5' }, + { name: 'CatppuccinMochaSky', value: '#89DCEB' }, + { name: 'CatppuccinMochaSapphire', value: '#74C7EC' }, + { name: 'CatppuccinMochaBlue', value: '#89B4FA' }, + { name: 'CatppuccinMochaLavender', value: '#B4BEFE' } +] + +export function getRandomColorClass() { + const randomInt = Math.floor(Math.random() * colors.length) + return 'main' + colors[randomInt].name +} + +export function getRandomColor() { + const randomInt = Math.floor(Math.random() * colors.length) + return colors[randomInt].value +} + export function calculateColorLuminance(colorValue) { const cutHex = colorValue.substring(1, 7) const colorValueR = parseInt(cutHex.substring(0, 2), 16) diff --git a/src/renderer/store/modules/profiles.js b/src/renderer/store/modules/profiles.js index 7c189f55440b7..78f9590cee565 100644 --- a/src/renderer/store/modules/profiles.js +++ b/src/renderer/store/modules/profiles.js @@ -1,6 +1,6 @@ import { MAIN_PROFILE_ID } from '../../../constants' import { DBProfileHandlers } from '../../../datastores/handlers/index' -import { calculateColorLuminance } from '../../helpers/utils' +import { calculateColorLuminance, getRandomColor } from '../../helpers/utils' const state = { profileList: [{ @@ -40,7 +40,7 @@ function profileSort(a, b) { } const actions = { - async grabAllProfiles({ rootState, dispatch, commit }, defaultName = null) { + async grabAllProfiles({ rootState, commit }, defaultName = null) { let profiles try { profiles = await DBProfileHandlers.find() @@ -53,7 +53,7 @@ const actions = { if (profiles.length === 0) { // Create a default profile and persist it - const randomColor = await dispatch('getRandomColor') + const randomColor = getRandomColor() const textColor = calculateColorLuminance(randomColor) const defaultProfile = { _id: MAIN_PROFILE_ID, diff --git a/src/renderer/store/modules/utils.js b/src/renderer/store/modules/utils.js index 9e85e33d084ef..0bf26dc0b192f 100644 --- a/src/renderer/store/modules/utils.js +++ b/src/renderer/store/modules/utils.js @@ -27,85 +27,6 @@ const state = { type: 'all', duration: '' }, - colorNames: [ - 'Red', - 'Pink', - 'Purple', - 'DeepPurple', - 'Indigo', - 'Blue', - 'LightBlue', - 'Cyan', - 'Teal', - 'Green', - 'LightGreen', - 'Lime', - 'Yellow', - 'Amber', - 'Orange', - 'DeepOrange', - 'DraculaCyan', - 'DraculaGreen', - 'DraculaOrange', - 'DraculaPink', - 'DraculaPurple', - 'DraculaRed', - 'DraculaYellow', - 'CatppuccinMochaRosewater', - 'CatppuccinMochaFlamingo', - 'CatppuccinMochaPink', - 'CatppuccinMochaMauve', - 'CatppuccinMochaRed', - 'CatppuccinMochaMaroon', - 'CatppuccinMochaPeach', - 'CatppuccinMochaYellow', - 'CatppuccinMochaGreen', - 'CatppuccinMochaTeal', - 'CatppuccinMochaSky', - 'CatppuccinMochaSapphire', - 'CatppuccinMochaBlue', - 'CatppuccinMochaLavender' - - ], - colorValues: [ - '#d50000', - '#C51162', - '#AA00FF', - '#6200EA', - '#304FFE', - '#2962FF', - '#0091EA', - '#00B8D4', - '#00BFA5', - '#00C853', - '#64DD17', - '#AEEA00', - '#FFD600', - '#FFAB00', - '#FF6D00', - '#DD2C00', - '#8BE9FD', - '#50FA7B', - '#FFB86C', - '#FF79C6', - '#BD93F9', - '#FF5555', - '#F1FA8C', - '#F5E0DC', - '#F2CDCD', - '#F5C2E7', - '#CBA6F7', - '#F38BA8', - '#EBA0AC', - '#FAB387', - '#F9E2AF', - '#A6E3A1', - '#94E2D5', - '#89DCEB', - '#74C7EC', - '#89B4FA', - '#B4BEFE' - ], externalPlayerNames: [], externalPlayerNameTranslationKeys: [], externalPlayerValues: [], @@ -137,14 +58,6 @@ const getters = { return state.searchSettings }, - getColorNames () { - return state.colorNames - }, - - getColorValues () { - return state.colorValues - }, - getShowProgressBar () { return state.showProgressBar }, @@ -534,16 +447,6 @@ const actions = { commit('setShowProgressBar', value) }, - getRandomColorClass () { - const randomInt = Math.floor(Math.random() * state.colorNames.length) - return 'main' + state.colorNames[randomInt] - }, - - getRandomColor () { - const randomInt = Math.floor(Math.random() * state.colorValues.length) - return state.colorValues[randomInt] - }, - getRegionData ({ commit }, payload) { let fileData /* eslint-disable-next-line */ diff --git a/src/renderer/views/ProfileEdit/ProfileEdit.js b/src/renderer/views/ProfileEdit/ProfileEdit.js index 6034fd1b0b030..93790025dbef7 100644 --- a/src/renderer/views/ProfileEdit/ProfileEdit.js +++ b/src/renderer/views/ProfileEdit/ProfileEdit.js @@ -5,7 +5,7 @@ import FtProfileEdit from '../../components/ft-profile-edit/ft-profile-edit.vue' import FtProfileChannelList from '../../components/ft-profile-channel-list/ft-profile-channel-list.vue' import FtProfileFilterChannelsList from '../../components/ft-profile-filter-channels-list/ft-profile-filter-channels-list.vue' import { MAIN_PROFILE_ID } from '../../../constants' -import { calculateColorLuminance } from '../../helpers/utils' +import { calculateColorLuminance, getRandomColor } from '../../helpers/utils' export default Vue.extend({ name: 'ProfileEdit', @@ -53,14 +53,14 @@ export default Vue.extend({ deep: true } }, - mounted: async function () { + mounted: function () { const profileType = this.$route.name this.deletePromptLabel = `${this.$t('Profile.Are you sure you want to delete this profile?')} ${this.$t('Profile["All subscriptions will also be deleted."]')}` if (profileType === 'newProfile') { this.isNew = true - const bgColor = await this.getRandomColor() + const bgColor = getRandomColor() const textColor = calculateColorLuminance(bgColor) this.profile = { name: '', @@ -88,8 +88,7 @@ export default Vue.extend({ }, methods: { ...mapActions([ - 'showToast', - 'getRandomColor' + 'showToast' ]) } }) From bd210ab0ff5aab94c1fd0f08ccc91e893ccbebea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B3=D0=BE=D1=80=20=D0=95=D1=80=D0=BC=D0=B0=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Tue, 11 Oct 2022 13:29:43 +0000 Subject: [PATCH 03/28] Translated using Weblate (Russian) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/ru/ --- static/locales/ru.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/locales/ru.yaml b/static/locales/ru.yaml index cfe1c73bd72a9..10737c198ff90 100644 --- a/static/locales/ru.yaml +++ b/static/locales/ru.yaml @@ -363,6 +363,9 @@ Settings: Export Playlists: Экспортировать плейлисты All playlists has been successfully imported: Все плейлисты успешно импортированы Playlist insufficient data: Недостаточно данных для плейлиста "$", пропуск элемента + Playlist File: Файл плейлиста + Subscription File: Файл подписок + History File: Файл истории Distraction Free Settings: Hide Live Chat: Скрыть чат прямой трансляции Hide Popular Videos: Скрыть популярные видео From 11b3c1973bab3e35cc16a46650989597cc1ed572 Mon Sep 17 00:00:00 2001 From: Yaron Shahrabani Date: Tue, 11 Oct 2022 12:57:21 +0000 Subject: [PATCH 04/28] Translated using Weblate (Hebrew) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/he/ --- static/locales/he.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/locales/he.yaml b/static/locales/he.yaml index b4ea19855fd70..37c87c6ec3178 100644 --- a/static/locales/he.yaml +++ b/static/locales/he.yaml @@ -325,6 +325,9 @@ Settings: Export Playlists: ייצוא פלייליסטים Import Playlists: ייבוא פלייליסטים Playlist insufficient data: אין מספיק נתונים לרשימת הנגינה „$”, הפריט ידולג + Playlist File: קובץ רשימת נגינה + Subscription File: קובץ מינוי + History File: קובץ היסטוריה Advanced Settings: Advanced Settings: 'הגדרות מתקדמות' Enable Debug Mode (Prints data to the console): 'הפעל מצב Debug ( מציג נתונים From 5199114125d25d3390a52e1ad5aef354b751926f Mon Sep 17 00:00:00 2001 From: ovari Date: Tue, 11 Oct 2022 19:43:52 +0000 Subject: [PATCH 05/28] Translated using Weblate (Hungarian) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/hu/ --- static/locales/hu.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/locales/hu.yaml b/static/locales/hu.yaml index 6a673a6631db6..7619de58202a3 100644 --- a/static/locales/hu.yaml +++ b/static/locales/hu.yaml @@ -344,6 +344,9 @@ Settings: sikeresen megtörtént All playlists has been successfully imported: Az összes lejátszási lista importálása sikeresen megtörtént + Subscription File: Feliratkozás-fájl + History File: Előzmények-fájl + Playlist File: lejátszási lista fájl Advanced Settings: Advanced Settings: 'További beállítások' Enable Debug Mode (Prints data to the console): 'Hibakeresési mód engedélyezése From 2a601295c9986e64acb260b0916c3e5ad31d0203 Mon Sep 17 00:00:00 2001 From: Fjuro Date: Tue, 11 Oct 2022 16:19:19 +0000 Subject: [PATCH 06/28] Translated using Weblate (Czech) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/cs/ --- static/locales/cs.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/static/locales/cs.yaml b/static/locales/cs.yaml index 6f9660c0cfd51..325de00ab5eb9 100644 --- a/static/locales/cs.yaml +++ b/static/locales/cs.yaml @@ -296,9 +296,9 @@ Settings: Distraction Free Settings: 'Nastavení Režimu nerozptylování' Hide Video Views: 'Skrýt počet přehrání videa' Hide Video Likes And Dislikes: 'Skrýt hodnocení videa' - Hide Channel Subscribers: 'Skrýt odebíratele kanálu' + Hide Channel Subscribers: 'Skrýt odběratele kanálu' Hide Comment Likes: 'Skrýt hodnocení komentářů' - Hide Recommended Videos: 'Skrýt doporučené videa' + Hide Recommended Videos: 'Skrýt doporučená videa' Hide Trending Videos: 'Skrýt trendy' Hide Popular Videos: 'Skrýt populární videa' Hide Live Chat: 'Skrýt chat' @@ -353,6 +353,9 @@ Settings: Playlist insufficient data: Nedostačující data pro playlist "$", přeskakuji All playlists has been successfully imported: Všechny playlisty byly úspěšně importovány All playlists has been successfully exported: Všechny playlisty byly úspěšně exportovány + History File: Soubor historie + Subscription File: Soubor odběrů + Playlist File: Soubor playlistů Advanced Settings: Advanced Settings: 'Rozšířené nastavení' Enable Debug Mode (Prints data to the console): 'Povolit režim ladění (výstup @@ -528,7 +531,7 @@ Profile: Profile Settings: Nastavení profilu Channel: Subscriber: 'Odběratel' - Subscribers: 'Odběratelé' + Subscribers: 'odběratelů' Subscribe: 'Odebírat' Unsubscribe: 'Zrušit odběr' Channel has been removed from your subscriptions: 'Kanál byl odebrán z vašich odběrů' From b35d7ea5e75d9d230cc50821a67719c8be009fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sveinn=20=C3=AD=20Felli?= Date: Wed, 12 Oct 2022 11:45:23 +0000 Subject: [PATCH 07/28] Translated using Weblate (Icelandic) Currently translated at 100.0% (630 of 630 strings) Translation: FreeTube/Translations Translate-URL: https://hosted.weblate.org/projects/free-tube/translations/is/ --- static/locales/is.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/locales/is.yaml b/static/locales/is.yaml index be2932b4b11f0..199a381f27e9e 100644 --- a/static/locales/is.yaml +++ b/static/locales/is.yaml @@ -361,6 +361,9 @@ Settings: All playlists has been successfully imported: Tekist hefur að flytja inn alla spilunarlista All playlists has been successfully exported: Tekist hefur að flytja út alla spilunarlista + Subscription File: Skrá með áskriftum + History File: Skrá með atvikaferli + Playlist File: Spilunarlistaskrá Proxy Settings: Proxy Settings: 'Stillingar milliþjóns (proxy)' Enable Tor / Proxy: 'Virkja Tor / milliþjón' From 1695605ab591d754b64ceb558dd137aee8283831 Mon Sep 17 00:00:00 2001 From: Aiz <66974576+Aiz0@users.noreply.github.com> Date: Wed, 12 Oct 2022 17:02:39 +0000 Subject: [PATCH 08/28] Remove deprecated @keypress + some accessability improvements (#2697) * remove deprecated @keypress from top-nav * remove deprecated @keypress from side-nav * add role and tabindex to new window button it could previously not be selected by tabbing over the buttons --- src/renderer/components/side-nav/side-nav.vue | 15 ++++++++------- src/renderer/components/top-nav/top-nav.vue | 13 ++++++++----- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/renderer/components/side-nav/side-nav.vue b/src/renderer/components/side-nav/side-nav.vue index f859356f7e867..34b07add98019 100644 --- a/src/renderer/components/side-nav/side-nav.vue +++ b/src/renderer/components/side-nav/side-nav.vue @@ -38,6 +38,7 @@ tabindex="0" :title="$t('Channels.Channels')" @click="navigate('subscribedchannels')" + @keydown.enter.prevent="navigate('subscribedchannels')" >
Date: Thu, 13 Oct 2022 02:34:04 +0200 Subject: [PATCH 09/28] Don't lint while rebasing (#2711) --- lefthook.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lefthook.yml b/lefthook.yml index a5332a08d2acb..7f6f4e3d68548 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -9,6 +9,8 @@ pre-commit: # matching the glob is being committed glob: "*.{js,vue}" run: yarn run eslint --no-color {staged_files} + skip: + - rebase From c0f98eeafe5eeb5a1ffed74c3783581b5cd66aea Mon Sep 17 00:00:00 2001 From: absidue <48293849+absidue@users.noreply.github.com> Date: Thu, 13 Oct 2022 13:51:15 +0200 Subject: [PATCH 10/28] Use named parameters instead of $ and % in localised strings (#2685) * Use named parameters instead of $ and % in localised strings * Fix URL warning again * Update placeholders in most locales * Let the translators fix the problematic RTL strings * Fix the missing quotes in some of the YAML files --- src/renderer/App.js | 6 +- .../components/data-settings/data-settings.js | 2 +- .../external-player-settings.js | 4 +- .../ft-age-restricted/ft-age-restricted.js | 2 +- .../ft-list-playlist/ft-list-playlist.js | 1 - .../ft-list-playlist/ft-list-playlist.vue | 2 +- .../components/ft-list-video/ft-list-video.js | 5 - .../ft-list-video/ft-list-video.vue | 2 +- .../ft-profile-channel-list.js | 3 +- .../ft-profile-edit/ft-profile-edit.js | 4 +- .../ft-profile-filter-channels-list.js | 3 +- .../ft-profile-selector.js | 2 +- .../ft-video-player/ft-video-player.js | 8 +- .../general-settings/general-settings.js | 3 +- .../general-settings/general-settings.vue | 2 +- .../watch-video-comments.js | 4 - .../watch-video-comments.vue | 2 +- .../watch-video-info/watch-video-info.js | 4 +- .../watch-video-info/watch-video-info.vue | 2 +- src/renderer/i18n/index.js | 4 +- src/renderer/store/modules/utils.js | 112 +++++++----------- src/renderer/views/Channel/Channel.js | 3 +- .../SubscribedChannels/SubscribedChannels.js | 4 +- .../SubscribedChannels/SubscribedChannels.vue | 4 +- static/locales/ar.yaml | 61 +++++----- static/locales/as.yaml | 1 - static/locales/az.yaml | 31 ++--- static/locales/bg.yaml | 57 +++++---- static/locales/bn.yaml | 15 ++- static/locales/bs.yaml | 15 ++- static/locales/ca.yaml | 33 +++--- static/locales/cs.yaml | 55 +++++---- static/locales/da.yaml | 57 +++++---- static/locales/de-DE.yaml | 54 ++++----- static/locales/el.yaml | 45 ++++--- static/locales/en-US.yaml | 60 ++++------ static/locales/en_GB.yaml | 60 ++++------ static/locales/eo.yaml | 15 ++- static/locales/es-MX.yaml | 47 ++++---- static/locales/es.yaml | 59 +++++---- static/locales/es_AR.yaml | 15 ++- static/locales/et.yaml | 55 +++++---- static/locales/eu.yaml | 57 +++++---- static/locales/fa.yaml | 28 ++--- static/locales/fi.yaml | 53 ++++----- static/locales/fil.yaml | 7 +- static/locales/fr-FR.yaml | 57 +++++---- static/locales/gl.yaml | 29 +++-- static/locales/gsw.yaml | 32 ++--- static/locales/he.yaml | 55 ++++----- static/locales/hi.yaml | 15 ++- static/locales/hr.yaml | 57 +++++---- static/locales/hu.yaml | 57 +++++---- static/locales/id.yaml | 45 ++++--- static/locales/is.yaml | 59 +++++---- static/locales/it.yaml | 57 +++++---- static/locales/ja.yaml | 51 ++++---- static/locales/ka.yaml | 36 +++--- static/locales/km.yaml | 27 ++--- static/locales/ko.yaml | 51 ++++---- static/locales/ku.yaml | 15 ++- static/locales/la.yaml | 17 ++- static/locales/lt.yaml | 40 +++---- static/locales/nb_NO.yaml | 43 ++++--- static/locales/ne.yaml | 24 ++-- static/locales/nl.yaml | 57 +++++---- static/locales/nn.yaml | 29 +++-- static/locales/pl.yaml | 55 +++++---- static/locales/pt-BR.yaml | 57 +++++---- static/locales/pt-PT.yaml | 53 ++++----- static/locales/pt.yaml | 53 ++++----- static/locales/ro.yaml | 57 +++++---- static/locales/ru.yaml | 55 +++++---- static/locales/sat.yaml | 15 ++- static/locales/si.yaml | 15 ++- static/locales/sk.yaml | 37 +++--- static/locales/sl.yaml | 19 ++- static/locales/sr.yaml | 17 ++- static/locales/sv.yaml | 39 +++--- static/locales/tok.yaml | 27 ++--- static/locales/tr.yaml | 51 ++++---- static/locales/uk.yaml | 55 +++++---- static/locales/ur.yaml | 51 ++++---- static/locales/vi.yaml | 57 +++++---- static/locales/zh-CN.yaml | 51 ++++---- static/locales/zh-TW.yaml | 51 ++++---- 86 files changed, 1279 insertions(+), 1457 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index f7447b94b8f14..ec94e628078d7 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -207,8 +207,7 @@ export default Vue.extend({ this.updateChangelog = marked.parse(json[0].body) this.changeLogTitle = json[0].name - const message = this.$t('Version $ is now available! Click for more details') - this.updateBannerMessage = message.replace('$', versionNumber) + this.updateBannerMessage = this.$t('Version {versionNumber} is now available! Click for more details', { versionNumber }) const appVersion = packageDetails.version.split('.') const latestVersion = versionNumber.split('.') @@ -242,8 +241,7 @@ export default Vue.extend({ const latestPubDate = new Date(latestBlog.pubDate) if (lastAppWasRunning === null || latestPubDate > lastAppWasRunning) { - const message = this.$t('A new blog is now available, $. Click to view more') - this.blogBannerMessage = message.replace('$', latestBlog.title) + this.blogBannerMessage = this.$t('A new blog is now available, {blogTitle}. Click to view more', { blogTitle: latestBlog.title }) this.latestBlogUrl = latestBlog.link this.showBlogBanner = true } diff --git a/src/renderer/components/data-settings/data-settings.js b/src/renderer/components/data-settings/data-settings.js index 14201469ada11..2f28ab5dc8540 100644 --- a/src/renderer/components/data-settings/data-settings.js +++ b/src/renderer/components/data-settings/data-settings.js @@ -1013,7 +1013,7 @@ export default Vue.extend({ const objectKeys = Object.keys(playlistObject) if ((objectKeys.length < requiredKeys.length) || playlistObject.videos.length === 0) { - const message = this.$t('Settings.Data Settings.Playlist insufficient data').replace('$', playlistData.playlistName) + const message = this.$t('Settings.Data Settings.Playlist insufficient data', { playlist: playlistData.playlistName }) this.showToast({ message: message }) diff --git a/src/renderer/components/external-player-settings/external-player-settings.js b/src/renderer/components/external-player-settings/external-player-settings.js index 1b5eabb49494d..5e4c684144643 100644 --- a/src/renderer/components/external-player-settings/external-player-settings.js +++ b/src/renderer/components/external-player-settings/external-player-settings.js @@ -47,8 +47,8 @@ export default Vue.extend({ const cmdArgs = this.$store.getters.getExternalPlayerCmdArguments[this.externalPlayer] if (cmdArgs && typeof cmdArgs.defaultCustomArguments === 'string' && cmdArgs.defaultCustomArguments !== '') { - const defaultArgs = this.$t('Tooltips.External Player Settings.DefaultCustomArgumentsTemplate') - .replace('$', cmdArgs.defaultCustomArguments) + const defaultArgs = this.$t('Tooltips.External Player Settings.DefaultCustomArgumentsTemplate', + { defaultCustomArguments: cmdArgs.defaultCustomArguments }) return `${tooltip} ${defaultArgs}` } diff --git a/src/renderer/components/ft-age-restricted/ft-age-restricted.js b/src/renderer/components/ft-age-restricted/ft-age-restricted.js index 5769012b54a86..cc38888f35348 100644 --- a/src/renderer/components/ft-age-restricted/ft-age-restricted.js +++ b/src/renderer/components/ft-age-restricted/ft-age-restricted.js @@ -16,7 +16,7 @@ export default Vue.extend({ restrictedMessage: function () { const contentType = this.$t('Age Restricted.Type.' + this.contentTypeString) - return this.$t('Age Restricted.This $contentType is age restricted').replace('$contentType', contentType) + return this.$t('Age Restricted.This {videoOrPlaylist} is age restricted', { videoOrPlaylist: contentType }) } } }) diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.js b/src/renderer/components/ft-list-playlist/ft-list-playlist.js index d6305b9ecf67c..308ec4639a4ff 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.js +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.js @@ -65,7 +65,6 @@ export default Vue.extend({ methods: { handleExternalPlayer: function () { this.openInExternalPlayer({ - strings: this.$t('Video.External Player'), watchProgress: 0, playbackRate: this.defaultPlayback, videoId: null, diff --git a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue index 6e055c11f60d7..e7f38432b67a3 100644 --- a/src/renderer/components/ft-list-playlist/ft-list-playlist.vue +++ b/src/renderer/components/ft-list-playlist/ft-list-playlist.vue @@ -25,7 +25,7 @@
profile.name !== this.profile.name ? [profile.name] : []) }, selectedText: function () { - const localeText = this.$t('Profile.$ selected') - return localeText.replace('$', this.selectedLength) + return this.$t('Profile.{number} selected', { number: this.selectedLength }) } }, watch: { diff --git a/src/renderer/components/ft-profile-selector/ft-profile-selector.js b/src/renderer/components/ft-profile-selector/ft-profile-selector.js index c1507a7879081..94d343b9aa126 100644 --- a/src/renderer/components/ft-profile-selector/ft-profile-selector.js +++ b/src/renderer/components/ft-profile-selector/ft-profile-selector.js @@ -78,7 +78,7 @@ export default Vue.extend({ if (targetProfile) { this.updateActiveProfile(targetProfile._id) - const message = this.$t('Profile.$ is now the active profile').replace('$', profile.name) + const message = this.$t('Profile.{profile} is now the active profile', { profile: profile.name }) this.showToast({ message }) } } diff --git a/src/renderer/components/ft-video-player/ft-video-player.js b/src/renderer/components/ft-video-player/ft-video-player.js index 1a1b2836691da..bb5dd26970177 100644 --- a/src/renderer/components/ft-video-player/ft-video-player.js +++ b/src/renderer/components/ft-video-player/ft-video-player.js @@ -1344,7 +1344,7 @@ export default Vue.extend({ } catch (err) { console.error(`Parse failed: ${err.message}`) this.showToast({ - message: this.$t('Screenshot Error').replace('$', err.message) + message: this.$t('Screenshot Error', { error: err.message }) }) canvas.remove() return @@ -1412,7 +1412,7 @@ export default Vue.extend({ } catch (err) { console.error(err) this.showToast({ - message: this.$t('Screenshot Error').replace('$', err) + message: this.$t('Screenshot Error', { error: err }) }) canvas.remove() return @@ -1429,11 +1429,11 @@ export default Vue.extend({ if (err) { console.error(err) this.showToast({ - message: this.$t('Screenshot Error').replace('$', err) + message: this.$t('Screenshot Error', { error: err }) }) } else { this.showToast({ - message: this.$t('Screenshot Success').replace('$', filePath) + message: this.$t('Screenshot Success', { filePath }) }) } }) diff --git a/src/renderer/components/general-settings/general-settings.js b/src/renderer/components/general-settings/general-settings.js index 6d650a4804e99..f01a933252fcb 100644 --- a/src/renderer/components/general-settings/general-settings.js +++ b/src/renderer/components/general-settings/general-settings.js @@ -193,9 +193,8 @@ export default Vue.extend({ const instance = this.currentInvidiousInstance this.updateDefaultInvidiousInstance(instance) - const message = this.$t('Default Invidious instance has been set to $') this.showToast({ - message: message.replace('$', instance) + message: this.$t('Default Invidious instance has been set to {instance}', { instance }) }) }, diff --git a/src/renderer/components/general-settings/general-settings.vue b/src/renderer/components/general-settings/general-settings.vue index a5aff4a1707cb..82f25f6b554cc 100644 --- a/src/renderer/components/general-settings/general-settings.vue +++ b/src/renderer/components/general-settings/general-settings.vue @@ -116,7 +116,7 @@ v-if="defaultInvidiousInstance !== ''" class="center" > - {{ $t('Settings.General Settings.The currently set default instance is $').replace('$', defaultInvidiousInstance) }} + {{ $t('Settings.General Settings.The currently set default instance is {instance}', { instance: defaultInvidiousInstance }) }}