[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: l10n-support/sr
From: Chusslove Illich <caslav.ilic () gmx ! net>
Date: 2009-07-09 23:07:47
Message-ID: 1247180867.011138.27898.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 994044 by ilic:
Adding ascription filters, to prevent unapproved messages going out to branches.
M +28 -0 scripts/summit_hooks.py
M +8 -2 summit/docmessages.extras.summit
M +8 -0 summit/messages.extras.summit
--- trunk/l10n-support/sr/scripts/summit_hooks.py #994043:994044
@@ -20,6 +20,7 @@
from pology.l10n.sr.hook.nobr import nobrhyp_char
from pology.l10n.sr.hook.nobr import to_nobr_hyphens as to_nobr_hyph_factory
from pology.l10n.sr.mdec import autoalt_head, autoalt_sep
+from pology.scripts.poascribe import ATYPE_MOD, ATYPE_REV
import sys, os, re, codecs
@@ -440,6 +441,33 @@
# ========================================
+# Ascription filters.
+# ========================================
+
+_asc_approvers = set((
+ "ilic",
+))
+
+
+def asc_filter_pass (msg, cat, hist, conf):
+
+ return True
+
+
+def asc_filter_basic (msg, cat, hist, conf):
+
+ # Fail the message if there was any modification by a non-approver
+ # after last review by an approver.
+ for a in hist:
+ if a.type == ATYPE_MOD and a.user not in _asc_approvers:
+ return False
+ if a.type == ATYPE_REV and a.user in _asc_approvers:
+ break
+
+ return True
+
+
+# ========================================
# Utilities.
# ========================================
--- trunk/l10n-support/sr/summit/docmessages.extras.summit #994043:994044
@@ -210,8 +210,6 @@
def is_not_latin_branch (bid):
return not is_latin_branch(bid)
-# ========================================
-# Everything ready, set hooks.
# Additional hooks on scattered translations.
S.hook_on_scatter_msgstr.extend([
@@ -315,3 +313,11 @@
(hooks.remove_obsolete, r"^\w"),
# ...summit ID is guaranteed not to start with a word character.
])
+
+
+# Set ascription filters.
+S.ascription_filters = [
+ ("basic", hooks.asc_filter_basic),
+ ("pass", hooks.asc_filter_pass),
+]
+
--- trunk/l10n-support/sr/summit/messages.extras.summit #994043:994044
@@ -238,3 +238,11 @@
(hooks.remove_obsolete, r"^\w"),
# ...summit ID is guaranteed not to start with a word character.
])
+
+
+# Set ascription filters.
+S.ascription_filters = [
+ ("basic", hooks.asc_filter_basic),
+ ("pass", hooks.asc_filter_pass),
+]
+
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic