mattias-persson / statamic-translation-manager

A Statamic V2 addon for importing and exporting translations
MIT License
5 stars 2 forks source link

Resolve issue exporting & importing booleans #14

Open aryehraber opened 4 years ago

aryehraber commented 4 years ago

This PR tackles #11 by casting booleans as strings during export, and then back to booleans during import.

Let me know if you have any questions!

mattias-persson commented 4 years ago

@aryehraber Exporting works great! However, I'm having trouble importing falsy values. For example, I have a toggle on a page which is currently enabled, I export and change the value from true to false and then import it again. The toggle doesn't seem to change.

aryehraber commented 4 years ago

@mattias-persson Thanks for testing and the feedback -- can definitely take another look!

Before I do, just want to double check: did you check the translated version for the toggle change or the original? I kept making this mistake while testing 🙈

mattias-persson commented 4 years ago

@aryehraber Pretty sure I tried both! When only changing the target value to false nothing happened 🙂

aryehraber commented 4 years ago

@mattias-persson Cool, thanks for confirming. Will run some more tests later this week and report back!