How to translate literal strings from source code

I have a game mode developed in Pawn - SA-MP, it is in Russian language and I would like to translate its literal strings into another language, I have been doing it with small pieces of code passing them to GPT 3.5 and it works fine, I think the translation is very good and maintains the logic of the code, but I think at this rate it will take a long time compared to passing large blocks of code. Does anyone have an idea how to achieve this and ensure that the AI’s response doesn’t fall short?

The current models are designed to only output the lines that need changing, so you may be presented with code that has … rest of cod here … sections… that typically does not happen for only a few lines of code, a few tests to see how many lines reliably get processed at once would be worth it. 10-20 should be ok I would guess.