PIT-Solutions-Private-Limited / ai_translate

1 stars 2 forks source link

I don't get tranlsations made by OpenAI or errors or notifications. #9

Open vicluber opened 6 days ago

vicluber commented 6 days ago

I have my API key set. I don't see any record on AI Translate -> Settings backend module What should I have on my sys_language table? Because its empty and I think that's why the backend module is empty too. My language options are set in the sites/config.yaml file.

Typo3 is 11.5.39 Php is 8.1.29 ai_translate is 2.1.2

vicluber commented 6 days ago

I'm asking for the sys_language table because I follow the {sysLanguages} fluid variable to the DeepleSettingsRepository.php and to the public function getSysLanguages() and that would be emtpy.

pitssavinmb commented 5 days ago

1_fedo4AoxGGPqR4zN_L69Mw Capture Capture1 This way you can add languages and settings

vicluber commented 5 days ago

Got it. I have a list of languages on settings now. (I need to look this up. Is this another way to set languages in typo3 besides the site/config.yaml file?)

I have created Spanish and English and I gave the ISO code to both of them. I went to settings and I set my OpenAI API key. I created a page put some content in it, create the Spanish version of that page and hit the "Translate" button. I selected "Tranlsate with OpenAI" and the translation goes through (fast, as if its not making any request, in the video tutorial takes some time to get the translation) and I end up with a "copy" content element in the same original language (German in this case), no translated content element.

But that's not the case for English. English works how it should. So, I don't know, it feels like I shouldn't be creating the languages that I already have set in the site config.yaml file.

vicluber commented 5 days ago

Got it. The getLanguageUidFromTitle() gets the uid from the title (obviously) so the "System Language" property from the language records (the title from the sys_language table) has to be equal to the title of the language set with the site/config.yaml file.

I had created the record with english language titles and I have the title on each language in the site config yaml file.

I hope this clarify something: Screenshot from 2024-09-12 14-54-28 Screenshot from 2024-09-12 14-54-47