Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show Development language again when development mode is enabled #19628

Merged
merged 1 commit into from Sep 5, 2022

Conversation

Findus23
Copy link
Member

Description:

I am not sure if this broke with my changes and the weblate migration or before, but I can't see any place in getAvailableLanguages() dev is added to the list.

Review

@Findus23 Findus23 added Needs Review PRs that need a code review Easier debugging For issues that make troubleshooting issues for developers easier. labels Aug 14, 2022
@justinvelluppillai
Copy link
Contributor

It looks like you could otherwise leave that code as it was and just add "dev" to global config file, then that function would remove it for prod installs (though it would be incorrectly named, should be disableDevelopmentLanguageInProdEnvironment).

Is it possible it was previously just added by developers in config, and this change now means it is added automatically when you've enabled development mode? It might also need some documentation update to avoid future confusion.

@Findus23
Copy link
Member Author

@justinvelluppillai You are right that seems a lot simpler (and I guess I lost that entry with #17930). So we could just add the entry for all users as it will be ignored for non-development anyway.

@Findus23 Findus23 marked this pull request as draft August 15, 2022 21:54
@justinvelluppillai justinvelluppillai removed the Needs Review PRs that need a code review label Aug 17, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2022

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Sep 1, 2022
@sgiehl
Copy link
Member

sgiehl commented Sep 2, 2022

I think it's actually better to only add the language in the code if development mode is enabled, rather than adding dev to the config file. Otherwise dev would be shown as configured language in the configuration screen, which might look weird in a production instance, as it's not even a valid language code.

@github-actions github-actions bot removed the Stale The label used by the Close Stale Issues action label Sep 3, 2022
@justinvelluppillai
Copy link
Contributor

Yep seems like a good approach to me.

@sgiehl sgiehl marked this pull request as ready for review September 5, 2022 08:13
@sgiehl sgiehl merged commit 3ce98e8 into 4.x-dev Sep 5, 2022
@sgiehl sgiehl deleted the fix-development-language branch September 5, 2022 08:18
@sgiehl sgiehl added this to the 4.12.0 milestone Sep 5, 2022
@sgiehl sgiehl added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easier debugging For issues that make troubleshooting issues for developers easier. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants