[Zope3-checkins] CVS: Products3/demo/messageboard/step9/locales - extract.py:1.1 messageboard.pot:1.1

Stephan Richter srichter@cosmos.phy.tufts.edu
Tue, 15 Jul 2003 17:43:56 -0400


Update of /cvs-repository/Products3/demo/messageboard/step9/locales
In directory cvs.zope.org:/tmp/cvs-serv2533/locales

Added Files:
	extract.py messageboard.pot 
Log Message:
Step 9: Online Help completed.


=== Added File Products3/demo/messageboard/step9/locales/extract.py ===
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Message id extraction script

This script extracts translatable strings and creates a single
messageboard.pot file.

$Id: extract.py,v 1.1 2003/07/15 21:43:51 srichter Exp $
"""

import os, sys, fnmatch
from zope.tal import talgettext
from zope.app.translation_files import pygettext


usage = """python extract.py
"""

def messageboard_dir():
    import zopeproducts.messageboard
    return os.path.dirname(zopeproducts.messageboard.__file__)


def find_files(dir, pattern, exclude=()):
    files = []
    def visit(files, dirname, names):
        files += [os.path.join(dirname, name)
                  for name in fnmatch.filter(names, pattern)
                  if name not in exclude]
        
    os.path.walk(dir, visit, files)

    return files


def main(argv=sys.argv):
    dir = messageboard_dir()
    sys.argv[1:] = ['-omessageboard.pot',]+find_files(dir, '*.py',
                                              exclude=["pygettext.py"])
    pygettext.main()
    sys.argv[1:] = ['-umessageboard.pot',
                    '-omessageboard.pot',]+find_files(dir, '*.pt')
    talgettext.main()


if __name__ == '__main__':
    main()


=== Added File Products3/demo/messageboard/step9/locales/messageboard.pot ===
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: Thu Jul 10 10:27:47 2003\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
"Generated-By: pygettext.py 1.4\n"


#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/fields.py:26
msgid "Forbidden HTML Tags used."
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:37
msgid "Description"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:38
msgid "A detailed description of the content of the board."
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:47
msgid "Title/Subject"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:48
msgid "Title and/or subject of the message."
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:53
msgid "Message Body"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:54
msgid "This is the actual message. Type whatever!"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:67
msgid "Allowed HTML Tags"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:68
msgid ""
"        Listed tags can be used in the value of the field.\n"
"        "
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:74
msgid "Forbidden HTML Tags"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/interfaces.py:75
msgid ""
"        Listed tags cannot be used in the value of the field.\n"
"        "
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/message.py:80
msgid "1 reply"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/message.py:81
msgid "${messages} replies"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/message.py:83
msgid ", 1 attachment"
msgstr ""

#:
#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/message.py:84
msgid ", ${attach} attachments"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/add.pt:8
msgid "Add Content"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:13
msgid "Author"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:32
msgid "Body"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:18
msgid "Date/Time"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/thread.pt:5
msgid "Discussion Thread"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:5
msgid "Message Details"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:23
msgid "Parent"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/details.pt:8
msgid "Title"
msgstr ""

#: /home/srichter/Zope3/Zope3-Cookbook/src/zopeproducts/messageboard/browser/add.pt:65
msgid "add-button"
msgstr ""