vibgyj / WPTranslationFiller

14 stars 5 forks source link

Improve OpenAI translation by adding vars in format {var 1} #298

Closed psmits1567 closed 3 months ago

psmits1567 commented 1 year ago

Currently OpenAI handles placeholders like %1$s and %2$s badly. They are sometimes not placed back on the proper place. To prevent that those placeholders are replaced by format {var 1}, {var 2} etc. Together with the proper prompt they are now put back where they belong. The same principle was already in use with Google and DeepL translating, but in a different format