Commit 33941c7e authored by Luuk Scholten's avatar Luuk Scholten

Merge branch '190-vanancies-vacancies-bij-plural-vacancy-categories' into 'master'

Fix translating in partners models

Also fix plural of vacancy categories

Closes #190

See merge request !196
parents fc30eceb 92cd1987
This diff was suppressed by a .gitattributes entry.
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-26 20:26+0200\n"
"PO-Revision-Date: 2016-08-13 12:03+0200\n"
"POT-Creation-Date: 2016-12-02 13:12+0100\n"
"PO-Revision-Date: 2016-12-02 13:13+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: nl\n"
......@@ -16,39 +16,63 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.7.1\n"
"X-Generator: Poedit 1.8.11\n"
#: partners/models.py:33
msgid "Enter a valid address"
msgstr "Voer een geldig adres in"
#: partners/models.py:38
msgid "Enter a valid zip code"
msgstr "Voer een geldige postcode in"
#: partners/models.py:74
msgid "image of {}"
msgstr "Plaatje van {}"
#: partners/models.py:85
msgid "Vacancy Categories"
msgstr "Vacaturecategorieën"
#: partners/models.py:102
msgid ""
"When you use a partner, the company name and logo below will not be used."
msgstr ""
"Wanneer je een partner aangeeft, zullen de bedrijfsnaam en logo hieronder "
"niet gebruikt worden."
#: partners/models.py:129 partners/templates/partners/partner.html:75
#: partners/templates/partners/vacancies.html:5
msgid "Vacancies"
msgstr "Vacatures"
#: partners/models.py:141
msgid "title"
msgstr ""
msgstr "titel"
#: partners/models.py:147
msgid "description"
msgstr ""
msgstr "beschrijving"
#: partners/models.py:152
#, fuzzy
#| msgid "Information"
msgid "location"
msgstr "Informatie"
msgstr "locatie"
#: partners/models.py:156
msgid "start time"
msgstr ""
msgstr "starttijd"
#: partners/models.py:158
msgid "end time"
msgstr ""
msgstr "eindtijd"
#: partners/models.py:160
#, fuzzy
#| msgid "Website"
msgid "website"
msgstr "Website"
msgstr "website"
#: partners/models.py:162
msgid "published"
msgstr ""
msgstr "gepubliceerd"
#: partners/templates/partners/index.html:6
msgid "Our partners"
......@@ -121,11 +145,6 @@ msgstr "Plaatsnaam"
msgid "Website"
msgstr "Website"
#: partners/templates/partners/partner.html:75
#: partners/templates/partners/vacancies.html:5
msgid "Vacancies"
msgstr "Vacatures"
#: partners/templates/partners/vacancies.html:7
msgid ""
"Je bent student en je hebt het maar krap. De politiek wil de studenten ook "
......
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-12-02 12:09
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('partners', '0005_partnerevent'),
]
operations = [
migrations.AlterModelOptions(
name='vacancycategory',
options={'verbose_name_plural': 'Vacancy Categories'},
),
]
from django.core.validators import RegexValidator, URLValidator
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext, ugettext_lazy as _
from tinymce.models import HTMLField
from utils.translation import ModelTranslateMeta, MultilingualField
......@@ -30,12 +30,12 @@ class Partner(models.Model):
regex=(r'^([1-9][e][\s])*([ëéÉËa-zA-Z]'
'+(([\.][\s])|([\s]))?)+[1-9][0-9]'
'*(([-][1-9][0-9]*)|([\s]?[ëéÉËa-zA-Z]+))?$'),
message='Enter a valid address')
message=_('Enter a valid address'))
])
zip_code = models.CharField(max_length=12, validators=[
RegexValidator(
regex=r'^[1-9][0-9]{3}[\s]?[A-Za-z]{2}$',
message='Enter a valid zip code'
message=_('Enter a valid zip code')
)
])
city = models.CharField(max_length=100)
......@@ -71,7 +71,7 @@ class PartnerImage(models.Model):
image = models.ImageField(upload_to='public/partners/images/')
def __str__(self):
return 'image of {}'.format(self.partner.name)
return ugettext('image of {}').format(self.partner.name)
class VacancyCategory(models.Model, metaclass=ModelTranslateMeta):
......@@ -82,7 +82,7 @@ class VacancyCategory(models.Model, metaclass=ModelTranslateMeta):
return self.name
class Meta:
verbose_name_plural = 'Vanancy Categories'
verbose_name_plural = _('Vacancy Categories')
class Vacancy(models.Model):
......@@ -99,8 +99,8 @@ class Vacancy(models.Model):
on_delete=models.PROTECT,
null=True,
blank=True,
help_text="When you use a partner, the company name and logo " +
"below will not be used."
help_text=_("When you use a partner, the company name and logo "
"below will not be used.")
)
company_name = models.CharField(max_length=255, blank=True)
......@@ -123,10 +123,10 @@ class Vacancy(models.Model):
return self.company_logo
def __str__(self):
return self.get_company_name() + ' - ' + self.title
return '{} — {}'.format(self.get_company_name(), self.title)
class Meta:
verbose_name_plural = 'Vacancies'
verbose_name_plural = _('Vacancies')
class PartnerEvent(models.Model, metaclass=ModelTranslateMeta):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment