Login and get coding
Imagine you built PyBites' new translation feature. You managed to successfully get translated text for a Bite, but there's a problem: the Python code inside the HTML
pretags gets translated too (yes, this actually happened to us!). Nobody ever said developer life was going to be easy right? (chuckle)
As we code in English, we require all code snippets to be in English even if the overall Bite description is being translated to another language.
Luckily, by now, you've mastered some text manipulation and regex skills (this is an advanced Bite after all) so you will write some code to fix this for all future translation calls.
Here is a small example (we test 3 different ones in the associated tests):
Original English Bite text:
Translator output which translated everything, description and code, to Russian:
You will take both output instances and produce the desired output: the description is in Russian while the code content in the
pretags is left intact (English):
Good luck and keep calm and code in Python.
Will you be Pythonista #105 to crack this Bite?
Resolution time: ~73 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 5.6 on a 1-10 difficulty scale.
» Up for a challenge? 💪