diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-04-22 09:22:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-04-22 20:09:18 +0200 |
commit | 9831d806ca7223058f74c61f4e1254c84464014d (patch) | |
tree | 8fa2c87f154bda246a70e54deebe3ac36d337711 | |
parent | 8ad0c29f56e5069a3679560d404b603332dcf38a (diff) |
Fix desktop-translate.py
...to not generate broken files relative to pre-
d2c23609083d7b3e5267b1e4c923476cbc509d00 "tdf#130911: convert desktop-translate
from Perl to Python", e.g.
> --- workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop
> +++ workdir/CustomTarget/sysui/share/libreoffice/startcenter.desktop
> @@ -25,13 +25,13 @@
> Exec=${UNIXBASISROOTNAME} %U
> MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis;
> Name=${PRODUCTNAME} ${PRODUCTVERSION}
> -GenericName=Office
> -GenericName[de]=Office
> +=Office
> +GenericNameGenericName[de]=Office
> GenericName[en]=Office
> GenericName[fi]=Toimisto
> GenericName[hu]=Iroda
> -Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> -Comment[de]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument-Format (ODF). Unterstützt von The Document Foundation.
> +=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> +CommentComment[de]=Die produktive Bürosoftware ist kompatibel zu dem offenen und standardisierten OpenDocument-Format (ODF). Unterstützt von The Document Foundation.
> Comment[en]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
> Comment[fi]=Avoimen ODF-asiakirjastandardin kanssa yhteensopiva, The Document Foundationin tukema toimisto-ohjelmisto.
> Comment[hu]=Az irodai programcsomag kompatibilis a nyílt és a szabványosított ODF dokumentumformátummal. A The Document Foundation támogatja.
(as captured with a `--with-lang=de en-US fi hu` build).
(The original solenv/bin/desktop-translate.pl had
> $keyline =~ s/^$key/$outkey/;
to replace key with outkey in keyline.)
Change-Id: I006e2a9cba5f91d41d925bc93949a4a975891008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92669
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | solenv/bin/desktop-translate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/solenv/bin/desktop-translate.py b/solenv/bin/desktop-translate.py index 6d5c074de7b0..38bf0a12942d 100644 --- a/solenv/bin/desktop-translate.py +++ b/solenv/bin/desktop-translate.py @@ -117,7 +117,7 @@ for template in templates: for line in template_file: keyline = line if keyline.startswith(o.key): - keyline = keyline[len(o.key):] + outkey + keyline = outkey + keyline[len(o.key):] outfile.write(keyline) if o.key in line: translations = templates[template]['translations'] |