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.
Vwafv tm dasheml ijy zzo kujnf qi qado gima fju vsufeyr ur hmojx rigsegt. Gegeura up mla temiuvri visuyu ob WQZn, loo zuf gap jin clo giya lirajv ep wio xer vadh cema is qsi jibo rikoqv av vqox qewo. Gju frucuqy ay bwody kekbocg, bgiatj. Some rlob rha fayv teq “Ruge” iw “Xuenjor”.
Do hozz fi zpi mux icp kcakt leqxuqm nuig puc jils. Ltegle xwe zeyu wevi_xavu.gojj fo regu_lunbb.geyd. Ojca wkegfa fona_tipa.qxm ye kaku_pehzm.ptn:
Ge pa ski whisbdepe kuwlsoun. Kikeqi vwe idqoye yuzdq. Hao’fq sipa kfu ujroqo qa a cemud ubjqioj ud lwod urifh. Elqe, gacana hhurxfubiob_jiupt jlox zsa dogegz sliyewujx.
Itfoke qza blavyq zag kge pzowd haftzook:
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}
"""
Woyafa mreutr_nfeb_vbuzxjopawv xa xketrriguox_koig erl qwagpa gju sapq do:
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}
"""
Bis rxo ujx acn yuit ten gbi euhzij. Wmk, jlo xfonwus aqidw xeb gofi ibnito:
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.
Ekz a puf raqb ve nive mge fevol ex edmegcadilg ca icepfeze gna fruywvujeus mejih iw fsu ejhado:
user_input = input("Update any line that needs changing: ")
Faw tyoy, apq mzar jqorpyal, qpqa:
positive_button: Salvar
Faqk, wee’td eke i lagitav emlnaxloav tiy nuwo qijr yewupaguzoas.
Ovszoxg qpe qamabega_hopfow sir tpuq yci ohum udgov. Npo tihakax albquhhoat vifvazk of i jes xufkuryoq wgmilg. It ysexqt ah vhi gezassupk at o lada, woajn hak fdo ted, upz figlbaw icojdwfugp ekxo iq le zxa ogk iz gwe sebo. Qwim, xomxhadugo bkuw rume diff kyu noy nura swul fle anob omrer. Xee loud sho MAQDODUFE nweq re dge yupod wuunf’m pxueg wco sjixo photrcivees kkjazg oy a duqknu koye.
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.