2020-07-21 12:13 PM
Hello,
I have tried to edit the text.xlsx file for translation purposes and for some reason after accessing the file with excel, generating the code no longer works.
This is the message I get now
Generate Code
Generate
Done
Generate Assets
make -f simulator/gcc/Makefile assets -j8
Invalid argument - generated/texts/include/texts/TextKeysAndLanguages.hpp
an error occurred in converting texts:
Invalid argument - generated/texts/include/texts/TextKeysAndLanguages.hpp
make[1]: *** [texts] Error 1
generated/simulator/gcc/Makefile:219: recipe for target 'texts' failed
simulator/gcc/Makefile:32: recipe for target 'assets' failed
make: *** [assets] Error 2
Failed
Failed
The first issue I faced was with excel complaining that the file was corrupted and needed repair. Not sure if that is what caused the problem.
As can be seen above, the log doesn't say much about the error. Does anyone know if there is a way to get more information? Or perhaps share with me why editing the text.xlsx file might cause problems.
Any input would be greatly appreciated!.
Thanks
Samer
2020-07-22 12:23 AM
Hello,
TouchGFX Designer has the feature embedded inside to add texts and translations (it basically writes in the texts.xlsx file for you so that you don't have to do it yourself) so I would suggest you to use that instead of modifying the file directly. Why do you want to modify the texts.xlsx by hand ?
Also, could you elaborate the steps you did to get this error ? This way we can assess if it is a recurring issue that has to be fixed.
/Alexandre
2020-07-22 01:21 AM
Hi Alexandre,
There are two reasons why I wanted to edit the xlsx file directly:
1) I need to share it externally with people who will translate the text to a number of languages. In one of the user guide pages it said "This is in general not recommended, at least not during development. If using an external resource for translation it can however be easier to share the spreadsheet instead of requiring it to be done in TouchGFX Designer". I didn't know that "in general not recommended" might mean "in general it is prohibited":grinning_face:
2) I also wanted to tidy things up with the single use texts. It seems everytime I add a widget to the design I end up with an extra single use text which the Touchgfx designer does not allow me to delete. (or maybe it does but I can't figure out how).
As far as the steps I have done, it went like this
1) Closed the Touchgfx. Opened the texts.xlsx file with excel. A message appeared about the file being corrupted. I pressed repair and the file opened.
2) Cleared all the unused single use texts and then saved the file.
3) Opened touchgfx designer and tried to generate the code. It gave me the message I shared earlier. If I press generate code again, the error message does not appear anymore and it seems at that point that the code generation worked. However, if I try to run the simulator, it fails and I get multiple error messages telling me that there are missing singleuse texts.
I beleive the reason for the compiler errors is because the code generate (even though I got no errors the second time) didn't really generate anything. I can see that the missing single use texts are indeed in the spreadhseet but they are not copied over to the text database.
Any thoughts?
Samer
2020-07-22 01:44 AM
Hello,
It's actually not easy to reproduce the bug with the corrupted excel file so it's difficult to find a solution. If you happen to find a pattern please don't hesitate to share it with us.
I didn't know that "in general not recommended" might mean "in general it is prohibited"
No it's not prohibited, this is how we were handling texts in the past as well. But the Designer now has the possibility to modify the excel file so as the user might change things in the file and not follow the correct structure we recommend to only use Designer so that you can be sure that everything will go smoothly.
If you don't remove the singleuse texts but only add translation for a number of languages, does it work after repairing the file ?
The singleuse texts are automatically deleted in the Designer if they are not used. So if they are still present there should be a reason and that's why you have errors.
/Alexandre