diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cce9833b..5c647b36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.1'] + php-versions: ['8.2'] steps: - name: Checkout uses: actions/checkout@v3 @@ -151,12 +151,29 @@ jobs: exit 1 fi + - name: Capture application log during tests + run: | + mkdir -p var/logs + touch var/logs/test.log + nohup tail -F -n 0 var/logs/test.log > /tmp/app-test.log 2>&1 & - name: Run tests with phpunit run: vendor/bin/phpunit tests - name: Run tests with vitest run: node node_modules/vitest/vitest.mjs --run + - name: Print application logs + if: failure() + run: | + echo "::group::app test log (captured live, filtered)" + grep -v -e 'User Deprecated' -e 'Checking support on authenticator' \ + -e 'Checking for authenticator support' -e 'does not support the request' \ + -e 'set the failure response' -e 'set the response' /tmp/app-test.log | tail -n 2500 || true + echo "::endgroup::" + echo "::group::session files" + ls -la var/sessions/* 2>/dev/null || true + echo "::endgroup::" + - name: Upload Panther screenshots if: failure() uses: actions/upload-artifact@v4 diff --git a/.nvmrc b/.nvmrc index 209e3ef4..a45fd52c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +24 diff --git a/assets/app.js b/assets/app.js index 7d3fec55..89431243 100644 --- a/assets/app.js +++ b/assets/app.js @@ -2,12 +2,20 @@ import './styles/app.css'; import { createApp } from 'vue'; import App from './vue/App.vue'; import { router } from './router'; +import { createAppI18n, loadMessages, readLocale } from './vue/i18n'; const appElement = document.getElementById('vue-app'); if (appElement) { - const app = createApp(App); - app.use(router); - app.mount(appElement); -} + // The server renders the page in the administrator's language and states it in . + const locale = readLocale(); + loadMessages(locale).then((loaded) => { + // If the catalogue could not be loaded the app still mounts; strings show as their keys. + const messages = loaded ?? {}; + const app = createApp(App); + app.use(router); + app.use(createAppI18n({ locale, messages })); + app.mount(appElement); + }); +} diff --git a/assets/editor/EditorAssetPicker.vue b/assets/editor/EditorAssetPicker.vue index de31e468..ca90b331 100644 --- a/assets/editor/EditorAssetPicker.vue +++ b/assets/editor/EditorAssetPicker.vue @@ -14,7 +14,7 @@

Choose an existing asset

-

Pick a file to insert it at the cursor position.

+

Pick a file to insert it at the cursor position.