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

Use different file extension to prevent conflicts #84

Merged
merged 5 commits into from
Sep 21, 2023
Merged

Conversation

swissspidy
Copy link
Owner

@swissspidy swissspidy commented Sep 19, 2023

  • No conflicts with wp-content/languages/{$locale}.php which WP supports for loading custom logic
  • Avoids deleting wrong files in uninstall.php (i.e. index.php or wp-content/languages/{$locale}.php)

Tested using wp plugin uninstall performant-translations --skip-delete --deactivate

Fixes #77

@swissspidy swissspidy added bug Something isn't working enhancement New feature or request labels Sep 19, 2023
@swissspidy swissspidy added this to the 1.0.4 milestone Sep 19, 2023
@swissspidy
Copy link
Owner Author

swissspidy commented Sep 19, 2023

Performance Test Results

Performance test results for 95160c8 are in 🛎️!

WordPress Admin

Locale Scenario wp-memory-usage wp-total
en_US Default 16.80 MB 147.08 ms
de_DE Default 33.51 MB 198.75 ms
de_DE Ginger MO (MO) 21.46 MB 175.55 ms
de_DE Ginger MO (PHP) 18.43 MB 149.68 ms
de_DE Ginger MO (JSON) 21.46 MB 171.24 ms

Twenty Twenty-Three

Locale Scenario wp-memory-usage wp-total
en_US Default 15.85 MB 137.00 ms
de_DE Default 29.39 MB 184.50 ms
de_DE Ginger MO (MO) 19.33 MB 165.72 ms
de_DE Ginger MO (PHP) 17.02 MB 146.07 ms
de_DE Ginger MO (JSON) 19.32 MB 159.75 ms

Twenty Twenty-One

Locale Scenario wp-memory-usage wp-total
en_US Default 15.38 MB 113.11 ms
de_DE Default 28.98 MB 160.19 ms
de_DE Ginger MO (MO) 18.87 MB 142.97 ms
de_DE Ginger MO (PHP) 16.56 MB 118.95 ms
de_DE Ginger MO (JSON) 18.87 MB 136.24 ms

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #84 (a40986f) into main (5763cb7) will not change coverage.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main      #84   +/-   ##
=========================================
  Coverage     92.21%   92.21%           
  Complexity      198      198           
=========================================
  Files             7        7           
  Lines           475      475           
=========================================
  Hits            438      438           
  Misses           37       37           
Flag Coverage Δ
default 92.21% <100.00%> (ø)
multisite 25.47% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
lib/class-performant-translations.php 95.77% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@swissspidy swissspidy changed the title Use different file extension Use different translation file extension to prevent conflicts with legacy setups Sep 21, 2023
@swissspidy swissspidy changed the title Use different translation file extension to prevent conflicts with legacy setups Use different file extension to prevent conflicts Sep 21, 2023
@swissspidy swissspidy merged commit 977a741 into main Sep 21, 2023
24 checks passed
@swissspidy swissspidy deleted the fix/77 branch September 21, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot redeclare function error with de_DE.php file present
1 participant