You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(4) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(1) |
Feb
(8) |
Mar
(8) |
Apr
(4) |
May
(19) |
Jun
(1) |
Jul
(1) |
Aug
(18) |
Sep
(18) |
Oct
(19) |
Nov
(75) |
Dec
(80) |
| 2006 |
Jan
(86) |
Feb
(61) |
Mar
(60) |
Apr
(47) |
May
(39) |
Jun
(16) |
Jul
(30) |
Aug
(13) |
Sep
(13) |
Oct
(21) |
Nov
(1) |
Dec
(10) |
| 2007 |
Jan
(2) |
Feb
(7) |
Mar
(9) |
Apr
(3) |
May
(9) |
Jun
(4) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
(7) |
| 2008 |
Jan
|
Feb
(2) |
Mar
(14) |
Apr
(9) |
May
(23) |
Jun
(4) |
Jul
|
Aug
(13) |
Sep
(8) |
Oct
(15) |
Nov
(40) |
Dec
(14) |
| 2009 |
Jan
|
Feb
(4) |
Mar
(10) |
Apr
(2) |
May
(2) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <sub...@co...> - 2006-12-14 01:26:02
|
Author: ianb
Date: 2006-12-13 18:26:00 -0700 (Wed, 13 Dec 2006)
New Revision: 2130
Modified:
FormEncode/trunk/docs/news.txt
FormEncode/trunk/formencode/api.py
Log:
Get rid of None values in unpack_errors
Modified: FormEncode/trunk/docs/news.txt
===================================================================
--- FormEncode/trunk/docs/news.txt 2006-12-14 01:25:44 UTC (rev 2129)
+++ FormEncode/trunk/docs/news.txt 2006-12-14 01:26:00 UTC (rev 2130)
@@ -17,6 +17,10 @@
* ``from formencode.validators import *`` will import the ``Invalid``
exception now.
+* ``Invalid().unpack_errors(encode_variables=True)`` now filters out
+ None values (which ``ForEach`` can produce even for keys with no
+ errors).
+
0.6
---
Modified: FormEncode/trunk/formencode/api.py
===================================================================
--- FormEncode/trunk/formencode/api.py 2006-12-14 01:25:44 UTC (rev 2129)
+++ FormEncode/trunk/formencode/api.py 2006-12-14 01:26:00 UTC (rev 2130)
@@ -119,6 +119,9 @@
result = variabledecode.variable_encode(result, add_repetitions=False,
dict_char=dict_char,
list_char=list_char)
+ for key in result.keys():
+ if not result[key]:
+ del result[key]
return result
else:
assert not encode_variables, (
|
|
From: <sub...@co...> - 2006-12-14 01:25:48
|
Author: ianb
Date: 2006-12-13 18:25:44 -0700 (Wed, 13 Dec 2006)
New Revision: 2129
Added:
FormEncode/trunk/tests/disabled_makeform.py
FormEncode/trunk/tests/disabled_sqlschema.py
Removed:
FormEncode/trunk/tests/test_makeform.py
FormEncode/trunk/tests/test_sqlschema.py
Log:
Disabled SQLObject-related tests
Copied: FormEncode/trunk/tests/disabled_makeform.py (from rev 2126, FormEncode/trunk/tests/test_makeform.py)
===================================================================
--- FormEncode/trunk/tests/disabled_makeform.py (rev 0)
+++ FormEncode/trunk/tests/disabled_makeform.py 2006-12-14 01:25:44 UTC (rev 2129)
@@ -0,0 +1,70 @@
+# @@: Note, this is an experimental (TDD) test
+from sqlobject import *
+from formencode.formgen import makeform
+from formencode.fields import Context
+from formencode.doctest_xml_compare import xml_compare, make_xml
+from formencode import sqlformgen
+
+sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
+
+CONTEXT = Context()
+CONTEXT.secret = 'foo'
+
+def printer(s):
+ print s
+
+def xcmp(a, b):
+ try:
+ a = '<xml>%s</xml>' % a
+ xml_a = make_xml(a)
+ except:
+ print prxml(a)
+ raise
+ try:
+ b = '<xml>%s</xml>' % b
+ xml_b = make_xml(b)
+ except:
+ print prxml(b)
+ raise
+ prxml(a)
+ prxml(b)
+ assert xml_compare(xml_a, xml_b, reporter=printer)
+
+def prxml(xml):
+ for lineno, line in enumerate(xml.splitlines()):
+ print '%2i %s' % (lineno+1, line)
+
+class SimpleForm(SQLObject):
+
+ name = StringCol()
+ address = StringCol()
+ city = StringCol()
+
+SimpleForm.createTable()
+
+def test_simple():
+ f, v = makeform(SimpleForm, CONTEXT)
+ yield (xcmp, f(requires_label=True).render(CONTEXT), """
+ name: <input type="text" name="name" /> <br />
+ address: <input type="text" name="address" /> <br />
+ city: <input type="text" name="city" /> <br />
+ """)
+
+ f.name = 'simp'
+
+ yield (xcmp, f(requires_label=True).render(CONTEXT), """
+ name: <input type="text" name="simp.name" /> <br />
+ address: <input type="text" name="simp.address" /> <br />
+ city: <input type="text" name="simp.city" /> <br />
+ """)
+
+ # This test isn't really ready, so we'll skip
+ return
+ s = SimpleForm(name='Tom', address='123', city='Chicago')
+ f, v = makeform(s, CONTEXT)
+ yield (xcmp, f(requires_label=True).render(CONTEXT), """
+ name: <input type="text" name="name" value="Tom" /> <br />
+ address: <input type="text" name="address" value="123" /> <br />
+ city: <input type="text" name="city" value="Chicago" /> <br />
+ """)
+
Copied: FormEncode/trunk/tests/disabled_sqlschema.py (from rev 2126, FormEncode/trunk/tests/test_sqlschema.py)
===================================================================
--- FormEncode/trunk/tests/disabled_sqlschema.py (rev 0)
+++ FormEncode/trunk/tests/disabled_sqlschema.py 2006-12-14 01:25:44 UTC (rev 2129)
@@ -0,0 +1,108 @@
+from sqlobject import *
+from formencode.sqlschema import *
+from formencode import validators
+from datetime import datetime, date
+
+def setup_module(module):
+ """Disable i18n translation
+ """
+ def notranslation(s): return s
+ import __builtin__
+ __builtin__._ = notranslation
+
+
+
+def teardown_module(module):
+ """Remove translation function
+ """
+ import __builtin__
+ del __builtin__._
+
+
+sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
+
+class EventObject(SQLObject):
+
+ name = StringCol(alternateID=True)
+ date = DateCol(notNull=True)
+ description = StringCol()
+
+EventObject.createTable()
+
+class EventObjectSchema(SQLSchema):
+
+ wrap = EventObject
+ # All other columns are inherited...
+ description = validators.String(strip=True, max=1024, if_empty=None)
+ date = validators.DateConverter(if_empty=None)
+
+def get_error(input, schema):
+ try:
+ result = schema.to_python(input)
+ assert 0, (
+ "Got %r from %r instead of an Invalid exception"
+ % (result, input))
+ except validators.Invalid, e:
+ return e
+
+def test_validate():
+ input = dict(name='test1', date='11/10/2010')
+ res = get_error(input, EventObjectSchema())
+ assert str(res) == 'description: Missing value'
+ input['description'] = ' test '
+ obj = EventObjectSchema().to_python(input)
+ assert isinstance(obj, EventObject)
+ assert obj.name == 'test1'
+ assert obj.date == date(2010, 11, 10)
+ assert obj.description == 'test'
+
+
+def test_update():
+ obj = EventObject(name='foobar', date=date(2020, 10, 1),
+ description=None)
+ input = dict(id=obj.id, date=None)
+ objschema = EventObjectSchema(wrap=obj)
+ assert str(get_error(input, objschema)) == 'date: You may not provide None for that value'
+ input = dict(id=obj.id, name='test2')
+ print str(objschema.to_python(input))
+ assert objschema.to_python(input) is obj
+ assert obj.name == 'test2'
+
+def test_defaults():
+ res = EventObjectSchema().from_python(None)
+ assert res == dict(date=None, description='')
+ obj = EventObject(name='foobar2', date=date(2020, 10, 1),
+ description=None)
+ res = EventObjectSchema(wrap=obj).from_python(None)
+ assert res == dict(id=obj.id, date='10/01/2020',
+ name='foobar2', description='')
+ obj2 = EventObject(name='bar', date=date(2002, 10, 1),
+ description='foobarish')
+ # @@: Should this give an error?
+ res = EventObjectSchema(wrap=obj).from_python(obj2)
+ assert res == dict(id=obj2.id, date='10/01/2002',
+ name='bar', description='foobarish')
+ res2 = EventObjectSchema().from_python(obj2)
+ assert res2 == res
+
+def test_sign():
+ obj = EventObject(name='signer', date=date(2020, 10, 1),
+ description=None)
+ s = EventObjectSchema(sign_id=True, secret='bar')
+ res = s.from_python(obj)
+ assert res['id'] != str(obj)
+ res['name'] = 'signer_updated'
+ obj_up = s.to_python(res)
+ assert obj_up is obj
+ assert obj_up.name == 'signer_updated'
+ res2 = s.from_python(obj)
+ assert res['id'] != res2['id']
+ # Futz up the signature:
+ print 'before', res2['id'], res2['id'].split()[0].decode('base64')
+ res2['id'] = res2['id'][:2]+'XXX'+res2['id'][5:]
+ print 'after ', res2['id'], res2['id'].split()[0].decode('base64')
+ try:
+ s.to_python(res2)
+ assert 0
+ except validators.Invalid, e:
+ assert str(e) == 'Signature is not correct'
Deleted: FormEncode/trunk/tests/test_makeform.py
===================================================================
--- FormEncode/trunk/tests/test_makeform.py 2006-12-11 15:55:15 UTC (rev 2128)
+++ FormEncode/trunk/tests/test_makeform.py 2006-12-14 01:25:44 UTC (rev 2129)
@@ -1,70 +0,0 @@
-# @@: Note, this is an experimental (TDD) test
-from sqlobject import *
-from formencode.formgen import makeform
-from formencode.fields import Context
-from formencode.doctest_xml_compare import xml_compare, make_xml
-from formencode import sqlformgen
-
-sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
-
-CONTEXT = Context()
-CONTEXT.secret = 'foo'
-
-def printer(s):
- print s
-
-def xcmp(a, b):
- try:
- a = '<xml>%s</xml>' % a
- xml_a = make_xml(a)
- except:
- print prxml(a)
- raise
- try:
- b = '<xml>%s</xml>' % b
- xml_b = make_xml(b)
- except:
- print prxml(b)
- raise
- prxml(a)
- prxml(b)
- assert xml_compare(xml_a, xml_b, reporter=printer)
-
-def prxml(xml):
- for lineno, line in enumerate(xml.splitlines()):
- print '%2i %s' % (lineno+1, line)
-
-class SimpleForm(SQLObject):
-
- name = StringCol()
- address = StringCol()
- city = StringCol()
-
-SimpleForm.createTable()
-
-def test_simple():
- f, v = makeform(SimpleForm, CONTEXT)
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="name" /> <br />
- address: <input type="text" name="address" /> <br />
- city: <input type="text" name="city" /> <br />
- """)
-
- f.name = 'simp'
-
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="simp.name" /> <br />
- address: <input type="text" name="simp.address" /> <br />
- city: <input type="text" name="simp.city" /> <br />
- """)
-
- # This test isn't really ready, so we'll skip
- return
- s = SimpleForm(name='Tom', address='123', city='Chicago')
- f, v = makeform(s, CONTEXT)
- yield (xcmp, f(requires_label=True).render(CONTEXT), """
- name: <input type="text" name="name" value="Tom" /> <br />
- address: <input type="text" name="address" value="123" /> <br />
- city: <input type="text" name="city" value="Chicago" /> <br />
- """)
-
Deleted: FormEncode/trunk/tests/test_sqlschema.py
===================================================================
--- FormEncode/trunk/tests/test_sqlschema.py 2006-12-11 15:55:15 UTC (rev 2128)
+++ FormEncode/trunk/tests/test_sqlschema.py 2006-12-14 01:25:44 UTC (rev 2129)
@@ -1,108 +0,0 @@
-from sqlobject import *
-from formencode.sqlschema import *
-from formencode import validators
-from datetime import datetime, date
-
-def setup_module(module):
- """Disable i18n translation
- """
- def notranslation(s): return s
- import __builtin__
- __builtin__._ = notranslation
-
-
-
-def teardown_module(module):
- """Remove translation function
- """
- import __builtin__
- del __builtin__._
-
-
-sqlhub.processConnection = connectionForURI('sqlite:/:memory:')
-
-class EventObject(SQLObject):
-
- name = StringCol(alternateID=True)
- date = DateCol(notNull=True)
- description = StringCol()
-
-EventObject.createTable()
-
-class EventObjectSchema(SQLSchema):
-
- wrap = EventObject
- # All other columns are inherited...
- description = validators.String(strip=True, max=1024, if_empty=None)
- date = validators.DateConverter(if_empty=None)
-
-def get_error(input, schema):
- try:
- result = schema.to_python(input)
- assert 0, (
- "Got %r from %r instead of an Invalid exception"
- % (result, input))
- except validators.Invalid, e:
- return e
-
-def test_validate():
- input = dict(name='test1', date='11/10/2010')
- res = get_error(input, EventObjectSchema())
- assert str(res) == 'description: Missing value'
- input['description'] = ' test '
- obj = EventObjectSchema().to_python(input)
- assert isinstance(obj, EventObject)
- assert obj.name == 'test1'
- assert obj.date == date(2010, 11, 10)
- assert obj.description == 'test'
-
-
-def test_update():
- obj = EventObject(name='foobar', date=date(2020, 10, 1),
- description=None)
- input = dict(id=obj.id, date=None)
- objschema = EventObjectSchema(wrap=obj)
- assert str(get_error(input, objschema)) == 'date: You may not provide None for that value'
- input = dict(id=obj.id, name='test2')
- print str(objschema.to_python(input))
- assert objschema.to_python(input) is obj
- assert obj.name == 'test2'
-
-def test_defaults():
- res = EventObjectSchema().from_python(None)
- assert res == dict(date=None, description='')
- obj = EventObject(name='foobar2', date=date(2020, 10, 1),
- description=None)
- res = EventObjectSchema(wrap=obj).from_python(None)
- assert res == dict(id=obj.id, date='10/01/2020',
- name='foobar2', description='')
- obj2 = EventObject(name='bar', date=date(2002, 10, 1),
- description='foobarish')
- # @@: Should this give an error?
- res = EventObjectSchema(wrap=obj).from_python(obj2)
- assert res == dict(id=obj2.id, date='10/01/2002',
- name='bar', description='foobarish')
- res2 = EventObjectSchema().from_python(obj2)
- assert res2 == res
-
-def test_sign():
- obj = EventObject(name='signer', date=date(2020, 10, 1),
- description=None)
- s = EventObjectSchema(sign_id=True, secret='bar')
- res = s.from_python(obj)
- assert res['id'] != str(obj)
- res['name'] = 'signer_updated'
- obj_up = s.to_python(res)
- assert obj_up is obj
- assert obj_up.name == 'signer_updated'
- res2 = s.from_python(obj)
- assert res['id'] != res2['id']
- # Futz up the signature:
- print 'before', res2['id'], res2['id'].split()[0].decode('base64')
- res2['id'] = res2['id'][:2]+'XXX'+res2['id'][5:]
- print 'after ', res2['id'], res2['id'].split()[0].decode('base64')
- try:
- s.to_python(res2)
- assert 0
- except validators.Invalid, e:
- assert str(e) == 'Signature is not correct'
|
|
From: <sub...@co...> - 2006-12-06 18:58:27
|
Author: ianb
Date: 2006-12-06 11:58:17 -0700 (Wed, 06 Dec 2006)
New Revision: 2120
Modified:
FormEncode/trunk/docs/Validator.txt
Log:
Added if_missing doc
Modified: FormEncode/trunk/docs/Validator.txt
===================================================================
--- FormEncode/trunk/docs/Validator.txt 2006-12-06 17:52:04 UTC (rev 2119)
+++ FormEncode/trunk/docs/Validator.txt 2006-12-06 18:58:17 UTC (rev 2120)
@@ -362,6 +362,13 @@
``.validate_other()`` will not be called when
``.from_python()`` is used.
+``if_missing``:
+ Typically when a field is missing the schema will raise an
+ error. In that case no validation is run -- so things like
+ ``if_invalid`` won't be triggered. This special attribute (if
+ set) will be used when the field is missing, and no error will
+ occur. (``None`` or ``()`` are common values)
+
State
-----
|
Author: gh Date: 2006-12-01 11:19:05 -0700 (Fri, 01 Dec 2006) New Revision: 2106 Added: FormEncode/trunk/docs/i18n.txt FormEncode/trunk/formencode/i18n/ FormEncode/trunk/formencode/i18n/big5/ FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/de/ FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/es/ FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/pt_BR/ FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/ru/ FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/sk/ FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/sl/ FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/ FormEncode/trunk/tests/test_i18n.py Removed: FormEncode/trunk/formencode/i18n/big5/ FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/de/ FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/es/ FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/pt_BR/ FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/ru/ FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/sk/ FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/ FormEncode/trunk/formencode/i18n/sl/ FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/ Modified: FormEncode/trunk/docs/news.txt FormEncode/trunk/formencode/api.py FormEncode/trunk/formencode/i18n/FormEncode.pot FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/FormEncode.mo FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/FormEncode.po FormEncode/trunk/formencode/schema.py FormEncode/trunk/formencode/validators.py FormEncode/trunk/tests/test_cc_expires.py FormEncode/trunk/tests/test_cc_validator.py FormEncode/trunk/tests/test_schema.py FormEncode/trunk/tests/test_sqlschema.py Log: merge gettext-enabled branche r1947 into trunk 2105 Added: FormEncode/trunk/docs/i18n.txt =================================================================== --- FormEncode/trunk/docs/i18n.txt (rev 0) +++ FormEncode/trunk/docs/i18n.txt 2006-12-01 18:19:05 UTC (rev 2106) @@ -0,0 +1,34 @@ +FormEncode Internationalization (gettext) ++++++++++++++++++++++++++++++++++++++++++ + +There are different translation options available: + +Domain "FormEncode" +^^^^^^^^^^^^^^^^^^^ + +for standalone use of FormEncode. The language to use is determined out of the local system (see gettext documentation http://docs.python.org/lib/node733.html). Optionally you can also set the language or the domain explicitly with the function. + +example: +formencode.api.set_stdtranslation(domain="FormEncode", languages=["de"]) + +The mo files are located in the i18n subdirectory of the formencode installation. + +state._ +^^^^^^^ +A custom _ gettext function provided as attribute of the state object. + +__builtins__._ +^^^^^^^^^^^^^^ +A custom _ gettext function provided in the builtin namespace. +This function is only used when: + +Validator.use_builtin_gettext == True (True is default) + + +Without translation +^^^^^^^^^^^^^^^^^^^ + +If no translation mechanism is found a fallback returns the plain string. + + +Gregor Horvath, 2006 gh...@gr... Modified: FormEncode/trunk/docs/news.txt =================================================================== --- FormEncode/trunk/docs/news.txt 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/docs/news.txt 2006-12-01 18:19:05 UTC (rev 2106) @@ -6,6 +6,8 @@ svn trunk --------- +* gettext-enabled branch merged in + * Fixes `#1457145: Fails on URLs with port numbers <http://sourceforge.net/tracker/index.php?func=detail&aid=1457145&group_id=91231&atid=596416>`_ Modified: FormEncode/trunk/formencode/api.py =================================================================== --- FormEncode/trunk/formencode/api.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/formencode/api.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -5,10 +5,34 @@ import declarative import textwrap import re +import os +from pkg_resources import resource_filename __all__ = ['NoDefault', 'Invalid', 'Validator', 'Identity', 'FancyValidator', 'is_validator'] +import gettext + +def get_localedir(): + return resource_filename(__name__, "/i18n") + +def set_stdtranslation(domain="FormEncode", languages=None, \ + localedir = get_localedir()): + + t = gettext.translation(domain=domain, \ + languages=languages, \ + localedir=localedir, fallback=True) + global _stdtrans + _stdtrans = t.ugettext + +set_stdtranslation() + +def _(s): return s # dummy i18n translation function, nothing is translated here. + # Instead this is actually done in api.Validator.message. + # The surrounding _("string") of the strings is only for extracting + # the strings automatically + # if you run pygettext with this source comment this function out temporarly + class NoDefault: pass @@ -117,7 +141,10 @@ if_missing = NoDefault repeating = False compound = False - + gettextargs = {} + use_builtins_gettext = True #In case you dont want to use __builtins__._ + #altough it may be definied, set this to False + __singletonmethods__ = ('to_python', 'from_python') def __classinit__(cls, new_attrs): @@ -141,8 +168,27 @@ return value def message(self, msgName, state, **kw): + #determine translation function try: - return self._messages[msgName] % kw + trans = state._ + except AttributeError: + try: + if self.use_builtins_gettext: + import __builtin__ + trans = __builtin__._ + + else: + trans = _stdtrans + + except AttributeError: + trans = _stdtrans + + if not callable(trans): + trans = _stdtrans + + + try: + return trans(self._messages[msgName], **self.gettextargs) % kw except KeyError, e: raise KeyError( "Key not found (%s) for %r=%r %% %r (from: %s)" @@ -294,9 +340,9 @@ strip = False messages = { - 'empty': "Please enter a value", - 'badType': "The input must be a string (not a %(type)s: %(value)r)", - 'noneType': "The input must be a string (not None)", + 'empty': _("Please enter a value"), + 'badType': _("The input must be a string (not a %(type)s: %(value)r)"), + 'noneType': _("The input must be a string (not None)"), } def to_python(self, value, state=None): Copied: FormEncode/trunk/formencode/i18n (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n) Modified: FormEncode/trunk/formencode/i18n/FormEncode.pot =================================================================== Copied: FormEncode/trunk/formencode/i18n/big5 (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/big5) Copied: FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/big5/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/de (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/de) Copied: FormEncode/trunk/formencode/i18n/de/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/de/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/de/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/es (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/es) Copied: FormEncode/trunk/formencode/i18n/es/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/es/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/pt_BR (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR) Copied: FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/ru (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/ru) Copied: FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/ru/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/sk (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/sk) Copied: FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/sk/LC_MESSAGES/FormEncode.po =================================================================== Copied: FormEncode/trunk/formencode/i18n/sl (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/sl) Copied: FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES (from rev 2105, FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES) Modified: FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/trunk/formencode/i18n/sl/LC_MESSAGES/FormEncode.po =================================================================== Modified: FormEncode/trunk/formencode/schema.py =================================================================== --- FormEncode/trunk/formencode/schema.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/formencode/schema.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -291,7 +291,7 @@ if isinstance(v, Exception): try: return str(v) - except UnicodeDecodeError: + except (UnicodeDecodeError, UnicodeEncodeError): # There doesn't seem to be a better way to get a str() # version if possible, and unicode() if necessary, because # testing for the presence of a __unicode__ method isn't Modified: FormEncode/trunk/formencode/validators.py =================================================================== --- FormEncode/trunk/formencode/validators.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/formencode/validators.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -44,6 +44,12 @@ True, False = (1==1), (0==1) +def _(s): return s # dummy translation function, nothing is translated here. + # Instead this is actually done in api.message. + # The surrounding _("string") of the strings is only for extracting + # the strings automatically + # if you run pygettext with this source comment this function out temporarly + ############################################################ ## Utility methods ############################################################ @@ -151,10 +157,10 @@ type = None messages = { - 'subclass': "%(object)r is not a subclass of %(subclass)s", - 'inSubclass': "%(object)r is not a subclass of one of the types %(subclassList)s", - 'inType': "%(object)r must be one of the types %(typeList)s", - 'type': "%(object)r must be of the type %(type)s", + 'subclass': _("%(object)r is not a subclass of %(subclass)s"), + 'inSubclass': _("%(object)r is not a subclass of one of the types %(subclassList)s"), + 'inType': _("%(object)r must be one of the types %(typeList)s"), + 'type': _("%(object)r must be of the type %(type)s"), } def __init__(self, *args, **kw): @@ -335,8 +341,8 @@ __unpackargs__ = ('maxLength',) messages = { - 'tooLong': "Enter a value less than %(maxLength)i characters long", - 'invalid': "Invalid value (value with length expected)", + 'tooLong': _("Enter a value less than %(maxLength)i characters long"), + 'invalid': _("Invalid value (value with length expected)"), } def validate_python(self, value, state): @@ -389,8 +395,8 @@ __unpackargs__ = ('minLength',) messages = { - 'tooShort': "Enter a value at least %(minLength)i characters long", - 'invalid': "Invalid value (value with length expected)", + 'tooShort': _("Enter a value at least %(minLength)i characters long"), + 'invalid': _("Invalid value (value with length expected)"), } def validate_python(self, value, state): @@ -424,7 +430,7 @@ not_empty = True messages = { - 'empty': "Please enter a value", + 'empty': _("Please enter a value"), } def validate_python(self, value, state): @@ -449,7 +455,7 @@ """ messages = { - 'notEmpty': "You cannot enter a value here", + 'notEmpty': _("You cannot enter a value here"), } def validate_python(self, value, state): @@ -500,7 +506,7 @@ __unpackargs__ = ('regex',) messages = { - 'invalid': "The input is not valid", + 'invalid': _("The input is not valid"), } def __init__(self, *args, **kw): @@ -555,7 +561,7 @@ regex = r"^[a-zA-Z_\-0-9]*$" messages = { - 'invalid': 'Enter only letters, numbers, or _ (underscore)', + 'invalid': _('Enter only letters, numbers, or _ (underscore)'), } class OneOf(FancyValidator): @@ -594,8 +600,8 @@ __unpackargs__ = ('list',) messages = { - 'invalid': "Invalid value", - 'notIn': "Value must be one of: %(items)s (not %(value)r)", + 'invalid': _("Invalid value"), + 'notIn': _("Value must be one of: %(items)s (not %(value)r)"), } def validate_python(self, value, state): @@ -658,10 +664,10 @@ __unpackargs__ = ('dict',) messages = { - 'keyNotFound': "Choose something", - 'chooseKey': "Enter a value from: %(items)s", - 'valueNotFound': "That value is not known", - 'chooseValue': "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s", + 'keyNotFound': _("Choose something"), + 'chooseKey': _("Enter a value from: %(items)s"), + 'valueNotFound': _("That value is not known"), + 'chooseValue': _("Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s"), } def _to_python(self, value, state): @@ -722,9 +728,9 @@ __unpackargs__ = ('list',) messages = { - 'integer': "Must be an integer index", - 'outOfRange': "Index out of range", - 'notFound': "Item %(value)s was not found in the list", + 'integer': _("Must be an integer index"), + 'outOfRange': _("Index out of range"), + 'notFound': _("Item %(value)s was not found in the list"), } def _to_python(self, value, state): @@ -799,11 +805,11 @@ datetime_module = None messages = { - 'after': "Date must be after %(date)s", - 'before': "Date must be before %(date)s", + 'after': _("Date must be after %(date)s"), + 'before': _("Date must be before %(date)s"), # Double %'s, because this will be substituted twice: - 'date_format': "%%A, %%d %%B %%Y", - 'future': "The date must be sometime in the future", + 'date_format': _("%%A, %%d %%B %%Y"), + 'future': _("The date must be sometime in the future"), } def validate_python(self, value, state): @@ -903,7 +909,7 @@ """ messages = { - 'integer': "Please enter an integer value", + 'integer': _("Please enter an integer value"), } def _to_python(self, value, state): @@ -935,7 +941,7 @@ """ messages = { - 'number': "Please enter a number", + 'number': _("Please enter a number"), } def _to_python(self, value, state): @@ -988,8 +994,8 @@ not_empty = None messages = { - 'tooLong': "Enter a value less than %(max)i characters long", - 'tooShort': "Enter a value %(min)i characters long or more", + 'tooLong': _("Enter a value less than %(max)i characters long"), + 'tooShort': _("Enter a value %(min)i characters long or more"), } def __initargs__(self, new_attrs): @@ -1040,7 +1046,7 @@ """ encoding = 'utf-8' messages = { - 'badEncoding' : "Invalid data or incorrect encoding", + 'badEncoding' : _("Invalid data or incorrect encoding"), } def __init__(self, inputEncoding=None, outputEncoding=None, **kw): @@ -1170,12 +1176,12 @@ domainRE = re.compile(r"^[a-z0-9][a-z0-9\.\-_]*\.[a-z]+$", re.I) messages = { - 'empty': 'Please enter an email address', - 'noAt': 'An email address must contain a single @', - 'badUsername': 'The username portion of the email address is invalid (the portion before the @: %(username)s)', - 'socketError': 'An error occured when trying to connect to the server: %(error)s', - 'badDomain': 'The domain portion of the email address is invalid (the portion after the @: %(domain)s)', - 'domainDoesNotExist': 'The domain of the email address does not exist (the portion after the @: %(domain)s)', + 'empty': _('Please enter an email address'), + 'noAt': _('An email address must contain a single @'), + 'badUsername': _('The username portion of the email address is invalid (the portion before the @: %(username)s)'), + 'socketError': _('An error occured when trying to connect to the server: %(error)s'), + 'badDomain': _('The domain portion of the email address is invalid (the portion after the @: %(domain)s)'), + 'domainDoesNotExist': _('The domain of the email address does not exist (the portion after the @: %(domain)s)'), } def __init__(self, *args, **kw): @@ -1283,12 +1289,12 @@ scheme_re = re.compile(r'^[a-zA-Z]+:') messages = { - 'noScheme': 'You must start your URL with http://, https://, etc', - 'badURL': 'That is not a valid URL', - 'httpError': 'An error occurred when trying to access the URL: %(error)s', - 'socketError': 'An error occured when trying to connect to the server: %(error)s', - 'notFound': 'The server responded that the page could not be found', - 'status': 'The server responded with a bad status code (%(status)s)', + 'noScheme': _('You must start your URL with http://, https://, etc'), + 'badURL': _('That is not a valid URL'), + 'httpError': _('An error occurred when trying to access the URL: %(error)s'), + 'socketError': _('An error occured when trying to connect to the server: %(error)s'), + 'notFound': _('The server responded that the page could not be found'), + 'status': _('The server responded with a bad status code (%(status)s)'), } def _to_python(self, value, state): @@ -1391,9 +1397,9 @@ __unpackargs__ = ('extra_states',) messages = { - 'empty': 'Please enter a state code', - 'wrongLength': 'Please enter a state code with TWO letters', - 'invalid': 'That is not a valid state code', + 'empty': _('Please enter a state code'), + 'wrongLength': _('Please enter a state code with TWO letters'), + 'invalid': _('That is not a valid state code'), } def validate_python(self, value, state): @@ -1444,7 +1450,7 @@ _phoneRE = re.compile(r'^\s*(?:1-)?(\d\d\d)[\- \.]?(\d\d\d)[\- \.]?(\d\d\d\d)(?:\s*ext\.?\s*(\d+))?\s*$', re.I) messages = { - 'phoneFormat': 'Please enter a number, with area code, in the form ###-###-####, optionally with "ext.####"', + 'phoneFormat': _('Please enter a number, with area code, in the form ###-###-####, optionally with "ext.####"'), } def _to_python(self, value, state): @@ -1608,15 +1614,15 @@ 9: 30, 10: 31, 11: 30, 12: 31} messages = { - 'badFormat': 'Please enter the date in the form %(format)s', - 'monthRange': 'Please enter a month from 1 to 12', - 'invalidDay': 'Please enter a valid day', - 'dayRange': 'That month only has %(days)i days', - 'invalidDate': 'That is not a valid day (%(exception)s)', - 'unknownMonthName': "Unknown month name: %(month)s", - 'invalidYear': 'Please enter a number for the year', - 'fourDigitYear': 'Please enter a four-digit year', - 'wrongFormat': 'Please enter the date in the form %(format)s', + 'badFormat': _('Please enter the date in the form %(format)s'), + 'monthRange': _('Please enter a month from 1 to 12'), + 'invalidDay': _('Please enter a valid day'), + 'dayRange': _('That month only has %(days)i days'), + 'invalidDate': _('That is not a valid day (%(exception)s)'), + 'unknownMonthName': _("Unknown month name: %(month)s"), + 'invalidYear': _('Please enter a number for the year'), + 'fourDigitYear': _('Please enter a four-digit year'), + 'wrongFormat': _('Please enter the date in the form %(format)s'), } def _to_python(self, value, state): @@ -1794,15 +1800,15 @@ datetime_module = None messages = { - 'noAMPM': 'You must indicate AM or PM', - 'tooManyColon': 'There are too many :\'s', - 'noSeconds': 'You may not enter seconds', - 'secondsRequired': 'You must enter seconds', - 'minutesRequired': 'You must enter minutes (after a :)', - 'badNumber': 'The %(part)s value you gave is not a number: %(number)r', - 'badHour': 'You must enter an hour in the range %(range)s', - 'badMinute': 'You must enter a minute in the range 0-59', - 'badSecond': 'You must enter a second in the range 0-59', + 'noAMPM': _('You must indicate AM or PM'), + 'tooManyColon': _('There are too many :\'s'), + 'noSeconds': _('You may not enter seconds'), + 'secondsRequired': _('You must enter seconds'), + 'minutesRequired': _('You must enter minutes (after a :)'), + 'badNumber': _('The %(part)s value you gave is not a number: %(number)r'), + 'badHour': _('You must enter an hour in the range %(range)s'), + 'badMinute': _('You must enter a minute in the range 0-59'), + 'badSecond': _('You must enter a second in the range 0-59'), } def _to_python(self, value, state): @@ -1956,7 +1962,7 @@ strip = True messages = { - 'invalid': 'Please enter a zip code (5 digits)', + 'invalid': _('Please enter a zip code (5 digits)'), } class StripField(FancyValidator): @@ -1980,7 +1986,7 @@ __unpackargs__ = ('name',) messages = { - 'missing': 'The name %(name)s is missing', + 'missing': _('The name %(name)s is missing'), } def _to_python(self, valueDict, state): @@ -2021,7 +2027,7 @@ true_values = ['true', 't', 'yes', 'y', 'on', '1'] false_values = ['false', 'f', 'no', 'n', 'off', '0'] - messages = { "string" : "Value should be %(true)r or %(false)r" } + messages = { "string" : _("Value should be %(true)r or %(false)r") } def _to_python(self, value, state): if isinstance(value, (str, unicode)): @@ -2056,8 +2062,8 @@ """ messages = { - 'malformed': 'Value does not contain a signature', - 'badsig': 'Signature is not correct', + 'malformed': _('Value does not contain a signature'), + 'badsig': _('Signature is not correct'), } secret = None @@ -2179,8 +2185,8 @@ __unpackargs__ = ('*', 'field_names') messages = { - 'invalid': "Fields do not match (should be %(match)s)", - 'invalidNoMatch': "Fields do not match", + 'invalid': _("Fields do not match (should be %(match)s)"), + 'invalidNoMatch': _("Fields do not match"), } def validate_partial(self, field_dict, state): @@ -2242,9 +2248,9 @@ __unpackargs__ = ('cc_type_field', 'cc_number_field') messages = { - 'notANumber': "Please enter only the number, no other characters", - 'badLength': "You did not enter a valid number of digits", - 'invalidNumber': "That number is not valid", + 'notANumber': _("Please enter only the number, no other characters"), + 'badLength': _("You did not enter a valid number of digits"), + 'invalidNumber': _("That number is not valid"), } def validate_partial(self, field_dict, state): @@ -2359,8 +2365,8 @@ datetime_module = None messages = { - 'notANumber': "Please enter numbers only for month and year", - 'invalidNumber': "Invalid Expiration Date", + 'notANumber': _("Please enter numbers only for month and year"), + 'invalidNumber': _("Invalid Expiration Date"), } def validate_partial(self, field_dict, state): @@ -2429,8 +2435,8 @@ __unpackargs__ = ('cc_type_field', 'cc_code_field') messages = { - 'notANumber': "Please enter numbers only for credit card security code", - 'badLength': "Invalid credit card security code length", + 'notANumber': _("Please enter numbers only for credit card security code"), + 'badLength': _("Invalid credit card security code length"), } def validate_partial(self, field_dict, state): Modified: FormEncode/trunk/tests/test_cc_expires.py =================================================================== --- FormEncode/trunk/tests/test_cc_expires.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/tests/test_cc_expires.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -9,11 +9,11 @@ except Invalid, e: return e.unpack_errors()['ccExpiresMonth'] -messages = CreditCardExpires._messages +messages = ed.message def test_ed(): assert validate('11', '2250') is None - assert validate('11', 'test') == messages['notANumber'] - assert validate('test', '2250') == messages['notANumber'] - assert validate('10', '2005') == messages['invalidNumber'] - assert validate('10', '05') == messages['invalidNumber'] + assert validate('11', 'test') == messages('notANumber', None) + assert validate('test', '2250') == messages('notANumber', None) + assert validate('10', '2005') == messages('invalidNumber', None) + assert validate('10', '05') == messages('invalidNumber', None) Modified: FormEncode/trunk/tests/test_cc_validator.py =================================================================== --- FormEncode/trunk/tests/test_cc_validator.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/tests/test_cc_validator.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -9,11 +9,11 @@ except Invalid, e: return e.unpack_errors()['ccNumber'] -messages = CreditCardValidator._messages +messages = cc.message def test_cc(): assert validate('visa', '4'+('1'*15)) is None - assert validate('visa', '5'+('1'*12)) == messages['invalidNumber'] - assert validate('visa', '4'+('1'*11) + '2') == messages['invalidNumber'] - assert validate('visa', 'test') == messages['notANumber'] - assert validate('visa', '4'+('1'*10)) == messages['badLength'] + assert validate('visa', '5'+('1'*12)) == messages('invalidNumber', None) + assert validate('visa', '4'+('1'*11) + '2') == messages('invalidNumber', None) + assert validate('visa', 'test') == messages('notANumber', None) + assert validate('visa', '4'+('1'*10)) == messages('badLength', None) Added: FormEncode/trunk/tests/test_i18n.py =================================================================== --- FormEncode/trunk/tests/test_i18n.py (rev 0) +++ FormEncode/trunk/tests/test_i18n.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +import formencode + +import os + +ne = formencode.validators.NotEmpty() + +def _test_builtins(func): + def dummy(s): + return "builtins dummy" + import __builtin__ + __builtin__._ = dummy + + try: + ne.to_python("") + except formencode.api.Invalid, e: + func(e) + + del __builtin__._ + +def test_builtins(): + def withbuiltins(e): + assert str(e) == "builtins dummy" + + _test_builtins(withbuiltins) + + +def test_bultins_disabled(): + def withoutbuiltins(e): + assert str(e) <> "builtins dummy" + + ne.use_builtins_gettext = False + _test_builtins(withoutbuiltins) + + + +def test_state(): + class st(object): + def _(self, s): + return "state dummy" + + try: + ne.to_python("", state=st()) + except formencode.api.Invalid, e: + assert str(e) == "state dummy" + + +def _test_lang(language, notemptytext): + + formencode.api.set_stdtranslation(languages=[language]) + + try: + ne.to_python("") + except formencode.api.Invalid, e: + assert unicode(e) == notemptytext + + formencode.api.set_stdtranslation() #set back to defaults + + +def test_de(): + _test_lang("de", u"Bitte einen Wert eingeben") + +def test_es(): + _test_lang("es", u"Por favor introduzca un valor") + +def test_pt_BR(): + _test_lang("pt_BR", u"Por favor digite um valor") + +def test_big5(): + _test_lang("big5", u"請輸入一個值") + +def test_sk(): + _test_lang("sk",u"Zadajte hodnotu, prosím") + +def test_ru(): + _test_lang("ru",u"Необходимо ввести значение") + + +def test_sl(): + _test_lang("sl",u"Prosim, izpolnite polje") + Modified: FormEncode/trunk/tests/test_schema.py =================================================================== --- FormEncode/trunk/tests/test_schema.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/tests/test_schema.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -4,6 +4,23 @@ from formencode.variabledecode import NestedVariables import cgi + +def setup_module(module): + """Disable i18n translation + """ + def notranslation(s): return s + import __builtin__ + __builtin__._ = notranslation + + + +def teardown_module(module): + """Remove translation function + """ + import __builtin__ + del __builtin__._ + + def d(**kw): return kw def cgi_parse(qs): @@ -114,9 +131,11 @@ text="The input field 'whatever' was not expected.") def test_this(): + for case in all_cases: yield case.test + def test_merge(): assert (merge_dicts(dict(a='a'), dict(b='b')) == dict(a='a', b='b')) @@ -128,4 +147,5 @@ c='foo')) == dict(a=['a1\naa1', 'a2'], b=['b\nbb', 'bbb'], c=['c'])) - + + Modified: FormEncode/trunk/tests/test_sqlschema.py =================================================================== --- FormEncode/trunk/tests/test_sqlschema.py 2006-12-01 07:04:20 UTC (rev 2105) +++ FormEncode/trunk/tests/test_sqlschema.py 2006-12-01 18:19:05 UTC (rev 2106) @@ -3,6 +3,22 @@ from formencode import validators from datetime import datetime, date +def setup_module(module): + """Disable i18n translation + """ + def notranslation(s): return s + import __builtin__ + __builtin__._ = notranslation + + + +def teardown_module(module): + """Remove translation function + """ + import __builtin__ + del __builtin__._ + + sqlhub.processConnection = connectionForURI('sqlite:/:memory:') class EventObject(SQLObject): |
|
From: <sub...@co...> - 2006-12-01 07:04:23
|
Author: gh
Date: 2006-12-01 00:04:20 -0700 (Fri, 01 Dec 2006)
New Revision: 2105
Added:
FormEncode/branches/gettext-enabled/formencode/i18n/sl/
FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/
FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.mo
FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.po
Modified:
FormEncode/branches/gettext-enabled/tests/test_i18n.py
Log:
added Slovenian translation sl
Added: FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.mo
===================================================================
(Binary files differ)
Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.po
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.po (rev 0)
+++ FormEncode/branches/gettext-enabled/formencode/i18n/sl/LC_MESSAGES/FormEncode.po 2006-12-01 07:04:20 UTC (rev 2105)
@@ -0,0 +1,325 @@
+# Slovene translation for FormEncode.
+# Copyright (C) 2006 Matej Barič
+# Matej Barič <mat...@gm...>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: FormEncode 0.6\n"
+"POT-Creation-Date: 2006-10-02 20:59+CEST\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Matej Barič <mat...@gm...>\n"
+"Language-Team: Matej Barič <mat...@gm...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: utf-8\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: api.py:335 validators.py:433
+msgid "Please enter a value"
+msgstr "Prosim, izpolnite polje"
+
+#: api.py:336
+msgid "The input must be a string (not a %(type)s: %(value)r)"
+msgstr "Vsebina polja mora biti niz (ne %(type)s: %(value)r)"
+
+#: api.py:337
+msgid "The input must be a string (not None)"
+msgstr "Vsebina polja mora biti niz (ne None)"
+
+#: validators.py:160
+msgid "%(object)r is not a subclass of %(subclass)s"
+msgstr "%(object)r ni podrazred razreda %(subclass)s"
+
+#: validators.py:161
+msgid "%(object)r is not a subclass of one of the types %(subclassList)s"
+msgstr "%(object)r ni podrazred enega izmed razredov %(subclassList)s"
+
+#: validators.py:162
+msgid "%(object)r must be one of the types %(typeList)s"
+msgstr "%(object)r mora biti eden izmed razredov %(typeList)s"
+
+#: validators.py:163
+msgid "%(object)r must be of the type %(type)s"
+msgstr "%(object)r mora biti izvod razreda %(type)s"
+
+#: validators.py:344
+msgid "Enter a value less than %(maxLength)i characters long"
+msgstr "Vnesite vrednost, krajšo od %(maxLength)i znakov"
+
+#: validators.py:345 validators.py:399
+msgid "Invalid value (value with length expected)"
+msgstr "Neveljavna vrednost (pričakovana je bila vrednost z dolžino)"
+
+#: validators.py:398
+msgid "Enter a value at least %(minLength)i characters long"
+msgstr "Vnesite vrednost, dolgo najmanj %(minLength)i znakov"
+
+#: validators.py:458
+msgid "You cannot enter a value here"
+msgstr "Tukaj ne morete vnesti vrednosti"
+
+#: validators.py:509
+msgid "The input is not valid"
+msgstr "Vrednost je neveljavna"
+
+#: validators.py:565
+msgid "Enter only letters, numbers, or _ (underscore)"
+msgstr "Vnašajte samo črke, številke ali _ (podčrtaj)"
+
+#: validators.py:604
+msgid "Invalid value"
+msgstr "Neveljaven vnos"
+
+#: validators.py:605
+msgid "Value must be one of: %(items)s (not %(value)r)"
+msgstr "Vrednost mora biti ena izmed: (%items)s (ne %(value)r)"
+
+#: validators.py:668
+msgid "Choose something"
+msgstr "Izberite nekaj"
+
+#: validators.py:669
+msgid "Enter a value from: %(items)s"
+msgstr "Vnesite eno izmed vrednosti: %(items)s"
+
+#: validators.py:670
+msgid "That value is not known"
+msgstr "Ta vrednost ni znana"
+
+#: validators.py:671
+msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s"
+msgstr "Slovar ne vsebuje vrednosti %(value)s. Izberite eno izmed: %(items)s"
+
+#: validators.py:732
+msgid "Must be an integer index"
+msgstr "Biti mora celoštevilčni indeks"
+
+#: validators.py:733
+msgid "Index out of range"
+msgstr "Indeks je izven veljavnega območja"
+
+#: validators.py:734
+msgid "Item %(value)s was not found in the list"
+msgstr "Element %(value)s ni bil najden v seznamu"
+
+#: validators.py:809
+msgid "Date must be after %(date)s"
+msgstr "Datum mora biti poznejši od %(date)s"
+
+#: validators.py:810
+msgid "Date must be before %(date)s"
+msgstr "Datum mora biti pred %(date)s"
+
+#: validators.py:812
+msgid "%%A, %%d %%B %%Y"
+msgstr "%%A, %%d. %%B %%Y"
+
+#: validators.py:813
+msgid "The date must be sometime in the future"
+msgstr "Datum mora biti v prihodnosti"
+
+#: validators.py:913
+msgid "Please enter an integer value"
+msgstr "Prosim, vnesite celoštevilčno vrednost"
+
+#: validators.py:945
+msgid "Please enter a number"
+msgstr "Prosim, vnesite številko"
+
+#: validators.py:998
+msgid "Enter a value less than %(max)i characters long"
+msgstr "Vnesite vrednost, krajšo od %(max)i znakov"
+
+#: validators.py:999
+msgid "Enter a value %(min)i characters long or more"
+msgstr "Vnesite vrednost, dolgo najmanj %(min)i znakov"
+
+#: validators.py:1050
+msgid "Invalid data or incorrect encoding"
+msgstr "Neveljaven podatek ali nepravilen encoding"
+
+#: validators.py:1178
+msgid "Please enter an email address"
+msgstr "Prosim, vnesite e-poštni naslov"
+
+#: validators.py:1179
+msgid "An email address must contain a single @"
+msgstr "E-poštni naslov mora vsebovati en sam znak @"
+
+#: validators.py:1180
+msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)"
+msgstr "Prvi del e-poštnega naslova je neveljaven: %(username)s)"
+
+#: validators.py:1181 validators.py:1294
+msgid "An error occured when trying to connect to the server: %(error)s"
+msgstr "Pojavila se je napaka pri povezovanju na strežnik: %(error)s"
+
+#: validators.py:1182
+msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)"
+msgstr "Domenski del e-poštnega naslova je neveljaven: %(domain)s"
+
+#: validators.py:1183
+msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)"
+msgstr "Domena e-poštnega naslova ne obstaja: %(domain)s"
+
+#: validators.py:1291
+msgid "You must start your URL with http://, https://, etc"
+msgstr "URL naslov se mora začeti s http://, https://, itd"
+
+#: validators.py:1292
+msgid "That is not a valid URL"
+msgstr "URL naslov je neveljaven"
+
+#: validators.py:1293
+msgid "An error occurred when trying to access the URL: %(error)s"
+msgstr "Pojavila se je napaka pri doseganju URL naslova: %(error)s"
+
+#: validators.py:1295
+msgid "The server responded that the page could not be found"
+msgstr "Strežnik je sporočil, da stran ni bila najdena"
+
+#: validators.py:1296
+msgid "The server responded with a bad status code (%(status)s)"
+msgstr ""
+
+#: validators.py:1399
+msgid "Please enter a state code"
+msgstr ""
+
+#: validators.py:1400
+msgid "Please enter a state code with TWO letters"
+msgstr ""
+
+#: validators.py:1401
+msgid "That is not a valid state code"
+msgstr ""
+
+#: validators.py:1452
+msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\""
+msgstr ""
+
+#: validators.py:1614 validators.py:1622
+msgid "Please enter the date in the form %(format)s"
+msgstr "Prosim, vnesite datum v obliki %(format)s"
+
+#: validators.py:1615
+msgid "Please enter a month from 1 to 12"
+msgstr "Prosim, vnesite mesec od 1 do 12"
+
+#: validators.py:1616
+msgid "Please enter a valid day"
+msgstr "Prosim, vnesite veljaven dan"
+
+#: validators.py:1617
+msgid "That month only has %(days)i days"
+msgstr "Ta mesec ima samo %(days)i dni"
+
+#: validators.py:1618
+msgid "That is not a valid day (%(exception)s)"
+msgstr "Dan ni veljaven (%(exception)s)"
+
+#: validators.py:1619
+msgid "Unknown month name: %(month)s"
+msgstr "Neznano ime meseca: %(month)s"
+
+#: validators.py:1620
+msgid "Please enter a number for the year"
+msgstr "Prosim, vnesite leto"
+
+#: validators.py:1621
+msgid "Please enter a four-digit year"
+msgstr "Prosim, vnesite štirimestno leto"
+
+#: validators.py:1800
+msgid "You must indicate AM or PM"
+msgstr "Določiti morate AM ali PM"
+
+#: validators.py:1801
+msgid "There are too many :'s"
+msgstr "Preveč dvopičij"
+
+#: validators.py:1802
+msgid "You may not enter seconds"
+msgstr "Ne morete vnesti sekund"
+
+#: validators.py:1803
+msgid "You must enter seconds"
+msgstr "Vnesti morate sekunde"
+
+#: validators.py:1804
+msgid "You must enter minutes (after a :)"
+msgstr "Vnesti morate minute (za dvopičjem)"
+
+#: validators.py:1805
+msgid "The %(part)s value you gave is not a number: %(number)r"
+msgstr "%(part)s vrednost ni število: %(number)r"
+
+#: validators.py:1806
+msgid "You must enter an hour in the range %(range)s"
+msgstr "Vnesti morate uro v območju %(range)s"
+
+#: validators.py:1807
+msgid "You must enter a minute in the range 0-59"
+msgstr "Vnesti morate minute v območju 0-59"
+
+#: validators.py:1808
+msgid "You must enter a second in the range 0-59"
+msgstr "Vnesti morate sekunde v območju 0-59"
+
+#: validators.py:1962
+msgid "Please enter a zip code (5 digits)"
+msgstr ""
+
+#: validators.py:1986
+msgid "The name %(name)s is missing"
+msgstr "Ime %(name)s manjka"
+
+#: validators.py:2027
+msgid "Value should be %(true)r or %(false)r"
+msgstr "Vrednost je lahko %(true)r ali %(false)r"
+
+#: validators.py:2062
+msgid "Value does not contain a signature"
+msgstr "Vrednost ne vsebuje podpisa"
+
+#: validators.py:2063
+msgid "Signature is not correct"
+msgstr "Podpis je nepravilen"
+
+#: validators.py:2185
+msgid "Fields do not match (should be %(match)s)"
+msgstr "Polja se ne ujemajo (biti mora %(match)s)"
+
+#: validators.py:2186
+msgid "Fields do not match"
+msgstr "Polja se ne ujemajo"
+
+#: validators.py:2248
+msgid "Please enter only the number, no other characters"
+msgstr "Prosim, vnesite samo število brez drugih znakov"
+
+#: validators.py:2249
+msgid "You did not enter a valid number of digits"
+msgstr "Niste vnesli veljavnega števila cifer"
+
+#: validators.py:2250
+msgid "That number is not valid"
+msgstr "Ta številka je neveljavna"
+
+#: validators.py:2365
+msgid "Please enter numbers only for month and year"
+msgstr "Prosim, vnesite samo števila za mesec in leto"
+
+#: validators.py:2366
+msgid "Invalid Expiration Date"
+msgstr "Neveljaven datum poteka veljavnosti"
+
+#: validators.py:2435
+msgid "Please enter numbers only for credit card security code"
+msgstr "Prosim, vnesite številke samo za varnostno kodo kartice"
+
+#: validators.py:2436
+msgid "Invalid credit card security code length"
+msgstr "Neveljavna dolžina varnostne kode kartice"
+
Modified: FormEncode/branches/gettext-enabled/tests/test_i18n.py
===================================================================
--- FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-11-23 15:18:24 UTC (rev 2104)
+++ FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-12-01 07:04:20 UTC (rev 2105)
@@ -75,3 +75,7 @@
def test_ru():
_test_lang("ru",u"Необходимо ввести значение")
+
+def test_sl():
+ _test_lang("sl",u"Prosim, izpolnite polje")
+
|
|
From: <sub...@co...> - 2006-11-10 05:58:55
|
Author: gh Date: 2006-11-09 22:58:53 -0700 (Thu, 09 Nov 2006) New Revision: 2065 Modified: FormEncode/branches/gettext-enabled/formencode/schema.py Log: Bugfix schema.py str assertion; see http://groups.google.at/group/turbogears/msg/bc89e30db68450b2?hl=de& Modified: FormEncode/branches/gettext-enabled/formencode/schema.py =================================================================== --- FormEncode/branches/gettext-enabled/formencode/schema.py 2006-11-06 19:47:05 UTC (rev 2064) +++ FormEncode/branches/gettext-enabled/formencode/schema.py 2006-11-10 05:58:53 UTC (rev 2065) @@ -309,7 +309,7 @@ ['%s' % (format_compound_error(value, indent=indent)) for value in v if value is not None]) - elif isinstance(v, str): + elif isinstance(v, basestring): return v else: assert 0, "I didn't expect something like %s" % repr(v) |
|
From: <sub...@co...> - 2006-10-31 10:19:31
|
Author: gh Date: 2006-10-31 03:19:15 -0700 (Tue, 31 Oct 2006) New Revision: 2058 Modified: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po Log: fixed Typos in ru translation Modified: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Modified: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po =================================================================== --- FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po 2006-10-31 09:31:55 UTC (rev 2057) +++ FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po 2006-10-31 10:19:15 UTC (rev 2058) @@ -6,14 +6,13 @@ msgstr "" "Project-Id-Version: FormEncode 0.6\n" "POT-Creation-Date: 2006-10-02 20:59+CEST\n" -"PO-Revision-Date: 2006-10-30 14:19+0200\n" +"PO-Revision-Date: 2006-10-31 11:59+0200\n" "Last-Translator: Oleg Deribas <thi...@td...>\n" "Language-Team: RUSSIAN <RU...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: pygettext.py 1.5\n" -"X-Poedit-Language: Russian\n" #: api.py:335 #: validators.py:433 @@ -314,7 +313,7 @@ #: validators.py:2365 msgid "Please enter numbers only for month and year" -msgstr "Введите числв только для месяца и года" +msgstr "Введите числа только для месяца и года" #: validators.py:2366 msgid "Invalid Expiration Date" |
|
From: <sub...@co...> - 2006-10-31 09:31:58
|
Author: gh Date: 2006-10-31 02:31:55 -0700 (Tue, 31 Oct 2006) New Revision: 2057 Added: FormEncode/branches/gettext-enabled/formencode/i18n/ru/ FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/ FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po Log: added translation ru; now with i18n/ru Added: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.mo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po =================================================================== --- FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po (rev 0) +++ FormEncode/branches/gettext-enabled/formencode/i18n/ru/LC_MESSAGES/FormEncode.po 2006-10-31 09:31:55 UTC (rev 2057) @@ -0,0 +1,330 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: FormEncode 0.6\n" +"POT-Creation-Date: 2006-10-02 20:59+CEST\n" +"PO-Revision-Date: 2006-10-30 14:19+0200\n" +"Last-Translator: Oleg Deribas <thi...@td...>\n" +"Language-Team: RUSSIAN <RU...@li...>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" +"X-Poedit-Language: Russian\n" + +#: api.py:335 +#: validators.py:433 +msgid "Please enter a value" +msgstr "Необходимо ввести значение" + +#: api.py:336 +msgid "The input must be a string (not a %(type)s: %(value)r)" +msgstr "Необходимо ввести строку (а не %(type)s: %(value)r)" + +#: api.py:337 +msgid "The input must be a string (not None)" +msgstr "Необходимо ввести строку (не None)" + +#: validators.py:160 +msgid "%(object)r is not a subclass of %(subclass)s" +msgstr "%(object)r не является подклассом %(subclass)s" + +#: validators.py:161 +msgid "%(object)r is not a subclass of one of the types %(subclassList)s" +msgstr "%(object)r не является подклассом одного из типов %(subclassList)s" + +#: validators.py:162 +msgid "%(object)r must be one of the types %(typeList)s" +msgstr "%(object)r должен быть одним из типов %(typeList)s" + +#: validators.py:163 +msgid "%(object)r must be of the type %(type)s" +msgstr "%(object)r должен быть типа %(type)s" + +#: validators.py:344 +msgid "Enter a value less than %(maxLength)i characters long" +msgstr "Введите значение меньшее чем %(maxLength)i символов" + +#: validators.py:345 +#: validators.py:399 +msgid "Invalid value (value with length expected)" +msgstr "Неправильное значение (ожидается значение с длиной)" + +#: validators.py:398 +msgid "Enter a value at least %(minLength)i characters long" +msgstr "Длина значения должна быть не меньше чем %(minLength)i" + +#: validators.py:458 +msgid "You cannot enter a value here" +msgstr "Сюда значение вводить нельзя" + +#: validators.py:509 +msgid "The input is not valid" +msgstr "Неправильный ввод" + +#: validators.py:565 +msgid "Enter only letters, numbers, or _ (underscore)" +msgstr "Допускается ввод только букв, чисел или _ (знаков подчеркивания)" + +#: validators.py:604 +msgid "Invalid value" +msgstr "Неправильное значение" + +#: validators.py:605 +msgid "Value must be one of: %(items)s (not %(value)r)" +msgstr "Значение должно быть одним из: %(items)s (но не %(value)r)" + +#: validators.py:668 +msgid "Choose something" +msgstr "Выберите что-нибудь" + +#: validators.py:669 +msgid "Enter a value from: %(items)s" +msgstr "Введите одно из следующих значений: %(items)s" + +#: validators.py:670 +msgid "That value is not known" +msgstr "Неизвестное значение" + +#: validators.py:671 +msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s" +msgstr "В моем словаре нет совпадений с значением %(value)s. Выберите одно из: %(items)s" + +#: validators.py:732 +msgid "Must be an integer index" +msgstr "Индекс должен быть числовым значением" + +#: validators.py:733 +msgid "Index out of range" +msgstr "Неправильный индекс " + +#: validators.py:734 +msgid "Item %(value)s was not found in the list" +msgstr "Пункт %(value)s отсутствуетв списке" + +#: validators.py:809 +msgid "Date must be after %(date)s" +msgstr "Дата должна быть позже чем %(date)s" + +#: validators.py:810 +msgid "Date must be before %(date)s" +msgstr "Дата должна быть раньше чем %(date)s" + +#: validators.py:812 +#, fuzzy +msgid "%%A, %%d %%B %%Y" +msgstr "" + +#: validators.py:813 +msgid "The date must be sometime in the future" +msgstr "Дата должна быть в будущем" + +#: validators.py:913 +msgid "Please enter an integer value" +msgstr "Введите числовое значение" + +#: validators.py:945 +msgid "Please enter a number" +msgstr "Введите число" + +#: validators.py:998 +msgid "Enter a value less than %(max)i characters long" +msgstr "Введите значение длиной меньше чем %(max)i символов" + +#: validators.py:999 +msgid "Enter a value %(min)i characters long or more" +msgstr "Введите значение длиной %(min)i или более символов" + +#: validators.py:1050 +msgid "Invalid data or incorrect encoding" +msgstr "Неправильные данные или неверная кодировка" + +#: validators.py:1178 +msgid "Please enter an email address" +msgstr "Введите email адрес" + +#: validators.py:1179 +msgid "An email address must contain a single @" +msgstr "email адрес должен содержать один символ @" + +#: validators.py:1180 +msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)" +msgstr "Неправильное имя пользователя в email адресе (часть адреса до символа @: %(username)s)" + +#: validators.py:1181 +#: validators.py:1294 +msgid "An error occured when trying to connect to the server: %(error)s" +msgstr "При подключении к серверу произошла ошибка: %(error)s" + +#: validators.py:1182 +msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)" +msgstr "Неверная доменная часть email адреса (часть после символа @: %(domain)s)" + +#: validators.py:1183 +msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)" +msgstr "Домен email адреса не существует (часть после символа @: %(domain)s)" + +#: validators.py:1291 +msgid "You must start your URL with http://, https://, etc" +msgstr "Сетевой адрес (URL) должен начинаться с http://, https://, и т. д." + +#: validators.py:1292 +msgid "That is not a valid URL" +msgstr "Неправильный сетевой адрес (URL)" + +#: validators.py:1293 +msgid "An error occurred when trying to access the URL: %(error)s" +msgstr "Ошибка доступа по адресу: %(error)s" + +#: validators.py:1295 +msgid "The server responded that the page could not be found" +msgstr "Сервер сообщает что страница не найдена" + +#: validators.py:1296 +msgid "The server responded with a bad status code (%(status)s)" +msgstr "Неправильный статусный код ответа сервера: (%(status)s)" + +#: validators.py:1399 +msgid "Please enter a state code" +msgstr "Введите код штата" + +#: validators.py:1400 +msgid "Please enter a state code with TWO letters" +msgstr "Введите код штата из ДВУХ букв" + +#: validators.py:1401 +msgid "That is not a valid state code" +msgstr "Неправильный код штата" + +#: validators.py:1452 +msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\"" +msgstr "Введите номер с кодом города в виде ###-###-####, возможно с дополнением \"ext.####\"" + +#: validators.py:1614 +#: validators.py:1622 +msgid "Please enter the date in the form %(format)s" +msgstr "Введите дату в виде %(format)s" + +#: validators.py:1615 +msgid "Please enter a month from 1 to 12" +msgstr "ведите номер месяца от 1 до 12" + +#: validators.py:1616 +msgid "Please enter a valid day" +msgstr "Введите правильный день" + +#: validators.py:1617 +msgid "That month only has %(days)i days" +msgstr "Этот месяц содержит только %(days)i дней" + +#: validators.py:1618 +msgid "That is not a valid day (%(exception)s)" +msgstr "Неправильный день (%(exception)s)" + +#: validators.py:1619 +msgid "Unknown month name: %(month)s" +msgstr "Неизвестное имя месяца: %(month)s" + +#: validators.py:1620 +msgid "Please enter a number for the year" +msgstr "Введите числовое значение для года" + +#: validators.py:1621 +msgid "Please enter a four-digit year" +msgstr "Введите четырехзначный год" + +#: validators.py:1800 +msgid "You must indicate AM or PM" +msgstr "Необходимо указать AM или PM" + +#: validators.py:1801 +msgid "There are too many :'s" +msgstr "Слишком много :'s" + +#: validators.py:1802 +msgid "You may not enter seconds" +msgstr "Секунды можно не вводить" + +#: validators.py:1803 +msgid "You must enter seconds" +msgstr "Необходимо ввести секунды" + +#: validators.py:1804 +msgid "You must enter minutes (after a :)" +msgstr "Необходимо ввести минуты (после :)" + +#: validators.py:1805 +msgid "The %(part)s value you gave is not a number: %(number)r" +msgstr "Вы ввели значение %(part)s которое не является числом: %(number)r" + +#: validators.py:1806 +msgid "You must enter an hour in the range %(range)s" +msgstr "Значение часов должно быть в диапазоне %(range)s" + +#: validators.py:1807 +msgid "You must enter a minute in the range 0-59" +msgstr "Необходимо ввести минуты в диапазоне от 0 до 59" + +#: validators.py:1808 +msgid "You must enter a second in the range 0-59" +msgstr "Необходимо ввести секунды в диапазоне от 0 до 59" + +#: validators.py:1962 +msgid "Please enter a zip code (5 digits)" +msgstr "Введите zip-код (5 цифр)" + +#: validators.py:1986 +msgid "The name %(name)s is missing" +msgstr "Отсутствует имя %(name)s" + +#: validators.py:2027 +msgid "Value should be %(true)r or %(false)r" +msgstr "Значение должно быть %(true)r или %(false)r" + +#: validators.py:2062 +msgid "Value does not contain a signature" +msgstr "Значение не содержит подписи" + +#: validators.py:2063 +msgid "Signature is not correct" +msgstr "Неверная подпись" + +#: validators.py:2185 +msgid "Fields do not match (should be %(match)s)" +msgstr "Поля не совпадают (должно быть %(match)s)" + +#: validators.py:2186 +msgid "Fields do not match" +msgstr "Поля не совпадают" + +#: validators.py:2248 +msgid "Please enter only the number, no other characters" +msgstr "Введите только номер, без прочих символов" + +#: validators.py:2249 +msgid "You did not enter a valid number of digits" +msgstr "Вы ввели неправильное количество цифр" + +#: validators.py:2250 +msgid "That number is not valid" +msgstr "Неверный номер " + +#: validators.py:2365 +msgid "Please enter numbers only for month and year" +msgstr "Введите числв только для месяца и года" + +#: validators.py:2366 +msgid "Invalid Expiration Date" +msgstr "Неправильная дата окончания периода обслуживания" + +#: validators.py:2435 +msgid "Please enter numbers only for credit card security code" +msgstr "Введите числа только для кода кредитной карты" + +#: validators.py:2436 +msgid "Invalid credit card security code length" +msgstr "Неправильная длина кода кредитной карты" + |
|
From: <sub...@co...> - 2006-10-31 09:31:03
|
Author: gh
Date: 2006-10-31 02:30:37 -0700 (Tue, 31 Oct 2006)
New Revision: 2056
Modified:
FormEncode/branches/gettext-enabled/tests/test_i18n.py
Log:
added translation ru
Modified: FormEncode/branches/gettext-enabled/tests/test_i18n.py
===================================================================
--- FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-30 19:49:05 UTC (rev 2055)
+++ FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-31 09:30:37 UTC (rev 2056)
@@ -72,3 +72,6 @@
def test_sk():
_test_lang("sk",u"Zadajte hodnotu, prosím")
+def test_ru():
+ _test_lang("ru",u"Необходимо ввести значение")
+
|
|
From: <sub...@co...> - 2006-10-18 23:05:54
|
Author: ianb
Date: 2006-10-18 17:05:14 -0600 (Wed, 18 Oct 2006)
New Revision: 2027
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Fix formatting of error
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:54:35 UTC (rev 2026)
+++ FormEncode/trunk/formencode/htmlfill.py 2006-10-18 23:05:14 UTC (rev 2027)
@@ -237,12 +237,12 @@
except UnicodeDecodeError, e:
if self.data_is_str:
e.reason += (
- "The form was passed in as an encoded string, but "
+ " the form was passed in as an encoded string, but "
"some data or error messages were unicode strings; "
"the form should be passed in as a unicode string")
else:
e.reason += (
- "The form was passed in as an unicode string, but "
+ " the form was passed in as an unicode string, but "
"some data or error message was an encoded string; "
"the data and error messages should be passed in as "
"unicode strings")
|
|
From: <sub...@co...> - 2006-10-18 22:55:19
|
Author: ianb
Date: 2006-10-18 16:54:35 -0600 (Wed, 18 Oct 2006)
New Revision: 2026
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Fix the way the last commit raises the error
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:08:13 UTC (rev 2025)
+++ FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:54:35 UTC (rev 2026)
@@ -236,17 +236,17 @@
t for t in self._content if not isinstance(t, tuple)])
except UnicodeDecodeError, e:
if self.data_is_str:
- raise UnicodeDecodeError(
+ e.reason += (
"The form was passed in as an encoded string, but "
"some data or error messages were unicode strings; "
- "the form should be passed in as a unicode string "
- "(error: %s)" % e)
+ "the form should be passed in as a unicode string")
else:
- raise UnicodeDecodeError(
+ e.reason += (
"The form was passed in as an unicode string, but "
"some data or error message was an encoded string; "
"the data and error messages should be passed in as "
- "unicode strings (error: %s)" % e)
+ "unicode strings")
+ raise
def add_key(self, key):
self.used_keys[key] = 1
|
|
From: <sub...@co...> - 2006-10-18 22:08:56
|
Author: ianb
Date: 2006-10-18 16:08:13 -0600 (Wed, 18 Oct 2006)
New Revision: 2025
Modified:
FormEncode/trunk/formencode/htmlfill.py
Log:
Improve the error message when you mix unicode and an encoded form
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2006-10-16 14:43:35 UTC (rev 2024)
+++ FormEncode/trunk/formencode/htmlfill.py 2006-10-18 22:08:13 UTC (rev 2025)
@@ -195,6 +195,7 @@
self.text_as_default = text_as_default
def feed(self, data):
+ self.data_is_str = isinstance(data, str)
self.source = data
self.lines = data.split('\n')
self.source_pos = 1, 0
@@ -230,8 +231,22 @@
assert False, (
"These errors were not used in the form: %s" %
', '.join(error_text))
- self._text = ''.join([
- t for t in self._content if not isinstance(t, tuple)])
+ try:
+ self._text = ''.join([
+ t for t in self._content if not isinstance(t, tuple)])
+ except UnicodeDecodeError, e:
+ if self.data_is_str:
+ raise UnicodeDecodeError(
+ "The form was passed in as an encoded string, but "
+ "some data or error messages were unicode strings; "
+ "the form should be passed in as a unicode string "
+ "(error: %s)" % e)
+ else:
+ raise UnicodeDecodeError(
+ "The form was passed in as an unicode string, but "
+ "some data or error message was an encoded string; "
+ "the data and error messages should be passed in as "
+ "unicode strings (error: %s)" % e)
def add_key(self, key):
self.used_keys[key] = 1
|
|
From: <sub...@co...> - 2006-10-10 20:21:19
|
Author: ianb
Date: 2006-10-10 14:21:19 -0600 (Tue, 10 Oct 2006)
New Revision: 2005
Modified:
FormEncode/trunk/formencode/formgen.py
FormEncode/trunk/formencode/sqlformgen.py
Log:
Removed/replaced decorator syntax
Modified: FormEncode/trunk/formencode/formgen.py
===================================================================
--- FormEncode/trunk/formencode/formgen.py 2006-10-10 20:18:56 UTC (rev 2004)
+++ FormEncode/trunk/formencode/formgen.py 2006-10-10 20:21:19 UTC (rev 2005)
@@ -9,7 +9,7 @@
pkg_resources.require('RuleDispatch')
import dispatch
-@dispatch.generic()
+#@dispatch.generic()
def makeform(obj, context):
"""
Return ``(field_obj, Schema)``.
@@ -20,3 +20,5 @@
"""
raise NotImplementedError
+makeform = dispatch.generic()(makeform)
+
Modified: FormEncode/trunk/formencode/sqlformgen.py
===================================================================
--- FormEncode/trunk/formencode/sqlformgen.py 2006-10-10 20:18:56 UTC (rev 2004)
+++ FormEncode/trunk/formencode/sqlformgen.py 2006-10-10 20:21:19 UTC (rev 2005)
@@ -8,7 +8,7 @@
from sqlobject import col
-@makeform.when('isinstance(obj, SQLObject) or (isinstance(obj, type) and issubclass(obj, SQLObject))')
+#@makeform.when('isinstance(obj, SQLObject) or (isinstance(obj, type) and issubclass(obj, SQLObject))')
def makeform_new_sqlobject(obj, context):
isinst = isinstance(obj, SQLObject)
sqlmeta = obj.sqlmeta
@@ -43,18 +43,27 @@
restore.pop_attr()
return layout, s
+makeform_new_sqlobject = makeform.when('isinstance(obj, SQLObject) or (isinstance(obj, type) and issubclass(obj, SQLObject))')(makeform_new_sqlobject)
+
def coldesc(col):
return getattr(col, 'description', col.name)
-@makeform.when('isinstance(obj, col.SOStringLikeCol)')
+#@makeform.when('isinstance(obj, col.SOStringLikeCol)')
def makeform_string_col(obj, context):
return fields.Text(context, description=coldesc(obj)), None
-@makeform.when('isinstance(obj, col.SOBoolCol)')
+makeform_string_col = makeform.when('isinstance(obj, col.SOStringLikeCol)')(makeform_string_col)
+
+#@makeform.when('isinstance(obj, col.SOBoolCol)')
def makeform_bool_col(obj, context):
return (fields.Checkbox(context, description=coldesc(obj)),
validators.Bool())
-@makeform.when('isinstance(obj, col.SOForeignKey) and getattr(obj, "editinline", False)')
+makeform_bool_col = makeform.when('isinstance(obj, col.SOBoolCol)')(makeform_bool_col)
+
+#@makeform.when('isinstance(obj, col.SOForeignKey) and getattr(obj, "editinline", False)')
def makeform_foreign(obj, context):
external_class = col.findClass(obj.foreignKey)
+
+makeform_foreign = makeform.when('isinstance(obj, col.SOForeignKey) and getattr(obj, "editinline", False)')(makeform_foreign)
+
|
|
From: <sub...@co...> - 2006-10-10 20:18:57
|
Author: ianb
Date: 2006-10-10 14:18:56 -0600 (Tue, 10 Oct 2006)
New Revision: 2004
Modified:
FormEncode/trunk/formencode/validators.py
Log:
Make validators.Regex accept unicode
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2006-10-10 20:14:22 UTC (rev 2003)
+++ FormEncode/trunk/formencode/validators.py 2006-10-10 20:18:56 UTC (rev 2004)
@@ -505,13 +505,13 @@
def __init__(self, *args, **kw):
FancyValidator.__init__(self, *args, **kw)
- if isinstance(self.regex, str):
+ if isinstance(self.regex, basestring):
ops = 0
- assert not isinstance(self.regexOps, str), (
+ assert not isinstance(self.regexOps, basestring), (
"regexOps should be a list of options from the re module "
"(names, or actual values)")
for op in self.regexOps:
- if isinstance(op, str):
+ if isinstance(op, basestring):
ops |= getattr(re, op)
else:
ops |= op
@@ -519,15 +519,14 @@
def validate_python(self, value, state):
self.assert_string(value, state)
- if self.strip and (isinstance(value, str) or isinstance(value, unicode)):
+ if self.strip and isinstance(value, basestring):
value = value.strip()
if not self.regex.search(value):
raise Invalid(self.message('invalid', state),
value, state)
def _to_python(self, value, state):
- if self.strip and \
- (isinstance(value, str) or isinstance(value, unicode)):
+ if self.strip and isinstance(value, basestring):
return value.strip()
return value
@@ -1160,6 +1159,8 @@
Traceback (most recent call last):
...
Invalid: The domain of the email address does not exist (the portion after the @: thisdomaindoesnotexistithinkforsure.com)
+ >>> e = Email(not_empty=False)
+ >>> e.to_python('')
"""
|
|
From: <sub...@co...> - 2006-10-10 20:14:25
|
Author: ianb Date: 2006-10-10 14:14:22 -0600 (Tue, 10 Oct 2006) New Revision: 2003 Modified: FormEncode/trunk/docs/news.txt FormEncode/trunk/formencode/validators.py Log: #1373485 -- from formencode.validators import * will import Invalid Modified: FormEncode/trunk/docs/news.txt =================================================================== --- FormEncode/trunk/docs/news.txt 2006-10-10 20:12:08 UTC (rev 2002) +++ FormEncode/trunk/docs/news.txt 2006-10-10 20:14:22 UTC (rev 2003) @@ -12,6 +12,9 @@ * Fixes `#1559918 Schema fails to accept unicode errors <http://sourceforge.net/tracker/index.php?func=detail&aid=1559918&group_id=91231&atid=596416>`_ +* ``from formencode.validators import *`` will import the ``Invalid`` + exception now. + 0.6 --- Modified: FormEncode/trunk/formencode/validators.py =================================================================== --- FormEncode/trunk/formencode/validators.py 2006-10-10 20:12:08 UTC (rev 2002) +++ FormEncode/trunk/formencode/validators.py 2006-10-10 20:14:22 UTC (rev 2003) @@ -2474,7 +2474,7 @@ } -__all__ = [] +__all__ = ['Invalid'] for name, value in globals().items(): if isinstance(value, type) and issubclass(value, Validator): __all__.append(name) |
|
From: <sub...@co...> - 2006-10-10 20:12:11
|
Author: ianb
Date: 2006-10-10 14:12:08 -0600 (Tue, 10 Oct 2006)
New Revision: 2002
Added:
FormEncode/trunk/tests/htmlfill_data/form-last-element.txt
Log:
Added test for #1364549 (passes)
Added: FormEncode/trunk/tests/htmlfill_data/form-last-element.txt
===================================================================
--- FormEncode/trunk/tests/htmlfill_data/form-last-element.txt (rev 0)
+++ FormEncode/trunk/tests/htmlfill_data/form-last-element.txt 2006-10-10 20:12:08 UTC (rev 2002)
@@ -0,0 +1,7 @@
+<select name='num'><option
+value='1'>ONE</option></select>
+----
+<select name="num"><option value="1"
+selected="selected">ONE</option></select>
+----
+defaults={"num":"1"}
Property changes on: FormEncode/trunk/tests/htmlfill_data/form-last-element.txt
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate LastChangedRevision
Name: svn:eol-style
+ native
|
|
From: <sub...@co...> - 2006-10-10 20:01:49
|
Author: ianb Date: 2006-10-10 14:01:44 -0600 (Tue, 10 Oct 2006) New Revision: 2001 Modified: FormEncode/trunk/docs/news.txt FormEncode/trunk/formencode/schema.py FormEncode/trunk/formencode/validators.py Log: Fix #1559918 Schema fails to accept unicode errors Modified: FormEncode/trunk/docs/news.txt =================================================================== --- FormEncode/trunk/docs/news.txt 2006-10-10 19:57:36 UTC (rev 2000) +++ FormEncode/trunk/docs/news.txt 2006-10-10 20:01:44 UTC (rev 2001) @@ -9,6 +9,9 @@ * Fixes `#1457145: Fails on URLs with port numbers <http://sourceforge.net/tracker/index.php?func=detail&aid=1457145&group_id=91231&atid=596416>`_ +* Fixes `#1559918 Schema fails to accept unicode errors + <http://sourceforge.net/tracker/index.php?func=detail&aid=1559918&group_id=91231&atid=596416>`_ + 0.6 --- Modified: FormEncode/trunk/formencode/schema.py =================================================================== --- FormEncode/trunk/formencode/schema.py 2006-10-10 19:57:36 UTC (rev 2000) +++ FormEncode/trunk/formencode/schema.py 2006-10-10 20:01:44 UTC (rev 2001) @@ -309,7 +309,7 @@ ['%s' % (format_compound_error(value, indent=indent)) for value in v if value is not None]) - elif isinstance(v, str): + elif isinstance(v, basestring): return v else: assert 0, "I didn't expect something like %s" % repr(v) Modified: FormEncode/trunk/formencode/validators.py =================================================================== --- FormEncode/trunk/formencode/validators.py 2006-10-10 19:57:36 UTC (rev 2000) +++ FormEncode/trunk/formencode/validators.py 2006-10-10 20:01:44 UTC (rev 2001) @@ -1509,8 +1509,9 @@ if isinstance(upload, cgi.FieldStorage): filename = upload.filename content = upload.value - elif isinstance(upload, str) and upload: + elif isinstance(upload, basestring) and upload: filename = None + # @@: Should this encode upload if it is unicode? content = upload if not content and static: filename, content = static.split(None, 1) |
|
From: <sub...@co...> - 2006-10-10 19:57:41
|
Author: ianb Date: 2006-10-10 13:57:36 -0600 (Tue, 10 Oct 2006) New Revision: 2000 Modified: FormEncode/trunk/docs/news.txt FormEncode/trunk/formencode/validators.py Log: Fixing SF bug #1457145 Modified: FormEncode/trunk/docs/news.txt =================================================================== --- FormEncode/trunk/docs/news.txt 2006-10-10 16:26:54 UTC (rev 1999) +++ FormEncode/trunk/docs/news.txt 2006-10-10 19:57:36 UTC (rev 2000) @@ -6,7 +6,8 @@ svn trunk --------- -* No changes yet +* Fixes `#1457145: Fails on URLs with port numbers + <http://sourceforge.net/tracker/index.php?func=detail&aid=1457145&group_id=91231&atid=596416>`_ 0.6 --- Modified: FormEncode/trunk/formencode/validators.py =================================================================== --- FormEncode/trunk/formencode/validators.py 2006-10-10 16:26:54 UTC (rev 1999) +++ FormEncode/trunk/formencode/validators.py 2006-10-10 19:57:36 UTC (rev 2000) @@ -1277,7 +1277,7 @@ url_re = re.compile(r'^(http|https)://' r'[a-z0-9][a-z0-9\-\._]*\.[a-z]+' - r'(?:[0-9]+)?' + r'(?::[0-9]+)?' r'(?:/.*)?$', re.I) scheme_re = re.compile(r'^[a-zA-Z]+:') |
|
From: <sub...@co...> - 2006-10-04 16:19:11
|
Author: gh Date: 2006-10-04 10:19:06 -0600 (Wed, 04 Oct 2006) New Revision: 1980 Added: FormEncode/branches/gettext-enabled/formencode/i18n/sk/ FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/ FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.mo FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.po Log: Add language sk, once again Added: FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.mo =================================================================== (Binary files differ) Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.mo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.po =================================================================== --- FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.po (rev 0) +++ FormEncode/branches/gettext-enabled/formencode/i18n/sk/LC_MESSAGES/FormEncode.po 2006-10-04 16:19:06 UTC (rev 1980) @@ -0,0 +1,328 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR ORGANIZATION +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2006-10-02 20:59+CEST\n" +"PO-Revision-Date: 2006-10-04 17:39+0100\n" +"Last-Translator: Julius Minka <ju...@mi...>\n" +"Language-Team: LANGUAGE <LL...@li...>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: pygettext.py 1.5\n" + +#: api.py:335 +#: validators.py:433 +msgid "Please enter a value" +msgstr "Zadajte hodnotu, prosím" + +#: api.py:336 +msgid "The input must be a string (not a %(type)s: %(value)r)" +msgstr "Zadané musí byť reťazec (nie %(type)s: %(value)r)" + +#: api.py:337 +msgid "The input must be a string (not None)" +msgstr "Vstup musí byť reťazec (nie None)" + +#: validators.py:160 +msgid "%(object)r is not a subclass of %(subclass)s" +msgstr "%(object)r nie je podtriedou %(subclass)s" + +#: validators.py:161 +msgid "%(object)r is not a subclass of one of the types %(subclassList)s" +msgstr "%(object)r nie je podtriedou jedného z typov %(subclassList)s" + +#: validators.py:162 +msgid "%(object)r must be one of the types %(typeList)s" +msgstr "%(object)r musí byť jedným z typov %(typeList)s" + +#: validators.py:163 +msgid "%(object)r must be of the type %(type)s" +msgstr "%(object)r musí byť typu %(type)s" + +#: validators.py:344 +msgid "Enter a value less than %(maxLength)i characters long" +msgstr "Zadajte hodnotu kratšiu ako %(maxLength)i znakov" + +#: validators.py:345 +#: validators.py:399 +msgid "Invalid value (value with length expected)" +msgstr "Neplatná hodnota (príliš dlhá)" + +#: validators.py:398 +msgid "Enter a value at least %(minLength)i characters long" +msgstr "Zadajte hodnotu dlhú minimálne %(minLength)i znakov" + +#: validators.py:458 +msgid "You cannot enter a value here" +msgstr "Tu nemôžete zadať hodnotu" + +#: validators.py:509 +msgid "The input is not valid" +msgstr "Vstup je neplatný" + +#: validators.py:565 +msgid "Enter only letters, numbers, or _ (underscore)" +msgstr "Zadajte iba písmená, čísla alebo _ (podčiarnik)" + +#: validators.py:604 +msgid "Invalid value" +msgstr "Neplatná hodnota" + +#: validators.py:605 +msgid "Value must be one of: %(items)s (not %(value)r)" +msgstr "Hodnota musí byť jedna z : %(items)s (nie %(value)r)" + +#: validators.py:668 +msgid "Choose something" +msgstr "Zvoľte niečo" + +#: validators.py:669 +msgid "Enter a value from: %(items)s" +msgstr "Zadajte hodnotu zo zoznamu: %(items)s" + +#: validators.py:670 +msgid "That value is not known" +msgstr "Hodnota je neznáma" + +#: validators.py:671 +msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s" +msgstr "V mojom slovníku sa nič nenachádza pod hodnotou %(value)s. Zvoľte jedno z : %(items)s" + +#: validators.py:732 +msgid "Must be an integer index" +msgstr "Musí byť celočíselný index" + +#: validators.py:733 +msgid "Index out of range" +msgstr "Index je mimo rozsah" + +#: validators.py:734 +msgid "Item %(value)s was not found in the list" +msgstr "Položka %(value)s sa nenašla v zozname" + +#: validators.py:809 +msgid "Date must be after %(date)s" +msgstr "Dátum musí byť po %(date)s" + +#: validators.py:810 +msgid "Date must be before %(date)s" +msgstr "Dátum musí byť pred %(date)s" + +#: validators.py:812 +msgid "%%A, %%d %%B %%Y" +msgstr "%%A, %%d %%B %%Y" + +#: validators.py:813 +msgid "The date must be sometime in the future" +msgstr "Dátum musí byť niekedy v budúcnosti" + +#: validators.py:913 +msgid "Please enter an integer value" +msgstr "Zadajte celé číslo, prosím" + +#: validators.py:945 +msgid "Please enter a number" +msgstr "Zadajte číslo, prosím" + +#: validators.py:998 +msgid "Enter a value less than %(max)i characters long" +msgstr "Zadajte hodnotu, ktorá má menej než %(max)i znakov" + +#: validators.py:999 +msgid "Enter a value %(min)i characters long or more" +msgstr "Zadajte hodnotu, ktorá je dlhá aspoň %(min)i znakov" + +#: validators.py:1050 +msgid "Invalid data or incorrect encoding" +msgstr "Neplatné údaje alebo nesprávne kódovanie" + +#: validators.py:1178 +msgid "Please enter an email address" +msgstr "Zadajte e-mailovú adresu, prosím" + +#: validators.py:1179 +msgid "An email address must contain a single @" +msgstr "E-mailová adresa musí raz obsahovať @" + +#: validators.py:1180 +msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)" +msgstr "Doména z e-mailovej adresy neexistuje (časť po @: %(domain)s)" + +#: validators.py:1181 +#: validators.py:1294 +msgid "An error occured when trying to connect to the server: %(error)s" +msgstr "Pri pokuse o pripojenie na server sa vyskytla chyba: %(error)s" + +#: validators.py:1182 +msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)" +msgstr "Doménová časť e-mailovej adresy je nesprávna (časť po @: %(domain)s)" + +#: validators.py:1183 +msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)" +msgstr "Doména z e-mailovej adresy neexistuje (časť po @: %(domain)s)" + +#: validators.py:1291 +msgid "You must start your URL with http://, https://, etc" +msgstr "URL musíte začať s http://, https://, apod." + +#: validators.py:1292 +msgid "That is not a valid URL" +msgstr "To nie je platné URL" + +#: validators.py:1293 +msgid "An error occurred when trying to access the URL: %(error)s" +msgstr "Pri prístupe na URL: %(error)s sa vyskytla chyba" + +#: validators.py:1295 +msgid "The server responded that the page could not be found" +msgstr "Server odpovedal, že stránka nebola nájdená" + +#: validators.py:1296 +msgid "The server responded with a bad status code (%(status)s)" +msgstr "Server odpovedal zlým stavovým kódom (%(status)s)" + +#: validators.py:1399 +msgid "Please enter a state code" +msgstr "Zadajte, prosím, kód štátu" + +#: validators.py:1400 +msgid "Please enter a state code with TWO letters" +msgstr "Zadajte, prosím, kód štátu obsahujúci DVE písmená" + +#: validators.py:1401 +msgid "That is not a valid state code" +msgstr "To nie je platný kód štátu" + +#: validators.py:1452 +msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\"" +msgstr "Zadajte, prosím, číslo so smerovým číslom v tvare ###-###-####, prípadne s \"ext.####\"" + +#: validators.py:1614 +#: validators.py:1622 +msgid "Please enter the date in the form %(format)s" +msgstr "Zadajte, prosím, dátum v tvare %(format)s" + +#: validators.py:1615 +msgid "Please enter a month from 1 to 12" +msgstr "Zadajte mesiac od 1 do 12, prosím" + +#: validators.py:1616 +msgid "Please enter a valid day" +msgstr "Zadajte platný deň, prosím" + +#: validators.py:1617 +msgid "That month only has %(days)i days" +msgstr "Ten mesiac má iba %(days)i dní" + +#: validators.py:1618 +msgid "That is not a valid day (%(exception)s)" +msgstr "To nie je platný deň (%(exception)s)" + +#: validators.py:1619 +msgid "Unknown month name: %(month)s" +msgstr "Neznáme meno mesiaca: %(month)s" + +#: validators.py:1620 +msgid "Please enter a number for the year" +msgstr "Zadajte, prosím, hodnotu pre rok" + +#: validators.py:1621 +msgid "Please enter a four-digit year" +msgstr "Zadajte, prosím, štvorciferný rok" + +#: validators.py:1800 +msgid "You must indicate AM or PM" +msgstr "Musíte zvoliť doopeda alebo poobede" + +#: validators.py:1801 +msgid "There are too many :'s" +msgstr "Je príliš veľa: 's" + +#: validators.py:1802 +msgid "You may not enter seconds" +msgstr "Nemusíte zadať sekundy" + +#: validators.py:1803 +msgid "You must enter seconds" +msgstr "Musíte zadať sekundy" + +#: validators.py:1804 +msgid "You must enter minutes (after a :)" +msgstr "Po dvojbodke musíte zadať minúty" + +#: validators.py:1805 +msgid "The %(part)s value you gave is not a number: %(number)r" +msgstr "Hodnota %(part)s , ktorú ste zadali, nie je číslo: %(number)r" + +#: validators.py:1806 +msgid "You must enter an hour in the range %(range)s" +msgstr "Musíte zadať hodinu v rozsahu %(range)s" + +#: validators.py:1807 +msgid "You must enter a minute in the range 0-59" +msgstr "Musíte zadať minútu v rozsahu 0 až 59" + +#: validators.py:1808 +msgid "You must enter a second in the range 0-59" +msgstr "Musíte zadať sekundu v rozsahu 0 až 59" + +#: validators.py:1962 +msgid "Please enter a zip code (5 digits)" +msgstr "Zadajte, prosím, PSČ (5 číslic)" + +#: validators.py:1986 +msgid "The name %(name)s is missing" +msgstr "Meno %(name)s chýba" + +#: validators.py:2027 +msgid "Value should be %(true)r or %(false)r" +msgstr "Hodnota má byť %(true)r alebo %(false)r" + +#: validators.py:2062 +msgid "Value does not contain a signature" +msgstr "Hodnota neobsahuje podpis" + +#: validators.py:2063 +msgid "Signature is not correct" +msgstr "Podpis je chybný" + +#: validators.py:2185 +msgid "Fields do not match (should be %(match)s)" +msgstr "Polia sa nezhodujú (majú byť %(match)s)" + +#: validators.py:2186 +msgid "Fields do not match" +msgstr "Polia sa nezhodujú" + +#: validators.py:2248 +msgid "Please enter only the number, no other characters" +msgstr "Zadajte, prosím, len číslo, nie iné znaky" + +#: validators.py:2249 +msgid "You did not enter a valid number of digits" +msgstr "Nezadali ste platný počet číslic" + +#: validators.py:2250 +msgid "That number is not valid" +msgstr "Neplatné číslo" + +#: validators.py:2365 +msgid "Please enter numbers only for month and year" +msgstr "Zadajte, prosím, čísla len pre mesiac a rok" + +#: validators.py:2366 +msgid "Invalid Expiration Date" +msgstr "Neplatný dátum skončenia platnosti" + +#: validators.py:2435 +msgid "Please enter numbers only for credit card security code" +msgstr "Pre bezpečnostný kód kreditnej karty zadajte, prosím, iba čísla" + +#: validators.py:2436 +msgid "Invalid credit card security code length" +msgstr "Nesprávna dĺžka bezpečnostného kódu karty" + |
|
From: <sub...@co...> - 2006-10-04 16:18:34
|
Author: gh
Date: 2006-10-04 10:18:22 -0600 (Wed, 04 Oct 2006)
New Revision: 1979
Modified:
FormEncode/branches/gettext-enabled/tests/test_i18n.py
Log:
Add language sk
Modified: FormEncode/branches/gettext-enabled/tests/test_i18n.py
===================================================================
--- FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-04 15:20:19 UTC (rev 1978)
+++ FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-04 16:18:22 UTC (rev 1979)
@@ -69,4 +69,6 @@
def test_big5():
_test_lang("big5", u"請輸入一個值")
+def test_sk():
+ _test_lang("sk",u"Zadajte hodnotu, prosím")
|
Author: gh
Date: 2006-10-03 13:01:53 -0600 (Tue, 03 Oct 2006)
New Revision: 1976
Added:
FormEncode/branches/gettext-enabled/formencode/i18n/big5/
FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/
FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.mo
FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.po
FormEncode/branches/gettext-enabled/formencode/i18n/es/
FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/
FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.mo
FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.po
FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/
FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/
FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/.#FormEncode.po
FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.mo
FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po
Modified:
FormEncode/branches/gettext-enabled/tests/test_i18n.py
Log:
Add pt_Br, big5, es
Added: FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.mo
===================================================================
(Binary files differ)
Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.po
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.po (rev 0)
+++ FormEncode/branches/gettext-enabled/formencode/i18n/big5/LC_MESSAGES/FormEncode.po 2006-10-03 19:01:53 UTC (rev 1976)
@@ -0,0 +1,328 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2006-10-02 20:59+CEST\n"
+"PO-Revision-Date: 2006-10-03 20:12+0800\n"
+"Last-Translator: Fred Lin <ga...@gm...>\n"
+"Language-Team: LANGUAGE <LL...@li...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+
+#: api.py:335
+#: validators.py:433
+msgid "Please enter a value"
+msgstr "請輸入一個值"
+
+#: api.py:336
+msgid "The input must be a string (not a %(type)s: %(value)r)"
+msgstr "輸入必須為字串 (而非 %(type)s: %(value)r)"
+
+#: api.py:337
+msgid "The input must be a string (not None)"
+msgstr "輸入必須為字串 (不能為空白)"
+
+#: validators.py:160
+msgid "%(object)r is not a subclass of %(subclass)s"
+msgstr "%(object)r 不是 %(subclass)s 的子類別"
+
+#: validators.py:161
+msgid "%(object)r is not a subclass of one of the types %(subclassList)s"
+msgstr "%(object)r 不是 %(subclassList)s 等類型的子類別"
+
+#: validators.py:162
+msgid "%(object)r must be one of the types %(typeList)s"
+msgstr "%(object)r 必須為 %(typeList)s 中的一個類型"
+
+#: validators.py:163
+msgid "%(object)r must be of the type %(type)s"
+msgstr "%(object)r 必須為 %(typeList)s 類型"
+
+#: validators.py:344
+msgid "Enter a value less than %(maxLength)i characters long"
+msgstr "輸入一個少於長度 %(maxLength)i 的值"
+
+#: validators.py:345
+#: validators.py:399
+msgid "Invalid value (value with length expected)"
+msgstr "不正確的值 (長度不正確)"
+
+#: validators.py:398
+msgid "Enter a value at least %(minLength)i characters long"
+msgstr "輸入一個大於長度 %(minLength)i 的值"
+
+#: validators.py:458
+msgid "You cannot enter a value here"
+msgstr "此處不可輸入值"
+
+#: validators.py:509
+msgid "The input is not valid"
+msgstr "輸入資料不正確"
+
+#: validators.py:565
+msgid "Enter only letters, numbers, or _ (underscore)"
+msgstr "僅支持字元, 數字, 或底線(_) 這三種輸入格式"
+
+#: validators.py:604
+msgid "Invalid value"
+msgstr "不正確的值"
+
+#: validators.py:605
+msgid "Value must be one of: %(items)s (not %(value)r)"
+msgstr "值必須為 %(items)s 中一個 (而非 %(value)r)"
+
+#: validators.py:668
+msgid "Choose something"
+msgstr "必須作選擇"
+
+#: validators.py:669
+msgid "Enter a value from: %(items)s"
+msgstr "從 %(items)s 中選擇一個值輸入"
+
+#: validators.py:670
+msgid "That value is not known"
+msgstr "值不能辨識"
+
+#: validators.py:671
+msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s"
+msgstr "字典中沒有 %(value)s 這個值. 從 %(items)s 中選擇一個值輸入"
+
+#: validators.py:732
+msgid "Must be an integer index"
+msgstr "必須是整數的索引"
+
+#: validators.py:733
+msgid "Index out of range"
+msgstr "索引超過範圍"
+
+#: validators.py:734
+msgid "Item %(value)s was not found in the list"
+msgstr "列表中找不到 %(value)s"
+
+#: validators.py:809
+msgid "Date must be after %(date)s"
+msgstr "資料必須在 %(date)s 之後"
+
+#: validators.py:810
+msgid "Date must be before %(date)s"
+msgstr "資料必須在 %(date)s 之前"
+
+#: validators.py:812
+msgid "%%A, %%d %%B %%Y"
+msgstr "%%A, %%d %%B %%Y"
+
+#: validators.py:813
+msgid "The date must be sometime in the future"
+msgstr "請選擇在今日之後的日期"
+
+#: validators.py:913
+msgid "Please enter an integer value"
+msgstr "請輸入整數的值"
+
+#: validators.py:945
+msgid "Please enter a number"
+msgstr "請輸入數字"
+
+#: validators.py:998
+msgid "Enter a value less than %(max)i characters long"
+msgstr "請輸入少於 %(max)i 個字元的值"
+
+#: validators.py:999
+msgid "Enter a value %(min)i characters long or more"
+msgstr "請輸入大於 %(min)i 個字元的值"
+
+#: validators.py:1050
+msgid "Invalid data or incorrect encoding"
+msgstr "不正確的資料或不正確的編碼"
+
+#: validators.py:1178
+msgid "Please enter an email address"
+msgstr "請輸入 email 帳號"
+
+#: validators.py:1179
+msgid "An email address must contain a single @"
+msgstr "email 帳號必須包含一個 @ 符號"
+
+#: validators.py:1180
+msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)"
+msgstr "Email 地址的使用者帳號錯誤 (email 帳號中 @ 符號之前的部份: %(username)s)"
+
+#: validators.py:1181
+#: validators.py:1294
+msgid "An error occured when trying to connect to the server: %(error)s"
+msgstr "連線至伺服器時出現錯誤訊息: %(error)s"
+
+#: validators.py:1182
+msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)"
+msgstr "Email 地址的網域不正確 (email 帳號中 @ 符號之後的部份: %(domain)s)"
+
+#: validators.py:1183
+msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)"
+msgstr "Email 地址的網域不存在 (email 帳號中 @ 符號之後的部份: %(domain)s)"
+
+#: validators.py:1291
+msgid "You must start your URL with http://, https://, etc"
+msgstr " URL 必須以 http://, https://, 等作為開頭"
+
+#: validators.py:1292
+msgid "That is not a valid URL"
+msgstr "不正確的 URL"
+
+#: validators.py:1293
+msgid "An error occurred when trying to access the URL: %(error)s"
+msgstr "嘗試存取 URL 發生錯誤: %(error)s"
+
+#: validators.py:1295
+msgid "The server responded that the page could not be found"
+msgstr "伺服器回應 頁面不存在"
+
+#: validators.py:1296
+msgid "The server responded with a bad status code (%(status)s)"
+msgstr "伺服器回應 壞的狀態碼(%(status)s)"
+
+#: validators.py:1399
+msgid "Please enter a state code"
+msgstr "請輸入一個狀態碼"
+
+#: validators.py:1400
+msgid "Please enter a state code with TWO letters"
+msgstr "請輸入兩個字元的狀態碼"
+
+#: validators.py:1401
+msgid "That is not a valid state code"
+msgstr "不正確的狀態碼"
+
+#: validators.py:1452
+msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\""
+msgstr "請輸入一個包含區域碼的數字, 格式為 ###-###-####, 可加上 \"ext.####\" 表示轉接"
+
+#: validators.py:1614
+#: validators.py:1622
+msgid "Please enter the date in the form %(format)s"
+msgstr "請以 %(format)s 的格式輸入日期"
+
+#: validators.py:1615
+msgid "Please enter a month from 1 to 12"
+msgstr "請輸入 1~12 間的月份"
+
+#: validators.py:1616
+msgid "Please enter a valid day"
+msgstr "請輸入一個正確的天數"
+
+#: validators.py:1617
+msgid "That month only has %(days)i days"
+msgstr "這個月份只包含 %(days)i 天"
+
+#: validators.py:1618
+msgid "That is not a valid day (%(exception)s)"
+msgstr "不正確的天數 (%(exception)s)"
+
+#: validators.py:1619
+msgid "Unknown month name: %(month)s"
+msgstr "未知的月份名稱:%(month)s"
+
+#: validators.py:1620
+msgid "Please enter a number for the year"
+msgstr "請輸入一個年份數字"
+
+#: validators.py:1621
+msgid "Please enter a four-digit year"
+msgstr "請輸入一個四位元的年份"
+
+#: validators.py:1800
+msgid "You must indicate AM or PM"
+msgstr "您必須指定 AM 或 PM"
+
+#: validators.py:1801
+msgid "There are too many :'s"
+msgstr "太多 :'s"
+
+#: validators.py:1802
+msgid "You may not enter seconds"
+msgstr "請您不要輸入秒數"
+
+#: validators.py:1803
+msgid "You must enter seconds"
+msgstr "請輸入秒數"
+
+#: validators.py:1804
+msgid "You must enter minutes (after a :)"
+msgstr "請在冒號 : 之後輸入分鐘"
+
+#: validators.py:1805
+msgid "The %(part)s value you gave is not a number: %(number)r"
+msgstr "您提供的值 %(part)s 並非數字: %(number)r"
+
+#: validators.py:1806
+msgid "You must enter an hour in the range %(range)s"
+msgstr "您必須輸入小於 %(range)s 的小時數"
+
+#: validators.py:1807
+msgid "You must enter a minute in the range 0-59"
+msgstr "您必須輸入介於 0-59 間的分鐘數"
+
+#: validators.py:1808
+msgid "You must enter a second in the range 0-59"
+msgstr "您必須輸入介於 0-59 間的秒數"
+
+#: validators.py:1962
+msgid "Please enter a zip code (5 digits)"
+msgstr "請輸入區碼(zip code, 5 位元)"
+
+#: validators.py:1986
+msgid "The name %(name)s is missing"
+msgstr "未填寫名稱 %(name)s "
+
+#: validators.py:2027
+msgid "Value should be %(true)r or %(false)r"
+msgstr "值必須為 %(true)r 或 %(false)r"
+
+#: validators.py:2062
+msgid "Value does not contain a signature"
+msgstr "值未包含符號"
+
+#: validators.py:2063
+msgid "Signature is not correct"
+msgstr "符號不正確"
+
+#: validators.py:2185
+msgid "Fields do not match (should be %(match)s)"
+msgstr "欄位不符合 (應該是 %(match)s)"
+
+#: validators.py:2186
+msgid "Fields do not match"
+msgstr "欄位不符合"
+
+#: validators.py:2248
+msgid "Please enter only the number, no other characters"
+msgstr "請輸入數字, 不包含字元"
+
+#: validators.py:2249
+msgid "You did not enter a valid number of digits"
+msgstr "不正確的數字或字元"
+
+#: validators.py:2250
+msgid "That number is not valid"
+msgstr "數字不正確"
+
+#: validators.py:2365
+msgid "Please enter numbers only for month and year"
+msgstr "請輸入月份或年份的數字"
+
+#: validators.py:2366
+msgid "Invalid Expiration Date"
+msgstr "到期日不正確"
+
+#: validators.py:2435
+msgid "Please enter numbers only for credit card security code"
+msgstr "請輸入信用卡安全碼數字"
+
+#: validators.py:2436
+msgid "Invalid credit card security code length"
+msgstr "不正確的信用卡安全碼長度"
+
Added: FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.mo
===================================================================
(Binary files differ)
Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.po
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.po (rev 0)
+++ FormEncode/branches/gettext-enabled/formencode/i18n/es/LC_MESSAGES/FormEncode.po 2006-10-03 19:01:53 UTC (rev 1976)
@@ -0,0 +1,325 @@
+# Traduccioón de FormEncode al Castellano.
+# Copyright (C) 2006 Alberto Valverde Gonzlález, licencia LGPL V2.0
+# Alberto Valverde González <al...@to...>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: FormEncode 0.5.1\n"
+"POT-Creation-Date: 2006-10-02 20:59+CEST\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Alberto Valverde González <al...@to...>\n"
+"Language-Team: Alberto Valverde González <al...@to...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: UTF-8\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: api.py:335 validators.py:433
+msgid "Please enter a value"
+msgstr "Por favor introduzca un valor"
+
+#: api.py:336
+msgid "The input must be a string (not a %(type)s: %(value)r)"
+msgstr "El valor debe ser una cadena (no un %(type)s: %(value)r)"
+
+#: api.py:337
+msgid "The input must be a string (not None)"
+msgstr "El valor debe ser una cadena (no None)"
+
+#: validators.py:160
+msgid "%(object)r is not a subclass of %(subclass)s"
+msgstr "%(object)r no es una subclase de %(subclass)s"
+
+#: validators.py:161
+msgid "%(object)r is not a subclass of one of the types %(subclassList)s"
+msgstr "%(object)r no es una sublclase de uno de los tipos %(subclassList)s"
+
+#: validators.py:162
+msgid "%(object)r must be one of the types %(typeList)s"
+msgstr "%(object)r debe ser de uno de los tipos %(typeList)s"
+
+#: validators.py:163
+msgid "%(object)r must be of the type %(type)s"
+msgstr "%(object)r debe ser del tipo %(type)s"
+
+#: validators.py:344
+msgid "Enter a value less than %(maxLength)i characters long"
+msgstr "Introduzca un valor de menos de %(maxLength)i caracteres"
+
+#: validators.py:345 validators.py:399
+msgid "Invalid value (value with length expected)"
+msgstr "El valor no es válido (se esperaba un valor con longitud)"
+
+#: validators.py:398
+msgid "Enter a value at least %(minLength)i characters long"
+msgstr "Introduzca un valor de al menos %(minLength)i caracteres"
+
+#: validators.py:458
+msgid "You cannot enter a value here"
+msgstr "No puedes introucir un valor aquí"
+
+#: validators.py:509
+msgid "The input is not valid"
+msgstr "El valor introducido no es válido"
+
+#: validators.py:565
+msgid "Enter only letters, numbers, or _ (underscore)"
+msgstr "Introduzca sólo letras, números o _ (guión bajo)"
+
+#: validators.py:604
+msgid "Invalid value"
+msgstr "El valor no es válido"
+
+#: validators.py:605
+msgid "Value must be one of: %(items)s (not %(value)r)"
+msgstr "El valor debe ser uno de: %(items)s (no %(value)r)"
+
+#: validators.py:668
+msgid "Choose something"
+msgstr "Elija algo"
+
+#: validators.py:669
+msgid "Enter a value from: %(items)s"
+msgstr "Introduzca un valor de: %(items)s"
+
+#: validators.py:670
+msgid "That value is not known"
+msgstr "El valor es desconocido"
+
+#: validators.py:671
+msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s"
+msgstr "El valor %(value)s no está en mi diccionario. Introduzca uno de: %(items)s"
+
+#: validators.py:732
+msgid "Must be an integer index"
+msgstr "El índice debe ser un número entero"
+
+#: validators.py:733
+msgid "Index out of range"
+msgstr "Índice fuera de rango"
+
+#: validators.py:734
+msgid "Item %(value)s was not found in the list"
+msgstr "El elemento %(value)s no se encontró en la lista"
+
+#: validators.py:809
+msgid "Date must be after %(date)s"
+msgstr "La fecha debe ser posterior a %(date)s"
+
+#: validators.py:810
+msgid "Date must be before %(date)s"
+msgstr "La fecha debe ser anterior a %(date)s"
+
+#: validators.py:812
+msgid "%%A, %%d %%B %%Y"
+msgstr "%%A, %%d de %%B del %%Y"
+
+#: validators.py:813
+msgid "The date must be sometime in the future"
+msgstr "La fecha debe ser de algún momento en el futuro"
+
+#: validators.py:913
+msgid "Please enter an integer value"
+msgstr "Por favor introduzca un número entero"
+
+#: validators.py:945
+msgid "Please enter a number"
+msgstr "Por favor introduzca un número"
+
+#: validators.py:998
+msgid "Enter a value less than %(max)i characters long"
+msgstr "Introuduzca un valor de menos de %(max)i caracteres"
+
+#: validators.py:999
+msgid "Enter a value %(min)i characters long or more"
+msgstr "Introduzca un valor de %(max)i caracteres o más"
+
+#: validators.py:1050
+msgid "Invalid data or incorrect encoding"
+msgstr "El valor o la codificación no son válidos"
+
+#: validators.py:1178
+msgid "Please enter an email address"
+msgstr "Por favor introduzca una dirección de correo electrónico"
+
+#: validators.py:1179
+msgid "An email address must contain a single @"
+msgstr "Una dirección de correo electrónico debe contener una sola @ (arroba)"
+
+#: validators.py:1180
+msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)"
+msgstr "La parte del usuario de la dirección de correo electrónico (antes de la @: %(username)s) no es válida"
+
+#: validators.py:1181 validators.py:1294
+msgid "An error occured when trying to connect to the server: %(error)s"
+msgstr "Ocurrió un error al intentar contactar con el servidor: %(error)s"
+
+#: validators.py:1182
+msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)"
+msgstr "La parte del dominio de la dirección de correo electrónico (después de la @: %(domain)s) no es válida"
+
+#: validators.py:1183
+msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)"
+msgstr "La parte del dominio de la dirección de correo electrónico (después de la @: %(domain)s) no existe"
+
+#: validators.py:1291
+msgid "You must start your URL with http://, https://, etc"
+msgstr "Debes comenzar el URL con http://, https://, etc."
+
+#: validators.py:1292
+msgid "That is not a valid URL"
+msgstr "Éso no es un URL válido"
+
+#: validators.py:1293
+msgid "An error occurred when trying to access the URL: %(error)s"
+msgstr "Ocurrió un error al intentar acceder al URL: %(error)s"
+
+#: validators.py:1295
+msgid "The server responded that the page could not be found"
+msgstr "El servidor respondió que la página no se pudo encontrar"
+
+#: validators.py:1296
+msgid "The server responded with a bad status code (%(status)s)"
+msgstr "El servidor respondió con un código de error (%(status)s)"
+
+#: validators.py:1399
+msgid "Please enter a state code"
+msgstr "Por favor introduzca el código de un Estado"
+
+#: validators.py:1400
+msgid "Please enter a state code with TWO letters"
+msgstr "El código del Estado debe tener DOS letras"
+
+#: validators.py:1401
+msgid "That is not a valid state code"
+msgstr "Éso no es un código de Estado válido"
+
+#: validators.py:1452
+msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\""
+msgstr "Por favor introduzca un número, con prefijo de area, en el formato ###-###-####, opcionalmente con \"ext.####\""
+
+#: validators.py:1614 validators.py:1622
+msgid "Please enter the date in the form %(format)s"
+msgstr "Por favor introduzca la fecha con el formato %(format)s"
+
+#: validators.py:1615
+msgid "Please enter a month from 1 to 12"
+msgstr "Por favor introduzca un mes desde el 1 al 12"
+
+#: validators.py:1616
+msgid "Please enter a valid day"
+msgstr "Por favor introduzca un día válido"
+
+#: validators.py:1617
+msgid "That month only has %(days)i days"
+msgstr "Ese mes sólo tiene %(day)i días"
+
+#: validators.py:1618
+msgid "That is not a valid day (%(exception)s)"
+msgstr "Ése no es un mes válido (%(exceptions)s)"
+
+#: validators.py:1619
+msgid "Unknown month name: %(month)s"
+msgstr "Nombre del mes desconocido: %(month)s"
+
+#: validators.py:1620
+msgid "Please enter a number for the year"
+msgstr "Por favor introduzca un número para el año"
+
+#: validators.py:1621
+msgid "Please enter a four-digit year"
+msgstr "Por favor introduzca un año con 4 cifras"
+
+#: validators.py:1800
+msgid "You must indicate AM or PM"
+msgstr "Debes indicar si es AM o PM"
+
+#: validators.py:1801
+msgid "There are too many :'s"
+msgstr "Hay demasiadas comillas sencillas ('s)"
+
+#: validators.py:1802
+msgid "You may not enter seconds"
+msgstr "No puedes introducir los segundos"
+
+#: validators.py:1803
+msgid "You must enter seconds"
+msgstr "Debes introducir los segundos"
+
+#: validators.py:1804
+msgid "You must enter minutes (after a :)"
+msgstr "Debes introducir los minutos (después de los :)"
+
+#: validators.py:1805
+msgid "The %(part)s value you gave is not a number: %(number)r"
+msgstr "La parte '%(part)s' del valor que introdujiste no es un número: %(number)r"
+
+#: validators.py:1806
+msgid "You must enter an hour in the range %(range)s"
+msgstr "Debes introducir la hora en el intervalo %(range)s"
+
+#: validators.py:1807
+msgid "You must enter a minute in the range 0-59"
+msgstr "Debes introducir los minutos en el intervalo 0-59"
+
+#: validators.py:1808
+msgid "You must enter a second in the range 0-59"
+msgstr "Debes introducir los segundos en el intervalo 0-59"
+
+#: validators.py:1962
+msgid "Please enter a zip code (5 digits)"
+msgstr "Por favor introduzca un código postal de 5 cifras"
+
+#: validators.py:1986
+msgid "The name %(name)s is missing"
+msgstr "Has omitido el nombre %(name)s"
+
+#: validators.py:2027
+msgid "Value should be %(true)r or %(false)r"
+msgstr "El valor debe ser %(true)r o %(falso)r"
+
+#: validators.py:2062
+msgid "Value does not contain a signature"
+msgstr "El valor no contiene una firma"
+
+#: validators.py:2063
+msgid "Signature is not correct"
+msgstr "La firma no es válida"
+
+#: validators.py:2185
+msgid "Fields do not match (should be %(match)s)"
+msgstr "Los campos no coinciden (deben ser %(match)s)"
+
+#: validators.py:2186
+msgid "Fields do not match"
+msgstr "Los campos no coinciden"
+
+#: validators.py:2248
+msgid "Please enter only the number, no other characters"
+msgstr "Por favor introduzca sólo el número, sin otros caracteres"
+
+#: validators.py:2249
+msgid "You did not enter a valid number of digits"
+msgstr "No has introducido un número adecuado de cifras"
+
+#: validators.py:2250
+msgid "That number is not valid"
+msgstr "El número no es válido"
+
+#: validators.py:2365
+msgid "Please enter numbers only for month and year"
+msgstr "Por favor introduce números sólo para el mes y el año"
+
+#: validators.py:2366
+msgid "Invalid Expiration Date"
+msgstr "La fecha de expiración no es válida"
+
+#: validators.py:2435
+msgid "Please enter numbers only for credit card security code"
+msgstr "Por favor introuce sólo los números de la tarjeta de crédito y el código de seguridad"
+
+#: validators.py:2436
+msgid "Invalid credit card security code length"
+msgstr "La longitud del código de seguridad no es válida"
+
Added: FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/.#FormEncode.po
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/.#FormEncode.po (rev 0)
+++ FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/.#FormEncode.po 2006-10-03 19:01:53 UTC (rev 1976)
@@ -0,0 +1 @@
+link gh@krumlov.9515:1159898051
\ No newline at end of file
Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/.#FormEncode.po
___________________________________________________________________
Name: svn:special
+ *
Added: FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.mo
===================================================================
(Binary files differ)
Property changes on: FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po (rev 0)
+++ FormEncode/branches/gettext-enabled/formencode/i18n/pt_BR/LC_MESSAGES/FormEncode.po 2006-10-03 19:01:53 UTC (rev 1976)
@@ -0,0 +1,325 @@
+# Brazilian Portuguese translation for FormEncode
+# Copyright (C) 2006 Jorge Godoy - G2C Tech Consultoria Ltda., licensed under LGPL V2.0
+# Jorge Godoy <go...@g2...>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: FormEncode 0.51\n"
+"POT-Creation-Date: 2006-10-02 20:59+CEST\n"
+"PO-Revision-Date: 2006-10-03 08:59-0300\n"
+"Last-Translator: Jorge Godoy <go...@g2...>\n"
+"Language-Team: Jorge Godoy <go...@g2...>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: UTF-8\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: api.py:335 validators.py:433
+msgid "Please enter a value"
+msgstr "Por favor digite um valor"
+
+#: api.py:336
+msgid "The input must be a string (not a %(type)s: %(value)r)"
+msgstr "A entrada deve ser uma string (não %(type)s: %(value)r)"
+
+#: api.py:337
+msgid "The input must be a string (not None)"
+msgstr "A entrada deve ser uma string (não nula)"
+
+#: validators.py:160
+msgid "%(object)r is not a subclass of %(subclass)s"
+msgstr "%(object)r não é uma subclasse de %(subclass)s"
+
+#: validators.py:161
+msgid "%(object)r is not a subclass of one of the types %(subclassList)s"
+msgstr "%(object)r não é uma subclasse de nenhum dos tipos %(subclassList)s"
+
+#: validators.py:162
+msgid "%(object)r must be one of the types %(typeList)s"
+msgstr "%(object)r deve pertencer aos tipos %(typeList)s"
+
+#: validators.py:163
+msgid "%(object)r must be of the type %(type)s"
+msgstr "%(object)r deve ser do tipo %(type)s"
+
+#: validators.py:344
+msgid "Enter a value less than %(maxLength)i characters long"
+msgstr "Digite um valor com menos de %(maxLength)i caracteres"
+
+#: validators.py:345 validators.py:399
+msgid "Invalid value (value with length expected)"
+msgstr "Valor inválido (valor com comprimento esperado)"
+
+#: validators.py:398
+msgid "Enter a value at least %(minLength)i characters long"
+msgstr "Digite um valor com pelo menos %(minLength)i caracteres"
+
+#: validators.py:458
+msgid "You cannot enter a value here"
+msgstr "Você não pode digitar um valor aqui"
+
+#: validators.py:509
+msgid "The input is not valid"
+msgstr "A entrada não é válida"
+
+#: validators.py:565
+msgid "Enter only letters, numbers, or _ (underscore)"
+msgstr "Digite apenas letras, números ou _ (sublinhado)"
+
+#: validators.py:604
+msgid "Invalid value"
+msgstr "Valor inválido"
+
+#: validators.py:605
+msgid "Value must be one of: %(items)s (not %(value)r)"
+msgstr "O valor deve estar entre: %(items)s (não %(value)r)"
+
+#: validators.py:668
+msgid "Choose something"
+msgstr "Escolha algo"
+
+#: validators.py:669
+msgid "Enter a value from: %(items)s"
+msgstr "Digite um dos valores de: %(items)s"
+
+#: validators.py:670
+msgid "That value is not known"
+msgstr "Este valor é desconhecido"
+
+#: validators.py:671
+msgid "Nothing in my dictionary goes by the value %(value)s. Choose one of: %(items)s"
+msgstr "Nada no meu dicionário tem esse valor %(value)s. Escolha um dos itens: %(items)s"
+
+#: validators.py:732
+msgid "Must be an integer index"
+msgstr "Deve possuir um índice inteiro"
+
+#: validators.py:733
+msgid "Index out of range"
+msgstr "Índice fora de faixa"
+
+#: validators.py:734
+msgid "Item %(value)s was not found in the list"
+msgstr "O item %(value)s não foi encontrado na lista"
+
+#: validators.py:809
+msgid "Date must be after %(date)s"
+msgstr "A data deve ser após %(date)s"
+
+#: validators.py:810
+msgid "Date must be before %(date)s"
+msgstr "A data deve ser antes de %(date)s"
+
+#: validators.py:812
+msgid "%%A, %%d %%B %%Y"
+msgstr "%%A, %%d de %%B de %%Y"
+
+#: validators.py:813
+msgid "The date must be sometime in the future"
+msgstr "A data deve indicar algum tempo no futuro"
+
+#: validators.py:913
+msgid "Please enter an integer value"
+msgstr "Por favor digite um valor inteiro"
+
+#: validators.py:945
+msgid "Please enter a number"
+msgstr "Por favor digite um número"
+
+#: validators.py:998
+msgid "Enter a value less than %(max)i characters long"
+msgstr "Digite um valor menor que %(max)i caracteres"
+
+#: validators.py:999
+msgid "Enter a value %(min)i characters long or more"
+msgstr "Digite um valor com %(min)i caracteres ou mais"
+
+#: validators.py:1050
+msgid "Invalid data or incorrect encoding"
+msgstr "Dados inválidos ou codificação incorreta"
+
+#: validators.py:1178
+msgid "Please enter an email address"
+msgstr "Por favor digite um endereço de email"
+
+#: validators.py:1179
+msgid "An email address must contain a single @"
+msgstr "Um endereço de email deve conter apenas uma @"
+
+#: validators.py:1180
+msgid "The username portion of the email address is invalid (the portion before the @: %(username)s)"
+msgstr "O nome de usuário do email é inválido (a parte antes da @: %(username)s)"
+
+#: validators.py:1181 validators.py:1294
+msgid "An error occured when trying to connect to the server: %(error)s"
+msgstr "Um erro aconteceu durante a tentativa de conexão ao servidor: %(error)s"
+
+#: validators.py:1182
+msgid "The domain portion of the email address is invalid (the portion after the @: %(domain)s)"
+msgstr "O domínio do email é inválido (a parte após a @: %(domain)s)"
+
+#: validators.py:1183
+msgid "The domain of the email address does not exist (the portion after the @: %(domain)s)"
+msgstr "O domínio do endereço de email não existe (a parte após a @: %(domain)s)"
+
+#: validators.py:1291
+msgid "You must start your URL with http://, https://, etc"
+msgstr "Você deve iniciar a URL com http://, https://, etc."
+
+#: validators.py:1292
+msgid "That is not a valid URL"
+msgstr "Esta não é uma URL válida"
+
+#: validators.py:1293
+msgid "An error occurred when trying to access the URL: %(error)s"
+msgstr "Um erro aconteceu na tentativa de acesso à URL: %(error)s"
+
+#: validators.py:1295
+msgid "The server responded that the page could not be found"
+msgstr "O servidor respondeu que a página não pôde ser encontrada"
+
+#: validators.py:1296
+msgid "The server responded with a bad status code (%(status)s)"
+msgstr "O servidor respondeu com um código de erro (%(status)s)"
+
+#: validators.py:1399
+msgid "Please enter a state code"
+msgstr "Por favor digite a sigla de um Estado"
+
+#: validators.py:1400
+msgid "Please enter a state code with TWO letters"
+msgstr "Por favor digite a sigla de um Estado com DUAS letras"
+
+#: validators.py:1401
+msgid "That is not a valid state code"
+msgstr "Este não é um Estado válido"
+
+#: validators.py:1452
+msgid "Please enter a number, with area code, in the form ###-###-####, optionally with \"ext.####\""
+msgstr "Por favor digite um número com código de área no formato ###-###-####, opcionalmente com \"ext.####\""
+
+#: validators.py:1614 validators.py:1622
+msgid "Please enter the date in the form %(format)s"
+msgstr "Por favor digite uma data no formato %(format)s"
+
+#: validators.py:1615
+msgid "Please enter a month from 1 to 12"
+msgstr "Por favor digite um mês de 1 a 12"
+
+#: validators.py:1616
+msgid "Please enter a valid day"
+msgstr "Por favor digite um dia válido"
+
+#: validators.py:1617
+msgid "That month only has %(days)i days"
+msgstr "Este mês tem apenas %(days)i dias"
+
+#: validators.py:1618
+msgid "That is not a valid day (%(exception)s)"
+msgstr "Este não é um dia válido (%(exception)s)"
+
+#: validators.py:1619
+msgid "Unknown month name: %(month)s"
+msgstr "Nome de mês desconhecido: %(month)s"
+
+#: validators.py:1620
+msgid "Please enter a number for the year"
+msgstr "Por favor digite um número para o ano"
+
+#: validators.py:1621
+msgid "Please enter a four-digit year"
+msgstr "Por favor digite o ano com quatro dígitos"
+
+#: validators.py:1800
+msgid "You must indicate AM or PM"
+msgstr "Você deve indicar AM ou PM"
+
+#: validators.py:1801
+msgid "There are too many :'s"
+msgstr "Há muitos :'s"
+
+#: validators.py:1802
+msgid "You may not enter seconds"
+msgstr "Você não pode digitar os segundos"
+
+#: validators.py:1803
+msgid "You must enter seconds"
+msgstr "Você deve digitar os segundos"
+
+#: validators.py:1804
+msgid "You must enter minutes (after a :)"
+msgstr "Você deve digitar os minutos (após :)"
+
+#: validators.py:1805
+msgid "The %(part)s value you gave is not a number: %(number)r"
+msgstr "O valor para %(part)s que você forneceu não é um número: %(number)r"
+
+#: validators.py:1806
+msgid "You must enter an hour in the range %(range)s"
+msgstr "Você deve digitar uma hora na faixa %(range)s"
+
+#: validators.py:1807
+msgid "You must enter a minute in the range 0-59"
+msgstr "Você deve digitar um minuto na faixa 0-59"
+
+#: validators.py:1808
+msgid "You must enter a second in the range 0-59"
+msgstr "Você deve entrar com os segundos na faixa 0-59"
+
+#: validators.py:1962
+msgid "Please enter a zip code (5 digits)"
+msgstr "Por favor digite um CEP (5 dígitos)"
+
+#: validators.py:1986
+msgid "The name %(name)s is missing"
+msgstr "O nome %(name)s está faltando"
+
+#: validators.py:2027
+msgid "Value should be %(true)r or %(false)r"
+msgstr "O valor deve ser %(true)r ou %(false)r"
+
+#: validators.py:2062
+msgid "Value does not contain a signature"
+msgstr "O valor não contém uma assinatura"
+
+#: validators.py:2063
+msgid "Signature is not correct"
+msgstr "A assinatura não está correta"
+
+#: validators.py:2185
+msgid "Fields do not match (should be %(match)s)"
+msgstr "Os campos não são iguais (deveriam ser %(match)s)"
+
+#: validators.py:2186
+msgid "Fields do not match"
+msgstr "Os campos não são iguais"
+
+#: validators.py:2248
+msgid "Please enter only the number, no other characters"
+msgstr "Por favor digite apenas o número, nenhum outro caractere"
+
+#: validators.py:2249
+msgid "You did not enter a valid number of digits"
+msgstr "Você não digitou uma quantidade de dígitos válida"
+
+#: validators.py:2250
+msgid "That number is not valid"
+msgstr "Este número não é válido"
+
+#: validators.py:2365
+msgid "Please enter numbers only for month and year"
+msgstr "Por favor digite os números apenas para o mês e o ano"
+
+#: validators.py:2366
+msgid "Invalid Expiration Date"
+msgstr "Data de expiração inválida"
+
+#: validators.py:2435
+msgid "Please enter numbers only for credit card security code"
+msgstr "Por favor digite apenas os números do código de segurança do cartão de crédito"
+
+#: validators.py:2436
+msgid "Invalid credit card security code length"
+msgstr "Tamanho incorreto para o código de segurança do cartão de crédito"
+
Modified: FormEncode/branches/gettext-enabled/tests/test_i18n.py
===================================================================
--- FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-03 17:31:09 UTC (rev 1975)
+++ FormEncode/branches/gettext-enabled/tests/test_i18n.py 2006-10-03 19:01:53 UTC (rev 1976)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
import formencode
import os
@@ -51,7 +52,7 @@
try:
ne.to_python("")
except formencode.api.Invalid, e:
- assert str(e) == notemptytext
+ assert unicode(e) == notemptytext
formencode.api.set_stdtranslation() #set back to defaults
@@ -59,6 +60,13 @@
def test_de():
_test_lang("de", u"Bitte einen Wert eingeben")
+def test_es():
+ _test_lang("es", u"Por favor introduzca un valor")
+def test_pt_BR():
+ _test_lang("pt_BR", u"Por favor digite um valor")
-
+def test_big5():
+ _test_lang("big5", u"請輸入一個值")
+
+
|
|
From: <sub...@co...> - 2006-10-03 16:42:27
|
Author: gh
Date: 2006-10-03 10:42:24 -0600 (Tue, 03 Oct 2006)
New Revision: 1972
Modified:
FormEncode/branches/gettext-enabled/formencode/api.py
Log:
__file__ changed to pkg_resources
Modified: FormEncode/branches/gettext-enabled/formencode/api.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03 15:24:57 UTC (rev 1971)
+++ FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03 16:42:24 UTC (rev 1972)
@@ -6,7 +6,7 @@
import textwrap
import re
import os
-import formencode
+from pkg_resources import resource_filename
__all__ = ['NoDefault', 'Invalid', 'Validator', 'Identity',
'FancyValidator', 'is_validator']
@@ -14,7 +14,7 @@
import gettext
def get_localedir():
- return "%s%s%s" % (os.path.dirname(formencode.__file__), os.path.sep, "i18n")
+ return resource_filename(__name__, "/i18n")
def set_stdtranslation(domain="FormEncode", languages=None, \
localedir = get_localedir()):
|
|
From: Ian B. <ia...@co...> - 2006-10-03 15:34:56
|
sub...@co... wrote: > +def get_localedir(): > + return "%s%s%s" % (os.path.dirname(formencode.__file__), os.path.sep, "i18n") > + > def set_stdtranslation(domain="FormEncode", languages=None, \ > - localedir = "%s%s%s" % \ > - (os.path.dirname(formencode.__file__), os.path.sep, "i18n")): > + localedir = get_localedir()): Shouldn't that be os.path.join(os.path.dirname(__file__), 'i18n') ? Also, perhaps this should be using pkg_resources: http://peak.telecommunity.com/DevCenter/PythonEggs#accessing-package-resources -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |
|
From: <sub...@co...> - 2006-10-03 15:25:01
|
Author: gh
Date: 2006-10-03 09:24:57 -0600 (Tue, 03 Oct 2006)
New Revision: 1971
Modified:
FormEncode/branches/gettext-enabled/formencode/api.py
FormEncode/branches/gettext-enabled/formencode/schema.py
Log:
UnicodeEncodeError Bug, Factor out get_localedir
Modified: FormEncode/branches/gettext-enabled/formencode/api.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03 04:48:02 UTC (rev 1970)
+++ FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03 15:24:57 UTC (rev 1971)
@@ -13,9 +13,11 @@
import gettext
+def get_localedir():
+ return "%s%s%s" % (os.path.dirname(formencode.__file__), os.path.sep, "i18n")
+
def set_stdtranslation(domain="FormEncode", languages=None, \
- localedir = "%s%s%s" % \
- (os.path.dirname(formencode.__file__), os.path.sep, "i18n")):
+ localedir = get_localedir()):
t = gettext.translation(domain=domain, \
languages=languages, \
@@ -174,11 +176,17 @@
if self.use_builtins_gettext:
import __builtin__
trans = __builtin__._
+
else:
trans = _stdtrans
+
except AttributeError:
trans = _stdtrans
+
+ if not callable(trans):
+ trans = _stdtrans
+
try:
return trans(self._messages[msgName], **self.gettextargs) % kw
except KeyError, e:
Modified: FormEncode/branches/gettext-enabled/formencode/schema.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/schema.py 2006-10-03 04:48:02 UTC (rev 1970)
+++ FormEncode/branches/gettext-enabled/formencode/schema.py 2006-10-03 15:24:57 UTC (rev 1971)
@@ -291,7 +291,7 @@
if isinstance(v, Exception):
try:
return str(v)
- except UnicodeDecodeError:
+ except (UnicodeDecodeError, UnicodeEncodeError):
# There doesn't seem to be a better way to get a str()
# version if possible, and unicode() if necessary, because
# testing for the presence of a __unicode__ method isn't
|
|
From: <sub...@co...> - 2006-10-03 04:48:05
|
Author: gh
Date: 2006-10-02 22:48:02 -0600 (Mon, 02 Oct 2006)
New Revision: 1970
Modified:
FormEncode/branches/gettext-enabled/formencode/api.py
Log:
remove debug print statement
Modified: FormEncode/branches/gettext-enabled/formencode/api.py
===================================================================
--- FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-02 19:10:07 UTC (rev 1969)
+++ FormEncode/branches/gettext-enabled/formencode/api.py 2006-10-03 04:48:02 UTC (rev 1970)
@@ -16,7 +16,7 @@
def set_stdtranslation(domain="FormEncode", languages=None, \
localedir = "%s%s%s" % \
(os.path.dirname(formencode.__file__), os.path.sep, "i18n")):
- print localedir
+
t = gettext.translation(domain=domain, \
languages=languages, \
localedir=localedir, fallback=True)
|