Skip to content

Commit

Permalink
Version 0.1.0, not so much functionality, but framework is done
Browse files Browse the repository at this point in the history
  • Loading branch information
MaWoScha committed Sep 9, 2015
0 parents commit c292a82
Show file tree
Hide file tree
Showing 17 changed files with 770 additions and 0 deletions.
38 changes: 38 additions & 0 deletions MagentoConnect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<h2>Englisches Sprachpaket für Magento Commerce</h2>
<p>(Magento Community Modules - English (Great Britain) Language Pack)</p>
<p>(Paquete de idioma inglés para Magento Commerce)</p>

<h3>Hint / Hinweis / Aviso</h3>
<p>Magento comes in its basic configuration with American English. Anyone wishing to use British English, should install the language pack <i>LocalePack_en_GB</i>.</p>
<p>Magento kommt in der Grundausstattung mit amerikanischem Englisch daher. Wer britisches Englisch nutzen möchte, sollte das Sprachpaket <i>LocalePack_en_GB</i> installieren.</p>
<p>Magento viene en su configuración básica con Inglés americano. Cualquier persona que desee utilizar Inglés británico, debe instalar el paquete de idioma <i>LocalePack_en_GB</i>.</p>

<h3>Mistake found? / Fehler gefunden? / ¿Encontrado un problema?</h3>
<p>Errors may be reported on GitHub / Fehler können auf GitHub gemeldet werden / Los errores pueden ser reportados en GitHub
<a href="https://github.com/MaWoScha/German_LocalePack_en_GB/issues">https://github.com/MaWoScha/German_LocalePack_en_GB/issues</a></p>

<h3>Cooperation wanted / Mitarbeit erwünscht / Cooperación deseada</h3>
<p>Information about language package can be found in the corresponding GitHub repository<br />
<a href="https://github.com/MaWoScha/German_LocalePack_en_GB">https://github.com/MaWoScha/German_LocalePack_en_GB</a></p>
<p>For employees on this language pack <strong>please PullRequests always send for the preview-Branch</strong>. Thank you :-)</p>

<p>Informationen zum Sprachpaket finden sich im dazugehörigen GitHub-Repository unter<br />
<a href="https://github.com/MaWoScha/German_LocalePack_en_GB">https://github.com/MaWoScha/German_LocalePack_en_GB</a></p>
<p>Bei Mitarbeit am Sprachpaket <strong>bitte PullRequests immer für den preview-Branch</strong> schicken. Danke :-)</p>

<p>Información sobre el paquete de idioma se puede encontrar en el correspondiente repositorio GitHub bajo<br />
<a href="https://github.com/MaWoScha/German_LocalePack_en_GB">https://github.com/MaWoScha/German_LocalePack_en_GB</a></p>
<p>Para los colaboradores en este paquete de idioma, por favor, <strong>mandan PullRequests siempre al preview-Branch</strong>. Gracias :-)</p>

<h3>More Information / Mehr Hinweise / Más información</h3>
<ul>
<li><a href="http://blog.siempro.co/?p=105&lang=en">Internationalization – Magento in several languages</a></li>
<li><a href="http://blog.siempro.co/?p=105&lang=de">Internationalisierung – Magento in mehreren Sprachen</a></li>
<li><a href="http://blog.siempro.co/?p=105&lang=es">Internacionalización – Magento en varios idiomas</a></li>
</ul>


<h3>ChangeLog</h3>
<ul>
<li><strong>0.1.0:</strong> Basisversion, only a Framework.</li>
</ul>
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Englisches Sprachpaket für Magento (CE)
(Magento Community Modules - English (Great Britain) Language Pack)<br />
(Módulos de Magento Community - Paquete de idioma inglés)

This language package is managed by MaWoScha.<br />
Dieses Sprachpaket wird von MaWoScha verwaltet.<br />
Este paquete de idioma está gestionado por MaWoScha.


# Git-Repository / Git-Verwaltung

Dieses Git-Repository kann genutzt werden für:

* Reine Informationszwecke
* Entwicklung aktueller Versionen
* Behebung von Fehlern in bereits veröffentlichten Versionen
* Alternative Downloads (unabhängig von den offiziellen Quellen)
* Eigene Sprachversion basierend auf en_US
* Melden von Fehlern und PullRequests
* Aktives Mitwirken am Sprachpaket

## Reporting bugs / Melden von Fehlern / Cómo informar de problemas

Errors may be reported on GitHub / Fehler können auf GitHub gemeldet werden / Los errores pueden ser reportados en GitHub
<a href="https://github.com/MaWoScha/German_LocalePack_en_GB/issues">https://github.com/MaWoScha/German_LocalePack_en_GB/issues</a>

Wir freuen uns, wenn dieses Repository aktiv dazu genutzt, wird Fehler zu melden (Issue) und zu beheben (PullRequest im _preview_-Branch).

Oben dann einfach auf "Issues" klicken -> "New Issue", um ein Anliegen zu übermitteln. Bestehende Anliegen hingegen können auch ohne GitHub-Account eingesehen werden, inklusive deren Bearbeitungsstand.

_Beachten Sie dazu bitte:_ Wenn hier in den Versionen Veränderungen eingepflegt werden, dann entsprechen diese nicht mehr dem Stand des Sprachpakets, welches Sie über Magento Connect installieren können. Es ist leider nicht möglich dort veröffentlichte Releases nachträglich zu bearbeiten. :-)

_Hinweis:_ PullRequests sind bitte immer im Preview-Branch zu senden.

## Aktives Mitwirken am Sprachpaket

Lust am Sprachpaket mitzuwirken und einen (zumindest kostenlosen) Github- und/oder Crowdin.net-Account? Dann einfach MaWoScha kontaktieren und wir stimmen eine eventuelle Zusammenarbeit ab.

Viel Spaß mit dem britisch-englischen Magento Sprachpaket!

MaWoScha
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
/**
* @category German
* @package German_LocalePack
* @authors MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @developer MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @version 0.1.0
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class German_LocalePackGb_Block_System_Config_Form_Fieldset_Extensions
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
{
public function render(Varien_Data_Form_Element_Abstract $element)
{
$helper = Mage::helper("localepackgb");

$html = $this->_getHeaderHtml($element);
$html .= "<p>".$helper->__("The installed language pack only provides translations of in Magento existing texts. If you want to prepare your Magento store on the legal requirements in %s or expand common payment methods, we recommend to install the following additional extensions.",
$helper->__("Great Britain"))."</p>";
$html .= "<hr style='margin-top:15px; margin-bottom:5px;' />";
$html .= "<h3 style='margin-top:20px; margin-bottom:10xp;'>".$helper->__("Specific market adjustment for")." ".$helper->__("English and British stores")."</h3>";
$html .= "<dl>";
$html .= "<dt>".$helper->__("Currently not available")."</dt>";
$html .= "</dl>";
$html .= "<h3 style='margin-top:20px; margin-bottom:10xp;'>".$helper->__("Common payment methods")."</h3>";
$html .= "<dl>";
$html .= "<dt><b>".$helper->__("Debit / direct debit")."</b> - <a href='http://www.magentocommerce.com/magento-connect/catalog/product/view/id/2606/' target='_blank'>DebitPayment</a> ".$helper->__("on")." Magento Connect</dt>";
$html .= "<dd>".$helper->__("Extension Key for the")." Connect Manager: <span style='color:#EA7601; font-style:italic;'>http://connect20.magentocommerce.com/community/DebitPayment</span></dd>";
$html .= "<dt><b>".$helper->__("Cash On Delivery")."</b> - <a href='http://www.magentocommerce.com/magento-connect/catalog/product/view/id/2360/' target='_blank'>CashOnDelivery</a> ".$helper->__("on")." Magento Connect</dt>";
$html .= "<dd>".$helper->__("Extension Key for the")." Connect Manager: <span style='color:#EA7601; font-style:italic;'>http://connect20.magentocommerce.com/community/CashOnDelivery</span></dd>";
$html .= "<dt><b>".$helper->__("Payment in advance")."</b> - <a href='http://www.magentocommerce.com/magento-connect/catalog/product/view/id/2298/' target='_blank'>BankPayment</a> ".$helper->__("on")." Magento Connect</dt>";
$html .= "<dd>".$helper->__("Extension Key for the")." Connect Manager: <span style='color:#EA7601; font-style:italic;'>http://connect20.magentocommerce.com/community/BankPayment</span></dd>";
$html .= "</dl>";
$html .= $this->_getFooterHtml($element);

return $html;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php
/**
* @category German
* @package German_LocalePack
* @authors MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @developer MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @version 0.1.0
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class German_LocalePackGb_Block_System_Config_Form_Fieldset_Instructions
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
{
public function render(Varien_Data_Form_Element_Abstract $element)
{
$nodepath = "modules/German_LocalePackGb";
$helper = Mage::helper("localepackgb");

$modules = Mage::getConfig()->getNode('modules')->children();
$section_link = Mage::helper('adminhtml')->getUrl('adminhtml/system_config/edit', array('section'=>'general'));

$html = $this->_getHeaderHtml($element);
$html .= "<p style='font-weight:bold;'>";
$html .= $helper->__("The %s language pack in version %s has been successfully installed.",
(string)Mage::app()->getConfig()->getNode($nodepath.'/locale'),
(string)Mage::app()->getConfig()->getNode($nodepath.'/version') );
$html .= "</p>";
if (!array_key_exists("German_LocaleFallback", $modules)) {
$html .= "<p>".$helper->__("Note: Install the extension %s, so you can use %s as a <a href='%s'>fallback language</a>.",
"<a href='https://github.com/MaWoScha/German_LocaleFallback'>German LocaleFallback</a>",
"en_US",
$section_link )."</p>";
}
$html .= "<p style='margin-top:20pt;'>";
$html .= $helper->__("On the <a href='%s'>Magento Connect page of the British English language pack</a>, you can find more information on the latest versions.",
(string)Mage::app()->getConfig()->getNode($nodepath.'/link_mage') );
$html .= "</p>";
$html .= "<p style='margin-top:20pt;'>";
$html .= $helper->__("For those interested there is a <a href='%s'>GitHub repository</a>. It is provided for the following purposes:",
(string)Mage::app()->getConfig()->getNode($nodepath.'/link_git') );
$html .= "</p>";

$html .= "<ul style='list-style-position: outside; list-style-type: disc; margin-left:18px;'>";
$html .= "<li>".$helper->__("Development of current language pack versions")."</li>";
$html .= "<li>".$helper->__("Report an error / send in patches, also happy for both published releases")."</li>";
$html .= "<li>".$helper->__("Alternative Downloads (regardless of official sources)")."</li>";
$html .= "<li>".$helper->__("Copy / forks for their own purposes")."</li>";
$html .= "<li>".$helper->__("Active participation in the language pack")."</li>";
$html .= "<li>".$helper->__("View Preview versions & test")."</li>";
$html .= '</ul>';

$html .= "<p style='margin-top:20pt;'>";
$html .= $helper->__("Note for detailed information, the README file on the GitHub page.");
$html .= "</p>";
$html .= "<p style='font-weight:bold;'>";
$html .= $helper->__("In order to ensure the translation Magento coverage, please see the information in the lower paragraphs!");
$html .= "</p>";
$html .= "<p style='text-align:right;'>";
$html .= $helper->__("powered by")." <a href='http://blog.siempro.co/' target='_blank'>MaWoScha</a>";
$html .= "</p>";
$html .= $this->_getFooterHtml($element);

return $html;
}
}
12 changes: 12 additions & 0 deletions app/code/community/German/LocalePackGb/Helper/Data.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* @category German
* @package German_LocalePack
* @authors MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>, Rico Neitzel <rico@buro71a.de, http://www.buro71a.de/>
* @developer MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>, Rico Neitzel <rico@buro71a.de, http://www.buro71a.de/>
* @version 0.1.0
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class German_LocalePackGb_Helper_Data extends Mage_Core_Helper_Abstract {

}
55 changes: 55 additions & 0 deletions app/code/community/German/LocalePackGb/Model/Observer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* @category German
* @package German_LocalePack
* @authors MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>, Rico Neitzel <rico@buro71a.de, http://www.buro71a.de/>
* @developer MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>, Rico Neitzel <rico@buro71a.de, http://www.buro71a.de/>
* @version 0.1.0
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
class German_LocalePackGb_Model_Observer {

public function adminhtmlControllerActionPredispatchStart() {

$helper = Mage::helper("localepackgb");
if ($this->localeMatchesMagento() && Mage::getSingleton('admin/session')->isLoggedIn()) {
Mage::getSingleton('core/session')->addNotice($helper->__('Attention: Your Locale Pack doesn\'t match your Magento Version. <a href="'.$this->getManageUrl().'">Get more information here.</a>'));
}
}

/**
* Version number of current locale
*
* @return string
*/
public function getVersionNumber() {

return (string)Mage::app()->getConfig()->getNode('modules/German_LocalePackGb/version');
}

/**
* Check if Magento Version Number is the beginning of Locale Version Number
*
* @return bool
*/
public function localeMatchesMagento() {

$magento = Mage::getVersion();
$locale = $this->getVersionNumber();

if (strpos($magento, $locale) !== false) {
return true;
}

return false;
}

/**
* Get URL of AdminPanel LocalePack section
*
* @return string
*/
public function getManageUrl() {
return Mage::helper("adminhtml")->getUrl('adminhtml/system_config/edit', array('section'=>'localepackgb'));
}
}
110 changes: 110 additions & 0 deletions app/code/community/German/LocalePackGb/etc/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0"?>
<!--
/**
* @category German
* @package German_LocalePack
* @authors MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @developer MaWoScha <mawoscha@siempro.co, http://www.siempro.co/>
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
-->
<config>
<modules>
<German_LocalePackGb>
<version>0.1.0</version>
<locale>en_GB</locale>
<title>English (Great Britain) Language Pack</title>
<link_git>https://github.com/MaWoScha/German_LocalePack_en_GB</link_git>
<link_mage></link_mage>
</German_LocalePackGb>
</modules>

<global>
<models>
<localepackgb>
<class>German_LocalePackGb_Model</class>
</localepackgb>
</models>
<helpers>
<localepackgb>
<class>German_LocalePackGb_Helper</class>
</localepackgb>
</helpers>
<blocks>
<localepackgb>
<class>German_LocalePackGb_Block</class>
</localepackgb>
</blocks>
<events>
<adminhtml_controller_action_predispatch_start>
<observers>
<localepackgb>
<class>localepackgb/observer</class>
<method>adminhtmlControllerActionPredispatchStart</method>
</localepackgb>
</observers>
</adminhtml_controller_action_predispatch_start>
</events>
</global>

<default>
<localepackgb>
<notification>
<url>https://github.com/MaWoScha/German_LocalePack_en_GB</url>
</notification>
</localepackgb>
<magesetup>
<default_country>GB</default_country>
</magesetup>
</default>

<adminhtml>
<layout>
<updates>
<localepackgb>
<files>
<default>localepackgb.xml</default>
</files>
</localepackgb>
</updates>
</layout>
<translate>
<modules>
<German_LocalePackGb>
<files>
<localepackgb>German_LocaleGb.csv</localepackgb>
<default>German_LocaleEn.csv</default>
</files>
</German_LocalePackGb>
</modules>
</translate>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<system>
<children>
<config>
<children> <!--
<localepacks translate="title" module="localepackgb">
<title>Language Packs</title>
<children> -->
<localepackgb translate="title" module="localepackgb">
<title>English (Great Britain) Language Pack</title>
</localepackgb> <!--
</children>
</localepacks> -->
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
</adminhtml>

</config>
Loading

0 comments on commit c292a82

Please sign in to comment.