Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add upper sorbian to transcription languages #14334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lang/translation-languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"hi": "Hindi",
"hmn": "Hmong",
"hr": "Croatian",
"hsb": "Upper Sorbian",
"ht": "Haitian Creole",
"hu": "Hungarian",
"hy": "Armenian",
Expand Down
7 changes: 5 additions & 2 deletions react/features/subtitles/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ function _endpointMessageReceived({ dispatch, getState }: IStore, next: Function
});
}

// If the suer is not requesting transcriptions just bail.
if (json.language.slice(0, 2) !== language) {
// If the user is not requesting transcriptions just bail.
// 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);
}

Expand Down
1 change: 1 addition & 0 deletions react/features/transcribing/jitsi-bcp47-map.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"hi": "hi-IN",
"mr": "mr-IN",
"hr": "hr-HR",
"hsb": "hsb-DE",
"hu": "hu-HU",
"hy": "hy-AM",
"id": "id-ID",
Expand Down
1 change: 1 addition & 0 deletions react/features/transcribing/transcriber-langs.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"is-IS": "Icelandic (Iceland)",
"it-IT": "Italian (Italy)",
"lt-LT": "Lithuanian (Lithuania)",
"hsb-DE": "Upper Sorbian (Germany)",
"hu-HU": "Hungarian (Hungary)",
"nl-NL": "Dutch (Netherlands)",
"no-NO": "Norwegian Bokmål (Norway)",
Expand Down