Read a file ang extract strings

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • J-L

    #1

    Read a file ang extract strings

    Hi,

    I need to read a file like this:

    # Messages français pour GNU gettext.
    # Copyright © 2006 Yoyodyne, Inc.
    # Michel Robitaille <robitail@IRO.U Montreal.CA>, 2006.
    # Christophe Combelles <ccomb@free.fr> , 2006
    #
    msgid ""
    msgstr ""
    "Project-Id-Version: GNU hello-pascal 0.15-pre5\n"
    "Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n"
    "PO-Revision-Date: 2006-10-01 02:29+0200\n"
    "Last-Translator: Christophe Combelles <ccomb@free.fr> \n"
    "Language-Team: French <traduc@traduc. org>\n"
    "MIME-Version: 1.0\n"
    "Content-Type: text/plain; charset=UTF-8\n"
    "Content-Transfer-Encoding: 8bit\n"
    "Plural-Forms: nplurals=2; plural=(n 1);\n"

    #: hello.hello_wor ld
    msgid "Hello, world!"
    msgstr "Bonjour, le monde !"

    #: hello.running_a s
    #, object-pascal-format
    msgid "This program is running as process number %d."
    msgstr "Ce programme est exécuté en tant que processus numéro %d."


    and get a sortedlist with all msgid as keyz and msgstr as values.
    "Hello, world!" = "Bonjour, le monde !"
    "This program is running as process number %d." = "Ce programme est
    exécuté en tant que processus numéro %d."

    What's the best solution to do this please ?

    Read all strings "one by one" ?

    Jean-Luc !


Working...