Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
E2E_INSTALL_ROOT: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

# ── Apache2 + mod_php ───────────────────────────────────────────────────
# Install Apache before setup-php adds external package sources; the app
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
--health-retries=5

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -62,9 +62,9 @@ jobs:
github-token: ''

- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
node-version: '22'

# ── Dependency CVE scanning ───────────────────────────────────────────
- name: composer audit (known CVEs)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-upgrade-smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
--health-retries=5

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ Pinakes is a self-hosted, full-featured ILS for schools, municipalities, and pri

---

## What's New in v0.7.41

### Features
- **Danish language (da_DK)** ([#279](https://github.com/fabiodalez-dev/Pinakes/issues/279)) — Danish is now a fully selectable interface language, contributed by [@HansUwe52](https://github.com/HansUwe52). Ships the complete UI catalogue (`locale/da_DK.json`, full key parity with the Italian source), route slugs (`locale/routes_da_DK.json`), and the fresh-install seed in Danish (`installer/database/data_da_DK.sql`: 181 genres, 22 email templates, CMS pages, settings). `da_DK` is wired into the installer language step, the email/route fallback chains, and the bundled-locale updater path. Emails fall back to English when a Danish template is missing.

### Fixes
- **Danish installer seed selection** ([#279](https://github.com/fabiodalez-dev/Pinakes/issues/279)) — the installer's locale maps only knew `it/en/de/fr`, so a Danish install silently seeded the Italian catalogue (genres + emails). All four maps in `Installer.php`, plus `PrivateModeMiddleware` and the `Updater` bundled-locale list, now include `da_DK`. Restored dropped content in the Danish `loan_pickup_ready` email and added the missing `fr_FR` entry to the `I18n` fallback map.

### Database Changes
- `migrate_0.7.41.sql` — registers the `da_DK` row in the `languages` table on existing installs (idempotent upsert), so Danish appears in the language UI after upgrading.

### Upgrade Notes
- Back up your database before updating (the in-app updater does this automatically).

---

## What's New in v0.7.40

### Features
Expand Down
2 changes: 1 addition & 1 deletion app/Middleware/PrivateModeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PrivateModeMiddleware implements MiddlewareInterface
];

/** Locales whose route variants are all registered in web.php. */
private const LOCALES = ['it_IT', 'en_US', 'de_DE', 'fr_FR'];
private const LOCALES = ['it_IT', 'en_US', 'de_DE', 'fr_FR', 'da_DK'];

/**
* Path prefixes always allowed (assets, installer, infra endpoints).
Expand Down
2 changes: 2 additions & 0 deletions app/Support/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ final class I18n
'it_IT' => 'Italiano',
'en_US' => 'English',
'de_DE' => 'Deutsch',
'fr_FR' => 'Français',
'da_DK' => 'Dansk',
];

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Support/SettingsMailTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ private static function localeOverrides(?string $locale): array
return [];
}
// Map short and full codes to the locale files we ship.
$map = ['en' => 'en_US', 'de' => 'de_DE', 'fr' => 'fr_FR', 'en_US' => 'en_US', 'de_DE' => 'de_DE', 'fr_FR' => 'fr_FR'];
$map = ['en' => 'en_US', 'de' => 'de_DE', 'fr' => 'fr_FR', 'da' => 'da_DK', 'en_US' => 'en_US', 'de_DE' => 'de_DE', 'fr_FR' => 'fr_FR', 'da_DK' => 'da_DK'];
$key = $map[$locale] ?? ($map[substr($locale, 0, 2)] ?? null);
if ($key === null) {
return [];
Expand Down
2 changes: 1 addition & 1 deletion app/Support/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@ private function isCustomLocalePath(string $relativePath): bool
if (preg_match('#^locale/(?:routes_)?([a-z]{2}_[A-Z]{2})\.json$#', $path, $matches) !== 1) {
return false;
}
return !in_array($matches[1], ['it_IT', 'en_US', 'de_DE', 'fr_FR'], true);
return !in_array($matches[1], ['it_IT', 'en_US', 'de_DE', 'fr_FR', 'da_DK'], true);
}

/**
Expand Down
Loading
Loading