#!/usr/bin/env python3 from optparse import OptionParser import os.path import re import sys M = { 'juh': 'javaunohelper', 'jurt': 'jurt', 'officebean': 'bean', 'ridl': 'ridljar', 'unoil': 'unoil', 'unoloader': 'ridljar', 'libreoffice': 'ridljar', } parser = OptionParser() _, args = parser.parse_args() if not len(args): parser.error('not enough arguments') elif len(args) > 1: parser.error('too many arguments') DEST = r'\g<1>%s\g<3>' % args[0] def replace_in_file(filename, src_pattern): try: f = open(filename, "r") s = f.read() f.close() s = re.sub(src_pattern, DEST, s) f = open(filename, "w") f.write(s) f.close() except IOError as err: print('error updating %s: %s' % (filename, err), file=sys.stderr) src_pattern = re.compile(r'^(\s*)([-.@\w]+)(\s*)$', re.MULTILINE) for a in ['juh', 'jurt', 'libreoffice', 'officebean', 'ridl', 'unoil', 'unoloader']: replace_in_file(os.path.join(M[a], 'pom.%s.xml' % a), src_pattern) src_pattern = re.compile(r"^(LIBREOFFICE_VERSION = ')([-.@\w]+)(')$", re.MULTILINE) replace_in_file('solenv/maven/VERSION', src_pattern) cd-5.3-3.4'>distro/collabora/cd-5.3-3.4 LibreOffice 界面翻译代码仓库文档基金会
aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-14 16:45:12 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-14 16:46:56 +0100
commitf9607e1846ae6a05aad52980c2c02bc553d6c57b (patch)
tree7eab9af52c3675defe47874837598813102f75cd /source
parentd317414f8297e51842dc450bfaf5eeff5cb164ff (diff)
convert to gettext format
Change-Id: Ia83ea50b4c7feb94685cfa385094b3fbce8a4056
Diffstat (limited to 'source')