Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into upload-subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed Jun 6, 2024
2 parents ebb95ec + a5eaccd commit 8aaf557
Show file tree
Hide file tree
Showing 56 changed files with 2,934 additions and 1,267 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.dockerignore
.git/
.github/
build/
Dockerfile
node_modules/
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ module.exports = {
extends: [
"@opencast/eslint-config-ts-react",
],
rules: {
// Currently 120 warnings.
"@typescript-eslint/no-explicit-any": "off",
},
overrides: [
{
files: ["./*.js"],
Expand Down
24 changes: 16 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
time: "04:00"
open-pull-requests-limit: 15
labels:
- type:dependencies

# GHA
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

# Javascript
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
time: "04:00"
open-pull-requests-limit: 15
labels:
- type:dependencies
42 changes: 42 additions & 0 deletions .github/generate-lngs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

declare -A country_language_map
declare -a order

# Loop through each file in the directory
for file in ??-??.json; do
if [ -f "$file" ]; then
# Extract country name and language code from the filename
country=$(basename "$file" .json | cut -d '-' -f 1)
language_code=$(basename "$file" .json)

if [ ! "${country_language_map[$country]}" ]; then
order+=("$country")
fi

# Check if the country already exists in the map
if [ -n "${country_language_map[$country]}" ]; then
country_language_map["$country"]+=" $language_code"
else
country_language_map["$country"]="$language_code"
fi
fi
done

echo "export const languages = new Map<string, string>(["
# Print the country-language mappings
for i in "${!order[@]}"; do
country=${order[$i]}
languages=()
for language in ${country_language_map[$country]}; do
languages+=("$language")
done
if [ ${#languages[@]} -eq 1 ]; then
echo " [\"$country\", \"${languages[0]}\"],"
else
for language in "${languages[@]}"; do
echo " [\"$language\", \"$language\"],"
done
fi
done
echo "]);"
218 changes: 217 additions & 1 deletion .github/mock/editor/ID-dual-stream-demo/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1,217 @@
[{"flavor":"dublincore\/episode","title":"EVENTS.EVENTS.DETAILS.CATALOG.EPISODE","fields":[{"readOnly":false,"id":"title","label":"EVENTS.EVENTS.DETAILS.METADATA.TITLE","type":"text","value":"Dual-Stream Demo","required":true},{"readOnly":false,"id":"subject","label":"EVENTS.EVENTS.DETAILS.METADATA.SUBJECT","type":"text","value":"","required":false},{"readOnly":false,"id":"description","label":"EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION","type":"text_long","value":"","required":false},{"translatable":true,"readOnly":false,"id":"language","label":"EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE","collection":{"LANGUAGES.SLOVENIAN":"slv","LANGUAGES.PORTUGUESE":"por","LANGUAGES.ROMANSH":"roh","LANGUAGES.ARABIC":"ara","LANGUAGES.POLISH":"pol","LANGUAGES.ITALIAN":"ita","LANGUAGES.CHINESE":"zho","LANGUAGES.FINNISH":"fin","LANGUAGES.DANISH":"dan","LANGUAGES.UKRAINIAN":"ukr","LANGUAGES.FRENCH":"fra","LANGUAGES.SPANISH":"spa","LANGUAGES.GERMAN_CH":"gsw","LANGUAGES.NORWEGIAN":"nor","LANGUAGES.RUSSIAN":"rus","LANGUAGES.JAPANESE":"jpx","LANGUAGES.DUTCH":"nld","LANGUAGES.TURKISH":"tur","LANGUAGES.HINDI":"hin","LANGUAGES.SWEDISH":"swa","LANGUAGES.ENGLISH":"eng","LANGUAGES.GERMAN":"deu"},"type":"text","value":"","required":false},{"readOnly":false,"id":"rightsHolder","label":"EVENTS.EVENTS.DETAILS.METADATA.RIGHTS","type":"text","value":"","required":false},{"translatable":true,"readOnly":false,"id":"license","label":"EVENTS.EVENTS.DETAILS.METADATA.LICENSE","collection":{"{\"label\":\"EVENTS.LICENSE.CC0\", \"order\":8, \"selectable\": true}":"CC0","{\"label\":\"EVENTS.LICENSE.CCBYND\", \"order\":4, \"selectable\": true}":"CC-BY-ND","{\"label\":\"EVENTS.LICENSE.CCBYNCND\", \"order\":7, \"selectable\": true}":"CC-BY-NC-ND","{\"label\":\"EVENTS.LICENSE.CCBYNCSA\", \"order\":6, \"selectable\": true}":"CC-BY-NC-SA","{\"label\":\"EVENTS.LICENSE.ALLRIGHTS\", \"order\":1, \"selectable\": true}":"ALLRIGHTS","{\"label\":\"EVENTS.LICENSE.CCBYSA\", \"order\":3, \"selectable\": true}":"CC-BY-SA","{\"label\":\"EVENTS.LICENSE.CCBYNC\", \"order\":5, \"selectable\": true}":"CC-BY-NC","{\"label\":\"EVENTS.LICENSE.CCBY\", \"order\":2, \"selectable\": true}":"CC-BY"},"type":"ordered_text","value":"CC-BY-SA","required":false},{"translatable":false,"readOnly":false,"id":"isPartOf","label":"EVENTS.EVENTS.DETAILS.METADATA.SERIES","collection":{"Wiki Commons Content":"ID-wiki-commons","AV-Portal Content":"ID-av-portal","Open Media for Opencast":"ID-openmedia-opencast","Blender Foundation Productions":"ID-blender-foundation"},"type":"text","value":"","required":false},{"translatable":false,"readOnly":false,"id":"creator","label":"EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS","collection":{"NASA Johnson":"NASA Johnson","NASA":"NASA","Rosatrieu":"Rosatrieu","I. Elgamal":"I. Elgamal","TIB AV-Portal Hannover":"TIB AV-Portal Hannover","Wiki Commons":"Wiki Commons","Lars Kiesow":"Lars Kiesow","Andy Goralczyk":"Andy Goralczyk","Olaf Schulte":"Olaf Schulte","Administrator":"Administrator","Nature Stock Videos":"Nature Stock Videos","Capture Agent":"Capture Agent","Blender Foundation":"Blender Foundation","Pixabay":"Pixabay","System User":"System User"},"type":"mixed_text","value":["Lars Kiesow"],"required":false},{"translatable":false,"readOnly":false,"id":"contributor","label":"EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS","collection":{"NASA Johnson":"NASA Johnson","NASA":"NASA","Rosatrieu":"Rosatrieu","I. Elgamal":"I. Elgamal","TIB AV-Portal Hannover":"TIB AV-Portal Hannover","Wiki Commons":"Wiki Commons","Lars Kiesow":"Lars Kiesow","Andy Goralczyk":"Andy Goralczyk","Olaf Schulte":"Olaf Schulte","Administrator":"Administrator","Nature Stock Videos":"Nature Stock Videos","Capture Agent":"Capture Agent","Blender Foundation":"Blender Foundation","Pixabay":"Pixabay","System User":"System User"},"type":"mixed_text","value":[],"required":false},{"readOnly":false,"id":"startDate","label":"EVENTS.EVENTS.DETAILS.METADATA.START_DATE","type":"date","value":"2022-02-03T01:02:00.000Z","required":false},{"readOnly":false,"id":"duration","label":"EVENTS.EVENTS.DETAILS.METADATA.DURATION","type":"text","value":"00:00:00","required":false},{"readOnly":false,"id":"location","label":"EVENTS.EVENTS.DETAILS.METADATA.LOCATION","type":"text","value":"","required":false},{"readOnly":false,"id":"source","label":"EVENTS.EVENTS.DETAILS.METADATA.SOURCE","type":"text","value":"","required":false},{"readOnly":true,"id":"created","label":"EVENTS.EVENTS.DETAILS.METADATA.CREATED","type":"date","value":"2022-02-03T01:02:00.000Z","required":false},{"readOnly":true,"id":"publisher","label":"EVENTS.EVENTS.DETAILS.METADATA.PUBLISHER","type":"text","value":"","required":false},{"readOnly":true,"id":"identifier","label":"EVENTS.EVENTS.DETAILS.METADATA.ID","type":"text","value":"ID-dual-stream-demo","required":false}]}]
[
{
"flavor": "dublincore\/episode",
"title": "EVENTS.EVENTS.DETAILS.CATALOG.EPISODE",
"fields": [
{
"readOnly": false,
"id": "title",
"label": "EVENTS.EVENTS.DETAILS.METADATA.TITLE",
"type": "text",
"value": "Dual-Stream Demo",
"required": true
},
{
"readOnly": false,
"id": "subject",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SUBJECT",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": false,
"id": "description",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DESCRIPTION",
"type": "text_long",
"value": "",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "language",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LANGUAGE",
"collection": {
"LANGUAGES.SLOVENIAN": "slv",
"LANGUAGES.PORTUGUESE": "por",
"LANGUAGES.ROMANSH": "roh",
"LANGUAGES.ARABIC": "ara",
"LANGUAGES.POLISH": "pol",
"LANGUAGES.ITALIAN": "ita",
"LANGUAGES.CHINESE": "zho",
"LANGUAGES.FINNISH": "fin",
"LANGUAGES.DANISH": "dan",
"LANGUAGES.UKRAINIAN": "ukr",
"LANGUAGES.FRENCH": "fra",
"LANGUAGES.SPANISH": "spa",
"LANGUAGES.GERMAN_CH": "gsw",
"LANGUAGES.NORWEGIAN": "nor",
"LANGUAGES.RUSSIAN": "rus",
"LANGUAGES.JAPANESE": "jpx",
"LANGUAGES.DUTCH": "nld",
"LANGUAGES.TURKISH": "tur",
"LANGUAGES.HINDI": "hin",
"LANGUAGES.SWEDISH": "swa",
"LANGUAGES.ENGLISH": "eng",
"LANGUAGES.GERMAN": "deu"
},
"type": "text",
"value": "",
"required": false
},
{
"readOnly": false,
"id": "rightsHolder",
"label": "EVENTS.EVENTS.DETAILS.METADATA.RIGHTS",
"type": "text",
"value": "",
"required": false
},
{
"translatable": true,
"readOnly": false,
"id": "license",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LICENSE",
"collection": {
"{\"label\":\"EVENTS.LICENSE.CC0\", \"order\":8, \"selectable\": true}": "CC0",
"{\"label\":\"EVENTS.LICENSE.CCBYND\", \"order\":4, \"selectable\": true}": "CC-BY-ND",
"{\"label\":\"EVENTS.LICENSE.CCBYNCND\", \"order\":7, \"selectable\": true}": "CC-BY-NC-ND",
"{\"label\":\"EVENTS.LICENSE.CCBYNCSA\", \"order\":6, \"selectable\": true}": "CC-BY-NC-SA",
"{\"label\":\"EVENTS.LICENSE.ALLRIGHTS\", \"order\":1, \"selectable\": true}": "ALLRIGHTS",
"{\"label\":\"EVENTS.LICENSE.CCBYSA\", \"order\":3, \"selectable\": true}": "CC-BY-SA",
"{\"label\":\"EVENTS.LICENSE.CCBYNC\", \"order\":5, \"selectable\": true}": "CC-BY-NC",
"{\"label\":\"EVENTS.LICENSE.CCBY\", \"order\":2, \"selectable\": true}": "CC-BY"
},
"type": "ordered_text",
"value": "CC-BY-SA",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "isPartOf",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SERIES",
"collection": {
"Wiki Commons Content": "ID-wiki-commons",
"AV-Portal Content": "ID-av-portal",
"Open Media for Opencast": "ID-openmedia-opencast",
"Blender Foundation Productions": "ID-blender-foundation"
},
"type": "text",
"value": "",
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "creator",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS",
"collection": {
"NASA Johnson": "NASA Johnson",
"NASA": "NASA",
"Rosatrieu": "Rosatrieu",
"I. Elgamal": "I. Elgamal",
"TIB AV-Portal Hannover": "TIB AV-Portal Hannover",
"Wiki Commons": "Wiki Commons",
"Lars Kiesow": "Lars Kiesow",
"Andy Goralczyk": "Andy Goralczyk",
"Olaf Schulte": "Olaf Schulte",
"Administrator": "Administrator",
"Nature Stock Videos": "Nature Stock Videos",
"Capture Agent": "Capture Agent",
"Blender Foundation": "Blender Foundation",
"Pixabay": "Pixabay",
"System User": "System User"
},
"type": "mixed_text",
"value": [
"Lars Kiesow"
],
"required": false
},
{
"translatable": false,
"readOnly": false,
"id": "contributor",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CONTRIBUTORS",
"collection": {
"NASA Johnson": "NASA Johnson",
"NASA": "NASA",
"Rosatrieu": "Rosatrieu",
"I. Elgamal": "I. Elgamal",
"TIB AV-Portal Hannover": "TIB AV-Portal Hannover",
"Wiki Commons": "Wiki Commons",
"Lars Kiesow": "Lars Kiesow",
"Andy Goralczyk": "Andy Goralczyk",
"Olaf Schulte": "Olaf Schulte",
"Administrator": "Administrator",
"Nature Stock Videos": "Nature Stock Videos",
"Capture Agent": "Capture Agent",
"Blender Foundation": "Blender Foundation",
"Pixabay": "Pixabay",
"System User": "System User"
},
"type": "mixed_text",
"value": [],
"required": false
},
{
"readOnly": false,
"id": "startDate",
"label": "EVENTS.EVENTS.DETAILS.METADATA.START_DATE",
"type": "date",
"value": "2022-02-03T01:02:00.000Z",
"required": false
},
{
"readOnly": false,
"id": "duration",
"label": "EVENTS.EVENTS.DETAILS.METADATA.DURATION",
"type": "text",
"value": "00:01:04",
"required": false
},
{
"readOnly": false,
"id": "location",
"label": "EVENTS.EVENTS.DETAILS.METADATA.LOCATION",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": false,
"id": "source",
"label": "EVENTS.EVENTS.DETAILS.METADATA.SOURCE",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": true,
"id": "created",
"label": "EVENTS.EVENTS.DETAILS.METADATA.CREATED",
"type": "date",
"value": "2022-02-03T01:02:00.000Z",
"required": false
},
{
"readOnly": true,
"id": "publisher",
"label": "EVENTS.EVENTS.DETAILS.METADATA.PUBLISHER",
"type": "text",
"value": "",
"required": false
},
{
"readOnly": true,
"id": "identifier",
"label": "EVENTS.EVENTS.DETAILS.METADATA.ID",
"type": "text",
"value": "ID-dual-stream-demo",
"required": false
}
]
}
]
3 changes: 2 additions & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ changelog:
- title: New Features
labels:
- type:feature
- type:enhancement

- title: Usability and Accessibility
labels:
Expand All @@ -30,4 +31,4 @@ changelog:

- title: Other Changes
labels:
- "type:*"
- "*"
8 changes: 4 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: use node.js 18.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: download dependencies
run: npm ci
Expand All @@ -25,7 +25,7 @@ jobs:
run: ./.github/build-release.sh

- name: create new release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: oc-editor-*.tar.gz
draft: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-crowdin-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.repository_owner == 'opencast'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: prepare crowdin client
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/playwright-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:

steps:
- name: Check out source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node Dependency
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
run: npx playwright test --config=playwright.config.ts

- name: Upload tests results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results/
Loading

0 comments on commit 8aaf557

Please sign in to comment.