jgrygierek / BatchEntityImportBundle

Importing entities with preview and edit features for Symfony.
MIT License
9 stars 6 forks source link

update missing translations #88

Closed tomekknapczyk closed 7 months ago

tomekknapczyk commented 8 months ago

Removed fallback to default locale when updating translations.

If we have an object without some translation (en -> exists, pl -> does not exist) and we try to update it with new values, then we run into a fallback issue. For empty pl translation, method translate will return default en translation and update it with new pl value which is incorrect.

Once changed, during import the translate method will not return a fallback value and will only update the specified locale.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.08%. Comparing base (731c8a7) to head (c69ecd6). Report is 2 commits behind head on master.

:exclamation: Current head c69ecd6 differs from pull request most recent head 3136b52. Consider uploading reports for the commit 3136b52 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #88 +/- ## ============================================ + Coverage 97.07% 97.08% +0.01% - Complexity 179 180 +1 ============================================ Files 29 29 Lines 478 480 +2 ============================================ + Hits 464 466 +2 Misses 14 14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jgrygierek commented 8 months ago

@tomekknapczyk Hi, thanks for your PR. I will check it soon. Can you fix code style?

jgrygierek commented 7 months ago

@tomekknapczyk can you resolve conflicts? And one thing: in this package instead of id field I use entity field. Please check ImportControllerTraitTest.