https://bugs.documentfoundation.org/show_bug.cgi?id=169977
--- Comment #2 from Carlos R. Esp <[email protected]> --- Hello Julien, Thanks for your attention. First, does someone know if changing the REPCOUNT translation will also change automatically the translations written in the code of LibreLogo.py? Because in languages with variants and only one generic translation in LibreLogo (like Spanish), the interpreter uses these internal translations instead, so LibreLogo.py should be updated too if we change the translation. Second, I developed a solution for all the failing languages without changing any translation, for you to discuss: repcount = a['REPCOUNT'].split('|')[0] repcount = re.sub("[ .']", '_', repcount) # INSERT THIS LINE loopi = itertools.count() ... [r"(?<!:)\b(?:%s)\b" % a['FOR'], "\nfor"], [r"(?<!:)\b(?:%s)\b" % a['REPCOUNT'], repcount], # INSERT THIS LINE [r"(?<!:)\b(?:%s)\b" % a['REPEAT'], "\n__repeat__"], [r"(?<!:)\b(?:%s)\b" % a['BREAK'], "\nbreak"], [r"(?<!:)\b(?:%s)\b" % a['CONTINUE'], "\ncontinue"], [r"(?<!:)\b(?:%s)\b" % a['REPCOUNT'], repcount], # REMOVE THIS LINE [r"(?<!:)\b(?:%s)\b" % a['IF'], "\nif"], The first change affects the languages with a REPCOUNT translation including spaces (like Croatian or Oriya), dots (like Spanish) or apostrophes (Guarani), and makes an internal substitution of characters rejected by the interpreter with "_" and also prevents that a part of the name be replaced in posterior subtitutions (this happens in Spanish when "conteo" of "conteo.veces" is replaced by "len", and will not happen if "conteo_veces" or "conteoveces" were found). The second change is for the languages with a REPCOUNT translation wich is composed with the first translation of REPEAT (like Afrikaans, Catalan, Catalan-Valencian and Guarani), and causes that the occurrences of the translation of REPCOUNT be replaced before REPEAT, avoiding another error that prevents the users of these other languages to write loops in LibreLogo. I found another language, Kazakh, that has the same translation in REPCOUNT than in REPEAT, preventing the use of the counter REPCOUNT in LibreLogo programs in this language but unaffected by my proposal. Translating the Spanish REPCOUNT will fix LibreLogo loops in Spanish, which is great, but this proposal could fix it in Spanish and in these languages too without changing translations. Please consider it. -- You are receiving this mail because: You are the assignee for the bug.
