Skip to content

Conversation

@tanyaka
Copy link
Contributor

@tanyaka tanyaka commented Sep 1, 2025

Fix context menu language not depending on Setting > Language

The simplesettings app was loading files/search script on every page load (due to being globally enabled), which interfered with language detection causing browser language to override user configured language.

Run test via:

../d-n-t/container/dev bash -c "cd apps-custom/simplesettings/ && phpunit -c tests/phpunit.xml --colors=always --fail-on-warning --fail-on-risky"

@tanyaka tanyaka requested a review from Copilot September 1, 2025 12:00

This comment was marked as outdated.

@tanyaka tanyaka force-pushed the tkl/dev/translation-fix branch from 38b7638 to ed44841 Compare September 2, 2025 11:01

This comment was marked as outdated.

@printminion-co printminion-co force-pushed the tkl/dev/translation-fix branch 3 times, most recently from 4ee2e83 to a03704b Compare September 3, 2025 15:41

This comment was marked as outdated.

@printminion-co printminion-co force-pushed the tkl/dev/translation-fix branch 2 times, most recently from 85d5dac to 1cdbd49 Compare September 4, 2025 11:49
@printminion-co printminion-co self-assigned this Sep 4, 2025
@printminion-co printminion-co force-pushed the tkl/dev/translation-fix branch from 1cdbd49 to 8e0af23 Compare September 4, 2025 11:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a language detection issue in the simplesettings app where the files search script was being loaded globally, causing browser language to override user-configured language settings.

  • Moved files search script loading from global Application constructor to specific page controller
  • Added test isolation utilities to reset script and style state between tests
  • Added test to verify files search script injection behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
lib/AppInfo/Application.php Removed global files search script loading from constructor
lib/Controller/PageController.php Added conditional files search script loading in index method
tests/Controller/PageControllerTest.php Added test isolation utilities and test for script injection behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@printminion-co printminion-co force-pushed the tkl/dev/translation-fix branch from 03c7cbb to 7f6c6f6 Compare September 4, 2025 11:56
Copy link
Contributor

@printminion-co printminion-co left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review ok
if changes accepted.

lets ensure that script addition happens in proper context

inspired by https://github.com/IONOS-Productivity/nc-server/blob/e68ddae1e3c1e4532043f07bbc1bd9d1c96aa8a1/apps/files/lib/Controller/ViewController.php#L188

…plesettings context

lets ensure that script addition happens in proper context

inspired by https://github.com/IONOS-Productivity/nc-server/blob/e68ddae1e3c1e4532043f07bbc1bd9d1c96aa8a1/apps/files/lib/Controller/ViewController.php#L188

Signed-off-by: Misha M.-Kupriyanov <[email protected]>
Co-authored-by: Tatjana Kaschperko Lindt <[email protected]>
@tanyaka tanyaka force-pushed the tkl/dev/translation-fix branch from 7f6c6f6 to 2663ee5 Compare September 5, 2025 09:59
@printminion-co printminion-co merged commit acd86b2 into main Sep 5, 2025
35 checks passed
@printminion-co printminion-co deleted the tkl/dev/translation-fix branch September 5, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants