[damned-lies] fix: finaly fixing the update-trans command :-)



commit 857bb1cdd4551726c6efdc30a6662127c40a4dd8
Author: Guillaume Bernard <associations guillaume-bernard fr>
Date:   Wed Jul 7 23:29:56 2021 +0200

    fix: finaly fixing the update-trans command :-)
    
    did not now this was automatically deployed to prod!

 stats/management/commands/update-trans.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/stats/management/commands/update-trans.py b/stats/management/commands/update-trans.py
index 9d289cc5..643fde57 100644
--- a/stats/management/commands/update-trans.py
+++ b/stats/management/commands/update-trans.py
@@ -32,10 +32,12 @@ class Command(BaseCommand):
             self.po_file = self.po_dir / f"{self.lang_code}.po"
             self._update_django_po_with_code_strings()
 
-        # backup code only strings in the code.po file. Remove non code related msgid (mainly coming from 
database)
-        code_po_file = str(self.locale_dir / "code.po")
-        shutil.copy(str(self.locale_dir / "django.po"), code_po_file)
-        subprocess.run(["/usr/bin/msgattrib", "--no-obsolete", "-o", str(code_po_file), str(code_po_file)], 
check=True)
+            # backup code-only strings in the code.po file. Remove non code related msgid (mainly coming 
from database)
+            code_po_file = str(self.locale_dir / "code.po")
+            shutil.copy(str(self.locale_dir / "django.po"), code_po_file)
+            subprocess.run(
+                ["/usr/bin/msgattrib", "--no-obsolete", "-o", str(code_po_file), str(code_po_file)], 
check=True
+            )
 
         self._update_django_po_with_database_strings()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]