From 0e65c1e717e5eba8e9d928ab8169abf4a4e7868a Mon Sep 17 00:00:00 2001 From: Levi Date: Sat, 9 Apr 2016 02:53:05 -0500 Subject: [PATCH] allowing urls translation into german using .po files --- digitalglarus/locale/de/LC_MESSAGES/django.mo | Bin 0 -> 512 bytes digitalglarus/locale/de/LC_MESSAGES/django.po | 43 ++++++++++++++++++ digitalglarus/templates/support.html | 22 ++------- digitalglarus/urls.py | 9 ++-- dynamicweb/settings/base.py | 5 ++ 5 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 digitalglarus/locale/de/LC_MESSAGES/django.mo create mode 100644 digitalglarus/locale/de/LC_MESSAGES/django.po diff --git a/digitalglarus/locale/de/LC_MESSAGES/django.mo b/digitalglarus/locale/de/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..f3f8d216bc1f432de021bb93ff97704efed87626 GIT binary patch literal 512 zcmYL`&5qMB5XZv;mq>8fGY2DaScGObEd>>~-QCc-OGMICX<7+RcvCkUn%a@=@bw=1 zdVAbEZ@{=9I`U65w*E67d+v@O-Fj#bk!MH`d5pw}voDB`aO4S6Bijd__Y1u{zsL9~ z`rqhr?du$&|8IqomKXNy;)Q40rcv4oZQO3I)mKqih}N*eqe@9i=Hd8bc*V$yWs4}C z`I&GDkeISs!~3>0kSj|3d78sm3vMw9Cfo{2x&p7`y4AdfsnR<`iEQ>;GwKe=-*9vy$@3BE Yyd3!6)(v61AHucRwEFvg3~ma40I#Qs5&!@I literal 0 HcmV?d00001 diff --git a/digitalglarus/locale/de/LC_MESSAGES/django.po b/digitalglarus/locale/de/LC_MESSAGES/django.po new file mode 100644 index 00000000..37f877ac --- /dev/null +++ b/digitalglarus/locale/de/LC_MESSAGES/django.po @@ -0,0 +1,43 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-09 02:43-0500\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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" + +#: cms_plugins.py:9 +msgid "Digital Glarus Gallery" +msgstr "" + +#: cms_plugins.py:21 +msgid "Digital Glarus Supporters" +msgstr "" + +#: urls.py:8 +msgid "contact/?$" +msgstr "kontakt/?$" + +#: urls.py:9 +msgid "supporters/?$" +msgstr "befurworter/?$" + +#: urls.py:10 +msgid "support-us/?$" +msgstr "" + +#: views.py:23 +msgid "Message Successfully Sent" +msgstr "" diff --git a/digitalglarus/templates/support.html b/digitalglarus/templates/support.html index 3b2a0b76..5ba63ee5 100644 --- a/digitalglarus/templates/support.html +++ b/digitalglarus/templates/support.html @@ -1,5 +1,6 @@ {% extends "base_glarus.html" %} {% load staticfiles %} +{% load cms_tags %} {% block title %}About{% endblock %} {% block content %} @@ -8,29 +9,12 @@

- BECOME A SUPPORTER + {% static_placeholder "digital_glarus_supporters_become_supporter" %}


-

- If you want to be our supporter, - you can send your donation to: -

-

- Bank info
- Postfinance
- 89-849216-5
-
- CH36 0900 0000 8984 9216 5
- Nico Schottelius
- Hauptstrasse 14
- 8775 Luchsingen
-

-

- If you want to donate us in other means (your time, skill, etc..) - you can write us to donation@digitalglarus.ch -

+ {% static_placeholder "digital_glarus_support_info" %}
diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py index 9e27c57c..d740a3d3 100644 --- a/digitalglarus/urls.py +++ b/digitalglarus/urls.py @@ -1,12 +1,13 @@ from django.conf.urls import url +from django.utils.translation import ugettext_lazy as _ from . import views from .views import ContactView urlpatterns = [ - url(r'contact/?$', ContactView.as_view(), name='contact'), - url(r'supporters/?$', views.supporters, name='supporters'), - url(r'support-us/?$', views.support, name='support'), # url(r'', views.index, name='index'), + url(_(r'contact/?$'), ContactView.as_view(), name='contact'), + url(_(r'supporters/?$'), views.supporters, name='supporters'), + url(_(r'support-us/?$'), views.support, name='support'), url(r'blog/',views.blog,name='blog'), url(r'^blog/(?P\w[-\w]*)/$', views.blog_detail, name='blog-detail'), -] +] \ No newline at end of file diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 7b932c9b..69977770 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -202,6 +202,11 @@ LANGUAGES = ( LANGUAGE_CODE = 'en-us' +LOCALE_PATHS = [ + + os.path.join(PROJECT_DIR,'digitalglarus/locale'), +] + CMS_PLACEHOLDER_CONF = { 'logo_image': { 'name': 'Logo Image',