phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

null value on phrase pull leads into exception #104

Closed komarekw closed 1 year ago

komarekw commented 2 years ago

Hi, we are just trying to pull our localizations from phrase. As we could have not translated keys, we are using the include_empty_translations: true param in our .phrase.yml. Now we are getting the untranslated keys with null value. When I now run any command for analyzing or pub get from flutter we get an exception Exception: A value for resource <our_key_name> was not found..

Can someone give me any hint, how to fix this?

Thanks, Werner

theSoenke commented 2 years ago

Hey @komarekw, would it be a solution to remove the parameter include_empty_translations: true if you don't need the empty translations? Or what would be the expected behavior with the parameter include_empty_translations: true for you?

komarekw commented 2 years ago

I actually would love to see an empty string instead of a null value. We need the untranslated keys unfortunately, due to some circumstances. Is it possible to get an empty string instead of a null value?

theSoenke commented 2 years ago

Thanks for the feedback. If nil values are not allowed then it looks like it should be empty strings instead. We're investigating about changing it to empty strings

forelabs commented 1 year ago

@komarekw Can you please name the file format you are using to pull the translations?

theSoenke commented 1 year ago

Hi @komarekw, could you check again whether this now works for you with arb files? This should be solved now and empty strings instead of null returned