X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLocale.pm;h=5503c1b9595b5c93c9ea4e96ebd5f8da7d840bc3;hb=c4ba4f3e7cd337939308b57eee799b201bd78cb9;hp=8a2caa2c0bfb7e335b046f88eb94a075ea4508e5;hpb=abde405dfaab376a13e9a1e3e24cd715fa7de024;p=kivitendo-erp.git diff --git a/SL/Locale.pm b/SL/Locale.pm index 8a2caa2c0..5503c1b95 100644 --- a/SL/Locale.pm +++ b/SL/Locale.pm @@ -214,6 +214,8 @@ sub text { my $self = shift; my $text = shift; + return $text->translated if (ref($text) || '') eq 'SL::Locale::String'; + if ($self->{texts}->{$text}) { $text = $self->{iconv}->convert($self->{texts}->{$text}); } else { @@ -326,7 +328,7 @@ sub date { } elsif ($myconfig->{dateformat} eq "yyyy-mm-dd") { # Use German syntax with the ISO date style "yyyy-mm-dd" because - # Lx-Office is mainly used in Germany or German speaking countries. + # kivitendo is mainly used in Germany or German speaking countries. if (defined $longformat && $longformat == 0) { $mm++; $dd = "0$dd" if ($dd < 10); @@ -401,8 +403,7 @@ sub format_date_object { my ($self, $datetime, %params) = @_; my $format = $::myconfig{dateformat} || 'yyyy-mm-dd'; - $format =~ s/yyyy/\%Y/; - $format =~ s/yy/\%y/; + $format =~ s/yy(?:yy)?/\%Y/; $format =~ s/mm/\%m/; $format =~ s/dd/\%d/; @@ -547,7 +548,7 @@ __END__ =head1 NAME -Locale - Functions for dealing with locale-dependant information +Locale - Functions for dealing with locale-dependent information =head1 SYNOPSIS