wearerequired / traduttore

🗼 A WordPress plugin to improve the I18N workflow for your own projects based on @GlotPress.
https://wearerequired.github.io/traduttore/
72 stars 15 forks source link

Make ProjectLocator more strict when matching paths with existing data #188

Closed ocean90 closed 3 years ago

ocean90 commented 3 years ago

Description Fixes #187.

Remove the partially matching to avoid false positives. It doesn't seem like there's a real use case for this as we have different meta keys to support searching by URL or path. @swissspidy Am I'm missing something here?

How has this been tested?

Types of changes Bug fix

Checklist:

codecov[bot] commented 3 years ago

Codecov Report

Merging #188 into master will increase coverage by 0.08%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #188      +/-   ##
============================================
+ Coverage     81.47%   81.55%   +0.08%     
  Complexity      367      367              
============================================
  Files            24       24              
  Lines           907      911       +4     
============================================
+ Hits            739      743       +4     
  Misses          168      168              
Impacted Files Coverage Δ Complexity Δ
inc/ProjectLocator.php 100.00% <ø> (ø) 25.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3115cb2...34a01c8. Read the comment docs.

swissspidy commented 3 years ago

This was probably done this way before we did the more robust implementation with all the useful meta keys.