← Back to team overview

harvest-dev team mailing list archive

[Merge] lp:~dholbach/harvest/i18n into lp:harvest

 

Daniel Holbach has proposed merging lp:~dholbach/harvest/i18n into lp:harvest.

Requested reviews:
  harvest-dev (harvest-dev)

-- 
https://code.launchpad.net/~dholbach/harvest/i18n/+merge/26466
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/i18n into lp:harvest.
=== modified file 'harvest/locale/harvest.pot'
--- harvest/locale/harvest.pot	2010-02-09 11:08:55 +0000
+++ harvest/locale/harvest.pot	2010-06-01 06:41:33 +0000
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-02-09 05:04-0600\n"
+"POT-Creation-Date: 2010-06-01 01:38-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@xxxxxx>\n"
@@ -16,74 +16,90 @@
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: opportunities/models.py:11 opportunities/models.py:19
-#: opportunities/models.py:47
+#: opportunities/models.py:15 opportunities/models.py:23
+#: opportunities/models.py:51
 msgid "Name"
 msgstr ""
 
-#: opportunities/models.py:48 opportunities/models.py:80
+#: opportunities/models.py:52 opportunities/models.py:83
 msgid "URL"
 msgstr ""
 
-#: opportunities/models.py:49 opportunities/models.py:79
+#: opportunities/models.py:53 opportunities/models.py:82
 msgid "Description"
 msgstr ""
 
-#: opportunities/models.py:50 opportunities/models.py:81
+#: opportunities/models.py:54 opportunities/models.py:84
 msgid "Last Updated"
 msgstr ""
 
-#: opportunities/models.py:51
+#: opportunities/models.py:55
 msgid "Active"
 msgstr ""
 
-#: opportunities/models.py:52
+#: opportunities/models.py:56
 msgid "Featured"
 msgstr ""
 
-#: opportunities/models.py:53
+#: opportunities/models.py:57
 msgid "Specially feature this list of opportunities?"
 msgstr ""
 
-#: opportunities/models.py:54
+#: opportunities/models.py:58
 msgid "Explanatory help text"
 msgstr ""
 
-#: opportunities/models.py:55
+#: opportunities/models.py:59
 msgid "Commentable"
 msgstr ""
 
-#: opportunities/models.py:56
+#: opportunities/models.py:60
 msgid "Can opportunities on this list have comments?"
 msgstr ""
 
-#: opportunities/models.py:82
+#: opportunities/models.py:61 opportunities/models.py:91
+msgid "Required Experience"
+msgstr ""
+
+#: opportunities/models.py:62
+msgid "Level of experience required for this type of opportunities."
+msgstr ""
+
+#: opportunities/models.py:85
 msgid "Since"
 msgstr ""
 
-#: opportunities/models.py:82
+#: opportunities/models.py:85
 msgid "On the list since"
 msgstr ""
 
-#: opportunities/models.py:83
-msgid "Reviewed"
-msgstr ""
-
 #: opportunities/models.py:86
+msgid "Irrelevant"
+msgstr ""
+
+#: opportunities/models.py:89
 msgid "Comment"
 msgstr ""
 
-#: opportunities/models.py:87
+#: opportunities/models.py:90
 msgid "Valid"
 msgstr ""
 
+#: opportunities/models.py:92
+msgid "Level of experience required for this specific opportunity."
+msgstr ""
+
+#: opportunities/views.py:60
+msgid "Opportunity details could not be saved."
+msgstr ""
+
 #: opportunities/templates/opportunities/opportunities_by_package.html:9
 msgid "Opportunities By Package"
 msgstr ""
 
-#: opportunities/templates/opportunities/opportunities_by_package.html:52
-#: opportunities/templates/opportunities/opportunities_by_type.html:52
-#: templates/opportunities/opportunity_index.html:42
+#: opportunities/templates/opportunities/opportunities_by_package.html:49
+#: opportunities/templates/opportunities/opportunities_by_type.html:49
+#: templates/opportunities/opportunity_index.html:41
 msgid "There are currently no opportunities in Harvest. :("
 msgstr ""
 
@@ -120,6 +136,14 @@
 msgid "Harvest Admin"
 msgstr ""
 
+#: templates/opportunities/opportunity_edit.html:10
+msgid "Please correct the error"
+msgstr ""
+
+#: templates/opportunities/opportunity_edit.html:14
+msgid "Update Information Now!"
+msgstr ""
+
 #: templates/opportunities/opportunity_index.html:4
 msgid "Opportunity Index"
 msgstr ""

=== added file 'harvest/opportunities/management/commands/update-template.py'
--- harvest/opportunities/management/commands/update-template.py	1970-01-01 00:00:00 +0000
+++ harvest/opportunities/management/commands/update-template.py	2010-06-01 06:41:33 +0000
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+from django.core.management.base import NoArgsCommand
+
+import subprocess
+import os
+
+from django.conf import settings
+
+try:
+    APP_NAME = settings.PROJECT_NAME
+except AttributeError:
+    APP_NAME = "harvest"
+
+DUMMY_LOCALE = "xx"
+
+def update_template():
+    pwd = os.getcwd()
+    os.chdir(settings.PROJECT_PATH)
+    subprocess.call(["./manage.py", "makemessages", "-l", DUMMY_LOCALE])
+    project_locale_path = os.path.join(settings.PROJECT_PATH, "locale")
+    os.rename(os.path.join(project_locale_path, 
+                           "%s/LC_MESSAGES/django.po" % DUMMY_LOCALE),
+              os.path.join(project_locale_path, "%s.pot" % APP_NAME))
+    os.removedirs(os.path.join(project_locale_path, 
+                               "%s/LC_MESSAGES" % DUMMY_LOCALE))
+    os.chdir(pwd)
+
+class Command(NoArgsCommand):
+    help = "Update translations template."
+
+    def handle_noargs(self, **options):
+        update_template()

=== modified file 'harvest/opportunities/management/commands/updatepackagesets.py'
--- harvest/opportunities/management/commands/updatepackagesets.py	2010-01-22 13:28:04 +0000
+++ harvest/opportunities/management/commands/updatepackagesets.py	2010-06-01 06:41:33 +0000
@@ -16,10 +16,14 @@
             sys.exit(1)
         lp_packagesets = launchpad.get_packagesets(lp)
         package_mapping = {}
+        unseeded, created = PackageSet.objects.get_or_create(name="unseeded")
+        if created:
+            unseeded.save()
         for lp_packageset in lp_packagesets:
             packageset, created = PackageSet.objects.get_or_create(name=lp_packageset.name)
             if created:
                 packageset.save()
+            # record information which package is in which package sets
             for package_name in lp_packageset.getSourcesIncluded():
                 if not package_mapping.has_key(package_name):
                     package_mapping[package_name] = set()
@@ -35,7 +39,15 @@
                         package.packagesets.get(name=packageset_name)
                     except PackageSet.DoesNotExist:
                         package.packagesets.add(PackageSet.objects.get(name=packageset_name))
+                # if package is in mapping, it can't be in the unseeded
+                # list any more
+                if package.packagesets.filter(name="unseeded"):
+                    package.packagesets.delete(unseeded)
                 for packageset in package.packagesets.all():
                     if packageset.name not in package_mapping[package_name]:
                         package.packagesets.delete(PackageSet.objects.get(name=packageset))
                 package.save()
+        unseeded_packages = SourcePackage.objects.filter(packagesets__isnull=True)
+        for u in unseeded_packages:
+            u.packagesets.add(unseeded)
+            u.save()


Follow ups