- my $string = $_[ ref($_[0]) || ($_[0] eq 'SL::Locale::String') ? 1 : 0 ];
- return SL::Locale::String->new(untranslated => $string);
+ shift if $_[0] eq __PACKAGE__;
+
+ my $string = shift;
+ return SL::Locale::String->new(untranslated => $string, args => [ @_ ]);
+}
+
+sub my_eq {
+ $_[1] eq $_[0]->translated;
+}
+
+sub my_ne {
+ $_[1] ne $_[0]->translated;
+}
+
+sub TO_JSON {
+ return $_[0]->translated;