* [kde-russian] Множественные формы
@ 2004-04-13 10:10 Черепанов Андрей
0 siblings, 0 replies; only message in thread
From: Черепанов Андрей @ 2004-04-13 10:10 UTC (permalink / raw)
To: KDE рассылка
Я начал ревизию ошибок во множественных формах наших переводов. Ветку 3.2
исправил. Сейчас исправляю HEAD. В конце сообщения приведён скрипт, которым я
проверяю. Он, правда, не проверяет, переведено ли сообщение вообще и в
обязательном порядке требует указания трёх '%n' в переводе. Прошу проверять
ваши переводы перед выкладыванием.
---------------------------------------------------------------
#!/usr/bin/perl
$file = $ARGV[0];
open(F,"$file") or die("Cannot open file $file");
$type = 0;
while(<F>) {
if(/^#/) { next; }
if(/^msgid "(.*)"$/) { $type=1; $id=$1; next; }
if(/^msgstr "(.*)"$/) { $type=2; $str=$1; next; }
if(/^$/) {
$type=0;
# Check forms
# print "$id\n\t$str\n";
if($id =~ /^_n:/) {
if(not $str =~ /%n.*%n.*%n/) {
print "Failed $file\n";
exit;
}
}
next;
}
if(/^(\s+)?"(.*)"$/) {
# Merge strings
if($type==1) { $id.=$2; }
if($type==2) { $str.=$2; }
}
}
close F;
--
Андрей Черепанов
sibskull@mail.ru
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-13 10:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-13 10:10 [kde-russian] Множественные формы Черепанов Андрей
рассылка русскоязычной группы пользователей и разработчиков KDE
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/kde-russian/0 kde-russian/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 kde-russian kde-russian/ http://lore.altlinux.org/kde-russian \
kde-russian@lists.kde.ru
public-inbox-index kde-russian
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.kde-russian
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git