Skip to content

Commit

Permalink
Translations, Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Merlin Buczek committed Jun 7, 2019
1 parent a3d7a35 commit c8d774e
Show file tree
Hide file tree
Showing 18 changed files with 426 additions and 367 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ For Django related variables see [Django's documentation](https://docs.djangopro
- `python manage.py update_translation_fields`. See [wagtail-modeltranslation docs](https://wagtail-modeltranslation.readthedocs.io/en/latest/management%20commands.html#the-update-translation-fields-command).

## Update search index
- `python manage.py update_index`. See [Wagtail docs](https://docs.wagtail.io/en/latest/reference/management_commands.html#update-index)
- `python manage.py update_index`. See [Wagtail docs](https://docs.wagtail.io/en/latest/reference/management_commands.html#update-index)

## Compile translation
- `python manage.py compilemessages`.
14 changes: 14 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
'wagtail.search',
'wagtail.admin',
'wagtail.core',
'wagtail.contrib.postgres_search',
'wagtail.contrib.search_promotions',

'wagtail_modeltranslation',
'wagtail_modeltranslation.makemigrations',
Expand Down Expand Up @@ -203,10 +205,22 @@
('en', _('English')),
('de', _('German')),
)

LOCALE_PATHS = [
ROOT_DIR.path('locale'),
]

WAGTAILMODELTRANSLATION_TRANSLATE_SLUGS = False

# WAGTAIL
WAGTAIL_SITE_NAME = 'MPI CMS'
# WAGTAIL_USER_EDIT_FORM = 'mpicms.users.forms.CustomUserEditForm'
# WAGTAIL_USER_CREATION_FORM = 'mpicms.users.forms.CustomUserCreationForm'
# WAGTAIL_USER_CUSTOM_FIELDS = ['phone', 'office']

# SEARCH
WAGTAILSEARCH_BACKENDS = {
'default': {
'BACKEND': 'wagtail.contrib.postgres_search.backend',
}
}
3 changes: 3 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
from django.conf.urls.static import static
from django.views import defaults as default_views

from base.views import search


urlpatterns = [
path('django-admin', admin.site.urls),
path('i18n/', include('django.conf.urls.i18n')),
path('search', search, name='search'),
re_path(r'^admin/', include(wagtailadmin_urls)),
re_path(r'^documents/', include(wagtaildocs_urls)),
] + static(
Expand Down
246 changes: 246 additions & 0 deletions locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-07 13:35+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: config/settings/base.py:205
msgid "English"
msgstr "Englisch"

#: config/settings/base.py:206
msgid "German"
msgstr "Deutsch"

#: mpicms/base/models.py:27
msgid "title"
msgstr "Titel"

#: mpicms/base/models.py:28
msgid "text"
msgstr "Text"

#: mpicms/base/models.py:39 mpicms/base/models.py:85
msgid "banner"
msgstr "Banner"

#: mpicms/base/models.py:40
msgid "banners"
msgstr "Banner"

#: mpicms/base/models.py:49 mpicms/base/models.py:66
msgid "contacts"
msgstr "Kontakte"

#: mpicms/base/models.py:55
msgid "person"
msgstr "Person"

#: mpicms/base/models.py:65
msgid "contact"
msgstr "Kontakt"

#: mpicms/base/models.py:111
msgid "homepage"
msgstr "Startseite"

#: mpicms/base/models.py:112
msgid "homepages"
msgstr "Startseiten"

#: mpicms/base/models.py:117 mpicms/news/models.py:57
msgid "preview"
msgstr "Vorschau"

#: mpicms/base/models.py:118
msgid "Short description of this category"
msgstr "Kurze Beschreibung der Kategorie"

#: mpicms/base/models.py:120 mpicms/events/models.py:19
#: mpicms/news/models.py:58
msgid "content"
msgstr "Inhalt"

#: mpicms/base/models.py:122
msgid "sidebar content"
msgstr "Inhalt der Seitenleiste"

#: mpicms/base/models.py:124
msgid "Text displayed in the sidebar of all child pages"
msgstr "Dieser Text wird in der Seitenleiste aller Unterseiten angezeigt"

#: mpicms/base/models.py:149
msgid "category"
msgstr "Kategorie"

#: mpicms/base/models.py:150
msgid "categories"
msgstr "Kategorien"

#: mpicms/base/models.py:174
msgid "wiki page"
msgstr "Wiki Seite"

#: mpicms/base/models.py:175
msgid "wiki pages"
msgstr "Wiki Seiten"

#: mpicms/events/models.py:14
msgid "start date"
msgstr "Anfangsdatum"

#: mpicms/events/models.py:15
msgid "end date"
msgstr "Enddatum"

#: mpicms/events/models.py:16
msgid "start time"
msgstr "Anfangszeit"

#: mpicms/events/models.py:17
msgid "end time"
msgstr "Endzeit"

#: mpicms/events/models.py:18
msgid "description"
msgstr "Beschreibung"

#: mpicms/events/models.py:33
msgid "event dates"
msgstr "Veranstaltungsdaten"

#: mpicms/events/models.py:79
msgid "event"
msgstr "Veranstaltung"

#: mpicms/events/models.py:80
msgid "events"
msgstr "Veranstaltungen"

#: mpicms/events/models.py:101
msgid "event index"
msgstr "Veranstaltungs-Index"

#: mpicms/events/models.py:102
msgid "event indexes"
msgstr "Veranstaltungs-Indexes"

#: mpicms/news/models.py:18
#, fuzzy
#| msgid "All news"
msgid "show all news"
msgstr "Alle Neuigkeiten"

#: mpicms/news/models.py:19
msgid "Include all news from subpages"
msgstr "Neuigkeiten aller Unterseiten inkludieren"

#: mpicms/news/models.py:52
msgid "news blog"
msgstr "News Blog"

#: mpicms/news/models.py:53
msgid "news blogs"
msgstr "News Blogs"

#: mpicms/news/models.py:59
msgid "post date"
msgstr "Veröffentlichungsdatum"

#: mpicms/news/models.py:76
msgid "news entry"
msgstr "News Artikel"

#: mpicms/news/models.py:77
msgid "news entries"
msgstr "News Artikel"

#: mpicms/personal/models.py:23
msgid "first name"
msgstr "Vorname"

#: mpicms/personal/models.py:24
msgid "last name"
msgstr "Nachname"

#: mpicms/personal/models.py:25
msgid "email"
msgstr "Email"

#: mpicms/personal/models.py:26
msgid "phone number"
msgstr "Telefonnummer"

#: mpicms/personal/models.py:27
msgid "room"
msgstr "Raum"

#: mpicms/templates/base/components/search.html:3
#: mpicms/templates/base/search_results.html:9
#: mpicms/templates/menus/main.html:81
msgid "Search"
msgstr "Suche"

#: mpicms/templates/base/home_page.html:27
msgid "Upcoming events"
msgstr "Kommende Veranstaltungen"

#: mpicms/templates/base/home_page.html:30
msgid "All events"
msgstr "Alle Veranstaltungen"

#: mpicms/templates/base/home_page.html:36
#, fuzzy
#| msgid "content"
msgid "Content"
msgstr "Inhalt"

#: mpicms/templates/events/event_page.html:23
msgid "No events found"
msgstr "Keine Veranstaltungen gefunden"

#: mpicms/templates/menus/main.html:18
msgid "Dashboard"
msgstr "Dashboard"

#: mpicms/templates/menus/main.html:19
msgid "Settings"
msgstr "Einstellungen"

#: mpicms/templates/menus/main.html:21
msgid "Logout"
msgstr "Ausloggen"

#: mpicms/templates/menus/main.html:25
msgid "Login"
msgstr "Einloggen"

#: mpicms/templates/menus/side.html:38
msgid "Contact"
msgstr "Kontakt"

#: mpicms/templates/news/components/news_list.html:17
msgid "See all"
msgstr "Alle Neuigkeiten"

#: mpicms/templates/news/components/news_preview.html:10
msgid "All news"
msgstr "Alle Neuigkeiten"

#: mpicms/users/forms.py:8 mpicms/users/forms.py:13
msgid "Phone"
msgstr "Telefon"
87 changes: 87 additions & 0 deletions mpicms/base/migrations/0012_auto_20190607_1139.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Generated by Django 2.2.1 on 2019-06-07 09:39

from django.db import migrations, models
import django.db.models.deletion
import wagtail.core.fields


class Migration(migrations.Migration):

dependencies = [
('base', '0011_auto_20190605_1727'),
]

operations = [
migrations.AlterModelOptions(
name='banner',
options={'verbose_name': 'banner', 'verbose_name_plural': 'banners'},
),
migrations.AlterModelOptions(
name='contacts',
options={'verbose_name': 'contact', 'verbose_name_plural': 'contacts'},
),
migrations.AlterModelOptions(
name='wikipage',
options={'verbose_name': 'wiki page', 'verbose_name_plural': 'wiki pages'},
),
migrations.AlterField(
model_name='banner',
name='text',
field=wagtail.core.fields.RichTextField(verbose_name='text'),
),
migrations.AlterField(
model_name='banner',
name='text_de',
field=wagtail.core.fields.RichTextField(null=True, verbose_name='text'),
),
migrations.AlterField(
model_name='banner',
name='text_en',
field=wagtail.core.fields.RichTextField(null=True, verbose_name='text'),
),
migrations.AlterField(
model_name='banner',
name='title',
field=models.CharField(blank=True, max_length=200, verbose_name='title'),
),
migrations.AlterField(
model_name='banner',
name='title_de',
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='title'),
),
migrations.AlterField(
model_name='banner',
name='title_en',
field=models.CharField(blank=True, max_length=200, null=True, verbose_name='title'),
),
migrations.AlterField(
model_name='categorypage',
name='preview',
field=models.TextField(blank=True, help_text='Short description of this category', verbose_name='preview'),
),
migrations.AlterField(
model_name='categorypage',
name='preview_de',
field=models.TextField(blank=True, help_text='Short description of this category', null=True, verbose_name='preview'),
),
migrations.AlterField(
model_name='categorypage',
name='preview_en',
field=models.TextField(blank=True, help_text='Short description of this category', null=True, verbose_name='preview'),
),
migrations.AlterField(
model_name='categorypage',
name='side_content',
field=wagtail.core.fields.RichTextField(blank=True, help_text='Text displayed in the sidebar of all child pages', verbose_name='sidebar content'),
),
migrations.AlterField(
model_name='contacts',
name='person',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='contact_references', to='personal.Person', verbose_name='person'),
),
migrations.AlterField(
model_name='homepage',
name='banner',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='base.Banner', verbose_name='banner'),
),
]
Loading

0 comments on commit c8d774e

Please sign in to comment.