From confirm-s2-xKRVCIB9FnSyztuVV2WYFW3tpFw-i18n-sig=python.org@yahoogroups.com Mon Nov 4 01:32:42 2002 From: confirm-s2-xKRVCIB9FnSyztuVV2WYFW3tpFw-i18n-sig=python.org@yahoogroups.com (Yahoo! Groups) Date: 4 Nov 2002 01:32:42 -0000 Subject: [I18n-sig] Please confirm your request to join locales Message-ID: <1036373562.44.14900.w37@yahoogroups.com> Hello i18n-sig@python.org, We have received your request to join the locales group hosted by Yahoo! Groups, a free, easy-to-use community service. This request will expire in 21 days. TO BECOME A MEMBER OF THE GROUP: 1) Go to the Yahoo! Groups site by clicking on this link: http://groups.yahoo.com/i?i=xKRVCIB9FnSyztuVV2WYFW3tpFw&e=i18n-sig%40python%2Eorg (If clicking doesn't work, "Cut" and "Paste" the line above into your Web browser's address bar.) -OR- 2) REPLY to this email by clicking "Reply" and then "Send" in your email program If you did not request, or do not want, a membership in the locales group, please accept our apologies and ignore this message. Regards, Yahoo! Groups Customer Care Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ From jankowska@euv-frankfurt-o.de Mon Nov 4 17:02:41 2002 From: jankowska@euv-frankfurt-o.de (Ania Jankowska) Date: Mon, 4 Nov 2002 18:02:41 +0100 Subject: [I18n-sig] RE: I18n-sig digest, Vol 1 #331 - 1 msg In-Reply-To: <20021104170004.14080.1154.Mailman@mail.python.org> Message-ID: -----Original Message----- From: i18n-sig-admin@python.org [mailto:i18n-sig-admin@python.org]On Behalf Of i18n-sig-request@python.org Sent: Monday, November 04, 2002 6:00 PM To: i18n-sig@python.org Subject: I18n-sig digest, Vol 1 #331 - 1 msg Send I18n-sig mailing list submissions to i18n-sig@python.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.python.org/mailman/listinfo/i18n-sig or, via email, send a message with subject or body 'help' to i18n-sig-request@python.org You can reach the person managing the list at i18n-sig-admin@python.org When replying, please edit your Subject line so it is more specific than "Re: Contents of I18n-sig digest..." Today's Topics: 1. Please confirm your request to join locales (Yahoo! Groups) --__--__-- Message: 1 Date: 4 Nov 2002 01:32:42 -0000 From: Yahoo! Groups Reply-To: confirm-s2-xKRVCIB9FnSyztuVV2WYFW3tpFw-i18n-sig=python.org@yahoogroups.com To: i18n-sig@python.org Subject: [I18n-sig] Please confirm your request to join locales Hello i18n-sig@python.org, We have received your request to join the locales group hosted by Yahoo! Groups, a free, easy-to-use community service. This request will expire in 21 days. TO BECOME A MEMBER OF THE GROUP: 1) Go to the Yahoo! Groups site by clicking on this link: http://groups.yahoo.com/i?i=xKRVCIB9FnSyztuVV2WYFW3tpFw&e=i18n-sig%40python% 2Eorg (If clicking doesn't work, "Cut" and "Paste" the line above into your Web browser's address bar.) -OR- 2) REPLY to this email by clicking "Reply" and then "Send" in your email program If you did not request, or do not want, a membership in the locales group, please accept our apologies and ignore this message. Regards, Yahoo! Groups Customer Care Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ --__--__-- _______________________________________________ I18n-sig mailing list I18n-sig@python.org http://mail.python.org/mailman/listinfo/i18n-sig End of I18n-sig Digest From j-david@noos.fr Mon Nov 4 22:44:47 2002 From: j-david@noos.fr (=?ISO-8859-1?Q?Juan_David_Ib=E1=F1ez_Palomar?=) Date: Mon, 04 Nov 2002 23:44:47 +0100 Subject: [I18n-sig] plural forms (patch) Message-ID: <3DC6F85F.6060804@noos.fr> This is a multi-part message in MIME format. --------------060608070102070508020001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hi, Attached is the patch to gettext.py and a new test_gettext.py file. The file "test/output/test_gettext" should be removed. The most ugly part is the plural expression transformation from C to Python (see the function c2py), if somebody wants to look at it.. anyway, the test pass. There's however an issue, as far as I know there isn't any tool able to parse Python plural forms, though, I only tried xgettext. It remains to update the documentation, I'll do it by the end of this month. By the way, I would like to get more involved in the development of Python, where should I ask for CVS write access and subscription to the python-dev mailing list? Maybe I could commit the gettext changes myself. Best regards, -- J. David Ibáñez, http://www.j-david.net Software Engineer / Ingénieur Logiciel / Ingeniero de Software --------------060608070102070508020001 Content-Type: text/plain; name="gettext.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gettext.diff" 34a35,36 > # J. David Ibanez implemented plural forms. > # 46,49c48,49 < import os < import sys < import struct < import copy --- > > import copy, os, re, struct, sys 51a52 > 57a59,108 > def test(condition, true, false): > """ > Implements the C expression: > > condition ? true : false > > Required to correctly interpret plural forms. > """ > if condition: > return true > else: > return false > > > def c2py(plural): > """ > Gets a C expression as used in PO files for plural forms and > returns a Python lambda function that implements an equivalent > expression. > """ > plural = plural.replace('&&', ' and ') > plural = plural.replace('||', ' or ') > > expr = re.compile(r'\![^=]') > plural = expr.sub(' not ', plural) > > # Regular expression and replacement function used to transform > # "a?b:c" to "test(a,b,c)". > expr = re.compile(r'(.*?)\?(.*?):(.*)') > def repl(x): > return "test(%s, %s, %s)" % (x.group(1), x.group(2), > expr.sub(repl, x.group(3))) > > # Code to transform the plural expression, taking care of parentheses > stack = [''] > for c in plural: > if c == '(': > stack.append('') > elif c == ')': > if len(stack) == 0: > raise ValueError, 'unbalanced parenthesis in plural form' > s = expr.sub(repl, stack.pop()) > stack[-1] += '(%s)' % s > else: > stack[-1] += c > plural = expr.sub(repl, stack.pop()) > > return eval('lambda n: int(%s)' % plural) > > 123a175,182 > def ngettext(self, msgid1, msgid2, n): > if self._fallback: > return self._fallback.ngettext(msgid1, msgid2, n) > if n == 1: > return msgid1 > else: > return msgid2 > 128a188,195 > def ungettext(self, msgid1, msgid2, n): > if self._fallback: > return self._fallback.ungettext(msgid1, msgid2, n) > if n == 1: > return unicode(msgid1) > else: > return unicode(msgid2) > 171a239 > msg = buf[moff:mend] 173c241,248 < catalog[buf[moff:mend]] = tmsg --- > if msg.find('\x00') >= 0: > # Plural forms > msgid1, msgid2 = msg.split('\x00') > tmsg = tmsg.split('\x00') > for i in range(len(tmsg)): > catalog[(msgid1, i)] = tmsg[i] > else: > catalog[msg] = tmsg 188a264,269 > elif k == 'plural-forms': > v = v.split(';') > ## nplurals = v[0].split('nplurals=')[1] > ## nplurals = int(nplurals.strip()) > plural = v[1].split('plural=')[1] > self.plural = c2py(plural) 200a282,294 > > def ngettext(self, msgid1, msgid2, n): > try: > return self._catalog[(msgid1, self.plural(n))] > except KeyError: > if self._fallback: > return self._fallback.ngettext(msgid1, msgid2, n) > if n == 1: > return msgid1 > else: > return msgid2 > > 210a305,316 > def ungettext(self, msgid1, msgid2, n): > try: > tmsg = self._catalog[(msgid1, self.plural(n))] > except KeyError: > if self._fallback: > return self._fallback.ungettext(msgid1, msgid2, n) > if n == 1: > tmsg = msgid1 > else: > tmsg = msgid2 > return unicode(tmsg, self._charset) > 313a420,430 > def dngettext(domain, msgid1, msgid2, n): > try: > t = translation(domain, _localedirs.get(domain, None)) > except IOError: > if n == 1: > return msgid1 > else: > return msgid2 > return t.ngettext(msgid1, msgid2, n) > > 317a435,438 > def ngettext(msgid1, msgid2, n): > return dngettext(_current_domain, msgid1, msgid2, n) > > --------------060608070102070508020001 Content-Type: text/plain; name="test_gettext.py" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="test_gettext.py" import os import base64 import gettext import unittest from unittest import TestCase # TODO: # - Add new tests, for example for "dgettext" # - Remove dummy tests, for example testing for single and double quotes # has no sense, it would have if we were testing a parser (i.e. pygettext) # - Tests should have only one assert. GNU_MO_DATA = '''\ 3hIElQAAAAAGAAAAHAAAAEwAAAALAAAAfAAAAAAAAACoAAAAFQAAAKkAAAAjAAAAvwAAAKEAAADj AAAABwAAAIUBAAALAAAAjQEAAEUBAACZAQAAFgAAAN8CAAAeAAAA9gIAAKEAAAAVAwAABQAAALcD AAAJAAAAvQMAAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABQAAAAYAAAACAAAAAFJh eW1vbmQgTHV4dXJ5IFlhY2gtdABUaGVyZSBpcyAlcyBmaWxlAFRoZXJlIGFyZSAlcyBmaWxlcwBU aGlzIG1vZHVsZSBwcm92aWRlcyBpbnRlcm5hdGlvbmFsaXphdGlvbiBhbmQgbG9jYWxpemF0aW9u CnN1cHBvcnQgZm9yIHlvdXIgUHl0aG9uIHByb2dyYW1zIGJ5IHByb3ZpZGluZyBhbiBpbnRlcmZh Y2UgdG8gdGhlIEdOVQpnZXR0ZXh0IG1lc3NhZ2UgY2F0YWxvZyBsaWJyYXJ5LgBtdWxsdXNrAG51 ZGdlIG51ZGdlAFByb2plY3QtSWQtVmVyc2lvbjogMi4wClBPLVJldmlzaW9uLURhdGU6IDIwMDAt MDgtMjkgMTI6MTktMDQ6MDAKTGFzdC1UcmFuc2xhdG9yOiBKLiBEYXZpZCBJYsOhw7FleiA8ai1k YXZpZEBub29zLmZyPgpMYW5ndWFnZS1UZWFtOiBYWCA8cHl0aG9uLWRldkBweXRob24ub3JnPgpN SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9aXNvLTg4 NTktMQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBub25lCkdlbmVyYXRlZC1CeTogcHlnZXR0 ZXh0LnB5IDEuMQpQbHVyYWwtRm9ybXM6IG5wbHVyYWxzPTI7IHBsdXJhbD1uIT0xOwoAVGhyb2F0 d29iYmxlciBNYW5ncm92ZQBIYXkgJXMgZmljaGVybwBIYXkgJXMgZmljaGVyb3MAR3V2ZiB6YnFo eXIgY2ViaXZxcmYgdmFncmVhbmd2YmFueXZtbmd2YmEgbmFxIHlicG55dm1uZ3ZiYQpmaGNjYmVn IHNiZSBsYmhlIENsZ3ViYSBjZWJ0ZW56ZiBvbCBjZWJpdnF2YXQgbmEgdmFncmVzbnByIGdiIGd1 ciBUQUgKdHJnZ3JrZyB6cmZmbnRyIHBuZ255YnQgeXZvZW5lbC4AYmFjb24Ad2luayB3aW5rAA== ''' LOCALEDIR = os.path.join('xx', 'LC_MESSAGES') MOFILE = os.path.join(LOCALEDIR, 'gettext.mo') def setup(): os.makedirs(LOCALEDIR) fp = open(MOFILE, 'wb') fp.write(base64.decodestring(GNU_MO_DATA)) fp.close() os.environ['LANGUAGE'] = 'xx' def teardown(): os.environ['LANGUAGE'] = 'en' os.unlink(MOFILE) os.removedirs(LOCALEDIR) class GettextTestCase1(TestCase): def setUp(self): self.localedir = os.curdir self.mofile = MOFILE gettext.install('gettext', self.localedir) def test_some_translations(self): # test some translations assert _('albatross') == 'albatross' assert _(u'mullusk') == 'bacon' assert _(r'Raymond Luxury Yach-t') == 'Throatwobbler Mangrove' assert _(ur'nudge nudge') == 'wink wink' def test_double_quotes(self): # double quotes assert _("albatross") == 'albatross' assert _(u"mullusk") == 'bacon' assert _(r"Raymond Luxury Yach-t") == 'Throatwobbler Mangrove' assert _(ur"nudge nudge") == 'wink wink' def test_triple_single_quotes(self): # triple single quotes assert _('''albatross''') == 'albatross' assert _(u'''mullusk''') == 'bacon' assert _(r'''Raymond Luxury Yach-t''') == 'Throatwobbler Mangrove' assert _(ur'''nudge nudge''') == 'wink wink' def test_triple_double_quotes(self): # triple double quotes assert _("""albatross""") == 'albatross' assert _(u"""mullusk""") == 'bacon' assert _(r"""Raymond Luxury Yach-t""") == 'Throatwobbler Mangrove' assert _(ur"""nudge nudge""") == 'wink wink' def test_multiline_strings(self): # multiline strings assert _('''This module provides internationalization and localization support for your Python programs by providing an interface to the GNU gettext message catalog library.''') == '''Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH trggrkg zrffntr pngnybt yvoenel.''' def test_the_alternative_interface(self): # test the alternative interface fp = open(os.path.join(self.mofile), 'rb') t = gettext.GNUTranslations(fp) fp.close() t.install() assert _('nudge nudge') == 'wink wink' # try unicode return type t.install(unicode=1) assert _('mullusk') == 'bacon' class GettextTestCase2(TestCase): def setUp(self): self.localedir = os.curdir gettext.bindtextdomain('gettext', self.localedir) gettext.textdomain('gettext') self._ = gettext.gettext def test_bindtextdomain(self): assert gettext.bindtextdomain('gettext') == self.localedir def test_textdomain(self): assert gettext.textdomain() == 'gettext' def test_some_translations(self): # test some translations assert self._('albatross') == 'albatross' assert self._(u'mullusk') == 'bacon' assert self._(r'Raymond Luxury Yach-t') == 'Throatwobbler Mangrove' assert self._(ur'nudge nudge') == 'wink wink' def test_double_quotes(self): # double quotes assert self._("albatross") == 'albatross' assert self._(u"mullusk") == 'bacon' assert self._(r"Raymond Luxury Yach-t") == 'Throatwobbler Mangrove' assert self._(ur"nudge nudge") == 'wink wink' def test_triple_single_quotes(self): # triple single quotes assert self._('''albatross''') == 'albatross' assert self._(u'''mullusk''') == 'bacon' assert self._(r'''Raymond Luxury Yach-t''') == 'Throatwobbler Mangrove' assert self._(ur'''nudge nudge''') == 'wink wink' def test_triple_double_quotes(self): # triple double quotes assert self._("""albatross""") == 'albatross' assert self._(u"""mullusk""") == 'bacon' assert self._(r"""Raymond Luxury Yach-t""") == 'Throatwobbler Mangrove' assert self._(ur"""nudge nudge""") == 'wink wink' def test_multiline_strings(self): # multiline strings assert self._('''This module provides internationalization and localization support for your Python programs by providing an interface to the GNU gettext message catalog library.''') == '''Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH trggrkg zrffntr pngnybt yvoenel.''' class PluralFormsTestCase(TestCase): def setUp(self): self.mofile = MOFILE def test_plural_forms1(self): x = gettext.ngettext('There is %s file', 'There are %s files', 1) assert x == 'Hay %s fichero' x = gettext.ngettext('There is %s file', 'There are %s files', 2) assert x == 'Hay %s ficheros' def test_plural_forms2(self): fp = open(os.path.join(self.mofile), 'rb') t = gettext.GNUTranslations(fp) fp.close() x = t.ngettext('There is %s file', 'There are %s files', 1) assert x == 'Hay %s fichero' x = t.ngettext('There is %s file', 'There are %s files', 2) assert x == 'Hay %s ficheros' def test_hu(self): f = gettext.c2py('0') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" def test_de(self): f = gettext.c2py('n != 1') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "10111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" def test_fr(self): f = gettext.c2py('n>1') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "00111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" def test_gd(self): f = gettext.c2py('n==1 ? 0 : n==2 ? 1 : 2') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "20122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" def test_gd2(self): # Tests the combination of parentheses and "?:" f = gettext.c2py('n==1 ? 0 : (n==2 ? 1 : 2)') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "20122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222" def test_lt(self): f = gettext.c2py('n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "20111111112222222222201111111120111111112011111111201111111120111111112011111111201111111120111111112011111111222222222220111111112011111111201111111120111111112011111111201111111120111111112011111111" def test_ru(self): f = gettext.c2py('n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "20111222222222222222201112222220111222222011122222201112222220111222222011122222201112222220111222222011122222222222222220111222222011122222201112222220111222222011122222201112222220111222222011122222" def test_pl(self): f = gettext.c2py('n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "20111222222222222222221112222222111222222211122222221112222222111222222211122222221112222222111222222211122222222222222222111222222211122222221112222222111222222211122222221112222222111222222211122222" def test_sl(self): f = gettext.c2py('n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3') s = ''.join([ str(f(x)) for x in range(200) ]) assert s == "30122333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333012233333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333" if __name__ == '__main__': try: setup() unittest.main() finally: teardown() # For reference, here's the .po file used to created the .mo data above. # # The original version was automatically generated from the sources with # pygettext. Later it was manually modified to add plural forms support. ''' # Dummy translation for Python's test_gettext.py module. # Copyright (C) 2001 Python Software Foundation # Barry Warsaw , 2000. # msgid "" msgstr "" "Project-Id-Version: 2.0\n" "PO-Revision-Date: 2000-08-29 12:19-04:00\n" "Last-Translator: J. David Ibanez \n" "Language-Team: XX \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.1\n" "Plural-Forms: nplurals=2; plural=n!=1;\n" #: test_gettext.py:19 test_gettext.py:25 test_gettext.py:31 test_gettext.py:37 #: test_gettext.py:51 test_gettext.py:80 test_gettext.py:86 test_gettext.py:92 #: test_gettext.py:98 msgid "nudge nudge" msgstr "wink wink" #: test_gettext.py:16 test_gettext.py:22 test_gettext.py:28 test_gettext.py:34 #: test_gettext.py:77 test_gettext.py:83 test_gettext.py:89 test_gettext.py:95 msgid "albatross" msgstr "" #: test_gettext.py:18 test_gettext.py:24 test_gettext.py:30 test_gettext.py:36 #: test_gettext.py:79 test_gettext.py:85 test_gettext.py:91 test_gettext.py:97 msgid "Raymond Luxury Yach-t" msgstr "Throatwobbler Mangrove" #: test_gettext.py:17 test_gettext.py:23 test_gettext.py:29 test_gettext.py:35 #: test_gettext.py:56 test_gettext.py:78 test_gettext.py:84 test_gettext.py:90 #: test_gettext.py:96 msgid "mullusk" msgstr "bacon" #: test_gettext.py:40 test_gettext.py:101 msgid "" "This module provides internationalization and localization\n" "support for your Python programs by providing an interface to the GNU\n" "gettext message catalog library." msgstr "" "Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba\n" "fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH\n" "trggrkg zrffntr pngnybt yvoenel." # Manually added, as neither pygettext nor xgettext support plural forms # in Python. msgid "There is %s file" msgid_plural "There are %s files" msgstr[0] "Hay %s fichero" msgstr[1] "Hay %s ficheros" ''' --------------060608070102070508020001-- From barry@python.org Mon Nov 4 22:55:05 2002 From: barry@python.org (Barry A. Warsaw) Date: Mon, 4 Nov 2002 17:55:05 -0500 Subject: [I18n-sig] plural forms (patch) References: <3DC6F85F.6060804@noos.fr> Message-ID: <15814.64201.327453.173516@gargle.gargle.HOWL> >>>>> "JDIP" =3D=3D Juan David Ib=E1=F1ez Palomar wri= tes: JDIP> Attached is the patch to gettext.py and a new JDIP> test_gettext.py file. The file "test/output/test_gettext" JDIP> should be removed. There's a problem with the patch. You need to provide either unified diffs or context 2 diffs. Personally I prefer unified, but either would be better than simply "diff". JDIP> There's however an issue, as far as I know there isn't any JDIP> tool able to parse Python plural forms, though, I only tried JDIP> xgettext. See if you can extend Tools/i18n/pygettext.py to parse them. JDIP> It remains to update the documentation, I'll do it by the JDIP> end of this month. Cool. -Barry From j-david@noos.fr Mon Nov 4 23:51:12 2002 From: j-david@noos.fr (=?ISO-8859-1?Q?Juan_David_Ib=E1=F1ez_Palomar?=) Date: Tue, 05 Nov 2002 00:51:12 +0100 Subject: [I18n-sig] plural forms (patch) References: <3DC6F85F.6060804@noos.fr> <15814.64201.327453.173516@gargle.gargle.HOWL> Message-ID: <3DC707F0.6020808@noos.fr> Barry A. Warsaw wrote: >>>>>>"JDIP" == Juan David Ibáñez Palomar writes: >>>>>> >>>>>> > > JDIP> Attached is the patch to gettext.py and a new > JDIP> test_gettext.py file. The file "test/output/test_gettext" > JDIP> should be removed. > >There's a problem with the patch. You need to provide either unified >diffs or context 2 diffs. Personally I prefer unified, but either >would be better than simply "diff". > > > I've submitted the unified version to the patch tracker (as Martin has suggested me). If you want I can post it here too. > JDIP> There's however an issue, as far as I know there isn't any > JDIP> tool able to parse Python plural forms, though, I only tried > JDIP> xgettext. > >See if you can extend Tools/i18n/pygettext.py to parse them. > > > Ok, I will look at it, after the documentation. -- J. David Ibáñez, http://www.j-david.net Software Engineer / Ingénieur Logiciel / Ingeniero de Software From mal@lemburg.com Tue Nov 5 08:56:15 2002 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 05 Nov 2002 09:56:15 +0100 Subject: [I18n-sig] RE: I18n-sig digest, Vol 1 #331 - 1 msg References: Message-ID: <3DC787AF.6040203@lemburg.com> Could someone with list admin rights please install a filter for these "join the Yahoo groups" spams ?! Thanks. Ania Jankowska wrote: > > -----Original Message----- > From: i18n-sig-admin@python.org [mailto:i18n-sig-admin@python.org]On > Behalf Of i18n-sig-request@python.org > Sent: Monday, November 04, 2002 6:00 PM > To: i18n-sig@python.org > Subject: I18n-sig digest, Vol 1 #331 - 1 msg > > > Send I18n-sig mailing list submissions to > i18n-sig@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/i18n-sig > or, via email, send a message with subject or body 'help' to > i18n-sig-request@python.org > > You can reach the person managing the list at > i18n-sig-admin@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of I18n-sig digest..." > > > Today's Topics: > > 1. Please confirm your request to join locales (Yahoo! Groups) > > --__--__-- > > Message: 1 > Date: 4 Nov 2002 01:32:42 -0000 > From: Yahoo! Groups > > Reply-To: > confirm-s2-xKRVCIB9FnSyztuVV2WYFW3tpFw-i18n-sig=python.org@yahoogroups.com > To: i18n-sig@python.org > Subject: [I18n-sig] Please confirm your request to join locales > > > Hello i18n-sig@python.org, > > We have received your request to join the locales > group hosted by Yahoo! Groups, a free, easy-to-use community service. > > This request will expire in 21 days. > > TO BECOME A MEMBER OF THE GROUP: > > 1) Go to the Yahoo! Groups site by clicking on this link: > > > http://groups.yahoo.com/i?i=xKRVCIB9FnSyztuVV2WYFW3tpFw&e=i18n-sig%40python% > 2Eorg > > (If clicking doesn't work, "Cut" and "Paste" the line above into your > Web browser's address bar.) > > -OR- > > 2) REPLY to this email by clicking "Reply" and then "Send" > in your email program > > If you did not request, or do not want, a membership in the > locales group, please accept our apologies > and ignore this message. > > Regards, > > Yahoo! Groups Customer Care > > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ > > > > > > > > > > --__--__-- > > _______________________________________________ > I18n-sig mailing list > I18n-sig@python.org > http://mail.python.org/mailman/listinfo/i18n-sig > > > End of I18n-sig Digest > > > _______________________________________________ > I18n-sig mailing list > I18n-sig@python.org > http://mail.python.org/mailman/listinfo/i18n-sig -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From jiri@baum.com.au Thu Nov 7 07:48:00 2002 From: jiri@baum.com.au (Jiri Baum) Date: Thu, 7 Nov 2002 18:48:00 +1100 Subject: [I18n-sig] gettext and distutils Message-ID: <20021107074800.GB21832@baum.com.au> Hello, this is probably a FAQ or somewhere in the docs, but I can't find it... What's the correct way to deal with l10n files (.po / .mo) with gettext and distutils (setup.py), please? All the gettext docs assume automake, and the distutils docs don't mention i18n... It would be nice if it would work under both Linux and MS Windows, too. Jiri -- Jiri Baum http://www.csse.monash.edu.au/~jirib From martin@v.loewis.de Thu Nov 7 15:10:50 2002 From: martin@v.loewis.de (Martin v. Loewis) Date: 07 Nov 2002 16:10:50 +0100 Subject: [I18n-sig] gettext and distutils In-Reply-To: <20021107074800.GB21832@baum.com.au> References: <20021107074800.GB21832@baum.com.au> Message-ID: Jiri Baum writes: > What's the correct way to deal with l10n files (.po / .mo) with gettext > and distutils (setup.py), please? There are two approaches: a) install the MO files into the standard location. This works particularly well on Unix, where the standard location already has plenty of MO files, for various packages. The standard location is /share/locale//LC_MESSAGES/.mo b) install the MO files in any convenient place, then use gettext.bindtextdomain to bind the domain to that place. Alternatively, instantiate GNUTranslations objects directly, then you can use arbitrary file names. > It would be nice if it would work under both Linux and MS Windows, too. Either option a) or b) are suitable for that. On Windows, option a tends to build quite an impressive directory hierarchy. If that doesn't bother you, and if you can assume that people have admin privileges on Unix, I'd recommend this approach. Now, the tricky question is how to achieve that with distutils, there is no good answer to that question. The install_data command is insufficient, so you probably need to extend it. Regards, Martin From mj@zope.com Tue Nov 12 15:00:38 2002 From: mj@zope.com (Martijn Pieters) Date: Tue, 12 Nov 2002 10:00:38 -0500 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages In-Reply-To: References: Message-ID: <20021112150038.GL24094@zope.com> On Tue, Nov 12, 2002 at 06:30:01AM -0500, postmaster@python.org wrote: > 2) "Please confirm your request to join locales" > from Yahoo! Groups > (envelope sender ) > for i18n-sig@python.org > received 2002-11-11 17:58:46 There are three requests to confirm a Yahoo Groups membership to the locales@yahoogroups.com mailinglist in our spam queue, all a few minutes apart. Were these requests legitimate? Although the goal of the locales mailinglist seems to fit with the i18n-sig group, I am wondering wether or not it was really the goal to subscribe the whole sig to that list. Can someone confirm? I'll rescue one of the confirmation requests then. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ --------------------------------------------- From pinard@iro.umontreal.ca Tue Nov 12 15:24:27 2002 From: pinard@iro.umontreal.ca (=?iso-8859-1?q?Fran=E7ois?= Pinard) Date: 12 Nov 2002 10:24:27 -0500 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages In-Reply-To: <20021112150038.GL24094@zope.com> References: <20021112150038.GL24094@zope.com> Message-ID: [Martijn Pieters] > There are three requests to confirm a Yahoo Groups membership to the > locales@yahoogroups.com mailinglist in our spam queue, all a few minutes > apart. Please do not accept subscribing mailing lists to one another. The only allowable exceptions are for maintenance purposes, when a mailing list is being renamed or moved to a new system, but then, it conceptually remains the same mailing list. As a user, I want to feel free to subscribe or unsubscribe to the mailing list(s) of my choice, and unsubscribe of the mailing list(s) of my choice. > Although the goal of the locales mailinglist seems to fit with the > i18n-sig group, I am wondering wether or not it was really the goal to > subscribe the whole sig to that list. When I subscribe to a mailing list, I consider rather unwelcome that people or robots use the mailing list roster as input for other lists. If the lists are related and of probable interest, a polite invitation might be sent to all for subscribing to the other or new mailing list, but please let it be the choice of members on an individual basis. -- François Pinard http://www.iro.umontreal.ca/~pinard From mal@lemburg.com Tue Nov 12 15:25:11 2002 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 12 Nov 2002 16:25:11 +0100 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages References: <20021112150038.GL24094@zope.com> Message-ID: <3DD11D57.3010104@lemburg.com> Martijn Pieters wrote: > On Tue, Nov 12, 2002 at 06:30:01AM -0500, postmaster@python.org wrote: > >> 2) "Please confirm your request to join locales" >> from Yahoo! Groups >> (envelope sender ) >> for i18n-sig@python.org >> received 2002-11-11 17:58:46 > > > There are three requests to confirm a Yahoo Groups membership to the > locales@yahoogroups.com mailinglist in our spam queue, all a few minutes > apart. > > Were these requests legitimate? Although the goal of the locales mailinglist > seems to fit with the i18n-sig group, I am wondering wether or not it was > really the goal to subscribe the whole sig to that list. > > Can someone confirm? I'll rescue one of the confirmation requests then. Those messages are spam. It doesn't really make sense to subscribe one mailing list to another. If someone wants to read both lists, he or she should subscribe to both lists. BTW, thanks for installing a spam protection against these signup requests. -- Marc-Andre Lemburg CEO eGenix.com Software GmbH _______________________________________________________________________ eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,... Python Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/ From guido@python.org Tue Nov 12 15:28:04 2002 From: guido@python.org (Guido van Rossum) Date: Tue, 12 Nov 2002 10:28:04 -0500 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages In-Reply-To: Your message of "Tue, 12 Nov 2002 10:00:38 EST." <20021112150038.GL24094@zope.com> References: <20021112150038.GL24094@zope.com> Message-ID: <200211121528.gACFS4X02557@odiug.zope.com> > On Tue, Nov 12, 2002 at 06:30:01AM -0500, postmaster@python.org wrote: > > 2) "Please confirm your request to join locales" > > from Yahoo! Groups > > (envelope sender ) > > for i18n-sig@python.org > > received 2002-11-11 17:58:46 > > There are three requests to confirm a Yahoo Groups membership to the > locales@yahoogroups.com mailinglist in our spam queue, all a few minutes > apart. > > Were these requests legitimate? Although the goal of the locales mailinglist > seems to fit with the i18n-sig group, I am wondering wether or not it was > really the goal to subscribe the whole sig to that list. > > Can someone confirm? I'll rescue one of the confirmation requests then. No! This is an annoying spam. --Guido van Rossum (home page: http://www.python.org/~guido/) From mj@zope.com Tue Nov 12 16:10:43 2002 From: mj@zope.com (Martijn Pieters) Date: Tue, 12 Nov 2002 11:10:43 -0500 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages In-Reply-To: <200211121528.gACFS4X02557@odiug.zope.com> References: <20021112150038.GL24094@zope.com> <200211121528.gACFS4X02557@odiug.zope.com> Message-ID: <20021112161043.GB24094@zope.com> On Tue, Nov 12, 2002 at 10:28:04AM -0500, Guido van Rossum wrote: > > Can someone confirm? I'll rescue one of the confirmation requests then. > > No! This is an annoying spam. I thought as much. Thanks for the resounding answer all. :) -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ --------------------------------------------- From ivanlan@pauahtun.org Tue Nov 12 18:48:25 2002 From: ivanlan@pauahtun.org (Ivan Van Laningham) Date: Tue, 12 Nov 2002 11:48:25 -0700 Subject: [I18n-sig] Re: Spam report (mail.python.org): 23 new messages References: <20021112150038.GL24094@zope.com> <200211121528.gACFS4X02557@odiug.zope.com> Message-ID: <3DD14CF9.3C53A0B4@pauahtun.org> Hi All-- Guido van Rossum wrote: > > > Can someone confirm? I'll rescue one of the confirmation requests then. > > No! This is an annoying spam. > I guess I don't see how we're getting them. I mean, yes, I see that someone's putting in a request to sub one list to another, but what I don't see is the point. Who's doing it and _why_ are they doing it? What do they hope to gain? -ly y'rs, Ivan ---------------------------------------------- Ivan Van Laningham God N Locomotive Works http://www.pauahtun.org http://www.foretec.com/python/workshops/1998-11/proceedings.html Army Signal Corps: Cu Chi, Class of '70 Author: Teach Yourself Python in 24 Hours From domains@keying.net Wed Nov 20 08:42:58 2002 From: domains@keying.net (Domain Monitor) Date: Wed, 20 Nov 2002 00:42:58 -0800 (PST) Subject: [I18n-sig] i18n.org is available. Message-ID: <10923757.1037781778330.JavaMail.hongwei@localhost> --9087518.1037781778319.JavaMail.hongwei@localhost.localdomain Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, The i18n.org is just released. If you are interested in, please register it with http://www.keying.net as soon as possible. Thank you. --9087518.1037781778319.JavaMail.hongwei@localhost.localdomain--