@@ -276,15 +276,9 @@ def collect_root_files(docs_dir: Path) -> list[Path]:
276276def main ():
277277 import argparse
278278
279- < << << << Updated upstream
280279 t0 = time .time ()
281280
282281 parser = argparse .ArgumentParser (description = "Translate docs from zh-CN to all target languages" )
283- == == == =
284- parser = argparse .ArgumentParser (
285- description = "Translate docs from zh-CN to all target languages"
286- )
287- >> >> >> > Stashed changes
288282 parser .add_argument ("--output-dir" , type = Path , default = DOCS_DIR )
289283 parser .add_argument (
290284 "--languages" , nargs = "*" , default = None , help = "Target languages (default: all)"
@@ -314,15 +308,8 @@ def main():
314308
315309 if args .dry_run :
316310 for f in src_files :
317- < << << << Updated upstream
318311 print (f" { f .relative_to (args .output_dir )} " , flush = True )
319312 print (f"\n Would translate { len (src_files )} files × { len (langs )} languages = { len (src_files ) * len (langs )} translations" , flush = True )
320- == == == =
321- print (f" { f .relative_to (args .output_dir )} " )
322- print (
323- f"\n Would translate { len (src_files )} files × { len (langs )} languages = { len (src_files ) * len (langs )} translations"
324- )
325- >> >> >> > Stashed changes
326313 return
327314
328315 stats = {"translated" : 0 , "cached" : 0 , "failed" : 0 }
@@ -370,7 +357,6 @@ def main():
370357 print (f" ✗ FAILED ({ dt :.1f} s)" , flush = True )
371358 time .sleep (0.3 )
372359
373- < << << << Updated upstream
374360 lang_dt = time .time () - lang_t0
375361 print (f" { lang } done: { lang_translated } translated, { lang_cached } cached ({ lang_dt :.1f} s)" , flush = True )
376362
@@ -380,11 +366,6 @@ def main():
380366 print (f" translated={ stats ['translated' ]} cached={ stats ['cached' ]} failed={ stats ['failed' ]} " , flush = True )
381367 print (f" LLM calls={ llm_calls } " , flush = True )
382368 print (f"{ '=' * 40 } " , flush = True )
383- == == == =
384- print (
385- f"\n Translation complete: translated={ stats ['translated' ]} cached={ stats ['cached' ]} failed={ stats ['failed' ]} "
386- )
387- >> >> >> > Stashed changes
388369
389370
390371if __name__ == "__main__" :
0 commit comments