Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
chore: add missing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sircharlo committed Jun 13, 2024
1 parent bf24dd2 commit 6cede0b
Show file tree
Hide file tree
Showing 22 changed files with 428 additions and 212 deletions.
47 changes: 46 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
{
"cSpell.words": [
"alllangs",
"ayfm",
"AYFM",
"cctv",
"docid",
"fileformat",
"fileurl",
"firefox",
"flac",
"fontawesome",
"formkit",
"icns",
"intlify",
"ionicons",
"iscoweek",
"jwlplaylist",
"jwpub",
"Jwpub",
"klaw",
"langwritten",
"localstorage",
"meps",
"mepslangs",
"mwbr",
"myapp",
"nodir",
"nsis",
"panzoom",
"Panzoom",
"panzoomend",
"panzooms",
"roboto",
"sircharlo",
"sjjm",
"snnw",
"sqlite",
"themify",
"upath",
"wtlocale",
"yeartexts"
],
"i18n-ally.localesPaths": ["src/i18n"],
Expand All @@ -43,5 +54,39 @@
"notebook.formatOnSave.enabled": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"i18n-ally.extract.autoDetect": true,
"i18n-ally.extract.ignoredByFiles": {
"src\\components\\media\\MusicButton.vue": [
"musicPlaying ? musicRemainingTime : ''"
],
"src\\pages\\MediaPlayerPage.vue": [""],
"src\\pages\\MediaCalendarPage.vue": [
"&\n customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ].max) ||\n media.duration,\n )\n }}\n "
],
"src\\layouts\\MainLayout.vue": [
"\n {{\n (!route.fullPath.includes('wizard') "
],
"src\\layouts\\MediaPlayerLayout.vue": ["Media Player Window"]
},
"i18n-ally.extract.ignored": [
"&\n (customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ].min > 0 ||\n customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ].max ",
"&\n formatTime(\n customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ].min,\n ) + ' - ') ||\n '') +\n formatTime(\n (customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ] ",
"&\n formatTime(\n customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ].min,\n ) + ' - ') ||\n '') +\n formatTime(\n (customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ] ",
"\n {{\n ((customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ] ",
"\n {{\n ((customDurations[currentCongregation][selectedDate][\n media.uniqueId\n ] ",
"< media.duration) ",
"< media.duration) ",
"&",
"bg-blue-2 text-grey-10",
" | ",
"SELECT * FROM Multimedia;",
"PRAGMA table_info(DocumentMultimedia);",
"SELECT DISTINCT Document.DocumentId, Title FROM Document JOIN ${mmTable} ON Document.DocumentId = ${mmTable}.DocumentId;",
"\n {{\n (!route.fullPath.includes('wizard') ",
"&\n currentSettings.congregationName) ||\n $t('titles.profileSelection')\n }}\n ",
"&\n currentSettings.congregationName) ||\n $t('titles.profileSelection')\n }}\n ",
"&\n currentSettings ",
"Meeting Media Manager"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"axios": "^1.6.8",
"better-sqlite3": "^9.6.0",
"decompress": "^4.2.1",
"electron-updater": "^6.2.1",
"fs-extra": "^11.2.0",
"heic-convert": "^2.1.0",
"jszip": "^3.10.1",
Expand Down
2 changes: 2 additions & 0 deletions src-electron/electron-main.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { enable, initialize } from '@electron/remote/main';
import { BrowserWindow, Menu, app, session } from 'electron';
import { autoUpdater } from 'electron-updater';
import os from 'os';
import path from 'path';

initialize();
autoUpdater.checkForUpdatesAndNotify();

// needed in case process is undefined under Linux
const platform = process.platform || os.platform();
Expand Down
12 changes: 7 additions & 5 deletions src/boot/axios.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios, { AxiosRequestConfig } from 'axios';
import { boot } from 'quasar/wrappers';
export default boot(({ app }) => {
app.config.globalProperties.$axios = axios;
});
// import { boot } from 'quasar/wrappers';
// export default boot(({ app }) => {
// app.config.globalProperties.$axios = axios;
// });

const get = async (url: string, params?: AxiosRequestConfig) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand All @@ -12,7 +12,7 @@ const get = async (url: string, params?: AxiosRequestConfig) => {
} catch (error) {
console.warn(error);
}
return returnVal.data;
return returnVal?.data ?? undefined;
};

const getLanguages = async () => {
Expand All @@ -21,6 +21,8 @@ const getLanguages = async () => {
};

const urlWithParamsToString = (url: string, params: object) => {
if (!url) return '';
if (!params) return url;
const urlWithParams = new URL(url);
for (const [key, value] of Object.entries(params)) {
urlWithParams.searchParams.append(key, value);
Expand Down
7 changes: 7 additions & 0 deletions src/components/media/DownloadStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
<template v-slot:loading>
<q-spinner-pie />
</template>
<q-tooltip
anchor="bottom left"
self="top left"
>
<!-- v-if="!disabled && !mediaDisplayPopup" -->
{{ $t('download-status') }}
</q-tooltip>
<q-popup-proxy>
<div
:class="'rounded-borders bg-grey-' + $q.dark.isActive ? '2' : '9'"
Expand Down
15 changes: 7 additions & 8 deletions src/components/media/MediaDisplayButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
self="top left"
v-if="!disabled && !mediaDisplayPopup"
>
Media display
{{ $t('media-display') }}
</q-tooltip>
<q-popup-proxy
anchor="bottom right"
Expand All @@ -25,23 +25,22 @@
>
<q-card class="non-selectable">
<q-card-section>
<div class="text-overline">Media display</div>
<div class="text-overline">{{ $t('media-display') }}</div>
<div class="text-h5 text-primary" v-if="mediaPlayer.windowVisible">
Projecting
</div>
<div class="text-h5 text-negative" v-else>Inactive</div>
<div class="text-caption text-grey">External screen</div>
{{ $t('projecting') }} </div>
<div class="text-h5 text-negative" v-else>{{ $t('inactive') }}</div>
<div class="text-caption text-grey">{{ $t('external-screen') }}</div>
</q-card-section>
<q-separator />
<q-card-actions>
<q-btn
@click="showMediaWindow(false)"
flat
v-if="mediaPlayer.windowVisible"
>Hide media display</q-btn
>{{ $t('hide-media-display') }}</q-btn
>
<q-btn @click="showMediaWindow(true)" flat v-else
>Show media display</q-btn
>{{ $t('show-media-display') }}</q-btn
>
</q-card-actions>
</q-card>
Expand Down
14 changes: 9 additions & 5 deletions src/components/media/MusicButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@
size="md"
v-if="currentSettings?.enableMusicButton"
>
<q-tooltip v-if="!disabled && !musicPopup"> Background music </q-tooltip>
<q-tooltip v-if="!disabled && !musicPopup">
{{ $t('setupWizard.backgroundMusic') }}
</q-tooltip>
<q-popup-proxy
anchor="top middle"
self="bottom middle"
v-model="musicPopup"
>
<q-card class="non-selectable">
<q-card-section>
<div class="text-overline">Background music</div>
<div class="text-overline">
{{ $t('setupWizard.backgroundMusic') }}
</div>
<div class="text-h5">
{{ musicPlaying ? musicRemainingTime : 'Inactive' }}
</div>
<div class="text-caption text-grey-9" v-if="musicPlaying">
Current song remaining: {{ currentSongRemainingTime }}
{{ $t('current-song-remaining') }} {{ currentSongRemainingTime }}
</div>
</q-card-section>
<q-separator />
Expand All @@ -33,15 +37,15 @@
flat
v-close-popup
v-if="!musicPlaying"
>Play music</q-btn
>{{ $t('play-music') }}</q-btn
>
<q-btn
:disable="musicStopping"
@click="stopMusic"
flat
v-close-popup
v-else
>Stop music</q-btn
>{{ $t('stop-music') }}</q-btn
>
</q-card-actions>
</q-card>
Expand Down
30 changes: 15 additions & 15 deletions src/components/media/ScenePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
<!-- :flat="!disabled"
:outline="disabled"
:disable="disabled" -->
<q-tooltip v-if="!menuActive"> Scene selection </q-tooltip>
<q-tooltip v-if="!menuActive"> {{ $t('scene-selection') }} </q-tooltip>
<q-menu
@before-hide="menuActive = false"
@before-show="menuActive = true"
class="non-selectable"
>
<q-list style="min-width: 100px">
<template v-if="mediaScene">
<q-item-label header>Media scene</q-item-label>
<q-item
:active="currentSceneUuid === mediaScene.sceneUuid"
@click="setObsSceneByUuid(mediaScene.sceneUuid as string)"
clickable
v-close-popup
>
<q-item-section avatar>
<q-icon :name="'mdi-alpha-m-circle'" />
</q-item-section>
<q-item-section>{{ mediaScene.sceneName }}</q-item-section>
</q-item>
<q-item-label header>Other scenes</q-item-label>
</template>
<q-item-label header>{{ $t('media-scene') }}</q-item-label>
<q-item
:active="currentSceneUuid === mediaScene.sceneUuid"
@click="setObsSceneByUuid(mediaScene.sceneUuid as string)"
clickable
v-close-popup
>
<q-item-section avatar>
<q-icon :name="'mdi-alpha-m-circle'" />
</q-item-section>
<q-item-section>{{ mediaScene.sceneName }}</q-item-section>
</q-item>
<q-item-label header>{{ $t('other-scenes') }}</q-item-label>
</template>
<template
:key="scene.sceneUuid"
v-for="[i, scene] in Object.entries(nonMediaScenes)"
Expand Down
9 changes: 5 additions & 4 deletions src/components/media/SongPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
<q-dialog persistent v-model="localValue">
<q-card class="non-selectable" style="min-width: 500px">
<q-card-section>
<div class="text-h6">Choose a song {{ selectedSong }}</div>
<div class="text-h6">{{ $t('choose-a-song') }}</div>
</q-card-section>
<q-card-section class="q-pt-none">
<q-select
:label="$t('song')"
:options="
songOptions.map((song) => {
return { value: song.track, label: song.title };
Expand All @@ -16,19 +17,19 @@
fill-input
hide-selected
input-debounce="10"
label="Song"
map-options
spellcheck="false"
use-input
v-model="selectedSong"
/>
</q-card-section>
<q-card-actions align="right">
<q-btn @click="dismissPopup" color="negative" flat label="Cancel" />
<q-btn :label="$t('cancel')" @click="dismissPopup" color="negative" flat />
<q-btn
:label="$t('add-song')"
@click="addSong(selectedSong)"
color="primary"
flat
label="Add song"
/>
</q-card-actions>
</q-card>
Expand Down
Loading

0 comments on commit 6cede0b

Please sign in to comment.