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

respect the webinterface config setting #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gregmartyn
Copy link

In an environment where access to /_translations is gated by the webserver itself, it's okay to show the webinterface in production. This change respects the user's config setting, and defaults the webinterface boolean to the APP_DEBUG var, if set, and false otherwise. The user of course is free to override that in their own config file.

Copy link
Owner

@hpolthof hpolthof left a comment

Choose a reason for hiding this comment

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

The merge cannot be accepted at this time. Please see the comment on the changed regex.


// Extract the real key from the translation.
if (preg_match("/^{$group}\.(.*?)$/sm", $key, $match)) {
if (preg_match("/^{$group}\\.(.*?)$/sm", $key, $match)) {
Copy link
Owner

Choose a reason for hiding this comment

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

You've seem to have added an extra slash. This slash however will break functionality. The single slash is intended to restrain the following dot from being counted as a wildcard character. Adding an extra slash would result in the dot being a wildcard.

Copy link
Owner

@hpolthof hpolthof left a comment

Choose a reason for hiding this comment

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

Change seems to be in line with current Laravel practices.

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.

2 participants