diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/common.pm | 1 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm index cce250899..f7d4bc15c 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -35,6 +35,7 @@ sub sprintf_fixutf8 { } sub N { + $::one_message_has_been_translated ||= join(':', (caller(0))[1,2]); #- see ugtk2.pm my $s = shift @_; my $t = translate($s); sprintf_fixutf8 $t, @_; } diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 154b1058e..01856795d 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -37,6 +37,8 @@ use Gtk2; unless ($::no_ugtk_init) { !check_for_xserver() and die "Cannot be run in console mode.\n"; + $::one_message_has_been_translated and warn("N() was called from $::one_message_has_been_translated BEFORE gtk2 initialisation, replace it with a N_() AND a translate() later.\n"), c::_exit(1); + Gtk2->init(\@ARGV); c::bind_textdomain_codeset($_, 'UTF8') foreach 'libDrakX', @::textdomains; $::need_utf8_i18n = 1; |