From: Alexander Potashev <aspotashev@gmail.com>
To: KDE russian translation mailing list <kde-russian@lists.kde.ru>
Subject: Re: [kde-russian] Изменение формулы для множественного числа
Date: Sat, 24 Jul 2010 00:16:10 +0400
Message-ID: <AANLkTi=DJUCxUiKL4YMz4USN6hp_KSSyoBjxBHYp-y1H@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikL5wIUWSNAkxTdImbj5X2adRmS6R-o_51OhYFd@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
>>> Готово:
>>> http://websvn.kde.org/?view=revision&revision=1152219 (trunk)
>>> http://websvn.kde.org/?view=revision&revision=1152232 (stable)
После перехода на 4 формы множественного числа хотелось бы реализовать
этот потенциал улучшения переводов.
Мне не очень хотелось проверять тысячу строк, использующих формы
множественного числа, поэтому я решил пройтись только по некоторым. А
именно, по тем строкам, где совпадают msgstr[1] и msgstr[2]. Благо,
что таких строк всего лишь около сотни. Результаты проверки:
http://websvn.kde.org/?view=revision&revision=1153718
Надеюсь, что по такому критерию можно найти почти (а может быть и
все?) строки, которые страдали от нехватки 4-й формы множественного
числа.
Если кто-то интересуется Pology, во вложении находится "sieve" для
Pology, находящий строки с совпадающими msgstr[1] и msgstr[2].
--
Alexander Potashev
[-- Attachment #2: find_fake_plurals.py --]
[-- Type: text/x-python, Size: 1650 bytes --]
# -*- coding: UTF-8 -*-
"""
Find messages with msgstr[1] == msgstr[2]
#For every fuzzy message, the translation and fuzzy data (the flag,
#previous fields) are removed. Manual (translator) comments are left in
#by default, but can be removed as well.
#Obsolete fuzzy messages are completely removed.
Sieve options:
- C{lokalize}: open catalogs at matched messages in Lokalize
@author: Alexander Potashev <aspotashev@gmail.com>
@license: GPLv3
"""
from pology import _, n_
from pology.misc.report import report
from pology.misc.msgreport import report_msg_content
from pology.misc.msgreport import report_msg_to_lokalize
def setup_sieve (p):
p.set_desc(_("@info sieve discription",
"Find messages with msgstr[1] == msgstr[2]."
))
p.add_param("lokalize", bool, defval=False,
desc=_("@info sieve parameter discription",
"Open catalogs at matched messages in Lokalize."
))
class Sieve (object):
def __init__ (self, params):
self.p = params
self.nfound = 0
def process (self, msg, cat):
if (msg.msgid_plural is not None and msg.msgstr[1] == msg.msgstr[2] and not msg.obsolete and not msg.fuzzy and not msg.untranslated):
self.nfound += 1
report_msg_content(msg, cat)
if self.p.lokalize:
report_msg_to_lokalize(msg, cat)
print "-" * 20
def finalize (self):
if self.nfound > 0:
msg = n_("@info:progress",
"Found %(num)d message of translation.",
"Found %(num)d messages of translation.",
num=self.nfound)
report("===== " + msg)
next prev parent reply other threads:[~2010-07-23 20:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 16:28 Yuri Chornoivan
2010-01-03 16:57 ` Alexander Potashev
2010-01-04 17:45 ` Alexander Potashev
2010-01-11 11:09 ` Андрей Черепанов
2010-03-14 10:51 ` Alexander Potashev
2010-03-18 16:36 ` Alexandre Prokoudine
2010-03-18 17:35 ` Alexander Potashev
2010-06-11 18:48 ` Alexander Potashev
2010-06-11 19:11 ` Yuri Chornoivan
2010-06-12 10:06 ` Yuri Chornoivan
2010-06-12 10:25 ` Alexander Potashev
2010-07-16 15:07 ` Alexander Potashev
2010-07-20 14:44 ` Alexander Potashev
2010-07-20 15:10 ` Alexander Potashev
2010-07-22 9:55 ` Yuri Chornoivan
2010-07-22 10:11 ` Alexander Potashev
2010-07-23 20:16 ` Alexander Potashev [this message]
2010-07-25 21:15 ` Artem Sereda
2010-07-25 21:30 ` Alexander Potashev
2010-07-25 21:40 ` Artem Sereda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=DJUCxUiKL4YMz4USN6hp_KSSyoBjxBHYp-y1H@mail.gmail.com' \
--to=aspotashev@gmail.com \
--cc=kde-russian@lists.kde.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
рассылка русскоязычной группы пользователей и разработчиков 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