~ubuntu-branches/ubuntu/lucid/kdelibs/lucid

« back to all changes in this revision

Viewing changes to debian/kubuntu-desktop-i18n/createdesktop.pl

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2009-11-09 17:43:28 UTC
  • mfrom: (1.1.16 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091109174328-3kvjg00vi07n1dvg
Tags: 4:3.5.10.dfsg.1-2.1ubuntu1
* Merge with Debian, remaining changes
 - make sure control and control.in are in sync
 - --with-distribution="Kubuntu (`lsb_release --codename --short`) $(DEB_VERSION)"
 - binary-install/kdelibs-data installs aboutkde-kubuntu.png.uu and cr*-device-system.png.uu
 - don't build-dep on libgamin-dev, libfam-dev
 - stop kdelibs4-dev depending on gamin/fam
 - don't install .svgz icons, docs or all_languages in kdelibs-data.install
 - rosetta support in rules common-install-prehook-impl:: [and common-post-build-arch:: ?] and include debian/kubuntu-desktop-i18n/
 - build-dep on: gettext-kde, kdesdk-scripts, lsb-release, base-files, sudo
 - cdbs build-dep 0.4.41ubuntu2
 - kdelibs4-dev depends on gettext-kde, kdesdk-scripts
 - copy debian/icons over
 - Make kdelibs4c2a depend on launchpad-integration, sudo.  Recommends on xdg-user-dirs
 - Remove 19_debianize_useragent.diff (changed to kubuntu_19_debianize_useragent.diff) s/Debian/Kubuntu
 - remove kdelibs4c2a depends on menu-xdg
 - include kubuntu_01_kdepot.diff and kde.pot in debian/patches/common
 - use a local copy of kde.mk without the common-install-prehook-impl:: rule; edit debian-qt-kde.mk to include debian/cdbs/kde.mk
 - build with --with-sudo-kdesu-backend and build-dep on sudo and make kdelibs4c2a depend on sudo
 - kdelibs-data.install : Add nzb mimetype
 - Make kdelibs4-dev replace more recent kdelibs4c2a for overlapping files
 - remove /usr/bin/preparetips, arts files and ksvntopng from kdelibs4-dev.install
 - Drop the package kdelibs4-doc completely. It contained API documentation  which is now obsolete, but still available via api.kde.org.
 - make sure control and control.in are in sync
 - in debian/rule remove .pot files outside .po directory
 - 97_automake_cleanup.diff becomes kubuntu_97_automake_cleanup.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env perl
2
 
 
3
 
use strict;
4
 
use warnings;
5
 
 
6
 
use Getopt::Long;
7
 
 
8
 
sub printdate
9
 
{
10
 
    printf ( "%04i", ( $_[5] + 1900 ) );
11
 
    print "-";
12
 
    printf ( "%02i", $_[4] + 1);
13
 
    print "-";
14
 
    printf ( "%02i", $_[3] );
15
 
    print " ";
16
 
    printf ( "%02i", $_[2] );
17
 
    print ":";
18
 
    printf ( "%02i", $_[1] );
19
 
    print "+0000";
20
 
}
21
 
 
22
 
sub prepare
23
 
{
24
 
    #warn "Running on Perl V5.8.x" if $^V ge v5.8.0;
25
 
 
26
 
    binmode( STDOUT, ":utf8" ) if $^V ge v5.8.0;
27
 
 
28
 
    my @now = gmtime();
29
 
    print "#, fuzzy\n";
30
 
    print "msgid \"\"\n";
31
 
    print "msgstr \"\"\n";
32
 
    print "\"Project-Id-Version: desktop files\\n\"\n";
33
 
    print "\"Report-Msgid-Bugs-To: http://bugs.kde.org\\n\"\n";
34
 
    print "\"POT-Creation-Date: "; printdate( @now ); print "\\n\"\n";
35
 
    print "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n";
36
 
    print "\"Last-Translator: FULL NAME <EMAIL\@ADDRESS>\\n\"\n";
37
 
    print "\"Language-Team: LANGUAGE <kde-i18n-doc\@kde.org>\\n\"\n";
38
 
    print "\"MIME-Version: 1.0\\n\"\n";
39
 
    print "\"Content-Type: text/plain; charset=UTF-8\\n\"\n";
40
 
    print "\"Content-Transfer-Encoding: 8bit\\n\"\n";
41
 
    print "\n\n";
42
 
}
43
 
 
44
 
sub processfiles
45
 
{
46
 
    my ( $files, $basedir) = ( @_ );
47
 
    for my $filename ( @$files )
48
 
    {
49
 
        chomp( $filename );
50
 
        open( FH, "<", $filename ) or warn "Cannot open file $filename";
51
 
        binmode( FH, ":utf8" ) if $^V ge v5.8.0;
52
 
    
53
 
        #warn("Using $filename");
54
 
        
55
 
        #my $regexp = qr{^(Name|Comment|Language|Keywords|About|Description|GenericName)=};
56
 
        my $regexp = qr{^(Name|Comment|Language|Keywords|About|Description|GenericName|Query|ExtraNames|X-KDE-Submenu)=};
57
 
    
58
 
        while( <FH> )
59
 
        {
60
 
            if ( m/$regexp/o )
61
 
            {
62
 
                my $msgid = $_;
63
 
                chomp( $msgid );
64
 
                $msgid =~ s/\\/\\\\/g;
65
 
                $msgid =~ s/\"/\\\"/g;
66
 
                if ($msgid =~ m/ +$/) {
67
 
                   $msgid =~ s/ +$//; # remove trailing spaces
68
 
                   print STDERR "ERROR: white space at the end of $msgid in $filename\n";
69
 
                }
70
 
                if ($msgid =~ m/\r+$/) {
71
 
                   $msgid =~ s/\r+$//; # remove trailing CR (Carriage Return)
72
 
                   print STDERR "ERROR: CR at the end of $msgid in $filename\n";
73
 
                }
74
 
                $filename =~ s,^$basedir/,,;
75
 
                print "#: $filename:$.\n";
76
 
                print "msgid \"$msgid\"\n";
77
 
                print "msgstr \"\"\n";
78
 
                print "\n";
79
 
            }
80
 
        }
81
 
    
82
 
        close( FH );
83
 
    }
84
 
}
85
 
 
86
 
my $onefilelist;
87
 
my $basedir;
88
 
GetOptions ( "file-list=s" => \$onefilelist,
89
 
             "base-dir=s" => \$basedir
90
 
           );
91
 
 
92
 
prepare;
93
 
 
94
 
open( FILELIST, $onefilelist ) or warn ( "Cannot open file list: $onefilelist" );
95
 
my @thislist = <FILELIST>;
96
 
processfiles( \@thislist, $basedir );
97
 
close( FILELIST );
98