[Jifty-commit] r2273 - in jifty/branches/template-declare: .
lib/Jifty/Action/Record lib/Jifty/Web/Form
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Dec 2 23:10:10 EST 2006
Author: audreyt
Date: Sat Dec 2 23:10:09 2006
New Revision: 2273
Modified:
jifty/branches/template-declare/ (props changed)
jifty/branches/template-declare/lib/Jifty/Action/Record/Search.pm
jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm
jifty/branches/template-declare/share/po/en.po
jifty/branches/template-declare/share/po/fr.po
jifty/branches/template-declare/share/po/ja.po
jifty/branches/template-declare/share/po/zh_cn.po
jifty/branches/template-declare/share/po/zh_tw.po
Log:
* Merge down into template-declare branch.
Modified: jifty/branches/template-declare/lib/Jifty/Action/Record/Search.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Action/Record/Search.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Action/Record/Search.pm Sat Dec 2 23:10:09 2006
@@ -64,8 +64,18 @@
if($info->{valid_values}) {
my $valid_values = $info->{valid_values};
- $valid_values = [$valid_values] unless ref($valid_values) eq 'ARRAY';
- unshift @$valid_values, "";
+
+ local $@;
+ $info->{valid_values} = $valid_values = (eval { [ @$valid_values ] } || [$valid_values]);
+
+ # For radio display, display an "any" label as empty choices looks weird
+ if (lc $info->{render_as} eq 'radio') {
+ unshift @$valid_values, { display => _("(any)"), value => '' };
+ $info->{default_value} ||= '';
+ }
+ else {
+ unshift @$valid_values, "";
+ }
}
if(lc $info->{'render_as'} eq 'password') {
Modified: jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/Form/Field.pm Sat Dec 2 23:10:09 2006
@@ -462,7 +462,7 @@
$field .= qq! id="@{[ $self->element_id ]}"!;
$field .= qq! value="@{[HTML::Entities::encode_entities($self->current_value)]}"! if defined $self->current_value;
$field .= $self->_widget_class;
- $field .= qq! size="@{[ $self->length() ]}"! if ($self->length());
+ $field .= qq! size="@{[ $self->length() ]}" maxlength=@{[ $self->length() ]}"! if ($self->length());
$field .= " " .$self->other_widget_properties;
$field .= qq! />\n!;
Jifty->web->out($field);
Modified: jifty/branches/template-declare/share/po/en.po
==============================================================================
--- jifty/branches/template-declare/share/po/en.po (original)
+++ jifty/branches/template-declare/share/po/en.po Sat Dec 2 23:10:09 2006
@@ -15,37 +15,37 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/Jifty/Action/Record/Search.pm:96
+#: lib/Jifty/Action/Record/Search.pm:106
#. ($label)
msgid "%1 after"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:97
+#: lib/Jifty/Action/Record/Search.pm:107
#. ($label)
msgid "%1 before"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:93
+#: lib/Jifty/Action/Record/Search.pm:103
#. ($label)
msgid "%1 contains"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:100
+#: lib/Jifty/Action/Record/Search.pm:110
#. ($label)
msgid "%1 greater than"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:89
+#: lib/Jifty/Action/Record/Search.pm:99
#. ($label)
msgid "%1 is not"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:94
+#: lib/Jifty/Action/Record/Search.pm:104
#. ($label)
msgid "%1 lacks"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:101
+#: lib/Jifty/Action/Record/Search.pm:111
#. ($label)
msgid "%1 less than"
msgstr ""
@@ -60,6 +60,10 @@
msgid "%1 seconds"
msgstr ""
+#: lib/Jifty/Action/Record/Search.pm:73
+msgid "(any)"
+msgstr ""
+
#: lib/Jifty/Web/Form/Field.pm:521
msgid "@{[$self->current_value]}"
msgstr ""
@@ -80,7 +84,7 @@
msgid "An error occurred. Try again later"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:105
+#: lib/Jifty/Action/Record/Search.pm:115
msgid "Any field contains"
msgstr ""
@@ -176,7 +180,7 @@
msgid "Next Page"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:106
+#: lib/Jifty/Action/Record/Search.pm:116
msgid "No field contains"
msgstr ""
Modified: jifty/branches/template-declare/share/po/fr.po
==============================================================================
--- jifty/branches/template-declare/share/po/fr.po (original)
+++ jifty/branches/template-declare/share/po/fr.po Sat Dec 2 23:10:09 2006
@@ -15,37 +15,37 @@
"Content-Type: text/plain; charset=ISO8859-15\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/Jifty/Action/Record/Search.pm:96
+#: lib/Jifty/Action/Record/Search.pm:106
#. ($label)
msgid "%1 after"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:97
+#: lib/Jifty/Action/Record/Search.pm:107
#. ($label)
msgid "%1 before"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:93
+#: lib/Jifty/Action/Record/Search.pm:103
#. ($label)
msgid "%1 contains"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:100
+#: lib/Jifty/Action/Record/Search.pm:110
#. ($label)
msgid "%1 greater than"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:89
+#: lib/Jifty/Action/Record/Search.pm:99
#. ($label)
msgid "%1 is not"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:94
+#: lib/Jifty/Action/Record/Search.pm:104
#. ($label)
msgid "%1 lacks"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:101
+#: lib/Jifty/Action/Record/Search.pm:111
#. ($label)
msgid "%1 less than"
msgstr ""
@@ -60,6 +60,10 @@
msgid "%1 seconds"
msgstr "%1 secondes"
+#: lib/Jifty/Action/Record/Search.pm:73
+msgid "(any)"
+msgstr ""
+
#: lib/Jifty/Web/Form/Field.pm:521
msgid "@{[$self->current_value]}"
msgstr ""
@@ -80,7 +84,7 @@
msgid "An error occurred. Try again later"
msgstr "Erreur. Ré-essayez plus tard"
-#: lib/Jifty/Action/Record/Search.pm:105
+#: lib/Jifty/Action/Record/Search.pm:115
msgid "Any field contains"
msgstr ""
@@ -176,7 +180,7 @@
msgid "Next Page"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:106
+#: lib/Jifty/Action/Record/Search.pm:116
msgid "No field contains"
msgstr ""
Modified: jifty/branches/template-declare/share/po/ja.po
==============================================================================
--- jifty/branches/template-declare/share/po/ja.po (original)
+++ jifty/branches/template-declare/share/po/ja.po Sat Dec 2 23:10:09 2006
@@ -15,37 +15,37 @@
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/Jifty/Action/Record/Search.pm:96
+#: lib/Jifty/Action/Record/Search.pm:106
#. ($label)
msgid "%1 after"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:97
+#: lib/Jifty/Action/Record/Search.pm:107
#. ($label)
msgid "%1 before"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:93
+#: lib/Jifty/Action/Record/Search.pm:103
#. ($label)
msgid "%1 contains"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:100
+#: lib/Jifty/Action/Record/Search.pm:110
#. ($label)
msgid "%1 greater than"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:89
+#: lib/Jifty/Action/Record/Search.pm:99
#. ($label)
msgid "%1 is not"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:94
+#: lib/Jifty/Action/Record/Search.pm:104
#. ($label)
msgid "%1 lacks"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:101
+#: lib/Jifty/Action/Record/Search.pm:111
#. ($label)
msgid "%1 less than"
msgstr ""
@@ -60,6 +60,10 @@
msgid "%1 seconds"
msgstr ""
+#: lib/Jifty/Action/Record/Search.pm:73
+msgid "(any)"
+msgstr ""
+
#: lib/Jifty/Web/Form/Field.pm:521
msgid "@{[$self->current_value]}"
msgstr ""
@@ -80,7 +84,7 @@
msgid "An error occurred. Try again later"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:105
+#: lib/Jifty/Action/Record/Search.pm:115
msgid "Any field contains"
msgstr ""
@@ -176,7 +180,7 @@
msgid "Next Page"
msgstr ""
-#: lib/Jifty/Action/Record/Search.pm:106
+#: lib/Jifty/Action/Record/Search.pm:116
msgid "No field contains"
msgstr ""
Modified: jifty/branches/template-declare/share/po/zh_cn.po
==============================================================================
--- jifty/branches/template-declare/share/po/zh_cn.po (original)
+++ jifty/branches/template-declare/share/po/zh_cn.po Sat Dec 2 23:10:09 2006
@@ -14,37 +14,37 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/Jifty/Action/Record/Search.pm:96
+#: lib/Jifty/Action/Record/Search.pm:106
#. ($label)
msgid "%1 after"
msgstr "%1 æäº"
-#: lib/Jifty/Action/Record/Search.pm:97
+#: lib/Jifty/Action/Record/Search.pm:107
#. ($label)
msgid "%1 before"
msgstr "%1 æ©äº"
-#: lib/Jifty/Action/Record/Search.pm:93
+#: lib/Jifty/Action/Record/Search.pm:103
#. ($label)
msgid "%1 contains"
msgstr "%1 å
å«"
-#: lib/Jifty/Action/Record/Search.pm:100
+#: lib/Jifty/Action/Record/Search.pm:110
#. ($label)
msgid "%1 greater than"
msgstr "%1 大äº"
-#: lib/Jifty/Action/Record/Search.pm:89
+#: lib/Jifty/Action/Record/Search.pm:99
#. ($label)
msgid "%1 is not"
msgstr "%1 ä¸çäº"
-#: lib/Jifty/Action/Record/Search.pm:94
+#: lib/Jifty/Action/Record/Search.pm:104
#. ($label)
msgid "%1 lacks"
msgstr "%1 ä¸å
å«"
-#: lib/Jifty/Action/Record/Search.pm:101
+#: lib/Jifty/Action/Record/Search.pm:111
#. ($label)
msgid "%1 less than"
msgstr "%1 å°äº"
@@ -59,6 +59,10 @@
msgid "%1 seconds"
msgstr "%1 ç§"
+#: lib/Jifty/Action/Record/Search.pm:73
+msgid "(any)"
+msgstr "(ä¸é)"
+
#: lib/Jifty/Web/Form/Field.pm:521
msgid "@{[$self->current_value]}"
msgstr ""
@@ -79,7 +83,7 @@
msgid "An error occurred. Try again later"
msgstr "ç³»ç»æ æ³æ§è¡æ¤é¡¹æä½, 请ç¨ååè¯"
-#: lib/Jifty/Action/Record/Search.pm:105
+#: lib/Jifty/Action/Record/Search.pm:115
msgid "Any field contains"
msgstr "ä»»æå段å
å«"
@@ -179,7 +183,7 @@
msgid "Next Page"
msgstr "ä¸ä¸é¡µ"
-#: lib/Jifty/Action/Record/Search.pm:106
+#: lib/Jifty/Action/Record/Search.pm:116
msgid "No field contains"
msgstr "没æå段å
å«"
@@ -258,7 +262,7 @@
#: share/web/templates/__jifty/admin/index.html:7
msgid "To disable this administrative console, add \"AdminMode: 0\" under the \"framework:\" settings in the config file (etc/config.yml)."
-msgstr ""
+msgstr "å¦æ¬²åç¨ç®¡ççé¢, 请å¨è®¾å®æ¡£ (etc/config.yml) ç \"framework:\" 设å®å
å ä¸ \"AdminMode: 0\" å³å¯."
#: share/web/templates/__jifty/admin/fragments/list/list:38
msgid "Toggle search"
@@ -291,4 +295,4 @@
#: share/web/templates/_elements/sidebar:7
msgid "You're not currently signed in."
-msgstr ""
+msgstr "æ¨ç®åå°æªç»å
¥."
Modified: jifty/branches/template-declare/share/po/zh_tw.po
==============================================================================
--- jifty/branches/template-declare/share/po/zh_tw.po (original)
+++ jifty/branches/template-declare/share/po/zh_tw.po Sat Dec 2 23:10:09 2006
@@ -14,37 +14,37 @@
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: lib/Jifty/Action/Record/Search.pm:96
+#: lib/Jifty/Action/Record/Search.pm:106
#. ($label)
msgid "%1 after"
msgstr "%1 ææ¼"
-#: lib/Jifty/Action/Record/Search.pm:97
+#: lib/Jifty/Action/Record/Search.pm:107
#. ($label)
msgid "%1 before"
msgstr "%1 æ©æ¼"
-#: lib/Jifty/Action/Record/Search.pm:93
+#: lib/Jifty/Action/Record/Search.pm:103
#. ($label)
msgid "%1 contains"
msgstr "%1 å
å«"
-#: lib/Jifty/Action/Record/Search.pm:100
+#: lib/Jifty/Action/Record/Search.pm:110
#. ($label)
msgid "%1 greater than"
msgstr "%1 大æ¼"
-#: lib/Jifty/Action/Record/Search.pm:89
+#: lib/Jifty/Action/Record/Search.pm:99
#. ($label)
msgid "%1 is not"
msgstr "%1 ä¸çæ¼"
-#: lib/Jifty/Action/Record/Search.pm:94
+#: lib/Jifty/Action/Record/Search.pm:104
#. ($label)
msgid "%1 lacks"
msgstr "%1 ä¸å
å«"
-#: lib/Jifty/Action/Record/Search.pm:101
+#: lib/Jifty/Action/Record/Search.pm:111
#. ($label)
msgid "%1 less than"
msgstr "%1 å°æ¼"
@@ -59,6 +59,10 @@
msgid "%1 seconds"
msgstr "%1 ç§"
+#: lib/Jifty/Action/Record/Search.pm:73
+msgid "(any)"
+msgstr "(ä¸é)"
+
#: lib/Jifty/Web/Form/Field.pm:521
msgid "@{[$self->current_value]}"
msgstr ""
@@ -79,7 +83,7 @@
msgid "An error occurred. Try again later"
msgstr "系統ç¡æ³å·è¡æ¤é
æä½, è«ç¨å¾å試"
-#: lib/Jifty/Action/Record/Search.pm:105
+#: lib/Jifty/Action/Record/Search.pm:115
msgid "Any field contains"
msgstr "ä»»ææ¬ä½å
å«"
@@ -179,7 +183,7 @@
msgid "Next Page"
msgstr "ä¸ä¸é "
-#: lib/Jifty/Action/Record/Search.pm:106
+#: lib/Jifty/Action/Record/Search.pm:116
msgid "No field contains"
msgstr "æ²ææ¬ä½å
å«"
More information about the Jifty-commit
mailing list