mirror of
https://github.com/duncs/clusterssh.git
synced 2025-07-03 18:03:23 +00:00
Start of non-English language support
This commit is contained in:
parent
7ecce265c7
commit
811db0cf29
4 changed files with 114 additions and 3 deletions
7
Build.PL
7
Build.PL
|
@ -15,9 +15,10 @@ my $build = Module::Build->new(
|
||||||
module_name => 'App::ClusterSSH',
|
module_name => 'App::ClusterSSH',
|
||||||
license => 'perl',
|
license => 'perl',
|
||||||
requires => {
|
requires => {
|
||||||
'version' => '0',
|
'version' => '0',
|
||||||
'Tk' => '800.022',
|
'Tk' => '800.022',
|
||||||
'X11::Protocol' => '0.56',
|
'X11::Protocol' => '0.56',
|
||||||
|
'Locale::Maketext' => 0,
|
||||||
},
|
},
|
||||||
build_requires => {
|
build_requires => {
|
||||||
'Test::Pod::Coverage' => 0,
|
'Test::Pod::Coverage' => 0,
|
||||||
|
|
52
lib/App/ClusterSSH/L10N.pm
Normal file
52
lib/App/ClusterSSH/L10N.pm
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
package App::ClusterSSH::L10N;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use Locale::Maketext 1.01;
|
||||||
|
use base qw(Locale::Maketext);
|
||||||
|
|
||||||
|
# This projects primary language is English
|
||||||
|
|
||||||
|
our %Lexicon = ( '_AUTO' => 1, );
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1
|
||||||
|
|
||||||
|
ClusterSSH::L10N - Base translations module
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use ClusterSSH::L10N;
|
||||||
|
my $lang = ClusterSSH::L10N->get_handle('en');
|
||||||
|
$lang->maketext('text to localise with args [_1]', $arg1);
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
L<Locale::Maketext> based translation module for ClusterSSH. See
|
||||||
|
L<Locale::Maketext> for more information and usage.
|
||||||
|
|
||||||
|
NOTE: the default language of this module is English.
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
See Locale::Maketext - there are curently no extra methods in this module.
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Duncan Ferguson (<duncan_j_ferguson (at) yahoo.co.uk>)
|
||||||
|
|
||||||
|
=head1 LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
|
Copyright (c) 2009 Duncan Ferguson (<duncan_j_ferguson (at) yahoo.co.uk>).
|
||||||
|
All rights reserved
|
||||||
|
|
||||||
|
This module is free software; you can redistribute it and/or
|
||||||
|
modify it under the same terms as Perl itself. See L<perlartistic>.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
43
lib/App/ClusterSSH/L10N/en.pm
Normal file
43
lib/App/ClusterSSH/L10N/en.pm
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
package App::ClusterSSH::L10N::en;
|
||||||
|
use base 'App::ClusterSSH::L10N';
|
||||||
|
|
||||||
|
%Lexicon = ( '_AUTO' => 1, );
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=pod
|
||||||
|
|
||||||
|
=head1
|
||||||
|
|
||||||
|
App::ClusterSSH::L10N::en - Base English translations module
|
||||||
|
|
||||||
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
|
use App::ClusterSSH::L10N;
|
||||||
|
my $lang = ClusterSSH::L10N->get_handle('en');
|
||||||
|
$lang->maketext('text to localise with args [_1]', $arg1);
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
L<Locale::Maketext> based translation module for ClusterSSH. See
|
||||||
|
L<Locale::Maketext> for more information and usage.
|
||||||
|
|
||||||
|
=head1 METHODS
|
||||||
|
|
||||||
|
No method are exported. See L<Locale::Maketext>.
|
||||||
|
|
||||||
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
Duncan Ferguson (<duncan_j_ferguson (at) yahoo.co.uk>)
|
||||||
|
|
||||||
|
=head1 LICENSE AND COPYRIGHT
|
||||||
|
|
||||||
|
Copyright (c) 2009 Duncan Ferguson (<duncan_j_ferguson (at) yahoo.co.uk>).
|
||||||
|
All rights reserved
|
||||||
|
|
||||||
|
This module is free software; you can redistribute it and/or
|
||||||
|
modify it under the same terms as Perl itself. See L<perlartistic>.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
15
t/01l10n.t
Normal file
15
t/01l10n.t
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use FindBin qw($Bin);
|
||||||
|
use lib "$Bin/../lib";
|
||||||
|
|
||||||
|
use Test::More tests => 2;
|
||||||
|
use Test::Trap;
|
||||||
|
|
||||||
|
BEGIN { use_ok( 'App::ClusterSSH::L10N', ) }
|
||||||
|
|
||||||
|
my $handle;
|
||||||
|
|
||||||
|
$handle = App::ClusterSSH::L10N->get_handle();
|
||||||
|
isa_ok( $handle, 'App::ClusterSSH::L10N' );
|
Loading…
Add table
Add a link
Reference in a new issue