Você não pode selecionar mais de 25 tópicosOs tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este arquivo contém caracteres ambíguos Unicode que podem ser confundidos com outros no seu idioma atual. Se o seu caso de uso for intencional e legítimo, você pode ignorar com segurança este aviso. Use o botão Escapar para destacar esses caracteres.
#! /usr/bin/perl
# NOTE: this script is part of the KDE SDK and added to KDevelop to support KDE 2 application development.
# The original is located in the KDE CVS module tdesdk/scripts. It gets installed in the same directory as
# the KDevelop binary to be in your PATH.
#
# What it does is extract the strings in an application´s .rc file, e.g. testappui.rc, and writes into the pot file
# where the translations are build with (po-files)
#
# Added to KDevelop 2000-10-29, Ralf Nolden (nolden@kde.org)
$linenr=0;
$filename="";
@filenames=();
subwriteoutstring($)
{
printSTDOUT"i18n(\"@_[0]\");\n";
}
while(defined($ARGV[0]))
{
$_=shift;
$filename=$_;# maybe check for options
if(!$filename){
printSTDERR"no file to open\n";
exit1;
}
$string="";
$intext=0;
open(FILE,$filename);
while(<FILE>){
$linenr++;
$string.=$_;
chomp($string);
$textstring='([tT][eE][xX][tT]|string)>';
if($intext==0){
if($string=~ /<$textstring/){
$string=~s/^.*<$textstring//;
$intext=1;
$starting_linenr=$linenr;
}else{
$string="";
}
}
if(($intext==1)&&($string=~ /<\/$textstring/)){
my$text=$string;
$text=~s/<\/$textstring.*$//;
$text=~s/</</g;
$text=~s/>/>/g;
$text=~s/&/&/g;
writeoutstring($text);
$string=~s/^.*<\/$textstring//;
$intext=0;
if($linenr!=$starting_linenr){
printSTDERR"there is <text> floating\n";
}
}
}
if($intext==1){
printSTDERR"parsing error in $filename $linenr\n";