Skip to content

Commit

Permalink
FIX Update translations to match class namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed Nov 27, 2017
1 parent 112059c commit 1f0292c
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mappings:
IFramePage: SilverStripe\IFrame\IFramePage
IFramePage_Controller: SilverStripe\IFrame\IFramePageController
2 changes: 1 addition & 1 deletion lang/ar.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ar:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'يقوم بتضمين آى فريم بداخل جسم الصفحة.'
PLURALNAME: 'الصفحات الرئيسية'
SINGULARNAME: 'صفحة الإطار'
Expand Down
2 changes: 1 addition & 1 deletion lang/cs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cs:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Základní stránky'
2 changes: 1 addition & 1 deletion lang/de.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
de:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Bettet eine andere Seite mittels Iframe ein.'
PLURALNAME: 'Iframe Seiten'
SINGULARNAME: 'Iframe Seite'
Expand Down
11 changes: 7 additions & 4 deletions lang/en.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
en:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Embeds an iframe into the body of the page.'
PLURALNAME: 'Base Pages'
SINGULARNAME: 'I Frame Page'
VALIDATION_BANNEDURLSCHEME: 'This URL scheme is not allowed.'
ExternalNote: 'Please note the following section of content is possibly being delivered from an external source (IFRAME in HTML terms), and may present unusual experiences for screen readers.'
Loading: 'Loading content...'
PLURALNAME: 'IFrame Pages'
PLURALS:
one: 'An IFrame Page'
other: '{count} IFrame Pages'
SINGULARNAME: 'IFrame Page'
VALIDATION_BANNEDURLSCHEME: 'This URL scheme is not allowed.'
2 changes: 1 addition & 1 deletion lang/eo.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eo:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Enkorpigas je iframe (kadro) en la korpon de la paĝo.'
PLURALNAME: 'Bazaj paĝoj'
SINGULARNAME: 'Paĝo de iframe (kadro)'
Expand Down
2 changes: 1 addition & 1 deletion lang/es.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
es:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Página base'
2 changes: 1 addition & 1 deletion lang/fa_IR.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fa_IR:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'صفحه اصلی'
SINGULARNAME: 'صفحه I Frame'
3 changes: 1 addition & 2 deletions lang/fi.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
fi:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Upottaa iframen sivulle.'
PLURALNAME: Pohjasivut
SINGULARNAME: 'I Frame sivu'
VALIDATION:
BANNEDURLSCHEME: 'Tämä URL-skeema ei ole sallittu.'
IframePage:
ExternalNote: 'Huomioithan, että seuraava sisältöosio on upotettu ulkopuolisesta lähteestä (HTML-kielen IFRAME-käskyllä) ja saattaa aiheuttaa odottamattoman käyttökokemuksen selaimessa.'
Loading: 'Ladataan sisältöä...'
2 changes: 1 addition & 1 deletion lang/fi_FI.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fi_FI:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: Pohjasivut
2 changes: 1 addition & 1 deletion lang/fr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fr:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Base Pages'
1 change: 0 additions & 1 deletion lang/id.yml

This file was deleted.

1 change: 0 additions & 1 deletion lang/it.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lang/lt.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lt:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Baziniai puslapiai'
2 changes: 1 addition & 1 deletion lang/lt_LT.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lt_LT:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Įtraukia iframe į puslapio body dalį'
PLURALNAME: 'Baziniai puslapiai'
SINGULARNAME: 'Iframe puslapis'
Expand Down
5 changes: 1 addition & 4 deletions lang/mi.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
mi:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Ka tāmau i tētahi ī-tāpare ki roto i te tinana o te whārangi.'
PLURALNAME: 'Ngā Whārangi Pūtake'
SINGULARNAME: 'Whārangi Ī-Tāpare'
ExternalNote: 'Me mōhio ka tukuna pea te wāhanga ihirangi e whai nei i tētahi pūtake ā-waho (he Ī-TĀPARE e pā ana ki te HTML), ā, ka whakarato pea i ngā wheako rerekē mō ngā pūpānui mata.'
Loading: 'Uta ihirangi ana...'
SiteTree:
PLURALNAME: 'Ngā Whārangi'
SINGULARNAME: Whārangi
6 changes: 1 addition & 5 deletions lang/nl.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
nl:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Voegt een iframe toe aan de pagina.'
PLURALNAME: 'Basis pagina''s'
SINGULARNAME: 'I Frame Pagina'
VALIDATION:
BANNEDURLSCHEME: 'Dit URL schema is niet toegestaan.'
IframePage:
ExternalNote: 'Gelieve op te merken dat de volgende sectie mogelijk kan aangeleverd worden door een externe bron (IFRAME in HTML termen) en dat dit een ongewone ervaring kan leveren voor scherm lezers.'
Loading: 'Laden van inhoud...'
SiteTree:
PLURALNAME: 'Pagina''s'
SINGULARNAME: Pagina
1 change: 0 additions & 1 deletion lang/pt_BR.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lang/ru.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ru:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: 'Вставка элемента iframe в основную область страницы.'
PLURALNAME: 'Страницы iframe'
SINGULARNAME: 'Страница iframe'
Expand Down
2 changes: 1 addition & 1 deletion lang/sk.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sk:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Základné stránky'
2 changes: 1 addition & 1 deletion lang/sv.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sv:
IFramePage:
SilverStripe\IFrame\IFramePage:
PLURALNAME: 'Bas sidor'
2 changes: 1 addition & 1 deletion lang/zh.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
zh:
IFramePage:
SilverStripe\IFrame\IFramePage:
DESCRIPTION: '将 iframe 嵌入页面主体'
PLURALNAME: 基页
SINGULARNAME: 'IFRAME 页面'
Expand Down
4 changes: 3 additions & 1 deletion src/IFramePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class IFramePage extends Page

private static $description = 'Embeds an iframe into the body of the page.';

private static $singular_name = 'IFrame Page';

public function getCMSFields()
{
$fields = parent::getCMSFields();
Expand Down Expand Up @@ -128,7 +130,7 @@ public function validate()
$allowed_schemes = array('http', 'https');
if ($matches = parse_url($this->IFrameURL)) {
if (isset($matches['scheme']) && !in_array($matches['scheme'], $allowed_schemes)) {
$result->addError(_t('IFramePage.VALIDATION_BANNEDURLSCHEME', "This URL scheme is not allowed."));
$result->addError(_t(__CLASS__ . '.VALIDATION_BANNEDURLSCHEME', "This URL scheme is not allowed."));
}
}

Expand Down
10 changes: 5 additions & 5 deletions templates/SilverStripe/IFrame/Layout/IFramePage.ss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div class="typography">
<h2>$Title</h2>

$Content
<% if IFrameURL %>
<% if $IFrameURL %>
<span id="Iframepage-loading" style="display: none;">
<%t IframePage.Loading "Loading content..." %>
<%t SilverStripe\\IFrame\\IFramePage.Loading "Loading content..." %>
</span>
<div class="nonvisual-indicator" style="position: absolute; overflow: hidden; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0;">
<%t IframePage.ExternalNote "Please note the following section of content is possibly being delivered from an external source (IFRAME in HTML terms), and may present unusual experiences for screen readers." %>
<%t SilverStripe\\IFrame\\IFramePage.ExternalNote "Please note the following section of content is possibly being delivered from an external source (IFRAME in HTML terms), and may present unusual experiences for screen readers." %>
</div>
<iframe id="Iframepage-iframe" style="$Style" src="$IFrameURL" class="$Class">$AlternateContent</iframe>
<% end_if %>
$BottomContent
</div>
</div>

0 comments on commit 1f0292c

Please sign in to comment.