[damned-lies] Add a mean to force intltool method over autodetection
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add a mean to force intltool method over autodetection
- Date: Mon, 26 Mar 2018 08:14:07 +0000 (UTC)
commit 91d3b17ca80244260e6bb1eb6516988ac0632c34
Author: Claude Paroz <claude 2xlibre net>
Date: Mon Mar 26 10:12:56 2018 +0200
Add a mean to force intltool method over autodetection
Fixes bug #794682.
.../migrations/0009_remove_null_on_text_fields.py | 2 +-
stats/models.py | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/stats/migrations/0009_remove_null_on_text_fields.py
b/stats/migrations/0009_remove_null_on_text_fields.py
index 38b59e6..515c78d 100644
--- a/stats/migrations/0009_remove_null_on_text_fields.py
+++ b/stats/migrations/0009_remove_null_on_text_fields.py
@@ -29,7 +29,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='domain',
name='pot_method',
- field=models.CharField(blank=True, default='', help_text="Leave blank for standard method
(intltool for UI and gnome-doc-utils for DOC), or '<gettext>' for the pure xgettext-based extraction",
max_length=100),
+ field=models.CharField(blank=True, default='', help_text="Leave blank for autodetected method
(intltool/gettext/gnome-doc-utils), or '<gettext>', '<intltool>', or real pot command to force
the tool chain", max_length=100),
preserve_default=False,
),
migrations.AlterField(
diff --git a/stats/models.py b/stats/models.py
index 4df5fdb..9dde167 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -38,6 +38,7 @@ validate_slug = RegexValidator(
'invalid'
)
GETTEXT_METHOD = '<gettext>'
+INTLTOOL_METHOD = '<intltool>'
VCS_TYPE_CHOICES = (
('cvs', 'CVS'),
@@ -742,8 +743,8 @@ class Domain(models.Model):
# The pot_method is a command who should produce a potfile in the po directory of
# the domain, named <potbase()>.pot (e.g. /po/gnucash.pot).
pot_method = models.CharField(max_length=100, blank=True,
- help_text="Leave blank for standard method (intltool for UI and gnome-doc-utils for DOC), "
- "or '<gettext>' for the pure xgettext-based extraction")
+ help_text="Leave blank for autodetected method (intltool/gettext/gnome-doc-utils), "
+ "or '<gettext>', '<intltool>', or real pot command to force the tool chain")
extra_its_dirs = models.TextField(blank=True,
help_text="colon-separated directories containing extra .its/.loc files for gettext")
linguas_location = models.CharField(max_length=50, blank=True,
@@ -843,7 +844,8 @@ class Domain(models.Model):
current_branch.uses_meson and not self.pot_method):
pot_command = self.get_xgettext_command(current_branch)
- elif not self.pot_method: # fallback is intltool
+ elif self.pot_method == INTLTOOL_METHOD or not self.pot_method:
+ # fallback is intltool
pot_command = ['intltool-update', '-g', self.potbase(), '-p']
bugs_url = self.module.get_bugs_enter_url()
if bugs_url:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]