From bd9e6617827818fd043452c08c606f07b78014a0 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- scripts/zonetab2pot.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 scripts/zonetab2pot.py (limited to 'scripts/zonetab2pot.py') diff --git a/scripts/zonetab2pot.py b/scripts/zonetab2pot.py new file mode 100755 index 00000000..2549e8e6 --- /dev/null +++ b/scripts/zonetab2pot.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python +'''This script reads timezone list as its first argument +or from /usr/share/zoneinfo/zone.tab, and converts it +to a PO file template. + +This is free software, released under GPL. +Author: Lukas Tinkl , 2002 +''' + +import sys +import fileinput +import string + +def makePOT(_file): + for line in fileinput.input(_file): + if (line[0]=='#'): #skip comments + continue + section=string.split(string.strip(line), '\t')[2] #third field, tab separated + newline='msgid \"' + section+ '\"\n' #msgid + newline+='msgstr \"\"\n' #msgstr + print(newline) #output to stdout + +if __name__ == '__main__': + makePOT(sys.argv[1:] or "/usr/share/zoneinfo/zone.tab") -- cgit v1.2.1