Merge lp:~dobey/intltool/remove-unicodify into lp:intltool

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 695
Merged at revision: not available
Proposed branch: lp:~dobey/intltool/remove-unicodify
Merge into: lp:intltool
Diff against target: None lines
To merge this branch: bzr merge lp:~dobey/intltool/remove-unicodify
Reviewer Review Type Date Requested Status
intltool Developers Pending
Review via email: mp+8620@code.launchpad.net

Commit message

Remove intltool-unicodify

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2009-04-26 19:15:06 +0000
3+++ Makefile.am 2009-07-11 17:03:43 +0000
4@@ -14,9 +14,6 @@
5 intltoolize \
6 intltool-prepare
7
8-# Deprecated:
9-EXTRA_SCRIPTS = intltool-unicodify
10-
11 # These are required by intltoolize
12 dist_pkgdata_DATA = Makefile.in.in
13
14@@ -29,8 +26,7 @@
15
16 EXTRA_DIST = \
17 $(distributed_scripts:=.in) \
18- intltool-prepare.in \
19- intltool-unicodify.in
20+ intltool-prepare.in
21
22 edit = sed -e 's|[@]PACKAGE@|$(PACKAGE)|g' \
23 -e 's|[@]VERSION@|$(VERSION)|g' \
24
25=== removed file 'intltool-unicodify.in'
26--- intltool-unicodify.in 2008-04-12 01:45:49 +0000
27+++ intltool-unicodify.in 1970-01-01 00:00:00 +0000
28@@ -1,172 +0,0 @@
29-#!@INTLTOOL_PERL@ -w
30-
31-#
32-# The i18n Unicode Encoding Utility
33-#
34-# Copyright (C) 2001 Free Software Foundation.
35-#
36-# This library is free software; you can redistribute it and/or
37-# modify it under the terms of the GNU General Public License as
38-# published by the Free Software Foundation; either version 2 of the
39-# License, or (at your option) any later version.
40-#
41-# This script is distributed in the hope that it will be useful,
42-# but WITHOUT ANY WARRANTY; without even the implied warranty of
43-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44-# General Public License for more details.
45-#
46-# You should have received a copy of the GNU General Public License
47-# along with this library; if not, write to the Free Software
48-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
49-#
50-# Authors: Kenneth Christiansen <kenneth@gnu.org>
51-#
52-
53-## Release information
54-my $PROGRAM = "intltool-unicodify";
55-my $VERSION = "@VERSION@";
56-my $PACKAGE = "@PACKAGE@";
57-
58-## Loaded modules
59-use strict;
60-use Getopt::Long;
61-use Cwd;
62-use File::Copy;
63-
64-## Scalars used by the option stuff
65-my $LANG = $ARGV[0];
66-my $HELP_ARG = 0;
67-my $VERSION_ARG = 0;
68-my $OVERWRITE_ARG = 0;
69-my $VERBOSE = 0;
70-
71-## Always print as the first thing
72-$| = 1;
73-
74-## Handle options
75-GetOptions
76-(
77- "help" => \$HELP_ARG,
78- "version" => \$VERSION_ARG,
79- "verbose|v" => \$VERBOSE,
80- "overwrite|o" => \$OVERWRITE_ARG,
81- ) or &print_error_invalid_option;
82-
83-sub split_on_argument
84-{
85- if ($VERSION_ARG) {
86- &print_version;
87- }
88- elsif ($HELP_ARG) {
89- &print_help;
90- }
91-
92- ## Give error if script is run without an argument
93- if (! $LANG){
94- print "${PROGRAM}: missing file arguments\n";
95- print "Try `${PROGRAM} --help' for more information.\n";
96- exit;
97- }
98-}
99-
100-&split_on_argument;
101-&main;
102-
103-sub print_version
104-{
105- ## Print version information
106- print "${PROGRAM} (${PACKAGE}) $VERSION\n";
107- print "Written by Kenneth Christiansen\n\n";
108- print "Copyright (C) 2001-2002 Free Software Foundation, Inc.\n";
109- print "This is free software; see the source for copying conditions. There is NO\n";
110- print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
111- exit;
112-}
113-
114-sub print_help
115-{
116- ## Print usage information
117- print "Usage: ${PROGRAM} [OPTIONS] ...LANGCODE\n";
118- print "Convert PO files containing translations to UTF8.\n\n";
119- print " -o, --owerwrite overwrite original file\n";
120- print " -x, --verbose display lots of feedback\n";
121- print " --help display this help and exit\n";
122- print " --version output version information and exit\n";
123- print "\nExamples of use:\n";
124- print "${PROGRAM} da ports da.po to UTF8 and saves as da.po-1\n\n";
125- print "Report bugs to bugzilla.gnome.org, module 'intltool'.\n";
126- exit;
127-}
128-
129-sub get_local_charset
130-{
131- my ($encoding) = @_;
132- my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
133-
134- # seek character encoding aliases in charset.alias (glib)
135-
136- if (open CHARSET_ALIAS, $alias_file)
137- {
138- while (<CHARSET_ALIAS>)
139- {
140- next if /^\#/;
141- return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
142- }
143-
144- close CHARSET_ALIAS;
145- }
146-
147- # if not found, return input string
148-
149- return $encoding;
150-}
151-
152-sub main
153-{
154- my $encoding_code_orig;
155-
156- open IN, "$LANG.po";
157-
158- while (<IN>)
159- {
160- ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
161- if (/Content-Type\:.*charset=(.*)\\n/)
162- {
163- $encoding_code_orig = $1;
164- last;
165- }
166- }
167-
168- close IN;
169-
170- $encoding_code_orig = get_local_charset($encoding_code_orig);
171-
172- print "Converting from $encoding_code_orig\n" if $VERBOSE;
173-
174- my $extern_conv="iconv -f $encoding_code_orig "
175- ."-t UTF-8 $LANG.po > $LANG.po-1";
176-
177- system ($extern_conv);
178-
179- my $source_orig;
180- {
181- local (*IN);
182- local $/; #slurp mode
183- open (IN, "<$LANG.po-1") || die "can't open $LANG.po-1: $!";
184- $source_orig = <IN>;
185- }
186-
187- $source_orig =~ s/Content-Type\:(.*)$encoding_code_orig/Content-Type\:$1UTF-8/;
188-
189- close IN;
190- open OUT, ">$LANG.po-1";
191-
192- print OUT $source_orig;
193- close OUT;
194-
195- if ($OVERWRITE_ARG)
196- {
197- copy ("$LANG.po-1", "$LANG.po");
198- system ("rm -rf $LANG.po-1");
199- }
200-}

Subscribers

People subscribed via source and target branches

to all changes: