Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-*- coding: utf-8 -*-
- import isbn
- import codecs
- import pywikibot
- f = codecs.open('i18n/isbn.py', 'w', 'utf-8')
- print >>f,"# coding=utf-8"
- print >>f,"msg = {"
- for lang in pywikibot.getSite().family.languages_by_size:
- print >>f, u"'%s': {" % lang
- for src, name in [(isbn.msg,'isbn-formatting'),]:
- if lang in src:
- trans = src[lang].replace("'", "\\'")
- if name == "category-was-moved":
- trans=trans.replace("%s", "%(newcat)s", 1).replace("%s", "%(title)s", 1)
- print >>f,u"'" + name + "': u'" + trans + "',"
- print >>f, u"},"
- print >>f,"}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement