[sysadmin-bin] Define a variable on its own for the additional_po_directories
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Define a variable on its own for the additional_po_directories
- Date: Wed, 5 Feb 2014 20:04:48 +0000 (UTC)
commit 95e59367cdce8038ea5cd8770f4f577bb8acfde6
Author: Andrea Veri <av gnome org>
Date: Wed Feb 5 21:04:39 2014 +0100
Define a variable on its own for the additional_po_directories
git/pre-receive-check-translations | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/git/pre-receive-check-translations b/git/pre-receive-check-translations
index 35c43f2..1bc5529 100755
--- a/git/pre-receive-check-translations
+++ b/git/pre-receive-check-translations
@@ -6,6 +6,7 @@
# The per-repository git config keys
#
# hooks.po-directories (default 'po')
+# hooks.additional-po-directories (default 'po-properties')
# hooks.help-directories (default 'help')
#
# Define the directories that have po-file or translated help structure.
@@ -43,7 +44,8 @@ def check_translations(oldrev, newrev, refname):
if re.match(r'^0+$', newrev):
error("translations user cannot delete branches")
- po_directories = config_dirs('hooks.po-directories', 'po', 'po-properties')
+ po_directories = config_dirs('hooks.po-directories', 'po')
+ additional_po_directories = config_dirs('hooks.additional-po-directories', 'po-properties')
help_directories = config_dirs('hooks.help-directories', 'help')
# Iterate through all changed files. Passing -z to git diff-tree
@@ -69,6 +71,19 @@ def check_translations(oldrev, newrev, refname):
if relpath == 'LINGUAS':
ok = True
+ for dir in additional_po_directories:
+ relpath = relative_path(path, dir)
+ if relpath is None:
+ continue
+
+ # Arbitrary change to a .po file
+ if re.match(r'^[a-zA-Z _]+ po$', relpath):
+ ok = True
+
+ # Arbitrary change to LINGUAS
+ if relpath == 'LINGUAS':
+ ok = True
+
for dir in help_directories:
relpath = relative_path(path, dir)
if relpath is None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]