diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | client/src/app/core/server/server.service.ts | 1 | ||||
-rw-r--r-- | client/src/app/videos/+video-edit/shared/video-edit.component.ts | 1 | ||||
-rw-r--r-- | client/src/locale/target/player_es_ES.xml | 44 | ||||
-rw-r--r-- | client/src/locale/target/server_es_ES.xml | 4 | ||||
-rw-r--r-- | client/src/locale/target/server_fr_FR.json | 2 | ||||
-rwxr-xr-x | scripts/i18n/pull-hook.sh | 3 | ||||
-rwxr-xr-x | scripts/i18n/xliff2json.ts | 2 | ||||
-rw-r--r-- | server/models/account/user.ts | 8 | ||||
-rw-r--r-- | shared/models/i18n/i18n.ts | 2 |
10 files changed, 61 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore index 92af76310..f31b67690 100644 --- a/.gitignore +++ b/.gitignore | |||
@@ -26,3 +26,4 @@ | |||
26 | /server/tools/import-mediacore.ts | 26 | /server/tools/import-mediacore.ts |
27 | /docker-volume/ | 27 | /docker-volume/ |
28 | /.zanata-cache | 28 | /.zanata-cache |
29 | /scripts/i18n/generate-iso639-target.ts | ||
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts index 6323a7edf..74363e6a1 100644 --- a/client/src/app/core/server/server.service.ts +++ b/client/src/app/core/server/server.service.ts | |||
@@ -141,7 +141,6 @@ export class ServerService { | |||
141 | ) | 141 | ) |
142 | .subscribe(({ data, translations }) => { | 142 | .subscribe(({ data, translations }) => { |
143 | Object.keys(data) | 143 | Object.keys(data) |
144 | .map(dataKey => parseInt(dataKey, 10)) | ||
145 | .forEach(dataKey => { | 144 | .forEach(dataKey => { |
146 | const label = data[ dataKey ] | 145 | const label = data[ dataKey ] |
147 | 146 | ||
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts index 66eb6611a..35d406ee3 100644 --- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts +++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts | |||
@@ -101,6 +101,7 @@ export class VideoEditComponent implements OnInit { | |||
101 | this.videoCategories = this.serverService.getVideoCategories() | 101 | this.videoCategories = this.serverService.getVideoCategories() |
102 | this.videoLicences = this.serverService.getVideoLicences() | 102 | this.videoLicences = this.serverService.getVideoLicences() |
103 | this.videoLanguages = this.serverService.getVideoLanguages() | 103 | this.videoLanguages = this.serverService.getVideoLanguages() |
104 | console.log(this.videoLanguages) | ||
104 | 105 | ||
105 | setTimeout(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute | 106 | setTimeout(() => this.minScheduledDate = new Date(), 1000 * 60) // Update every minute |
106 | } | 107 | } |
diff --git a/client/src/locale/target/player_es_ES.xml b/client/src/locale/target/player_es_ES.xml index fadc5c52e..884763bee 100644 --- a/client/src/locale/target/player_es_ES.xml +++ b/client/src/locale/target/player_es_ES.xml | |||
@@ -3,6 +3,14 @@ | |||
3 | <xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" xmlns:xyz="urn:appInfo:Items" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1 http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd" version="1.1"> | 3 | <xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" xmlns:xyz="urn:appInfo:Items" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.1 http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd" version="1.1"> |
4 | <file source-language="en-US" datatype="plaintext" original="" target-language="es-ES"> | 4 | <file source-language="en-US" datatype="plaintext" original="" target-language="es-ES"> |
5 | <body> | 5 | <body> |
6 | <trans-unit id="Audio Player"> | ||
7 | <source>Audio Player</source> | ||
8 | <target>Reproductor de audio</target> | ||
9 | </trans-unit> | ||
10 | <trans-unit id="Video Player"> | ||
11 | <source>Video Player</source> | ||
12 | <target>Reproductor de video</target> | ||
13 | </trans-unit> | ||
6 | <trans-unit id="Play"> | 14 | <trans-unit id="Play"> |
7 | <source>Play</source> | 15 | <source>Play</source> |
8 | <target>Reproducir</target> | 16 | <target>Reproducir</target> |
@@ -15,10 +23,42 @@ | |||
15 | <source>Replay</source> | 23 | <source>Replay</source> |
16 | <target>Ver de nuevo</target> | 24 | <target>Ver de nuevo</target> |
17 | </trans-unit> | 25 | </trans-unit> |
26 | <trans-unit id="Duration"> | ||
27 | <source>Duration</source> | ||
28 | <target>Duración</target> | ||
29 | </trans-unit> | ||
30 | <trans-unit id="Remaining Time"> | ||
31 | <source>Remaining Time</source> | ||
32 | <target>Tiempo restante</target> | ||
33 | </trans-unit> | ||
34 | <trans-unit id="LIVE"> | ||
35 | <source>LIVE</source> | ||
36 | <target>EN DIRECTO</target> | ||
37 | </trans-unit> | ||
38 | <trans-unit id="Loaded"> | ||
39 | <source>Loaded</source> | ||
40 | <target>Cargado</target> | ||
41 | </trans-unit> | ||
42 | <trans-unit id="Progress"> | ||
43 | <source>Progress</source> | ||
44 | <target>Progreso</target> | ||
45 | </trans-unit> | ||
46 | <trans-unit id="Progress Bar"> | ||
47 | <source>Progress Bar</source> | ||
48 | <target>Barra de progreso</target> | ||
49 | </trans-unit> | ||
50 | <trans-unit id="progress bar timing: currentTime={1} duration={2}"> | ||
51 | <source>{1} of {2}</source> | ||
52 | <target>{1} de {2}</target> | ||
53 | </trans-unit> | ||
18 | <trans-unit id="Fullscreen"> | 54 | <trans-unit id="Fullscreen"> |
19 | <source>Fullscreen</source> | 55 | <source>Fullscreen</source> |
20 | <target>Pantalla completa</target> | 56 | <target>Pantalla completa</target> |
21 | </trans-unit> | 57 | </trans-unit> |
58 | <trans-unit id="Non-Fullscreen"> | ||
59 | <source>Non-Fullscreen</source> | ||
60 | <target>Salir de pantalla completa</target> | ||
61 | </trans-unit> | ||
22 | <trans-unit id="Mute"> | 62 | <trans-unit id="Mute"> |
23 | <source>Mute</source> | 63 | <source>Mute</source> |
24 | <target>Silenciar</target> | 64 | <target>Silenciar</target> |
@@ -27,6 +67,10 @@ | |||
27 | <source>Unmute</source> | 67 | <source>Unmute</source> |
28 | <target>Activar sonido</target> | 68 | <target>Activar sonido</target> |
29 | </trans-unit> | 69 | </trans-unit> |
70 | <trans-unit id="Playback Rate"> | ||
71 | <source>Playback Rate</source> | ||
72 | <target>Velocidad de reproducción</target> | ||
73 | </trans-unit> | ||
30 | <trans-unit id="Subtitles"> | 74 | <trans-unit id="Subtitles"> |
31 | <source>Subtitles</source> | 75 | <source>Subtitles</source> |
32 | <target>Subtitulos</target> | 76 | <target>Subtitulos</target> |
diff --git a/client/src/locale/target/server_es_ES.xml b/client/src/locale/target/server_es_ES.xml index 13618f3f6..a04fbbb98 100644 --- a/client/src/locale/target/server_es_ES.xml +++ b/client/src/locale/target/server_es_ES.xml | |||
@@ -76,5 +76,9 @@ | |||
76 | <source>Food</source> | 76 | <source>Food</source> |
77 | <target>Cocina</target> | 77 | <target>Cocina</target> |
78 | </trans-unit> | 78 | </trans-unit> |
79 | <trans-unit id="Attribution"> | ||
80 | <source>Attribution</source> | ||
81 | <target>Asignación</target> | ||
82 | </trans-unit> | ||
79 | </body> | 83 | </body> |
80 | </file></xliff> \ No newline at end of file | 84 | </file></xliff> \ No newline at end of file |
diff --git a/client/src/locale/target/server_fr_FR.json b/client/src/locale/target/server_fr_FR.json index 72f6e322d..a3c83dbcf 100644 --- a/client/src/locale/target/server_fr_FR.json +++ b/client/src/locale/target/server_fr_FR.json | |||
@@ -1 +1 @@ | |||
{"Music":"Musiques","Films":"Films","Vehicles":"Transport","Art":"Art","Sports":"Sports","Travels":"Voyages","Gaming":"Jeux vidéos","People":"Personnalités","Comedy":"Humour","Entertainment":"Divertissement","News":"Actualités","How To":"Tutoriels","Education":"Éducation","Activism":"Militantisme","Science & Technology":"Science & Technologie","Animals":"Animaux","Kids":"Enfants","Food":"Cuisine","Attribution":"Attribution","Attribution - Share Alike":"Attribution - Partage dans les mêmes conditions","Attribution - No Derivatives":"Attribution - Pas d'oeuvre dérivée","Attribution - Non Commercial":"Attribution - Utilisation non commerciale","Attribution - Non Commercial - Share Alike":"Attribution - Utilisation non commerciale - Partage dans les mêmes conditions","Attribution - Non Commercial - No Derivatives":"Attribution - Utilisation non commerciale - Pas d'oeuvre dérivée","Public Domain Dedication":"Domaine public","Public":"Publique","Unlisted":"Non listée","Private":"Privée","Misc":"Divers","Unknown":"Inconnu","Arabic":"Arabe"} \ No newline at end of file | {"Music":"Musiques","Films":"Films","Vehicles":"Transport","Art":"Art","Sports":"Sports","Travels":"Voyages","Gaming":"Jeux vidéos","People":"Personnalités","Comedy":"Humour","Entertainment":"Divertissement","News":"Actualités","How To":"Tutoriels","Education":"Éducation","Activism":"Militantisme","Science & Technology":"Science & Technologie","Animals":"Animaux","Kids":"Enfants","Food":"Cuisine","Attribution":"Attribution","Attribution - Share Alike":"Attribution - Partage dans les mêmes conditions","Attribution - No Derivatives":"Attribution - Pas d'oeuvre dérivée","Attribution - Non Commercial":"Attribution - Utilisation non commerciale","Attribution - Non Commercial - Share Alike":"Attribution - Utilisation non commerciale - Partage dans les mêmes conditions","Attribution - Non Commercial - No Derivatives":"Attribution - Utilisation non commerciale - Pas d'oeuvre dérivée","Public Domain Dedication":"Domaine public","Public":"Publique","Unlisted":"Non listée","Private":"Privée","Misc":"Divers","Unknown":"Inconnu","Afar":"Afar","Abkhazian":"Abkhaze","Afrikaans":"Afrikaans","Akan":"Akan","Amharic":"Amharique","Arabic":"Arabe","Aragonese":"Aragonais","Assamese":"Assamais","Avaric":"Avar","Aymara":"Aymara","Azerbaijani":"Azéri","Bashkir":"Bachkir","Bambara":"Bambara","Belarusian":"Biélorusse","Bengali":"Bengali","Bislama":"Bichlamar","Tibetan":"Tibétain","Bosnian":"Bosniaque","Breton":"Breton","Bulgarian":"Bulgare","Catalan":"Catalan","Czech":"Tchèque","Chamorro":"Chamorro","Chechen":"Tchétchène","Chuvash":"Tchouvache","Cornish":"Cornique","Corsican":"Corse","Cree":"Cree","Welsh":"Gallois","Danish":"Danois","German":"Allemand","Dhivehi":"Maldivien","Dzongkha":"Dzongkha","Modern Greek (1453-)":"Grec moderne (après 1453)","English":"Anglais","Estonian":"Estonien","Basque":"Basque","Ewe":"Éwé","Faroese":"Féroïen","Persian":"Persan","Fijian":"Fidjien","Finnish":"Finnois","French":"Français","Western Frisian":"Frison occidental","Fulah":"Peul","Scottish Gaelic":"Gaélique","Irish":"Irlandais","Galician":"Galicien","Manx":"Manx","Guarani":"Guarani","Gujarati":"Goudjrati","Haitian":"Haïtien","Hausa":"Haoussa","Hebrew":"Hébreu","Herero":"Herero","Hindi":"Hindi","Hiri Motu":"Hiri motu","Croatian":"Croate","Hungarian":"Hongrois","Armenian":"Arménien","Igbo":"Igbo","Sichuan Yi":"Yi de Sichuan","Inuktitut":"Inuktitut","Indonesian":"Indonésien","Inupiaq":"Inupiaq","Icelandic":"Islandais","Italian":"Italien","Javanese":"Javanais","Japanese":"Japonais","Kalaallisut":"Groenlandais","Kannada":"Kannada","Kashmiri":"Kashmiri","Georgian":"Géorgien","Kanuri":"Kanouri","Kazakh":"Kazakh","Khmer":"Khmer central","Kikuyu":"Kikuyu","Kinyarwanda":"Rwanda","Kirghiz":"Kirghiz","Komi":"Kom","Kongo":"Kongo","Korean":"Coréen","Kuanyama":"Kuanyama","Kurdish":"Kurde","Lao":"Lao","Latvian":"Letton","Limburgan":"Limbourgeois","Lingala":"Lingala","Lithuanian":"Lituanien","Luxembourgish":"Luxembourgeois","Luba-Katanga":"Luba-katanga","Ganda":"Ganda","Marshallese":"Marshall","Malayalam":"Malayalam","Marathi":"Marathe","Macedonian":"Macédonien","Malagasy":"Malgache","Maltese":"Maltais","Mongolian":"Mongol","Maori":"Maori","Malay (macrolanguage)":"Malais","Burmese":"Birman","Nauru":"Nauruan","Navajo":"Navaho","South Ndebele":"Ndébélé du Sud","North Ndebele":"Ndébélé du Nord","Ndonga":"Ndonga","Nepali (macrolanguage)":"Népalais","Dutch":"Néerlandais","Norwegian Nynorsk":"Norvégien nynorsk","Norwegian Bokmål":"Norvégien bokmål","Norwegian":"Norvégien","Nyanja":"Chichewa","Occitan (post 1500)":"Occitan (après 1500)","Ojibwa":"Ojibwa","Oriya (macrolanguage)":"Oriya","Oromo":"Galla","Ossetian":"Ossète","Panjabi":"Pendjabi","Polish":"Polonais","Portuguese":"Portugais","Pushto":"Pachto","Quechua":"Quechua","Romansh":"Romanche","Romanian":"Roumain","Rundi":"Rundi","Russian":"Russe","Sango":"Sango","Sinhala":"Singhalais","Slovak":"Slovaque","Slovenian":"Slovène","Northern Sami":"Sami du Nord","Samoan":"Samoan","Shona":"Shona","Sindhi":"Sindhi","Somali":"Somali","Southern Sotho":"Sotho du Sud","Spanish":"Espagnol","Albanian":"Albanais","Sardinian":"Sarde","Serbian":"Serbe","Swati":"Swati","Sundanese":"Soundanais","Swahili (macrolanguage)":"Swahili","Swedish":"Suédois","Tahitian":"Tahitien","Tamil":"Tamoul","Tatar":"Tatar","Telugu":"Télougou","Tajik":"Tadjik","Tagalog":"Tagalog","Thai":"Thaï","Tigrinya":"Tigrigna","Tonga (Tonga Islands)":"Tongan (Îles Tonga)","Tswana":"Tswana","Tsonga":"Tsonga","Turkmen":"Turkmène","Turkish":"Turc","Twi":"Twi","Uighur":"Ouïgour","Ukrainian":"Ukrainien","Urdu":"Ourdou","Uzbek":"Ouszbek","Venda":"Venda","Vietnamese":"Vietnamien","Walloon":"Wallon","Wolof":"Wolof","Xhosa":"Xhosa","Yiddish":"Yiddish","Yoruba":"Yoruba","Zhuang":"Zhuang","Chinese":"Chinois","Zulu":"Zoulou"} \ No newline at end of file | ||
diff --git a/scripts/i18n/pull-hook.sh b/scripts/i18n/pull-hook.sh index 3d57040cc..3a8394110 100755 --- a/scripts/i18n/pull-hook.sh +++ b/scripts/i18n/pull-hook.sh | |||
@@ -9,4 +9,5 @@ for i in 1 2 3; do | |||
9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml | 9 | perl -pi -e 's|<x id=(.+?)/>([^"])|<x id=\1/>\2|g' client/src/locale/target/*.xml |
10 | done | 10 | done |
11 | 11 | ||
12 | npm run i18n:xliff2json \ No newline at end of file | 12 | npm run i18n:xliff2json |
13 | |||
diff --git a/scripts/i18n/xliff2json.ts b/scripts/i18n/xliff2json.ts index 17c73181b..ed6854514 100755 --- a/scripts/i18n/xliff2json.ts +++ b/scripts/i18n/xliff2json.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as xliff12ToJs from 'xliff/xliff12ToJs' | 1 | import * as xliff12ToJs from 'xliff/xliff12ToJs' |
2 | import { readFile, readFileSync, unlink, writeFile } from 'fs' | 2 | import { readFileSync, unlink, writeFile } from 'fs' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { buildFileLocale, I18N_LOCALES, isDefaultLocale } from '../../shared/models/i18n/i18n' | 4 | import { buildFileLocale, I18N_LOCALES, isDefaultLocale } from '../../shared/models/i18n/i18n' |
5 | import { eachSeries } from 'async' | 5 | import { eachSeries } from 'async' |
diff --git a/server/models/account/user.ts b/server/models/account/user.ts index 56af2f30a..1165285ea 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts | |||
@@ -36,6 +36,10 @@ import { NSFWPolicyType } from '../../../shared/models/videos/nsfw-policy.type' | |||
36 | import { values } from 'lodash' | 36 | import { values } from 'lodash' |
37 | import { NSFW_POLICY_TYPES } from '../../initializers' | 37 | import { NSFW_POLICY_TYPES } from '../../initializers' |
38 | 38 | ||
39 | enum ScopeNames { | ||
40 | WITH_VIDEO_CHANNEL = 'WITH_VIDEO_CHANNEL' | ||
41 | } | ||
42 | |||
39 | @DefaultScope({ | 43 | @DefaultScope({ |
40 | include: [ | 44 | include: [ |
41 | { | 45 | { |
@@ -45,7 +49,7 @@ import { NSFW_POLICY_TYPES } from '../../initializers' | |||
45 | ] | 49 | ] |
46 | }) | 50 | }) |
47 | @Scopes({ | 51 | @Scopes({ |
48 | withVideoChannel: { | 52 | [ScopeNames.WITH_VIDEO_CHANNEL]: { |
49 | include: [ | 53 | include: [ |
50 | { | 54 | { |
51 | model: () => AccountModel, | 55 | model: () => AccountModel, |
@@ -199,7 +203,7 @@ export class UserModel extends Model<UserModel> { | |||
199 | } | 203 | } |
200 | } | 204 | } |
201 | 205 | ||
202 | return UserModel.scope('withVideoChannel').findOne(query) | 206 | return UserModel.scope(ScopeNames.WITH_VIDEO_CHANNEL).findOne(query) |
203 | } | 207 | } |
204 | 208 | ||
205 | static loadByEmail (email: string) { | 209 | static loadByEmail (email: string) { |
diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts index e0e5982f9..e2b440900 100644 --- a/shared/models/i18n/i18n.ts +++ b/shared/models/i18n/i18n.ts | |||
@@ -2,7 +2,7 @@ export const LOCALE_FILES = [ 'player', 'server' ] | |||
2 | 2 | ||
3 | export const I18N_LOCALES = { | 3 | export const I18N_LOCALES = { |
4 | 'en-US': 'English (US)', | 4 | 'en-US': 'English (US)', |
5 | 'fr-FR': 'French (France)' | 5 | 'fr-FR': 'Français (France)' |
6 | } | 6 | } |
7 | 7 | ||
8 | const I18N_LOCALE_ALIAS = { | 8 | const I18N_LOCALE_ALIAS = { |