PDA

Zobacz pełną wersję : Dlaczego nie można wczytać tłumaczeń do administracji szablonem



adrianb
22-06-2017, 09:12
Cześć,

Mam ostatnio dość nietypowy problem. Zacząłem tworzyć mój pierwszy szablon. Zrobiłem plik templateDetails.xml, folder language i jeszcze kilka innych niezbędnych plików i folderów. Zainstalowałem ten szablon bez problemów już w CMS Joomla i przeszedłem do jego administracji. To co tam zobaczyłem wywołało u mnie zastanowienie. Otóż zobaczyłem, że stałe językowe zaimplementowane w odpowiednim pliku językowym w ogóle nie zadziałały i wygląd administracji szablonu wygląda tak:

9160

Plik templateDetails.xml wygląda następująco:


<?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="template">
<name>onepiece</name>
<creationDate>19.07.2017</creationDate>
<author>X</author>
<authorUrl>x.pl</authorUrl>
<copyright>X 2017</copyright>
<license>GNU/GPL</license>
<version>1.0</version>
<description>New template from x.pl</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<folder>images</folder>
<folder>css</folder>
<folder>language</folder>

</files>
<positions>
<position>header-a</position>
<position>header-b</position>
<position>header-c</position>
<position>header-d</position>
<position>navigation-a</position>
<position>navigation-b</position>
<position>navigation-c</position>
<position>navigation-d</position>
<position>slideshow</position>
<position>showcase-a</position>
<position>showcase-b</position>
<position>breadcrumb</position>
<position>bottom-a</position>
<position>bottom-b</position>
<position>bottom-c</position>
<position>bottom-d</position>
<position>sidebar</position>
<position>footer-a</position>
<position>footer-b</position>
<position>footer-c</position>
<position>footer-d</position>
<position>copyright</position>
</positions>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.tpl_onepiece.ini</language>

</languages>
<!--<administration>
<languages folder="admin">
<language tag="en-GB">en-GB/en-GB.tpl_onepiece.ini</language>

</languages>
</administration>-->
<config>
<fields name="params">
<fieldset name="style" label="STYLE">
<field
name="copyright"
type="text"
label="TPL_ONEPIECE_COPYRIGHT_LABEL"
description="TPL_ONEPIECE_COPYRIGHT_DESC"
default="TPL_ONEPIECE_COPYRIGHT_DEF"
/>
<field
name="templateColor"
type="color"
label="TPL_ONEPIECE_COLOR_LABEL"
description="TPL_ONEPIECE_COLOR_DESC"
default="#000000"
/>
<field
name="templateBackgroundColor"
type="color"
label="TPL_ONEPIECE_BACKGROUND_COLOR_LABEL"
description="TPL_ONEPIECE_BACKGROUND_COLOR_DESC"
default="#dfe0e0"
/>
<field
name="logoFile"
type="media"
label="TPL_ONEPIECE_LOGO_LABEL"
description="TPL_ONEPIECE_LOGO_DESC"
default=""
/>
<field
name="sitetitle"
type="text"
label="JGLOBAL_TITLE"
description="JFIELD_ALT_PAGE_TITLE_LABEL"
default=""
filter="string"
/>
<field name="sitedescription" type="text" default=""
label="JGLOBAL_DESCRIPTION"
description="JGLOBAL_SUBHEADING_DESC"
filter="string" />

<field name="googleFont"
type="radio"
class="btn-group btn-group-yesno"
default="1"
label="TPL_ONEPIECE_FONT_LABEL"
description="TPL_ONEPIECE_FONT_DESC"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field name="googleFontName" class="" type="text" default="Open+Sans"
label="TPL_ONEPIECE_FONT_NAME_LABEL"
description="TPL_ONEPIECE_FONT_NAME_DESC"
showon="googleFont:1" />

<field name="fluidContainer"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="TPL_ONEPIECE_FLUID_LABEL"
description="TPL_ONEPIECE_FLUID_DESC"
>
<option value="1">TPL_ONEPIECE_FLUID</option>
<option value="0">TPL_ONEPIECE_STATIC</option>
</field>
</fieldset>

<fieldset name="layout" label="LAYOUTS">
<!-- Start of navigation positions -->
<field
name="navigations"
label="TPL_ONEPIECE_NAVIGATIONS_NAME_LABEL"
type="spacer"
/>
<field
name="widthNavigationA"
label="TPL_ONEPIECE_NAV_A_WIDTH_LABEL"
description="TPL_ONEPIECE_NAV_A_WIDTH_DESC"
default="300"
/>
<field
name="widthNavigationB"
label="TPL_ONEPIECE_NAV_B_WIDTH_LABEL"
description="TPL_ONEPIECE_NAV_B_WIDTH_DESC"
default="300"
/>
<field
name="widthNavigationC"
label="TPL_ONEPIECE_NAV_C_WIDTH_LABEL"
description="TPL_ONEPIECE_NAV_C_WIDTH_DESC"
default="300"
/>
<field
name="widthNavigationD"
label="TPL_ONEPIECE_NAV_D_WIDTH_LABEL"
description="TPL_ONEPIECE_NAV_D_WIDTH_DESC"
default="300"
/>
<field name="spacer" type="spacer" hr="true"/>
<!-- End of navigation positions -->
<!-- Start of header positions -->
<field
name="headers"
label="TPL_ONEPIECE_HEADERS_NAME_LABEL"
/>
<field
name="widthHeaderA"
label="TPL_ONEPIECE_HEAD_A_WIDTH_LABEL"
description="TPL_ONEPIECE_HEAD_A_WIDTH_DESC"
default="300"
/>
<field
name="widthHeaderB"
label="TPL_ONEPIECE_HEAD_B_WIDTH_LABEL"
description="TPL_ONEPIECE_HEAD_B_WIDTH_DESC"
default="300"
/>
<field
name="widthHeaderC"
label="TPL_ONEPIECE_HEAD_C_WIDTH_LABEL"
description="TPL_ONEPIECE_HEAD_C_WIDTH_DESC"
default="300"
/>
<field
name="widthHeaderD"
label="TPL_ONEPIECE_HEAD_D_WIDTH_LABEL"
description="TPL_ONEPIECE_HEAD_D_WIDTH_DESC"
default="300"
/>
<!-- End of header positions -->
<!-- Start of slideshow position-->
<field
name="slideshow"
label="TPL_ONEPIECE_SLIDESHOW_NAME_LABEL"
/>
<field
name="widthSlideshow"
label="TPL_ONEPIECE_SLIDESHOW_WIDTH_LABEL"
description="TPL_ONEPIECE_SLIDESHOW_WIDTH_DESC"
default="1200"
/>
<!-- End of slideshow position-->
<!-- Start of showcase positions-->
<field
name="showcases"
label="TPL_ONEPIECE_SHOWCASES_NAME_LABEL"
/>
<field
name="widthShowcaseA"
label="TPL_ONEPIECE_SHOWCASE_A_WIDTH_LABEL"
description="TPL_ONEPIECE_SHOWCASE_A_WIDTH_DESC"
default="600"
/>
<field
name="widthShowcaseB"
label="TPL_ONEPIECE_SHOWCASE_B_WIDTH_LABEL"
description="TPL_ONEPIECE_SHOWCASE_B_WIDTH_DESC"
default="600"
/>
<!-- End of showcase positions-->
<!-- Start of slideshow position-->
<field
name="breadcrumb"
label="TPL_ONEPIECE_BREADCRUMB_NAME_LABEL"
/>
<field
name="widthBreadcrumb"
label="TPL_ONEPIECE_BREADCRUMB_WIDTH_LABEL"
description="TPL_ONEPIECE_BREADCRUMB_WIDTH_DESC"
default="1200"
/>
<!-- End of slideshow position-->
<!-- Start of bottom positions -->
<field
name="bottoms"
label="TPL_ONEPIECE_BOTTOMS_NAME_LABEL"
/>
<field
name="widthBottomA"
label="TPL_ONEPIECE_BOTTOM_A_WIDTH_LABEL"
description="TPL_ONEPIECE_BOTTOM_A_WIDTH_DESC"
default="300"
/>
<field
name="widthBottomB"
label="TPL_ONEPIECE_BOTTOM_B_WIDTH_LABEL"
description="TPL_ONEPIECE_BOTTOM_B_WIDTH_DESC"
default="300"
/>
<field
name="widthBottomC"
label="TPL_ONEPIECE_BOTTOM_C_WIDTH_LABEL"
description="TPL_ONEPIECE_BOTTOM_C_WIDTH_DESC"
default="300"
/>
<field
name="widthBottomD"
label="TPL_ONEPIECE_BOTTOM_D_WIDTH_LABEL"
description="TPL_ONEPIECE_BOTTOM_D_WIDTH_DESC"
default="300"
/>
<!-- End of bottom positions -->
<!-- Start of sidebar position-->
<field
name="sidebar"
label="TPL_ONEPIECE_SIDEBAR_NAME_LABEL"
/>
<field
name="widthSidebar"
label="TPL_ONEPIECE_SIDEBAR_WIDTH_LABEL"
description="TPL_ONEPIECE_SIDEBAR_WIDTH_DESC"
default="1200"
/>
<!-- End of sidebar position-->
<!-- Start of footer positions -->
<field
name="footers"
label="TPL_ONEPIECE_FOOTERS_NAME_LABEL"
/>
<field
name="widthFooterA"
label="TPL_ONEPIECE_FOOTER_A_WIDTH_LABEL"
description="TPL_ONEPIECE_FOOTER_A_WIDTH_DESC"
default="300"
/>
<field
name="widthFooterB"
label="TPL_ONEPIECE_FOOTER_B_WIDTH_LABEL"
description="TPL_ONEPIECE_FOOTER_B_WIDTH_DESC"
default="300"
/>
<field
name="widthFooterC"
label="TPL_ONEPIECE_FOOTER_C_WIDTH_LABEL"
description="TPL_ONEPIECE_FOOTER_C_WIDTH_DESC"
default="300"
/>
<field
name="widthFooterD"
label="TPL_ONEPIECE_FOOTER_D_WIDTH_LABEL"
description="TPL_ONEPIECE_FOOTER_D_WIDTH_DESC"
default="300"
/>
<!-- End of header positions -->
<!-- Start of copyright position-->
<field
name="copyright"
label="TPL-ONEPIECE_COPYRIGHT_NAME_LABEL"
/>
<field
name="widthCopyright"
label="TPL_ONEPIECE_COPYRIGHT_WIDTH_LABEL"
description="TPL_ONEPIECE_COPYRIGHT_WIDTH_DESC"
default="1200"
/>
<!-- End of sidebar position-->
</fieldset>
</fields>
</config>
</extension>


Czy jest osoba na forum, która wiedziałaby co robię źle i pomogłaby mi w rozwiązaniu tego problemu.

Z góry dziękuję za wszelką pomoc.

Pozdrawiam Adrian

- - - Updated - - -

Rozwiązałem problem sam. Błąd był dość głupi. Po prostu nie przypuszczałem, że muszę zwrócić uwagę na nazwę folderu. Jak miałem ten błąd to folder nazywał languages zamiast language. Myślałem, że to nie ma znaczenia, ale jednak ma.

Pozdrawiam wszystkich zainteresowanych moim wątkiem.