Add configuration for location of strings in Scanner#256
Closed
Arzaroth wants to merge 2 commits intophp-gettext:masterfrom
Closed
Add configuration for location of strings in Scanner#256Arzaroth wants to merge 2 commits intophp-gettext:masterfrom
Arzaroth wants to merge 2 commits intophp-gettext:masterfrom
Conversation
Member
|
Hi, thanks for your work with these issues! I'd rather have these two issues in two different pull requests, because I have some doubts:
$contents = file_get_contents($file);
$relativePath = get_the_relative_path($file);
$translations = $scanner->scanString($contents, $relativePath);This function is already present in the interface (https://github.com/php-gettext/Gettext/blob/master/src/Scanner/ScannerInterface.php#L21) and this way is much more flexible, so I'd wouldn't add this feature (at least, for now). |
Author
|
Points taken. I'll close this PR and submit two new ones. Regarding relative paths, I didn't realize what you suggested was possible. It is indeed a nice workaround and I understand your argument on this matter. |
This was referenced Apr 24, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses both #208 and #143
I didn't provide tests for this PR since there is no concrete implementation of CodeScanner in this repository