--- libreoffice-7.6.0.1/solenv/bin/desktop-translate.py 2023-08-08 19:29:16.088847384 +0200 +++ libreoffice-7.6.0.1/solenv/bin/desktop-translate.py 2023-08-08 19:36:37.413324064 +0200 @@ -62,7 +62,7 @@ o = parser.parse_args() if o.template_dir is None: - template_dir = f"{o.workdir}/{o.prefix}" + template_dir = '{}/{}'.format(o.workdir, o.prefix) else: template_dir = o.template_dir @@ -85,7 +85,7 @@ entry = {} # For every section in the specified ulf file there should exist # a template file in $workdir .. - entry["outfile"] = f"{template_dir}{template}.{o.ext}" + entry["outfile"] = "{}{}.{}".format(template_dir, template, o.ext) entry["translations"] = {} entry["key"] = key templates[heading] = entry @@ -130,12 +130,12 @@ if o.ext == "str": continue sys.exit( - f"Warning: No template found for item '{template}' : '{outfilename}'\n" + "Warning: No template found for item '{}' : '{}'\n".format(template, outfilename) ) processed += 1 # open output file - tmpfilename = f"{outfilename}.tmp" + tmpfilename = '{}.tmp'.format(outfilename) outfile = io.open(tmpfilename, "w", encoding="utf-8") # emit the template to the output file @@ -157,9 +157,9 @@ if o.ext in ("desktop", "str"): if o.ext == "desktop": value = encode_desktop_string(value) - outfile.write(f"{OUTKEY}[{locale}]={value}\n") + outfile.write("{}[{}]={}\n".format(OUTKEY, locale, value)) else: - outfile.write(f"\t[{locale}]{OUTKEY}={value}\n") + outfile.write("\t[{}]{}={}\n".format(locale, OUTKEY, value)) template_file.close()