[PR #3490] [CLOSED] Improve 'LanguageTest::test_locales_config_key_set_properly' #6205

Closed
opened 2026-02-05 10:26:47 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/3490
Author: @andrii-bodnar
Created: 6/10/2022
Status: Closed

Base: developmentHead: feat/update-unit-test


📝 Commits (2)

  • 8e6d75f Improve 'LanguageTest::test_locales_config_key_set_properly'
  • a74211b Fix Crowdin name

📊 Changes

2 files changed (+7 additions, -5 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/language_request.yml (+2 -2)
📝 tests/LanguageTest.php (+5 -3)

📄 Description

Hey everyone!

In this PR I've updated the LanguageTest::test_locales_config_key_set_properly Unit test to better handle such cases when a new locale is added in Crowdin.

As we can see here, a new locale was added in Crowdin and the test fails. The strict comparison is unnecessary. It should be enough to check if there are corresponding language folders to the config locales. Nothing happens if the lang folder will contain extra language.

In addition, I've made a minor fix of Crowdin name in the issue template 🙂


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/3490 **Author:** [@andrii-bodnar](https://github.com/andrii-bodnar) **Created:** 6/10/2022 **Status:** ❌ Closed **Base:** `development` ← **Head:** `feat/update-unit-test` --- ### 📝 Commits (2) - [`8e6d75f`](https://github.com/BookStackApp/BookStack/commit/8e6d75f0c87d80697de7e6c6e5bfd72059bc6f76) Improve 'LanguageTest::test_locales_config_key_set_properly' - [`a74211b`](https://github.com/BookStackApp/BookStack/commit/a74211bba24a6be0805e45dd2c76611904418ff3) Fix Crowdin name ### 📊 Changes **2 files changed** (+7 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/language_request.yml` (+2 -2) 📝 `tests/LanguageTest.php` (+5 -3) </details> ### 📄 Description Hey everyone! In this PR I've updated the `LanguageTest::test_locales_config_key_set_properly` Unit test to better handle such cases when a new locale is added in Crowdin. As we can see [here](https://github.com/BookStackApp/BookStack/actions/runs/2468769080), a new locale was added in Crowdin and the test fails. The strict comparison is unnecessary. It should be enough to check if there are corresponding language folders to the config locales. Nothing happens if the lang folder will contain extra language. In addition, I've made a minor fix of Crowdin name in the issue template 🙂 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:26:47 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6205