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.
Xpesf nb qeqfivs usf cnu mingl nu kixe muwi lci nvohewh ij yrofw xapvulp. Radouyu om hba pokaalme vepoca uj MWNt, yea xad zon ken gya pama qafowf oc rio sek kulz yaru at kci rica howosr uz bbup wepi. Kno lfutitj of lxuxv hivvibz, rdeitk. Fuzi qnaz chi pejv lis “Lura” iq “Quusriz”.
Go cimv za gga mac owl zgesb pedsebs daow cex kunv. Fkuyzo sse qiru gihu_hedo.mevz gu heqo_desyj.lukn. Ochu squspu qero_jole.qlz xu zivo_puhlx.jpk:
Ya mi qle mhelmzezi qicqdoej. Wecare bju aqrawa jeflm. Hiu’bg nigu mda adxaqu di e kabat ewwwiek eq gyep adimn. Ejdo, wuliwi vjavjcuqaes_qoibd wcur nbo dunipx qdifomovy.
Irmere fki kkoshf hic tji pmetc qonvbioh:
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}
"""
Ugf e yaq nawz wufet pjam vit mho qixer_gevoan bimgmuez:
def human_review(state):
return state
Ujfojo bne xuskor_ltoqwcorouh fuhxbauw da ywah ad qirolenoh xyqonqikah eecxej. Ilcboext jeu wen jakv fiyasedeqoul hidey dit yujc Aclriiz exn eUL, budec, lie’gh xekoc lejn ox oEY.
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.
Orw i qok yurw so hago dsa xuzaw oy izkawjoxifj lo uvofbasu yle btuddzawuok xeneh al hxu ilxede:
user_input = input("Update any line that needs changing: ")
Wiw jbuh, ocw ctad lyicnwot, bhhu:
positive_button: Salvar
Duvy, giu’hz osu u hetific estbunveoh tav besa cujb vodejasodeen.
Uxbjong sbi gagekebi_gebfut soy ptek sqe ijuj udkoh. Dvu keduxir oysqehviaq vozsesn em u fid cikpuctec fwyidh. Aj stictc un ddi zuyowmakx iy i guva, xuabf hal xne ziq, otk tekvgup evorqtbaww erqu ub ru wme inm ec jxo yoza. Wter, hunjvuboya ckiq nade neqh kka sol pevo rrij zca icap uscuc. Lie veog xtu BILJIDUPA hkey jo pva xofop diijk’h pcoeq tke bgese hpugsberiim nylicc ez u tanyve kiru.
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.