Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37046179
en ru br
Репозитории ALT
S:0.3.3-alt1
5.1: 0.2-alt3
4.1: 0.2-alt3
4.0: 0.2-alt3
3.0: 0.2-alt3
www.altlinux.org/Changes

Группа :: Система/Основа
Пакет: menu-messages

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/usr/bin/perl

# Little scrip to read the /usr/lib/menu/* files, and write a
# menu-menssages.pot file for them. This file then should contain
# all possible translations, and can be used by translators.'
#
#
# Should be changed to
# - accept the compat-2 mode
# - extract /usr/lib/menu/* files from .deb files. Then I'll run it on master.

open(POT, ">menu-messages.pot");

while (</tmp/tmp-menu-files/*>){
my $file=$_;
open(ME,$_);
while(<ME>){
my $line;
$line=$_;
chomp($line);
while($line =~ /\\\s*$/){
$line =~ s/\\\s*$//;
$line .= <ME>;
chomp($line);
}
$line =~ s/^[^:]*://;
$line =~ m/title\s*=\s*"(.*?[^\\])"/ ||
$line =~ m/title\s*=\s*([^\s]*)/;
$title=$1;
$line =~ m/genericname\s*=\s*"(.*?[^\\])"/ ||
$line =~ m/genericname\s*=\s*([^\s]*)/;
$genericname=$1;
$line =~ m/longtitle\s*=\s*"(.*?[^\\])"/ ||
$line =~ m/longtitle\s*=\s*([^\s]*)/;
$longtitle=$1;
$line =~ m/section\s*=\s*"(.*?[^\\])"/ ||
$line =~ m/section\s*=\s*([^\s]*)/;
$section=$1;
#print "T=$title S=$section LL " . $line . "\n";
$items{$title}=$file;
$items{$genericname}=$file;
$items{$longtitle}=$file;
while( $section =~ s%/?([^/]+)/?%% ){
$items{$1}=$file;
}
}
close(ME);
}


print POT "# Collection of titles/sections of debian menu's.
# This file is automatically generated. Do not edit.
# It's generated from the /usr/lib/menu/* files.
#
#, fuzzy
msgid \"\"
msgstr \"\"
\"Project-Id-Version: PACKAGE VERSION\\n\"
\"POT-Creation-Date: 1999-12-05 18:51+0100\\n\"
\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"
\"Last-Translator: FULL NAME <joostje\@debian.org>\\n\"
\"MIME-Version: 1.0\\n\"
\"Content-Type: text/plain; charset=CHARSET\\n\"
\"Content-Transfer-Encoding: ENCODING\\n\"

";

for my $s (sort keys %items){
print POT "#: Found in " . $items{$s} . "\n";
print POT "msgid \"" . $s . "\"\n";
print POT "msgstr \"\"\n\n";
}












 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin