# # # add_file "translations/README" # content [aa8700ae8e632325ca87dd12b59005fea62370be] # # patch "linux-install" # from [542a02db4322b9a9b0ffcc5522e02d2457d397f4] # to [aceddec4b837cf70358e5350dc1f7916fedcb18a] # ============================================================ --- translations/README aa8700ae8e632325ca87dd12b59005fea62370be +++ translations/README aa8700ae8e632325ca87dd12b59005fea62370be @@ -0,0 +1,13 @@ +Copy the mtn-browse.pot file to .po, e.g. de_DE.po, and then edit as +appropriate. The installer will convert the po files to mo format and store them +under: + + .../share/locale//LC_MESSAGES/mtn-browse.mo + +e.g. + + .../share/locale/de_DE/LC_MESSAGES/mtn-browse.mo + +Thank you. + +Tony Cooper. ============================================================ --- linux-install 542a02db4322b9a9b0ffcc5522e02d2457d397f4 +++ linux-install aceddec4b837cf70358e5350dc1f7916fedcb18a @@ -232,6 +232,24 @@ use IO::File; } $dir->close(); + # Install translation files. + + die("IO::Dir failed with $!") + if (! defined($dir = IO::Dir->new("translations"))); + while (defined($file = $dir->read())) + { + if ($file =~ m/(.*)\.po$/) + { + my $locale = $1; + system("msgfmt --output-file=translations/${locale}.mo " + . "translations/$file"); + system("$install translations/${locale}.mo " + . "${prefix_dir}/share/locale/${locale}/LC_MESSAGES/" + . "mtn-browse.mo"); + } + } + $dir->close(); + exit(0); }