@mindedge/vuetify-player 0.1.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ export default {
2
+ locales: {
3
+ 'en-US': 'inglés',
4
+ 'sv-SE': 'sueco',
5
+ },
6
+ playlist: {
7
+ up_next: 'A continuación',
8
+ default_name: 'Medios',
9
+ previous: 'Reproducir elemento anterior en la lista de reproducción',
10
+ next: 'Reproducir el siguiente elemento en la lista de reproducción',
11
+ },
12
+ player: {
13
+ playback_speed: 'Velocidad de reproducción',
14
+ playback_decrease: 'Disminuir la velocidad de reproducción',
15
+ playback_increase: 'Aumentar la velocidad de reproducción',
16
+ toggle_settings: 'Alternar configuración',
17
+ download: 'Descargar',
18
+ toggle_remote_playback: 'Alternar reproducción remota',
19
+ toggle_picture_in_picture: 'Alternar Imagen en imagen',
20
+ toggle_fullscreen: 'Alternar pantalla completa',
21
+ toggle_cc: 'Alternar subtítulos',
22
+ volume_slider: 'Control deslizante de volumen',
23
+ rewind_10: 'Rebobinar 10 segundos',
24
+ play: 'Haz clic para reproducir',
25
+ pause: 'Haga clic para pausar',
26
+ no_support: 'Lo sentimos, su navegador no admite vídeos incrustados. ',
27
+ },
28
+ captions: {
29
+ expand: 'Expandir',
30
+ collapse: 'Colapsar',
31
+ view_as_paragraph: 'Ver como párrafo',
32
+ view_as_captions: 'Ver como subtítulos',
33
+ },
34
+ }
@@ -0,0 +1,43 @@
1
+ import i18n from './index.js'
2
+
3
+ /**
4
+ * Traverses the properties of an object to return the localized value
5
+ *
6
+ * @param object obj The object to search
7
+ * @param string path The path in the object. Eg `a.b.c`
8
+ * @returns
9
+ */
10
+ function get(obj, path) {
11
+ const parts = path.split('.')
12
+ if (parts.length == 1) {
13
+ return obj[parts[0]]
14
+ }
15
+ if (typeof obj[parts[0]] === 'undefined') {
16
+ return null
17
+ }
18
+ return get(obj[parts[0]], parts.slice(1).join('.'))
19
+ }
20
+
21
+ const t = (lang, path) => {
22
+ if (typeof i18n[lang] === 'undefined') {
23
+ console.warn(
24
+ '[VuetifyPlayer] No support for locale ' +
25
+ lang +
26
+ '. Falling back to en-US'
27
+ )
28
+ lang = 'en-US'
29
+ }
30
+ let localized = get(i18n[lang], path)
31
+
32
+ // Could not localize this path. Return the path instead of null / undefined
33
+ if (!localized) {
34
+ localized = path
35
+ console.warn(
36
+ '[VuetifyPlayer] localization path ' + path + ' does not exist'
37
+ )
38
+ }
39
+
40
+ return localized
41
+ }
42
+
43
+ export { t }
@@ -0,0 +1,9 @@
1
+ import enUS from './en-US'
2
+ import esES from './es-ES'
3
+ import svSE from './sv-SE'
4
+
5
+ export default {
6
+ 'en-US': enUS,
7
+ 'sv-SE': svSE,
8
+ 'es-ES': esES,
9
+ }
@@ -0,0 +1,34 @@
1
+ export default {
2
+ locales: {
3
+ 'en-US': 'Engelska',
4
+ 'sv-SE': 'Svenska',
5
+ },
6
+ playlist: {
7
+ up_next: 'Nästa',
8
+ default_name: 'Media',
9
+ previous: 'Spela sista',
10
+ next: 'Spela nästa',
11
+ },
12
+ player: {
13
+ playback_speed: 'Uppspelningshastighet',
14
+ playback_decrease: 'Minska uppspelningshastigheten',
15
+ playback_increase: 'Öka uppspelningshastigheten',
16
+ toggle_settings: 'Växla inställningar',
17
+ download: 'Ladda ner',
18
+ toggle_remote_playback: 'Växla fjärruppspelning',
19
+ toggle_picture_in_picture: 'Växla bild i bild',
20
+ toggle_fullscreen: 'Växla helskärm',
21
+ toggle_cc: 'Växla undertexter',
22
+ volume_slider: 'Ändra volym',
23
+ rewind_10: 'Spola tillbaka 10 sekunder',
24
+ play: 'Klicka för att spela',
25
+ pause: 'Klicka för att pausa',
26
+ no_support: 'Tyvärr, din webbläsare stöder inte inbäddade videor.',
27
+ },
28
+ captions: {
29
+ expand: 'Bygga ut',
30
+ collapse: 'Kollaps',
31
+ view_as_paragraph: 'Visa som stycke',
32
+ view_as_captions: 'Visa som bildtexter',
33
+ },
34
+ }
package/vue.config.js ADDED
@@ -0,0 +1,34 @@
1
+ const { defineConfig } = require('@vue/cli-service')
2
+
3
+ module.exports = defineConfig({
4
+ transpileDependencies: ['vuetify'],
5
+
6
+ configureWebpack: {
7
+ output: {
8
+ libraryExport: 'default',
9
+ },
10
+ },
11
+
12
+ css: {
13
+ extract: false,
14
+ },
15
+
16
+ chainWebpack: (config) => {
17
+ config.module
18
+ .rule('i18n')
19
+ .resourceQuery(/blockType=i18n/)
20
+ .type('javascript/auto')
21
+ .use('i18n')
22
+ .loader('@intlify/vue-i18n-loader')
23
+ },
24
+
25
+ pluginOptions: {
26
+ i18n: {
27
+ locale: 'en-US',
28
+ fallbackLocale: 'en-US',
29
+ enableInSFC: true,
30
+ includeLocales: true,
31
+ enableBridge: true,
32
+ },
33
+ },
34
+ })