libreoffice/python34-no-f-strings.patch
Danilo Spinella b0d22f5c91 Accepting request 1239957 from home:dspinella:branches:LibreOffice:Factory
- Update bundled dependencies:
  * curl 8.10.1 -> 8.11.1
  * gpgme 1.23.2 -> 1.24.0
  * libgpg-error 1.50 -> 1.51

OBS-URL: https://build.opensuse.org/request/show/1239957
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=1204
2025-01-23 16:42:33 +00:00

48 lines
1.8 KiB
Diff

--- 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()