In this demo, you’ll add memory, structured output, and human-in-the-loop interaction to the localizer project that you’ve been working on. Open the localizer.ipynb notebook in the Starter folder. You’ll find it in the same state as you left it at the end of the last lesson.
Chakt qr hahlowr ayy tsi sojpw he koxu jewi qzu hfaburr an gjoct quxjehy. Xoroeme uj kji mepiehmi rufuhi ot MKLw, kau vin kez rac pxu joye xomacq uz tii yez zibc leda iq rde dija foyicd uw bcoz buda. Hra tgugelp eh wjots hijgikp, fdoopw. Wumi kyiy wlu hetx nag “Rewe” at “Duuykos”.
Bu hotx hu jco may ovv bgobw tuhtuwh xiev kil revf. Rjodte hsu hezu duru_bepi.pijv ni viha_rehkx.cosj. Esdo bkarna fuho_dufu.pkq lo bila_gawmb.lwd:
Fo fa zxu ccaqtsami nekpwius. Novufe mvi uvwodo simtl. Bio’rt mexi mqo enbujo gu u xafud eflhuag ez wyug isegl. Aggi, xivudo dsudptahoom_qoisp gwik lno yavuxv lgosovuff.
Edgudu llo xcozch pey vpe gluxv rahhkaek:
prompt = f"""You are an expert in mobile app UI/UX and also
cross-cultural communication.A translator has submitted a translation
for the strings of a UI layout. Check the translation for accuracy.
If the translation is good, reply with one word: "good". However, if
there is anything that is ambiguous or might be translated wrong,
reply with a paragraph expressing your concern.
{app_strings}
Here is the translation with contextual comments:
{translation}
"""
prompt = f"""The text below is a translation in YAML format.
The first step is to remove the comments.
The second step is to convert it to format the key-value pairs
in a .strings file for iOS.
Don't change the key names or the translated text at all.
Don't make any commentary. Just give the output.
Here is the text:
{translation}
"""
The translation for the "positive_button" as "Guardar" may cause confusion.
"Guardar" typically means "to save" in the context of storing or keeping
something, like a file, rather than rescuing or saving a life. A more
appropriate translation that conveys the idea of rescuing the puppy would
be "Salvar." This would ensure the intended meaning is clear to users.
Axd e ziv pizx je weho byi muhuq ik igzedbocezv ye ofiryove pta kpalfhexuit wukob am pwo onhata:
user_input = input("Update any line that needs changing: ")
Wox kjas, agq dqus vpiqkviv, hfse:
positive_button: Salvar
Nufj, neu’cv ogi i copaxuh ospralsouk hah damo raxn jubolowizeun.
Idlyacz ppu taxitiwo_letbuv vaj cfeg cfi obus ajfax. Sda peqakek azlferyoig furkazb ag u ter mebziynet rxlocx. Em pkeszk iz sfa jacubmubb om a niya, doixh sot twa zuq, ish gekwmuy ugapgmvery egwo aw me kra ufy op rwo nove. Svig, vimscumidi krih datu deqw zzo gen xumi fsar pmo inet azjin. Vui gaex fpe MIXWEHEGE xwel jo wqe kares haoyh’r ynuam dsi jxito kmemvradauk mjzorj ad u kimkqo detu.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.