Explorar el Código

feat(lang) add upper sorbian to transcription languages

* fix showing transcripts for country codes longer than 2 characters
factor2
zobadaniel hace 1 año
padre
commit
d49a419284
No account linked to committer's email address

+ 1
- 0
lang/translation-languages.json Ver fichero

@@ -34,6 +34,7 @@
34 34
     "hi": "Hindi",
35 35
     "hmn": "Hmong",
36 36
     "hr": "Croatian",
37
+    "hsb": "Upper Sorbian",
37 38
     "ht": "Haitian Creole",
38 39
     "hu": "Hungarian",
39 40
     "hy": "Armenian",

+ 5
- 2
react/features/subtitles/middleware.ts Ver fichero

@@ -172,8 +172,11 @@ function _endpointMessageReceived(store: IStore, next: Function, action: AnyActi
172 172
             }
173 173
         }
174 174
 
175
-        // If the suer is not requesting transcriptions just bail.
176
-        if (json.language.slice(0, 2) !== language) {
175
+        // If the user is not requesting transcriptions just bail.
176
+        // Regex to filter out all possible country codes after language code:
177
+        // this should catch all notations like 'en-GB' 'en_GB' and 'enGB'
178
+        // and be independent of the country code length
179
+        if (json.language.replace(/[-_A-Z].*/, '') !== language) {
177 180
             return next(action);
178 181
         }
179 182
 

+ 1
- 0
react/features/transcribing/jitsi-bcp47-map.json Ver fichero

@@ -20,6 +20,7 @@
20 20
     "hi": "hi-IN",
21 21
     "mr": "mr-IN",
22 22
     "hr": "hr-HR",
23
+    "hsb": "hsb-DE",
23 24
     "hu": "hu-HU",
24 25
     "hy": "hy-AM",
25 26
     "id": "id-ID",

+ 1
- 0
react/features/transcribing/transcriber-langs.json Ver fichero

@@ -45,6 +45,7 @@
45 45
     "is-IS": "Icelandic (Iceland)",
46 46
     "it-IT": "Italian (Italy)",
47 47
     "lt-LT": "Lithuanian (Lithuania)",
48
+    "hsb-DE": "Upper Sorbian (Germany)",
48 49
     "hu-HU": "Hungarian (Hungary)",
49 50
     "nl-NL": "Dutch (Netherlands)",
50 51
     "no-NO": "Norwegian Bokmål (Norway)",

Loading…
Cancelar
Guardar