From 1f0292c5647bd2d220e26a818eef8e0f459c92d1 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 27 Nov 2017 14:14:00 +1300 Subject: [PATCH] FIX Update translations to match class namespaces --- .upgrade.yml | 3 +++ lang/ar.yml | 2 +- lang/cs.yml | 2 +- lang/de.yml | 2 +- lang/en.yml | 11 +++++++---- lang/eo.yml | 2 +- lang/es.yml | 2 +- lang/fa_IR.yml | 2 +- lang/fi.yml | 3 +-- lang/fi_FI.yml | 2 +- lang/fr.yml | 2 +- lang/id.yml | 1 - lang/it.yml | 1 - lang/lt.yml | 2 +- lang/lt_LT.yml | 2 +- lang/mi.yml | 5 +---- lang/nl.yml | 6 +----- lang/pt_BR.yml | 1 - lang/ru.yml | 2 +- lang/sk.yml | 2 +- lang/sv.yml | 2 +- lang/zh.yml | 2 +- src/IFramePage.php | 4 +++- templates/SilverStripe/IFrame/Layout/IFramePage.ss | 10 +++++----- 24 files changed, 35 insertions(+), 38 deletions(-) create mode 100644 .upgrade.yml delete mode 100644 lang/id.yml delete mode 100644 lang/it.yml delete mode 100644 lang/pt_BR.yml diff --git a/.upgrade.yml b/.upgrade.yml new file mode 100644 index 0000000..cde0303 --- /dev/null +++ b/.upgrade.yml @@ -0,0 +1,3 @@ +mappings: + IFramePage: SilverStripe\IFrame\IFramePage + IFramePage_Controller: SilverStripe\IFrame\IFramePageController diff --git a/lang/ar.yml b/lang/ar.yml index 7faed3e..3bd9d01 100644 --- a/lang/ar.yml +++ b/lang/ar.yml @@ -1,5 +1,5 @@ ar: - IFramePage: + SilverStripe\IFrame\IFramePage: DESCRIPTION: 'يقوم بتضمين آى فريم بداخل جسم الصفحة.' PLURALNAME: 'الصفحات الرئيسية' SINGULARNAME: 'صفحة الإطار' diff --git a/lang/cs.yml b/lang/cs.yml index eaa6002..2b4f736 100644 --- a/lang/cs.yml +++ b/lang/cs.yml @@ -1,3 +1,3 @@ cs: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Základní stránky' diff --git a/lang/de.yml b/lang/de.yml index 868e19c..23b6ec8 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -1,5 +1,5 @@ de: - IFramePage: + SilverStripe\IFrame\IFramePage: DESCRIPTION: 'Bettet eine andere Seite mittels Iframe ein.' PLURALNAME: 'Iframe Seiten' SINGULARNAME: 'Iframe Seite' diff --git a/lang/en.yml b/lang/en.yml index af39526..d197758 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -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.' diff --git a/lang/eo.yml b/lang/eo.yml index b338c04..663dec7 100644 --- a/lang/eo.yml +++ b/lang/eo.yml @@ -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)' diff --git a/lang/es.yml b/lang/es.yml index 34fd3f6..654e79b 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -1,3 +1,3 @@ es: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Página base' diff --git a/lang/fa_IR.yml b/lang/fa_IR.yml index 7c58ce2..313ad03 100644 --- a/lang/fa_IR.yml +++ b/lang/fa_IR.yml @@ -1,4 +1,4 @@ fa_IR: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'صفحه اصلی' SINGULARNAME: 'صفحه I Frame' diff --git a/lang/fi.yml b/lang/fi.yml index 80cd395..73b11f1 100644 --- a/lang/fi.yml +++ b/lang/fi.yml @@ -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öä...' diff --git a/lang/fi_FI.yml b/lang/fi_FI.yml index 879ece0..fb6221d 100644 --- a/lang/fi_FI.yml +++ b/lang/fi_FI.yml @@ -1,3 +1,3 @@ fi_FI: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: Pohjasivut diff --git a/lang/fr.yml b/lang/fr.yml index 6f81da5..1e01d7a 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -1,3 +1,3 @@ fr: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Base Pages' diff --git a/lang/id.yml b/lang/id.yml deleted file mode 100644 index 8446cba..0000000 --- a/lang/id.yml +++ /dev/null @@ -1 +0,0 @@ -id: diff --git a/lang/it.yml b/lang/it.yml deleted file mode 100644 index 8583063..0000000 --- a/lang/it.yml +++ /dev/null @@ -1 +0,0 @@ -it: diff --git a/lang/lt.yml b/lang/lt.yml index 0c0d9e9..69a7a98 100644 --- a/lang/lt.yml +++ b/lang/lt.yml @@ -1,3 +1,3 @@ lt: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Baziniai puslapiai' diff --git a/lang/lt_LT.yml b/lang/lt_LT.yml index d190569..6ab6df9 100644 --- a/lang/lt_LT.yml +++ b/lang/lt_LT.yml @@ -1,5 +1,5 @@ lt_LT: - IFramePage: + SilverStripe\IFrame\IFramePage: DESCRIPTION: 'Įtraukia iframe į puslapio body dalį' PLURALNAME: 'Baziniai puslapiai' SINGULARNAME: 'Iframe puslapis' diff --git a/lang/mi.yml b/lang/mi.yml index 86d505e..90abcf2 100644 --- a/lang/mi.yml +++ b/lang/mi.yml @@ -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 diff --git a/lang/nl.yml b/lang/nl.yml index 9bda6b9..40bef6a 100644 --- a/lang/nl.yml +++ b/lang/nl.yml @@ -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 diff --git a/lang/pt_BR.yml b/lang/pt_BR.yml deleted file mode 100644 index b98a6c9..0000000 --- a/lang/pt_BR.yml +++ /dev/null @@ -1 +0,0 @@ -pt_BR: diff --git a/lang/ru.yml b/lang/ru.yml index 203748a..1c12933 100644 --- a/lang/ru.yml +++ b/lang/ru.yml @@ -1,5 +1,5 @@ ru: - IFramePage: + SilverStripe\IFrame\IFramePage: DESCRIPTION: 'Вставка элемента iframe в основную область страницы.' PLURALNAME: 'Страницы iframe' SINGULARNAME: 'Страница iframe' diff --git a/lang/sk.yml b/lang/sk.yml index a10587d..3524003 100644 --- a/lang/sk.yml +++ b/lang/sk.yml @@ -1,3 +1,3 @@ sk: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Základné stránky' diff --git a/lang/sv.yml b/lang/sv.yml index 74b83e4..13729d1 100644 --- a/lang/sv.yml +++ b/lang/sv.yml @@ -1,3 +1,3 @@ sv: - IFramePage: + SilverStripe\IFrame\IFramePage: PLURALNAME: 'Bas sidor' diff --git a/lang/zh.yml b/lang/zh.yml index c9c5285..e3c45ed 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -1,5 +1,5 @@ zh: - IFramePage: + SilverStripe\IFrame\IFramePage: DESCRIPTION: '将 iframe 嵌入页面主体' PLURALNAME: 基页 SINGULARNAME: 'IFRAME 页面' diff --git a/src/IFramePage.php b/src/IFramePage.php index d7f6dce..95eb846 100644 --- a/src/IFramePage.php +++ b/src/IFramePage.php @@ -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(); @@ -128,7 +130,7 @@ class IFramePage extends Page $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.")); } } diff --git a/templates/SilverStripe/IFrame/Layout/IFramePage.ss b/templates/SilverStripe/IFrame/Layout/IFramePage.ss index 766857b..3a4fe24 100644 --- a/templates/SilverStripe/IFrame/Layout/IFramePage.ss +++ b/templates/SilverStripe/IFrame/Layout/IFramePage.ss @@ -1,15 +1,15 @@

$Title

- + $Content - <% if IFrameURL %> + <% if $IFrameURL %>
- <%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." %>
<% end_if %> $BottomContent -
\ No newline at end of file +