summaryrefslogtreecommitdiffstats
path: root/perl-install/share/po
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-02 14:56:54 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-02 14:56:54 +0000
commitb004f75c6a1b4e301644cd93b8be1b10e1511930 (patch)
tree3f8228319ce6d49bf073a795c21f52530ae7751b /perl-install/share/po
parentd164e57aa4acd604e32783d406c5a920a1a8ecb4 (diff)
downloaddrakx-b004f75c6a1b4e301644cd93b8be1b10e1511930.tar
drakx-b004f75c6a1b4e301644cd93b8be1b10e1511930.tar.gz
drakx-b004f75c6a1b4e301644cd93b8be1b10e1511930.tar.bz2
drakx-b004f75c6a1b4e301644cd93b8be1b10e1511930.tar.xz
drakx-b004f75c6a1b4e301644cd93b8be1b10e1511930.zip
add
Diffstat (limited to 'perl-install/share/po')
-rwxr-xr-xperl-install/share/po/translation_size.pl45
1 files changed, 45 insertions, 0 deletions
diff --git a/perl-install/share/po/translation_size.pl b/perl-install/share/po/translation_size.pl
new file mode 100755
index 000000000..54a4b120e
--- /dev/null
+++ b/perl-install/share/po/translation_size.pl
@@ -0,0 +1,45 @@
+#!/usr/bin/perl -w
+
+#
+# Guillaume Cottenceau (gc@mandrakesoft.com)
+#
+# Copyright 2003 MandrakeSoft
+#
+# This software may be freely redistributed under the terms of the GNU
+# public license.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+# Tool to check translations sizes
+#
+# cd to this directory to have the "use lib" works and grab install_gtk successfully
+
+
+use lib qw(../..);
+use common;
+use ugtk2;
+use install_gtk;
+
+!@ARGV and die "Usage: LANGUAGE=lang_to_test $0 string_to_translate\n(for example: LANGUAGE=ja $0 Advanced)\n";
+
+install_gtk::load_font({ locale => { lang => 'en_US' } });
+$l1 = Gtk2::Label->new($ARGV[0]);
+my $v = Gtk2::VBox->new(1, 0);
+$v->pack_start($l1, 0, 0, 0);
+my $window = Gtk2::Window->new('toplevel');
+$window->set_size_request(200, 50);
+$window->set_position('center');
+$window->signal_connect(key_press_event => sub { Gtk2->main_quit });
+$window->add($v);
+$window->show_all;
+
+install_gtk::load_font({ locale => { lang => $ENV{LANGUAGE} } });
+$l2 = Gtk2::Label->new(translate($ARGV[0]));
+$v->pack_start($l2, 0, 0, 0);
+$window->show_all;
+
+Gtk2->main;
+