Skip to content

Commit

Permalink
Language work
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Sep 18, 2017
1 parent 92db523 commit e7098f5
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 14 deletions.
11 changes: 11 additions & 0 deletions src/Resources/contao/languages/de/modules.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

/*
* UrlRewrite Bundle for Contao Open Source CMS.
*
* @copyright Copyright (c) 2017, terminal42 gmbh
* @author terminal42 <https://terminal42.ch>
* @license MIT
*/

$GLOBALS['TL_LANG']['MOD']['url_rewrites'] = ['URL Umschreiberegeln'];
71 changes: 71 additions & 0 deletions src/Resources/contao/languages/de/tl_url_rewrite.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php

/*
* UrlRewrite Bundle for Contao Open Source CMS.
*
* @copyright Copyright (c) 2017, terminal42 gmbh
* @author terminal42 <https://terminal42.ch>
* @license MIT
*/

$GLOBALS['TL_LANG']['tl_url_rewrite']['name'] = ['Interne Bezeichnung', 'Hier können Sie eine interne Bezeichnung erfassen (nur im Backend ersichtlich).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['type'] = ['Typ', 'Wählen Sie hier den Typen der Umleitung aus.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestHosts'] = ['Host-Einschränkung', 'Hier können Sie die Regel auf bestimmte Hosts einschränken.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestPath'] = ['Pfad-Einschränkung', 'Hier können Sie einen Pfad eingeben.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestRequirements'] = ['Extra-Anforderungen', 'Hier können Sie Extra-Anforderungen für die Regel definieren.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestCondition'] = ['Anfrage-Bedingung', 'Bitte geben Sie hier die Bedingung mittels der Symfony Expression Language ein (z.B. <em>context.getMethod() in [\'GET\'] and request.query.has(\'foo\')</em>).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseCode'] = ['Antwort-Statuscode', 'Wählen Sie hier den gewünschten Antwort-Statuscode aus.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseUri'] = ['Antwort-Umleitungs-URL', 'Hier können Sie die Umleitungs-URL eingeben. Sie können Insert-Tags, Routen-Attribute und Query-Parameter als Wildcards nutzen (z.B. <em>/foo/{bar}</em>). Wenn Sie absolute URLs generieren möchten, nutzen Sie das "absolute" Insert Tag Flag (bspw. <em>{{link_url::123|absolute}}</em>).'];

/*
* Legends
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['name_legend'] = 'Bezeichnung';
$GLOBALS['TL_LANG']['tl_url_rewrite']['request_legend'] = 'Anfrage-Zuordnung (Request matching)';
$GLOBALS['TL_LANG']['tl_url_rewrite']['response_legend'] = 'Anwort-Verarbeitung (Response processing)';
$GLOBALS['TL_LANG']['tl_url_rewrite']['examples_legend'] = 'Beispiele';

/*
* Buttons
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['new'] = ['Neue Regel', 'Eine neue Regel anlegen'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['show'] = ['Regel-Details', 'Details der Regel ID %s anzeigen'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['edit'] = ['Regel editieren', 'Regel ID %s editieren'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['copy'] = ['Regel duplizieren', 'Regel ID %s duplizieren'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['delete'] = ['Regel löschen', 'Regel ID %s löschen'];

/*
* Reference
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['typeRef'] = [
'basic' => ['einfach', 'Erlaubt die Anfrage-Zuordnung auf Basis von einfachen Symfony Routing Funktionen.'],
'expert' => ['komplex', 'Erlaubt die Anfrage-Zuordnung auf Basis der Symfony <a href="https://symfony.com/doc/current/components/expression_language.html" target="_blank">Expression Language</a>. Für weitere Informationen <a href="https://symfony.com/doc/current/routing/conditions.html" target="_blank">besuchen Sie bitte diese Seite</a>.'],
];

/**
* Examples
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['examples'] = [
['Adresse auf Google Maps finden:', 'Typ: einfach
Pfad-Einschränkung: find/{address}
Antwort-Statuscode: 303 See Other
Antwort-Umleitungs-URL: https://www.google.com/maps?q={address}
---
Resultat: domain.tld/find/Schweiz → https://www.google.com/maps?q=Schweiz'],
['Zu einem bestimmten News-Artikel weiterleiten:', 'Typ: einfach
Pfad-Einschränkung: news/{news}
Extra-Anforderungen: [news => \d+]
Antwort-Statuscode: 301 Moved Permanently
Antwort-Umleitungs-URL: {{news_url::{news}|absolute}}
---
Resultat: domain.tld/news/123 → domain.tld/news-reader/foobar-123.html
Resultat: domain.tld/news/foobar → 404 Page Not Found
'],
['Alte URLs mit Query Parameter umschreiben:', 'Typ: komplex
Pfad-Einschränkung: home.php
Anfrage-Bedingung: context.getMethod() == \'GET\' and request.query.has(\'page\')
Antwort-Statuscode: 301 Moved Permanently
Antwort-Umleitungs-URL: {{link_url::{page}|absolute}}
---
Resultat: domain.tld/home.php?page=123 → domain.tld/foobar-123.html'],
];
28 changes: 14 additions & 14 deletions src/Resources/contao/languages/en/tl_url_rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

$GLOBALS['TL_LANG']['tl_url_rewrite']['name'] = ['Internal name', 'Please enter the rewrite internal name (visible only in backend).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['type'] = ['Type', 'Here you can choose the type.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestHosts'] = ['Hosts restriction', 'Here you can restrict the match to certain hosts.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestHosts'] = ['Hosts restriction', 'Here you can restrict the rule to certain hosts.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestPath'] = ['Path restriction', 'Here you can enter the path to match.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestRequirements'] = ['Extra requirements', 'Here you can add extra requirements for the match.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestCondition'] = ['Request condition', 'Please enter the request condition in the expression language (e.g. <em>context.getMethod() in [\'GET\'] and request.query.has(\'foo\')</em>).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseCode'] = ['Response code', 'Here you can select the response status code.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseUri'] = ['Response URI', 'Here you can enter the response URI. You can use the insert tags, route attributes and query parameters as wildcards (e.g. <em>/foo/{bar}</em>). To generate the absolute URLs using insert tags you can use the absolute flag (e.g. <em>{{link_url::123|absolute}}</em>).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['requestCondition'] = ['Request condition', 'Please enter the request condition using Symfony\'s Expression Language (e.g. <em>context.getMethod() in [\'GET\'] and request.query.has(\'foo\')</em>).'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseCode'] = ['Response status code', 'Here you can select the response status code.'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['responseUri'] = ['Response redirect URL', 'Here you can enter the response redirect URI. You can use the insert tags, route attributes and query parameters as wildcards (e.g. <em>/foo/{bar}</em>). To generate absolute URLs using insert tags you can use the "absolute" insert tag flag (e.g. <em>{{link_url::123|absolute}}</em>).'];

/*
* Legends
Expand All @@ -28,18 +28,18 @@
/*
* Buttons
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['new'] = ['New rewrite', 'Create a new rewrite'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['show'] = ['Rewrite details', 'Show the details of rewrite ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['edit'] = ['Edit rewrite', 'Edit rewrite ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['copy'] = ['Duplicate rewrite', 'Duplicate rewrite ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['delete'] = ['Delete rewrite', 'Delete rewrite ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['new'] = ['New rule', 'Create a new rewrite rule'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['show'] = ['Rule details', 'Show the details of rewrite rule ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['edit'] = ['Edit rule', 'Edit rewrite rule ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['copy'] = ['Duplicate rule', 'Duplicate rewrite rule ID %s'];
$GLOBALS['TL_LANG']['tl_url_rewrite']['delete'] = ['Delete rule', 'Delete rewrite rule ID %s'];

/*
* Reference
*/
$GLOBALS['TL_LANG']['tl_url_rewrite']['typeRef'] = [
'basic' => ['Basic', 'Allows to define the request matching using the basic routing features.'],
'expert' => ['Expert', 'Allows to define the request condition using the <a href="https://symfony.com/doc/current/components/expression_language.html" target="_blank">Expression Language</a>. For more informations please <a href="https://symfony.com/doc/current/routing/conditions.html" target="_blank">visit this link</a>.'],
'basic' => ['Basic', 'Allows to define the request matching using the basic Symfony routing features.'],
'expert' => ['Expert', 'Allows to define the request condition using the <a href="https://symfony.com/doc/current/components/expression_language.html" target="_blank">Expression Language</a>. For more information please <a href="https://symfony.com/doc/current/routing/conditions.html" target="_blank">visit this link</a>.'],
];

/**
Expand All @@ -49,14 +49,14 @@
['Find address on Google Maps:', 'Type: basic
Path restriction: find/{address}
Response code: 303 See Other
Response URI: https://www.google.com/maps?q={address}
Response redirect URL: https://www.google.com/maps?q={address}
---
Result: domain.tld/find/Switzerland → https://www.google.com/maps?q=Switzerland'],
['Redirect to a specific news entry:', 'Type: basic
Path restriction: news/{news}
Requirements: [news => \d+]
Response code: 301 Moved Permanently
Response URI: {{news_url::{news}|absolute}}
Response redirect URL: {{news_url::{news}|absolute}}
---
Result: domain.tld/news/123 → domain.tld/news-reader/foobar-123.html
Result: domain.tld/news/foobar → 404 Page Not Found
Expand All @@ -65,7 +65,7 @@
Path restriction: home.php
Request condition: context.getMethod() == \'GET\' and request.query.has(\'page\')
Response code: 301 Moved Permanently
Response URI: {{link_url::{page}|absolute}}
Response redirect URL: {{link_url::{page}|absolute}}
---
Result: domain.tld/home.php?page=123 → domain.tld/foobar-123.html'],
];

0 comments on commit e7098f5

Please sign in to comment.