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

Use project version inferred from POT import for translation API #133

Closed swissspidy closed 5 years ago

swissspidy commented 5 years ago

Description

Extracts and stores the version number from the Project-Id-Version header if it exists in a POT file.

The version number is then used in the translation API responses.

How has this been tested?

Added unit tests to document the behavior.

Types of changes New feature (non-breaking change which adds functionality)

Checklist:

codecov-io commented 5 years ago

Codecov Report

Merging #133 into master will increase coverage by 0.28%. The diff coverage is 94.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #133      +/-   ##
============================================
+ Coverage        78%   78.28%   +0.28%     
- Complexity      333      341       +8     
============================================
  Files            23       23              
  Lines           800      815      +15     
============================================
+ Hits            624      638      +14     
- Misses          176      177       +1
Impacted Files Coverage Δ Complexity Δ
inc/TranslationApiRoute.php 100% <100%> (ø) 5 <0> (ø) :arrow_down:
inc/Project.php 100% <100%> (ø) 52 <4> (+4) :arrow_up:
inc/Updater.php 94.02% <85.71%> (-0.98%) 26 <3> (+4)
inc/ZipProvider.php 98.88% <0%> (+0.02%) 27% <0%> (ø) :arrow_down:

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 074e9ba...3876286. Read the comment docs.