diff --git a/Changelog b/Changelog index b58871b6..7491cbd1 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +1.0.13: 2017-06-13 + * [datacenterlight] Added translations for email and name placeholders fields 1.0.12: 2017-06-13 * [datacenterlight] Added from address for EmailMessage that was missing 1.0.11: 2017-06-12 diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.mo b/datacenterlight/locale/de/LC_MESSAGES/django.mo index a9ce890d..c34cf654 100644 Binary files a/datacenterlight/locale/de/LC_MESSAGES/django.mo and b/datacenterlight/locale/de/LC_MESSAGES/django.mo differ diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index a69fe333..9bb441a8 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-09 16:08-0500\n" +"POT-Creation-Date: 2017-06-13 13:41-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -136,7 +136,8 @@ msgid "I want it!" msgstr "Das will ich haben!" #: templates/datacenterlight/home.html:46 -#: templates/datacenterlight/includes/_footer.html:14 +#: templates/datacenterlight/includes/_footer.html:11 +#: templates/datacenterlight/includes/_footer.html:31 #: templates/datacenterlight/includes/_navbar.html:26 msgid "What is it" msgstr "Was ist es?" @@ -153,7 +154,7 @@ msgstr "" "errichten.
" #: templates/datacenterlight/home.html:61 -msgid "Only wants you to pay for what you actually need.\\u2028" +msgid "Only wants you to pay for what you actually need." msgstr "" "Möchte, dass du nur bezahlst, was du auch wirklich brauchst: Wähle deine " "Ressourcen individuell aus!
" @@ -161,7 +162,7 @@ msgstr "" #: templates/datacenterlight/home.html:65 msgid "" "Is creative, using a modern and alternative design for a data center in " -"order to make it more sustainable and affordable at the same time.\\u2028" +"order to make it more sustainable and affordable at the same time." msgstr "" "Ist kreativ, indem es sich ein modernes und alternatives Layout zu Nutze " "macht um Nachhaltigkeit zu fördern und somit erschwingliche Preise bieten zu " @@ -177,7 +178,8 @@ msgstr "" "Lizenzgebühren verzichten können.
" #: templates/datacenterlight/home.html:89 -#: templates/datacenterlight/includes/_footer.html:17 +#: templates/datacenterlight/includes/_footer.html:14 +#: templates/datacenterlight/includes/_footer.html:34 #: templates/datacenterlight/includes/_navbar.html:29 msgid "Scale out" msgstr "Skalierung" @@ -193,7 +195,8 @@ msgstr "" "komponenten hinzugekauft und skalieren so das Datencenter." #: templates/datacenterlight/home.html:115 -#: templates/datacenterlight/includes/_footer.html:20 +#: templates/datacenterlight/includes/_footer.html:17 +#: templates/datacenterlight/includes/_footer.html:37 #: templates/datacenterlight/includes/_navbar.html:32 msgid "Reliable and light" msgstr "Zuverlässig und leicht" @@ -240,9 +243,25 @@ msgstr "Standort des Datacenters ist in der Schweiz" msgid "10 GB Storage (SSD)" msgstr "10 GB Storage (SSD)" -#: templates/datacenterlight/home.html:163 -#: templates/datacenterlight/order.html:74 -#: templates/datacenterlight/pricing.html:76 +#: templates/datacenterlight/index.html:289 +msgid "Name" +msgstr "" + +#: templates/datacenterlight/index.html:290 +msgid "Your Name" +msgstr "Dein Name" + +#: templates/datacenterlight/index.html:293 +msgid "Email" +msgstr "E-Mail-Adresse" + +#: templates/datacenterlight/index.html:294 +msgid "Your Email" +msgstr "Deine E-Mail" + +#: templates/datacenterlight/index.html:297 +#: templates/datacenterlight/order.html:133 +#: templates/datacenterlight/pricing.html:161 msgid "Order Now!" msgstr "Bestelle jetzt!" @@ -258,22 +277,24 @@ msgstr "Fragen?" msgid "Contact us!" msgstr "Kontaktiere uns!" -#: templates/datacenterlight/includes/_footer.html:10 -msgid "Home" -msgstr "Home" +#: templates/datacenterlight/includes/_footer.html:20 +#: templates/datacenterlight/includes/_navbar.html:35 +msgid "Order VM" +msgstr "VM bestellen" #: templates/datacenterlight/includes/_footer.html:23 -msgid "Pricing" -msgstr "Preise" - -#: templates/datacenterlight/includes/_footer.html:27 +#: templates/datacenterlight/includes/_footer.html:44 #: templates/datacenterlight/includes/_navbar.html:38 msgid "Contact" msgstr "Kontakt" -#: templates/datacenterlight/includes/_navbar.html:35 -msgid "Order VM" -msgstr "VM bestellen" +#: templates/datacenterlight/includes/_footer.html:27 +msgid "Home" +msgstr "Home" + +#: templates/datacenterlight/includes/_footer.html:40 +msgid "Pricing" +msgstr "Preise" #: templates/datacenterlight/order.html:30 #: templates/datacenterlight/pricing.html:30 @@ -400,6 +421,18 @@ msgstr "" msgid "as soon as possible!" msgstr "" +#~ msgid "month" +#~ msgstr "Monat" + +#~ msgid "Want to know more? Subscribe to our newsletter!" +#~ msgstr "Willst du mehr wissen? Abonniere unseren Newsletter!" + +#~ msgid "I want to have it!" +#~ msgstr "Das möchte ich haben!" + +#~ msgid "Buy VM" +#~ msgstr "VM Kaufen" + #~ msgid "" #~ "Reuse existing factory halls intead of building an expensive building." #~ msgstr "" diff --git a/datacenterlight/templates/datacenterlight/home.html b/datacenterlight/templates/datacenterlight/home.html index eb2decd2..84785b05 100755 --- a/datacenterlight/templates/datacenterlight/home.html +++ b/datacenterlight/templates/datacenterlight/home.html @@ -58,11 +58,11 @@
  • -

    {% trans "Only wants you to pay for what you actually need.
" %}

    +

    {% trans "Only wants you to pay for what you actually need." %}

  • -

    {% trans "Is creative, using a modern and alternative design for a data center in order to make it more sustainable and affordable at the same time.
" %}

    +

    {% trans "Is creative, using a modern and alternative design for a data center in order to make it more sustainable and affordable at the same time." %}

  • diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index a8939080..e30654cb 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,5 +1,6 @@ {% load staticfiles i18n%} {% get_current_language as LANGUAGE_CODE %} +{% load custom_tags %}
  • diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html new file mode 100755 index 00000000..00e121d2 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/index.html @@ -0,0 +1,270 @@ +{% extends "datacenterlight/base.html" %} +{% load staticfiles i18n%} +{% get_current_language as LANGUAGE_CODE %} + +{% block content %} + + +
    +
    + +
    +
    + +
    +

    DataCenterLight

    +

    {% trans "Finally, an affordable VM hosting in Switzerland!" %}

    +
    + +
    +
    +
    + +
    +
    +
    + + +
    + + + +
    + +
    +
    +
    + +
    +
    +
    +
    +

    {% trans "What is it" %}

    +
    +
    +
      +
    • + +

      {% trans "Reuses existing factory halls instead of building a new expensive building." %} +

      +
    • +
    • + +

      {% trans "Only wants you to pay for what you actually need." %}

      +
    • +
    • + +

      {% trans "Is creative, using a modern and alternative design for a data center in order to make it more sustainable and affordable at the same time." %}

      +
    • +
    • + +

      {% trans "Cuts down the costs for you by using FOSS (Free Open Source Software) exclusively, wherefore we can save money from paying licenses." %}

      +
    • +
    + +
    +
    +
    +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
    +

    {% trans "Scale out" %}

    +
    +
    +

    {% trans "We don't use special hardware. We use commodity hardware: we buy computers that you buy. Just many more and put them in a cozy home for computers called data center." %}

    + +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +

    {% trans "Reliable and light" %}

    +
    +
    +

    {% trans "Our VMs are located in Switzerland, with reliable power supply and fast internet connection. Our VM costs less thanks to our featherlight infrastructure." %}

    + +
    +
    +
    +
    +
    + + +
    + + +
    + +
    + +
    +
    +

    {% trans "Simple and affordable: Try our virtual machine with featherlight price." %}

    +

    {% trans "Affordable VM hosting based in Switzerland" %}

    +
    + +
    +
    +
    + +
    +
    + {% csrf_token %} +
    +

    {% trans "VM hosting" %}

    +
    +
    + 15 + CHF/{% trans "month" %} +
    +
    +
    +

    {% trans "Hosted in Switzerland" %}

    +
    +
    + + + Core + +
    +
    + + + GB RAM + +
    +
    + + + {% trans "GB Storage (SSD)" %} + +
    +
    + + +
    + + +
    + + +
    +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +
    + + + + +
    +
    +
    +
    + +
    +
    +
    +

    ungleich GmbH

    +
    +
    +

    info@datacenterlight.ch

    +

    In der Au 7, Schwanden 8762

    +

    {% trans "Switzerland " %}

    +
    + +
    +
    +
    +
    +

    {% trans "Questions?" %} {% trans "Contact us!" %}

    +
    +
    +
    + +
    +
    + +
    + + {% endblock %} \ No newline at end of file diff --git a/datacenterlight/templatetags/__init__.py b/datacenterlight/templatetags/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/datacenterlight/templatetags/custom_tags.py b/datacenterlight/templatetags/custom_tags.py new file mode 100644 index 00000000..915e68fe --- /dev/null +++ b/datacenterlight/templatetags/custom_tags.py @@ -0,0 +1,24 @@ +from django import template +from django.core.urlresolvers import resolve, reverse +from django.utils.translation import activate, get_language + +register = template.Library() + + + +@register.simple_tag(takes_context=True) +def change_lang(context, lang=None, *args, **kwargs): + + path = context['request'].path + url_parts = resolve( path ) + + url = path + cur_language = get_language() + try: + activate(lang) + url = reverse( url_parts.view_name, kwargs=url_parts.kwargs ) + finally: + activate(cur_language) + + + return "%s" % url \ No newline at end of file diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 8463d6a0..d23c4231 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -236,7 +236,7 @@ class BetaProgramView(CreateView): class IndexView(CreateView): - template_name = "datacenterlight/home.html" + template_name = "datacenterlight/index.html" model = BetaAccess form_class = BetaAccessForm success_url = "/datacenterlight#requestform" diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index d9ccd7ac..ec240691 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -110,6 +110,7 @@ INSTALLED_APPS = ( 'digitalglarus', 'nosystemd', 'datacenterlight', + 'datacenterlight.templatetags', 'alplora', 'rest_framework', 'opennebula_api'