feat(lang) add upper sorbian to transcription languages

* fix showing transcripts for country codes longer than 2 characters
pull/14782/head jitsi-meet_9525
zobadaniel 1 year ago committed by GitHub
parent 0913554af9
commit d49a419284
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      lang/translation-languages.json
  2. 7
      react/features/subtitles/middleware.ts
  3. 1
      react/features/transcribing/jitsi-bcp47-map.json
  4. 1
      react/features/transcribing/transcriber-langs.json

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

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

@ -20,6 +20,7 @@
"hi": "hi-IN", "hi": "hi-IN",
"mr": "mr-IN", "mr": "mr-IN",
"hr": "hr-HR", "hr": "hr-HR",
"hsb": "hsb-DE",
"hu": "hu-HU", "hu": "hu-HU",
"hy": "hy-AM", "hy": "hy-AM",
"id": "id-ID", "id": "id-ID",

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

Loading…
Cancel
Save