# # # add_file "lib/perl/LocaleEnableUtf8.pm" # content [0d357e757533506d36274f17b5d93597b2e5ca3e] # # patch "installer-files/DependencyChecker.pm" # from [94f601d6ee7af29384e5ec3a6fc42d59d803bb9e] # to [005b9ed24f6d0724a5ce919d120841b380c69177] # # patch "lib/perl/AdvancedFind.pm" # from [007f51112d0a3c7ddd3d83296e4c20ccc83d787f] # to [1a706d28e9628ecb70166b58b1a1c83df0758533] # # patch "lib/perl/Annotate.pm" # from [1e20648ca38bb4ac491c9d66de06d2575b7219c1] # to [4b4766bf05dbb8895984aebfe26e0d7c7d1ce25b] # # patch "lib/perl/CachingAutomateStdio.pm" # from [6eea2e0d89c07113e0f94581fedf159344ad629a] # to [de0a03ee77a90bf0f78020d342cb754d5348b454] # # patch "lib/perl/ChangeLog.pm" # from [c3467132f877e523e4cff90deb187827a46e8802] # to [e834dfe87ef7add13ab74dfd14f391707f6dfca0] # # patch "lib/perl/ComboAutoCompletion.pm" # from [323da650715093941315ee15bec38e5bff75a3cf] # to [a08dd9dab70a34a5e71ccb6b35a16d2861894521] # # patch "lib/perl/Common.pm" # from [000f95ec93c27d77d3994a47ad0f32a61c0635b5] # to [ece342e6cdb7e8f24e9cd5f0517ad1642fd8ded5] # # patch "lib/perl/Completion.pm" # from [0f9ade9ad8a389fa9d21df5bff30745464dd8b4d] # to [14b963469ffd8340d75ea66e4f74f5d409b15516] # # patch "lib/perl/FindFiles.pm" # from [ff79f40f11aa711c65249fdfd53271bcf62f72d0] # to [10a2d9032978d20fdb9496ef876da845fa9ea8fb] # # patch "lib/perl/FindText.pm" # from [bc11df9613a01154a92fb6f855fcca1dfcc8c39b] # to [65000c0c8004be927d06248a4cae65e47fbca015] # # patch "lib/perl/Globals.pm" # from [ec8fe1bfec2013217496d5991ad7532ef30a7b84] # to [d368dbb3992aaf613f8ed630b6c088b22954715e] # # patch "lib/perl/History.pm" # from [9cbe1ed307bcf1199202b66d91d90de3f806ec8d] # to [676fd21d0cbbe57c42caba1188ede42cd870e692] # # patch "lib/perl/Preferences.pm" # from [03b4000a401723ce673839dce808ade8d4eaacca] # to [92111fa9127ba4345a281e4e1d62f6a89955a3c1] # # patch "lib/perl/WindowManager.pm" # from [41b8c9c3ed55d22a4a6e55a87f9d28c38f43cd40] # to [6d30c1472f2e9dfbc86025c9f0601e3626cf9562] # # patch "mtn-browse" # from [1dafd8758fabc53bfcd3693cbc0d348fb6eba8ae] # to [567234f0497878b4898b61d6ba4885fcb42d04fa] # ============================================================ --- lib/perl/LocaleEnableUtf8.pm 0d357e757533506d36274f17b5d93597b2e5ca3e +++ lib/perl/LocaleEnableUtf8.pm 0d357e757533506d36274f17b5d93597b2e5ca3e @@ -0,0 +1,63 @@ +############################################################################## +# +# File Name - LocaleEnableUtf8.pm +# +# Description - The locale enable UTF-8 module for the mtn-browse +# application. This module contains code that basically +# enables the handling of UTF-8 with the Locale::TextDomain +# library. This module should be included before any module +# that uses Locale::TextDomain (to get around the situation +# where translations are performed on global strings). +# +# Author - A.E.Cooper. +# +# Legal Stuff - Copyright (c) 2007 Anthony Edward Cooper +# . +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; +# either version 3 of the License, or (at your option) any +# later version. +# +# 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. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public +# License along with this software; if not, write to the Free +# Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307 USA. +# +############################################################################## +# +############################################################################## +# +# Global Data For This Module +# +############################################################################## + + + +# ***** DIRECTIVES ***** + +require 5.008005; + +use locale; +use strict; +use warnings; + +BEGIN +{ + Locale::Messages::bind_textdomain_filter + (APPLICATION_NAME, + sub { + my $utf_8 = decode_utf8($_[0]); + return defined($utf_8) ? $utf_8 : $_[0]; + }); + Locale::Messages::bind_textdomain_codeset(APPLICATION_NAME, "utf-8"); +} + +1; ============================================================ --- installer-files/DependencyChecker.pm 94f601d6ee7af29384e5ec3a6fc42d59d803bb9e +++ installer-files/DependencyChecker.pm 005b9ed24f6d0724a5ce919d120841b380c69177 @@ -50,6 +50,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/AdvancedFind.pm 007f51112d0a3c7ddd3d83296e4c20ccc83d787f +++ lib/perl/AdvancedFind.pm 1a706d28e9628ecb70166b58b1a1c83df0758533 @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/Annotate.pm 1e20648ca38bb4ac491c9d66de06d2575b7219c1 +++ lib/perl/Annotate.pm 4b4766bf05dbb8895984aebfe26e0d7c7d1ce25b @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/CachingAutomateStdio.pm 6eea2e0d89c07113e0f94581fedf159344ad629a +++ lib/perl/CachingAutomateStdio.pm de0a03ee77a90bf0f78020d342cb754d5348b454 @@ -50,6 +50,7 @@ use integer; require 5.008005; use integer; +use locale; use strict; use warnings; ============================================================ --- lib/perl/ChangeLog.pm c3467132f877e523e4cff90deb187827a46e8802 +++ lib/perl/ChangeLog.pm e834dfe87ef7add13ab74dfd14f391707f6dfca0 @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/ComboAutoCompletion.pm 323da650715093941315ee15bec38e5bff75a3cf +++ lib/perl/ComboAutoCompletion.pm a08dd9dab70a34a5e71ccb6b35a16d2861894521 @@ -43,6 +43,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/Common.pm 000f95ec93c27d77d3994a47ad0f32a61c0635b5 +++ lib/perl/Common.pm ece342e6cdb7e8f24e9cd5f0517ad1642fd8ded5 @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/Completion.pm 0f9ade9ad8a389fa9d21df5bff30745464dd8b4d +++ lib/perl/Completion.pm 14b963469ffd8340d75ea66e4f74f5d409b15516 @@ -48,6 +48,7 @@ use integer; require 5.008005; use integer; +use locale; use strict; use warnings; ============================================================ --- lib/perl/FindFiles.pm ff79f40f11aa711c65249fdfd53271bcf62f72d0 +++ lib/perl/FindFiles.pm 10a2d9032978d20fdb9496ef876da845fa9ea8fb @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/FindText.pm bc11df9613a01154a92fb6f855fcca1dfcc8c39b +++ lib/perl/FindText.pm 65000c0c8004be927d06248a4cae65e47fbca015 @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/Globals.pm ec8fe1bfec2013217496d5991ad7532ef30a7b84 +++ lib/perl/Globals.pm d368dbb3992aaf613f8ed630b6c088b22954715e @@ -48,16 +48,12 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; # ***** GLOBAL DATA DECLARATIONS ***** -# Constants for the name and version of this application. - -use constant APPLICATION_NAME => "mtn-browse"; -use constant APPLICATION_VERSION => 0.62; - # Constants used to represent the different groups of widgets. use constant BRANCH => 0x01; @@ -119,8 +115,6 @@ our %EXPORT_TAGS = (constants => [qw(ALL use base qw(Exporter); our %EXPORT_TAGS = (constants => [qw(ALL_CHANGED - APPLICATION_NAME - APPLICATION_VERSION BRANCH BRANCH_CHANGED DATABASE_CHANGED ============================================================ --- lib/perl/History.pm 9cbe1ed307bcf1199202b66d91d90de3f806ec8d +++ lib/perl/History.pm 676fd21d0cbbe57c42caba1188ede42cd870e692 @@ -42,6 +42,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; no warnings qw(recursion); ============================================================ --- lib/perl/Preferences.pm 03b4000a401723ce673839dce808ade8d4eaacca +++ lib/perl/Preferences.pm 92111fa9127ba4345a281e4e1d62f6a89955a3c1 @@ -61,6 +61,7 @@ require 5.008005; require 5.008005; +use locale; use strict; use warnings; ============================================================ --- lib/perl/WindowManager.pm 41b8c9c3ed55d22a4a6e55a87f9d28c38f43cd40 +++ lib/perl/WindowManager.pm 6d30c1472f2e9dfbc86025c9f0601e3626cf9562 @@ -48,7 +48,7 @@ require 5.008005; require 5.008005; -use integer; +use locale; use strict; use warnings; ============================================================ --- mtn-browse 1dafd8758fabc53bfcd3693cbc0d348fb6eba8ae +++ mtn-browse 567234f0497878b4898b61d6ba4885fcb42d04fa @@ -44,11 +44,13 @@ BEGIN BEGIN { - use constant FILE_COMPARE_CMD => "@INST:FILE_COMPARE_CMD@"; - use constant HTML_VIEWER_CMD => "@INST:HTML_VIEWER_CMD@"; - use constant LIB_DIR => "@INST:LIB_DIR@"; - use constant MIME_GLOB_FILE => "@INST:GLOBS_FILE@"; - use constant PREFIX_DIR => "@INST:PREFIX_DIR@"; + use constant APPLICATION_NAME => "mtn-browse"; + use constant APPLICATION_VERSION => 0.62; + use constant FILE_COMPARE_CMD => "@INST:FILE_COMPARE_CMD@"; + use constant HTML_VIEWER_CMD => "@INST:HTML_VIEWER_CMD@"; + use constant LIB_DIR => "@INST:LIB_DIR@"; + use constant MIME_GLOB_FILE => "@INST:GLOBS_FILE@"; + use constant PREFIX_DIR => "@INST:PREFIX_DIR@"; } use locale; use strict; @@ -73,11 +75,11 @@ use Gtk2::SourceView; use Gtk2::Helper; use Gtk2::Pango; use Gtk2::SourceView; -use Locale::TextDomain ("mtn-browse", - File::Spec->catfile(PREFIX_DIR, "share", "locale")); use IO::Dir; use IO::File; use IPC::Open3; +use Locale::TextDomain (APPLICATION_NAME, + File::Spec->catfile(PREFIX_DIR, "share", "locale")); use POSIX qw(:errno_h :locale_h :sys_wait_h strftime); use Symbol qw(gensym); use Text::Tabs; @@ -94,6 +96,7 @@ use Globals qw(:constants :variables); # Modules specific to this application. use Globals qw(:constants :variables); +use LocaleEnableUtf8; use AdvancedFind; use Annotate; use ChangeLog;