Conversation
anthonynsimon
left a comment
There was a problem hiding this comment.
Looks good, thank you for helping out! Please just review the comments below.
| return jsonNestedParser(JSON.stringify(parse(php))); | ||
| }; | ||
|
|
||
| export const phpExporter: Exporter = async (data: IntermediateTranslationFormat) => { |
There was a problem hiding this comment.
Wouldn't you need to escape the term and translations in case there is quote in there?
For example in:
[ "term with \" quote" => "translation with \" quote" ]|
@kjellspijker any update on this? :) |
|
@anthonynsimon I've been a bit busy, so thanks for the reminder :) I did manage to add the format to the import controller and I spent a bit of time looking at the case you presented with the quotes, but couldn't manage to get that part fixed. As a side note, there is functionally a bit of difference between strings with double (") and single (') quotes in PHP, where double quotes allow string templating, which (in my opinion), you wouldn't want here. The same problem does still exist though, just with a single quote. Maybe you have some idea on how to fix this? |
|
@kjellspijker Hey thanks a lot for putting time into this :) If it's ok with you, I can try and incorporate the last fixes on my branch so that we can merge it. |
Closes #82
I chose the format used by the Laravel framework as base. This should be easy enough to include in different frameworks/projects as required.