X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLocale%2FString.pm;h=63a53231ba5d5c4aab7c9cdae067caf5f6ef339d;hb=dd2ee66b1d04c3644c48c32b33673463af223077;hp=e05ae6abedc3841e14a2bc3aafa059e9a8d738d1;hpb=b3a47a992c7c7918e0cf67d9d6c10d002ef2108f;p=kivitendo-erp.git diff --git a/SL/Locale/String.pm b/SL/Locale/String.pm index e05ae6abe..63a53231b 100644 --- a/SL/Locale/String.pm +++ b/SL/Locale/String.pm @@ -11,7 +11,9 @@ use Rose::Object::MakeMethods::Generic ( our @EXPORT = qw(t8); -use overload '""' => \&translated; +use overload + '""' => \&translated, + eq => \&my_eq; sub translated { my ($self) = @_; @@ -25,6 +27,10 @@ sub t8 { return SL::Locale::String->new(untranslated => $string, args => [ @_ ]); } +sub my_eq { + $_[1] eq $_[0]->translated; +} + sub TO_JSON { return $_[0]->translated; }