#!/usr/bin/python import polib import binascii import getopt import sys import os.path from subprocess import check_output try: myopts, args = getopt.getopt(sys.argv[1:], "i:o:") except getopt.GetoptError as e: print(" Syntax: hrcex -i FileIn -o FileOut") print(" FileIn: Source files (*.ui)") print(" FileOut: Destination file (*.*)") sys.exit(2) for o, a in myopts: if o == '-i': ifile = a elif o == '-o': ofile = a with open(ofile, "a") as output: input = check_output(["xgettext", "-C", "--add-comments", "--keyword=NC_:1c,2", "--keyword=NNC_:1c,2,3", "--from-code=UTF-8", "--no-wrap", ifile, "-o", "-"]) po = polib.pofile(input) if len(po) != 0: print >> output, "" for entry in po: keyid = entry.msgctxt + '|' + entry.msgid print >> output, '#. ' + polib.genKeyId(keyid) for i, occurrence in enumerate(entry.occurrences): entry.occurrences[i] = os.path.relpath(occurrence[0], os.environ['SRCDIR']), occurrence[1] print >> output, entry 4'>distro/allotropia/zeta-7-4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorGabor Kelemen <kelemeng@ubuntu.com>2018-04-19 01:05:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-20 09:00:44 +0200
commit663fd3d6e1f93ec989dc289e688d5dbfe434cbca (patch)
treebdcdae8456be4bc375ea903a856d8c8fd477362e /uui
parent73584b2342b4e527b5329b4bf779171c4fc2d4ce (diff)
tdf#42949 Remove unnecessary localization headers of svtools
Found by searching for the header names and the localization function: git grep -l -e \<svtools/svtresid.hxx\> -e \<svtools/strings.hrc\> | xargs grep -c SvtResId | grep :0$ | grep -v /pch Change-Id: I861fed778660412dc73616da29503538b3fe9ccb Reviewed-on: https://gerrit.libreoffice.org/53136 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>