bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in po-mode?


From: Rasmus Resen Amossen
Subject: bug in po-mode?
Date: Wed, 28 Aug 2002 11:10:11 +0200 (CEST)

I'm having troubles with the po-mode in pluralfors. The following is 
exactely what I do:
I first create a .php file:

-----file start-----
<?
bindtextdomain("messages","./po");
textdomain("messages");
print(_("Hello World!")."\n<br><br>\n");
print(_("Hi there!")."\n<br><br>\n");
print(sprintf(ngettext("Here is % banana","Here is %s bananas",1),1));
print("<br>");
print(sprintf(ngettext("Here is % banana","Here is %s bananas",2),2));
?>
-----file end-----

I then run "xgettext --keyword=_ -i locale.php". This generates the 
file "messages.po" (why not "messages.pot"?):

-----file start-----
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <address@hidden>, YEAR.
#
#, fuzzy
msgid   ""
msgstr  "Project-Id-Version: PACKAGE VERSION\n"
        "POT-Creation-Date: 2002-08-28 11:00+0200\n"
        "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
        "Last-Translator: FULL NAME <address@hidden>\n"
        "Language-Team: LANGUAGE <address@hidden>\n"
        "MIME-Version: 1.0\n"
        "Content-Type: text/plain; charset=CHARSET\n"
        "Content-Transfer-Encoding: 8bit\n"
        "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: locale.php:4
msgid   "Hello World!"
msgstr  ""

#: locale.php:5
msgid   "Hi there!"
msgstr  ""

#: locale.php:6 locale.php:8
msgid   "Here is % banana"
msgid_plural    "Here is %s bananas"
msgstr[0]       ""
msgstr[1]       ""
-----file end-----


Now I run "msginit -lda_DK -i messages.po" which generates the file "da.po":

-----file start-----
# Danish translations for PACKAGE package
# Danske oversættelser for pakke PACKAGE.
# Copyright (C) 2002 THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Rasmus Resen Amossen <address@hidden>, 2002.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2002-08-28 11:00+0200\n"
"PO-Revision-Date: 2002-08-28 11:01+0200\n"
"Last-Translator: Rasmus Resen Amossen <address@hidden>\n"
"Language-Team: Danish <address@hidden>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: locale.php:4
msgid "Hello World!"
msgstr ""

#: locale.php:5
msgid "Hi there!"
msgstr ""

#: locale.php:6 locale.php:8
msgid "Here is % banana"
msgid_plural "Here is %s bananas"
msgstr[0] ""
msgstr[1] ""
-----file end-----


The problem is now that po-mode WON'T let me edit the "msgstr[1]". If I try 
to (place the curser on "msgstr[1] and press ENTER"), Emacs comes with the 
following error:

-----Error start-----
Search failed: "^\\(#~[         ]*\\)?msgid.*
\\(\\(#~[       ]*\\)?\".*
\\)*"
-----Error end-----

What to do?

By the way: If there are more than 2 pluralis forms given in the "Plural-
Forms" header tag, how can I create all the msgstr[N]-tags needed for 
these? I have only been able to create msgstr[0] and msgstr[1].

Thanks!

Rasmus Resen Amossen






reply via email to

[Prev in Thread] Current Thread [Next in Thread]