more i18n fixes
This commit is contained in:
parent
16b0edfb6b
commit
f78591d8a7
8 changed files with 27 additions and 20 deletions
|
|
@ -96,8 +96,9 @@ Renders a combo box form control.
|
|||
|
||||
sub toHtml {
|
||||
my $self = shift;
|
||||
$self->get("options")->{''} = '['.WebGUI::International::get(582).']';
|
||||
$self->get("options")->{_new_} = WebGUI::International::get(581).'->';
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
$self->get("options")->{''} = '['.$i18n->get(582).']';
|
||||
$self->get("options")->{_new_} = $i18n->get(581).'->';
|
||||
return $self->SUPER::toHtml
|
||||
.WebGUI::Form::Text->new(
|
||||
size=>$self->session->setting->get("textBoxSize")-5,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ sub definition {
|
|||
defaultValue=>undef
|
||||
},
|
||||
hoverHelp=>{
|
||||
defaultValue=>WebGUI::International::get('1075 description')
|
||||
defaultValue=>$i18n->get('1075 description')
|
||||
},
|
||||
});
|
||||
return $class->SUPER::definition($definition);
|
||||
|
|
|
|||
|
|
@ -61,12 +61,13 @@ A text label that will be displayed if toHtmlWithWrapper() is called. Defaults t
|
|||
sub definition {
|
||||
my $class = shift;
|
||||
my $definition = shift || [];
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
push(@{$definition}, {
|
||||
formName=>{
|
||||
defaultValue=>WebGUI::International::get("fieldtype","WebGUI")
|
||||
defaultValue=>$i18n->get("fieldtype","WebGUI")
|
||||
},
|
||||
label=>{
|
||||
defaultValue=>WebGUI::International::get("fieldtype","WebGUI")
|
||||
defaultValue=>$i18n->get("fieldtype","WebGUI")
|
||||
},
|
||||
types=>{
|
||||
defaultValue=>$class->getTypes
|
||||
|
|
|
|||
|
|
@ -106,14 +106,15 @@ Returns a select list containing the content filter options. This is for use wit
|
|||
|
||||
sub toHtml {
|
||||
my $self = shift;
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
my %filter;
|
||||
tie %filter, 'Tie::IxHash';
|
||||
%filter = (
|
||||
'none'=>WebGUI::International::get(420),
|
||||
'macros'=>WebGUI::International::get(891),
|
||||
'javascript'=>WebGUI::International::get(526),
|
||||
'most'=>WebGUI::International::get(421),
|
||||
'all'=>WebGUI::International::get(419)
|
||||
'none'=>$i18n->get(420),
|
||||
'macros'=>$i18n->get(891),
|
||||
'javascript'=>$i18n->get(526),
|
||||
'most'=>$i18n->get(421),
|
||||
'all'=>$i18n->get(419)
|
||||
);
|
||||
$self->get("options") = \%filter;
|
||||
return $self->SUPER::toHtml();
|
||||
|
|
|
|||
|
|
@ -119,11 +119,12 @@ sub toHtml {
|
|||
$self->session->style->setScript($self->session->config->get("extrasURL").'/textFix.js',{ type=>'text/javascript' });
|
||||
$self->get("extras") .= ' onblur="fixChars(this.form.'.$self->get("name").')" mce_editable="true" ';
|
||||
return $self->SUPER::toHtml.WebGUI::Asset::RichEdit->new($self->get("richEditId"))->getRichEditor($self->{id});
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
my $richEdit = WebGUI::Asset::RichEdit->new($self->get("richEditId"));
|
||||
if (defined $richEdit) {
|
||||
return $self->SUPER::toHtml.$richEdit->getRichEditor($self->{id});
|
||||
} else {
|
||||
return WebGUI::International::get('rich editor load error','Form_HTMLArea');
|
||||
return $i18n->get('rich editor load error','Form_HTMLArea');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,13 +105,14 @@ sub toHtml {
|
|||
my $self = shift;
|
||||
my %units;
|
||||
tie %units, 'Tie::IxHash';
|
||||
%units = ('seconds'=>WebGUI::International::get(704),
|
||||
'minutes'=>WebGUI::International::get(705),
|
||||
'hours'=>WebGUI::International::get(706),
|
||||
'days'=>WebGUI::International::get(700),
|
||||
'weeks'=>WebGUI::International::get(701),
|
||||
'months'=>WebGUI::International::get(702),
|
||||
'years'=>WebGUI::International::get(703));
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
%units = ('seconds'=>$i18n->get(704),
|
||||
'minutes'=>$i18n->get(705),
|
||||
'hours'=>$i18n->get(706),
|
||||
'days'=>$i18n->get(700),
|
||||
'weeks'=>$i18n->get(701),
|
||||
'months'=>$i18n->get(702),
|
||||
'years'=>$i18n->get(703));
|
||||
my ($interval, $units) = $self->session->datetime->secondsToInterval($self->get("value"));
|
||||
# not sure why, but these things need to be defined like this or
|
||||
# they fail under some circumstnaces
|
||||
|
|
|
|||
|
|
@ -108,13 +108,14 @@ Renders a time field.
|
|||
sub toHtml {
|
||||
my $self = shift;
|
||||
my $value = $self->session->datetime->secondsToTime($self->get("value"));
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
$self->session->style->setScript($self->session->config->get("extrasURL").'/inputCheck.js',{ type=>'text/javascript' });
|
||||
$self->get("extras") .= ' onkeyup="doInputCheck(this.form.'.$self->get("name").',\'0123456789:\')"';
|
||||
return $self->SUPER::toHtml
|
||||
.WebGUI::Form::Button->new(
|
||||
id=>$self->{id},
|
||||
extras=>'style="font-size: 8pt;" onclick="window.timeField = this.form.'.$self->get("name").';clockSet = window.open(\''.$self->session->config->get("extrasURL"). '/timeChooser.html\',\'timeChooser\',\'WIDTH=230,HEIGHT=100\');return false"',
|
||||
value=>WebGUI::International::get(970)
|
||||
value=>$i18n->get(970)
|
||||
)->toHtml;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ sub www_auth {
|
|||
my $methodCall = shift || $session->form->process("method") || "init";
|
||||
if(!$authMethod->isCallable($methodCall)){
|
||||
$session->errorHandler->security("access uncallable auth method on page '".$session->asset->getTitle."' [".$session->asset->pageId."].");
|
||||
return WebGUI::International::get(1077);
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
return $i18n->get(1077);
|
||||
}
|
||||
return $session->style->userStyle($authMethod->$methodCall);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue