Fixed minor internationalizable string error in admin templates.

This commit is contained in:
Franck Allimant
2013-11-06 20:01:26 +01:00
parent 8d40605091
commit f8f68eb59b
37 changed files with 1440 additions and 1380 deletions

View File

@@ -1,26 +1,14 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
return array(
'Delivery module' => 'Delivery module',
'Quantity' => 'Quantity',
'Product' => 'Product',
'Unit. price' => 'Unit. price',
'Tax' => 'Tax',
'Unit taxed price' => 'Unit taxed price',
'Taxed total' => 'Taxed total',
'Payment module' => 'Payment module',
'Postage' => 'Postage',
'Total' => 'Total',
);

View File

@@ -1,26 +1,36 @@
<?php
/*************************************************************************************/
/* */
/* Thelia */
/* */
/* Copyright (c) OpenStudio */
/* email : info@thelia.net */
/* web : http://www.thelia.net */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 3 of the License */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* */
/*************************************************************************************/
return array(
'Combination builder' => 'Combination builder',
'Title' => 'Title',
'City' => 'City',
'Zip code' => 'Zip code',
'Country' => 'Country',
'Phone' => 'Phone',
'Login' => 'Login',
'Password' => 'Password',
'Profile' => 'Profile',
'Postage' => 'Postage',
'Add to all product templates' => 'Add to all product templates',
'Quantity' => 'Quantity',
'Name' => 'Name',
'Value' => 'Value',
'Subject' => 'Subject',
'Company' => 'Company',
'Description' => 'Description',
'Language name' => 'Language name',
'ISO 639 Code' => 'ISO 639 Code',
'If a translation is missing or incomplete :' => 'If a translation is missing or incomplete :',
'Host' => 'Host',
'Port' => 'Port',
'Encryption' => 'Encryption',
'Username' => 'Username',
'Timeout' => 'Timeout',
'Source IP' => 'Source IP',
'Email address' => 'Email address',
'Firstname' => 'Firstname',
'Lastname' => 'Lastname',
'Additional address' => 'Additional address',
'Reference' => 'Reference',
'EAN Code' => 'EAN Code',
);

View File

@@ -32,6 +32,7 @@ use Thelia\Model\ConfigQuery;
use Thelia\Model\ModuleQuery;
use Thelia\Core\Template\TemplateHelper;
use Thelia\Core\Template\TemplateDefinition;
use Thelia\Tools\URL;
/**
* Class LangController
* @package Thelia\Controller\Admin
@@ -41,7 +42,6 @@ class TranslationsController extends BaseAdminController
{
protected function renderTemplate()
{
// Find modules
$modules = ModuleQuery::create()->joinI18n($this->getCurrentEditionLocale())->orderByPosition()->find();
@@ -58,24 +58,33 @@ class TranslationsController extends BaseAdminController
$template = $directory = $i18n_directory = false;
$mode = 'template';
$walkMode = TemplateHelper::WALK_MODE_TEMPLATE;
if (! empty($item_id)) {
$templateArguments = array(
'item_to_translate' => $item_to_translate,
'item_id' => $item_id,
'view_missing_traductions_only' => $this->getRequest()->get('view_missing_traductions_only', 0),
'max_input_vars_warning' => false,
);
// Find the i18n directory, and the directory to examine.
if (! empty($item_id) || $item_to_translate == 'co') {
switch($item_to_translate) {
case 'mo' :
if (null !== $module = ModuleQuery::create()->findPk($item_id)) {
$directory = THELIA_MODULE_DIR . $module->getBaseDir();
$i18n_directory = THELIA_TEMPLATE_DIR . $template->getI18nPath();
$mode = 'php';
$i18n_directory = THELIA_TEMPLATE_DIR . $module->getI18nPath();
$walkMode = TemplateHelper::WALK_MODE_PHP;
}
break;
case 'co' :
$directory = THELIA_ROOT . 'core/lib/Thelia';
$i18n_directory = THELIA_ROOT . 'core/lib/Thelia/Config/I18n';
$mode = 'php';
$walkMode = TemplateHelper::WALK_MODE_PHP;
break;
case 'fo' :
@@ -96,24 +105,58 @@ class TranslationsController extends BaseAdminController
$i18n_directory = THELIA_TEMPLATE_DIR . $template->getI18nPath();
}
// Load strings to translate
if ($directory) {
// Load strings
$this->walkDir($directory, $mode, $all_strings);
// Load translated strings
// Save the string set, if the form was submitted
if ($i18n_directory) {
$locale = $this->getCurrentEditionLocale();
$save_mode = $this->getRequest()->get('save_mode', false);
if ($save_mode !== false) {
$texts = $this->getRequest()->get('text', array());
if (! empty($texts)) {
$file = sprintf("%s/%s.php", $i18n_directory, $this->getCurrentEditionLocale());
$translations = $this->getRequest()->get('translation', array());
TemplateHelper::getInstance()->write_translation($file, $texts, $translations);
if ($save_mode == 'stay')
$this->redirectToRoute("admin.configuration.translations", $templateArguments);
else
$this->redirect(URL::getInstance()->adminViewUrl('configuration'));
}
}
}
return $this->render('translations', array(
'item_to_translate' => $item_to_translate,
'item_id' => $item_id,
'all_strings' => $all_strings,
'view_missing_traductions_only' => $this->getRequest()->get('view_missing_traductions_only', 0)
));
// Load strings
$stringsCount = TemplateHelper::getInstance()->walkDir(
$directory,
$walkMode,
$this->getTranslator(),
$this->getCurrentEditionLocale(),
$all_strings
);
// Estimate number of fields, and compare to php ini max_input_vars
$stringsCount = $stringsCount * 2 + 6;
if ($stringsCount > ini_get('max_input_vars')) {
$templateArguments['max_input_vars_warning'] = true;
$templateArguments['required_max_input_vars'] = $stringsCount;
$templateArguments['current_max_input_vars'] = ini_get('max_input_vars');
}
else {
$templateArguments['all_strings'] = $all_strings;
}
}
}
return $this->render('translations', $templateArguments);
}
public function defaultAction()
@@ -129,86 +172,4 @@ class TranslationsController extends BaseAdminController
return $this->renderTemplate();
}
protected function normalize_path($path)
{
$path =
str_replace(
str_replace('\\', '/', THELIA_ROOT),
'',
str_replace('\\', '/', realpath($path))
);
if ($path[0] == '/') $path = substr($path, 1);
return $path;
}
protected function walkDir($directory, $mode, &$strings) {
if ($mode == 'php') {
$prefix = '\-\>[\s]*trans[\s]*\(';
$allowed_exts = array('php');
} else {
$prefix = '\{intl[\s]l=';
$allowed_exts = array('html', 'tpl', 'xml');
}
try {
//echo "walking in $directory<br />";
foreach (new \DirectoryIterator($directory) as $fileInfo) {
if ($fileInfo->isDot()) continue;
if ($fileInfo->isDir()) $this->walkDir($fileInfo->getPathName(), $mode, $strings);
if ($fileInfo->isFile()) {
$ext = $fileInfo->getExtension();
if (in_array($ext, $allowed_exts)) {
if ($content = file_get_contents($fileInfo->getPathName())) {
$short_path = $this->normalize_path($fileInfo->getPathName());
// echo " examining $short_path\n";
$matches = array();
if (preg_match_all('/'.$prefix.'((?<![\\\\])[\'"])((?:.(?!(?<![\\\\])\1))*.?)\1/', $content, $matches)) {
// print_r($matches[2]);
foreach($matches[2] as $match) {
$hash = md5($match);
if (isset($strings[$hash]))
{
if (! in_array($short_path, $strings[$hash]['files']))
{
$strings[$hash]['files'][] = $short_path;
}
}
else
$strings[$hash] = array(
'files' => array($short_path),
'chaine' => $match,
'translation' => $this->getTranslator()->trans($match, array(), 'messages', $this->getCurrentEditionLocale(), false),
'dollar' => strstr($match, '$') !== false
);
}
}
}
}
}
}
} catch (\UnexpectedValueException $ex) {
echo $ex;
}
}
}

View File

@@ -24,9 +24,14 @@
namespace Thelia\Core\Template;
use Thelia\Model\ConfigQuery;
use Thelia\Log\Tlog;
use Thelia\Core\Translation\Translator;
class TemplateHelper
{
const WALK_MODE_PHP = 'php';
const WALK_MODE_TEMPLATE = 'tpl';
/**
* This is a singleton
@@ -93,4 +98,156 @@ class TemplateHelper
return $list;
}
protected function normalize_path($path)
{
$path = str_replace(
str_replace('\\', '/', THELIA_ROOT),
'',
str_replace('\\', '/', realpath($path))
);
return ltrim($path, '/');
}
/**
* Récursively examine files in a directory tree, and extract translatable strings.
*
* Returns an array of translatable strings, each item having with the following structure:
* 'files' an arfray of file names in which the string appears,
* 'text' the translatable text
* 'translation' => the text translation, or an empty string if none available.
* 'dollar' => true if the translatable text contains a $
*
* @param string $directory the path to the directory to examine
* @param string $walkMode type of file scanning: WALK_MODE_PHP or WALK_MODE_TEMPLATE
* @param Thelia\Core\Translation\Translator $translator the current translator
* @param string $currentLocale the current locale
* @param array $strings the liste of strings
* @throws \InvalidArgumentException if $walkMode contains an invalid value
* @return number the total number of translatable texts
*/
public function walkDir($directory, $walkMode, Translator $translator, $currentLocale, &$strings) {
$num_files = 0;
if ($walkMode == self::WALK_MODE_PHP) {
$prefix = '\-\>[\s]*trans[\s]*\(';
$allowed_exts = array('php');
} else if ($walkMode == self::WALK_MODE_TEMPLATE) {
$prefix = '\{intl[\s]l=';
$allowed_exts = array('html', 'tpl', 'xml');
}
else {
throw new \InvalidArgumentException(
Translator::getInstance()->trans('Invalid value for walkMode parameter: %value', array('%value' => $walkMode))
);
}
try {
Tlog::getInstance()->debug("Walking in $directory, in mode $walkMode");
foreach (new \DirectoryIterator($directory) as $fileInfo) {
if ($fileInfo->isDot()) continue;
if ($fileInfo->isDir()) $num_files += $this->walkDir($fileInfo->getPathName(), $walkMode, $translator, $currentLocale, $strings);
if ($fileInfo->isFile()) {
$ext = $fileInfo->getExtension();
if (in_array($ext, $allowed_exts)) {
if ($content = file_get_contents($fileInfo->getPathName())) {
$short_path = $this->normalize_path($fileInfo->getPathName());
Tlog::getInstance()->debug("Examining file $short_path\n");
$matches = array();
if (preg_match_all('/'.$prefix.'((?<![\\\\])[\'"])((?:.(?!(?<![\\\\])\1))*.?)\1/', $content, $matches)) {
Tlog::getInstance()->debug("Strings found: ", $matches[2]);
foreach($matches[2] as $match) {
$hash = md5($match);
if (isset($strings[$hash]))
{
if (! in_array($short_path, $strings[$hash]['files']))
{
$strings[$hash]['files'][] = $short_path;
}
}
else
$num_files++;
// remove \'
$match = str_replace("\\'", "'", $match);
$strings[$hash] = array(
'files' => array($short_path),
'text' => $match,
'translation' => $translator->trans($match, array(), 'messages', $currentLocale, false),
'dollar' => strstr($match, '$') !== false
);
}
}
}
}
}
}
return $num_files;
} catch (\UnexpectedValueException $ex) {
echo $ex;
}
}
public function write_translation($file, $texts, $translations)
{
if ($fp = @fopen($file, 'w')) {
fwrite($fp, '<' . "?php\n\n");
fwrite($fp, "return array(\n");
$idx = 0;
foreach($texts as $text)
{
// Write only defined (not empty) translations
if (! empty($translations[$idx])) {
$text = str_replace("'", "\'", $text);
$translation = str_replace("'", "\'", $translations[$idx]);
fwrite($fp, sprintf("\t'%s' => '%s',\n", $text, $translation));
}
$idx++;
}
fwrite($fp, ");\n");
@fclose($fh);
}
else
{
throw new \RuntimeException(
$this->getTranslator()->trans(
"Failed to open translation file %file. Please be sure that this file is writable by your Web server",
array('%file' => $file)
)
);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/attributes'}">{intl l="Attributes"}</a></li>
<li>{intl l='Editing attribute "%name"' name="{$TITLE}"}</li>
<li>{intl l='Editing attribute "%name"' name=$TITLE}</li>
</ul>
<div class="row">
@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit attribute $TITLE"}
{intl l='Edit attribute "%name"' name=$TITLE}
</div>
<div class="col-md-12">
@@ -186,7 +186,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, attribute ID=$attribute_id was not found."}
{intl l="Sorry, attribute ID=%id was not found." id=$attribute_id}
</div>
</div>
</div>
@@ -218,7 +218,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="current-edit-lang" id="$edit_language_id"}
<div class="input-group">
@@ -226,7 +226,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the value in the current edit language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the value in the current edit language (%title)" title=$TITLE}</div>
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />

View File

@@ -161,7 +161,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
@@ -169,7 +169,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the attribute name in the default language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the attribute name in the default language (%language_name)" language_name=$TITLE}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />

View File

@@ -81,7 +81,7 @@
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
@@ -94,7 +94,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">

View File

@@ -82,7 +82,7 @@
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
@@ -95,7 +95,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">

View File

@@ -127,14 +127,14 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Country title'}">
</div>
{/form_field}
{form_field form=$form field='area'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<option value="{$ID}">{$TITLE}</option>
</select>
@@ -143,22 +143,22 @@
{form_field form=$form field='isocode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='ISO Code'}">
</div>
{/form_field}
{form_field form=$form field='isoalpha2'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 2'}">
</div>
{/form_field}
{form_field form=$form field='isoalpha3'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 3'}">
</div>
{/form_field}
{loop type="lang" name="default-lang" default_only="1"}

View File

@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit country $TITLE"}
{intl l='Edit country "%name"' name="{$TITLE}"}
</div>
<div class="form-container">
@@ -52,7 +52,7 @@
{form_field form=$form field='area'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
<option value="{$ID}">{$TITLE}</option>
</select>
@@ -61,41 +61,41 @@
{form_field form=$form field='isocode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='ISO Code'}">
</div>
{/form_field}
{form_field form=$form field='isoalpha2'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 2'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 2'}">
</div>
{/form_field}
{form_field form=$form field='isoalpha3'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Alpha code 3'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Alpha code 3'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Country title'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Country title'}">
</div>
{/form_field}
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l=""}" placeholder="{intl l='Country short description'}">{$value}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Country short description'}">{$value}</textarea>
</div>
{/form_field}
{form_field form=$form field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Country description'}">{$value}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Country description'}">{$value}</textarea>
</div>
{/form_field}
</div>
@@ -116,7 +116,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, country ID=$country_id was not found."}
{intl l="Sorry, country ID=%id was not found." id=$country_id}
</div>
</div>
</div>

View File

@@ -214,7 +214,7 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
@@ -222,7 +222,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the currency name in the default language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the currency name in the default language (%title)" title=$TITLE}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
@@ -236,7 +236,7 @@
{form_field form=$form field='code'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='ISO 4217 code'}" placeholder="{intl l='Code'}">
<span class="help-block"><a href="http://fr.wikipedia.org/wiki/ISO_4217" target="_blank">{intl l='More information about ISO 4217'}</a></span>
</div>
@@ -244,14 +244,14 @@
{form_field form=$form field='symbol'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}">
</div>
{/form_field}
{form_field form=$form field='rate'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Currency rate'}" placeholder="{intl l='Rate'}">
<span class="help-block">{intl l="The rate from Euro (Price in Euro * rate = Price in this currency)"}</span>
</div>

View File

@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit currency $NAME"}
{intl l='Edit currency "%name"' name=$NAME}
</div>
<div class="form-container">
@@ -54,7 +54,7 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Currency name'}" placeholder="{intl l='Currency name'}" class="form-control">
<span class="help-block">&nbsp;</span>
</div>
@@ -63,7 +63,7 @@
{form_field form=$form field='code'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Currency ISO 4217 Code'}" placeholder="{intl l='Code'}" class="form-control">
<span class="help-block">
@@ -79,17 +79,17 @@
{form_field form=$form field='symbol'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Currency symbol'}" placeholder="{intl l='Symbol'}" class="form-control">
<span class="help-block">{intl l='The symbol, such as $, £, &euro;...'}</span>
<span class="help-block">{intl l='The symbol, such as &#36;, £, &euro;...'}</span>
</div>
{/form_field}
{form_field form=$form field='rate'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rate from Euro'}" placeholder="{intl l='Rate'}" class="form-control">
<span class="help-block">The rate from Euro: Price in Euro x rate = Price in this currency</span>
@@ -115,7 +115,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, currency ID=$currency_id was not found."}
{intl l="Sorry, currency ID=%id was not found." id=$currency_id}
</div>
</div>
</div>

View File

@@ -51,7 +51,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1" backend_context="1"}
@@ -63,15 +63,15 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{$label}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{$label}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
@@ -81,47 +81,47 @@
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$COMPANY}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$COMPANY}" title="{$label}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS1}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS1}" title="{$label}" placeholder="{intl l='Address'}">
</div>
{/form_field}
{form_field form=$form field='address2'}
<div class="form-group">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS2}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS2}" title="{$label}" placeholder="{intl l='Additional address'}">
</div>
{/form_field}
{form_field form=$form field='address3'}
<div class="form-group">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS3}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS3}" title="{$label}" placeholder="{intl l='Additional address'}">
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ZIPCODE}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ZIPCODE}" title="{$label}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$CITY}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$CITY}" title="{$label}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}" {if $ID == $COUNTRY}selected{/if}>{$TITLE}</option>
@@ -253,7 +253,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, customer ID=$customer_id was not found."}
{intl l="Sorry, customer ID=%id was not found." id=$customer_id}
</div>
</div>
</div>
@@ -277,21 +277,21 @@
{/form_field}
{form_field form=$form field='label'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Label'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Label'}">
</div>
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="title" name="title1"}
@@ -303,54 +303,54 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}" required>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Firstname'}" required>
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}" required>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}" required>
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}" required>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Address'}" required>
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}" required>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Zip code'}" required>
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}" required>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='City'}" required>
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>

View File

@@ -180,14 +180,14 @@
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
@@ -199,54 +199,54 @@
{form_field form=$form field='firstname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Firstname'}">
</div>
{/form_field}
{form_field form=$form field='lastname'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}">
</div>
{/form_field}
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
<div class="form-group">
{form_field form=$form field='address3'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
{/form_field}
</div>
{/form_field}
{form_field form=$form field='zipcode'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Zip code'}">
</div>
{/form_field}
{form_field form=$form field='city'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='City'}">
</div>
{/form_field}
{form_field form=$form field='country'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="country" name="country1"}
<option value="{$ID}">{$TITLE}</option>
@@ -257,8 +257,8 @@
{form_field form=$form field='email'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Email address'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Email address'}">
</div>
{/form_field}

View File

@@ -22,7 +22,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit document $TITLE"}
{intl l='Edit document "%name"' name="{$TITLE}"}
</div>
<div class="form-container">
@@ -59,29 +59,29 @@
<div class="col-md-6">
{form_field form=$form field='file'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{intl l="{$label}"}" placeholder="{intl l='File'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{$label}" placeholder="{intl l='File'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Title'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{$label}" placeholder="{intl l='Title'}">
</div>
{/form_field}
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Chapo'}">{$CHAPO}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Chapo'}">{$CHAPO}</textarea>
</div>
{/form_field}
{form_field form=$form field='postscriptum'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
</div>
{/form_field}
</div>
@@ -90,8 +90,8 @@
<div class="col-md-12">
{form_field form=$form field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control wysiwyg" title="{intl l="{$label}"}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control wysiwyg" title="{$label}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
</div>
{/form_field}
</div>
@@ -125,7 +125,7 @@
</div>
</div>
<div class="alert alert-error">
{intl l="Sorry, document ID=$documentId was not found."}
{intl l="Sorry, document ID=%id was not found." id=$documentId}
</div>
</div>
</div>

View File

@@ -16,7 +16,7 @@
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/features'}">{intl l="Features"}</a></li>
<li>{intl l='Editing feature "%name"' name="{$TITLE}"}</li>
<li>{intl l='Editing feature "%name"' name=$TITLE}</li>
</ul>
<div class="row">
@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit feature $TITLE"}
{intl l='Edit feature "%name"' name=$TITLE}
</div>
<div class="col-md-12">
@@ -186,7 +186,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, feature ID=$feature_id was not found."}
{intl l="Sorry, feature ID=%id was not found." id=$feature_id}
</div>
</div>
</div>
@@ -218,7 +218,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="current-edit-lang" id="$edit_language_id"}
<div class="input-group">
@@ -226,7 +226,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the value in the current edit language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the value in the current edit language (%language_name)" language_name=$TITLE}</div>
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />

View File

@@ -161,7 +161,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
@@ -169,7 +169,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the feature name in the default language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the feature name in the default language (%title)" title=$TITLE}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />

View File

@@ -82,7 +82,7 @@
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
@@ -95,7 +95,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">

View File

@@ -14,7 +14,7 @@
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path="{$redirectUrl}"}">{intl l="Image"}</a></li>
<li>{intl l='Editing image "%name"' name="{$TITLE}"}</li>
<li>{intl l='Editing image "%name"' name=$TITLE}</li>
</ul>
<div class="row">
@@ -22,7 +22,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit image $TITLE"}
{intl l='Edit image "%name"' name=$TITLE}
</div>
<div class="form-container">
@@ -63,29 +63,29 @@
<div class="col-md-6">
{form_field form=$form field='file'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{intl l="{$label}"}" placeholder="{intl l='File'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="file" id="{$label_attr.for}" name="{$name}" class="form-control" value="" title="{$label}" placeholder="{intl l='File'}">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{intl l="{$label}"}" placeholder="{intl l='Title'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$TITLE}" title="{$label}" placeholder="{intl l='Title'}">
</div>
{/form_field}
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Chapo'}">{$CHAPO}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Chapo'}">{$CHAPO}</textarea>
</div>
{/form_field}
{form_field form=$form field='postscriptum'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Post Scriptum'}">{$POSTSCRIPTUM}</textarea>
</div>
{/form_field}
</div>
@@ -94,8 +94,8 @@
<div class="col-md-12">
{form_field form=$form field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control wysiwyg" title="{intl l="{$label}"}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<textarea id="{$label_attr.for}" name="{$name}" class="form-control wysiwyg" title="{$label}" placeholder="{intl l='Description'}">{$DESCRIPTION}</textarea>
</div>
{/form_field}
</div>
@@ -130,7 +130,7 @@
</div>
</div>
<div class="alert alert-error">
{intl l="Sorry, image ID=$imageId was not found."}
{intl l="Sorry, image ID=%id was not found." id=$imageId}
</div>
</div>
</div>

View File

@@ -43,11 +43,11 @@ Parameters:
<div class="col-md-6 inner-actions">
{if $hide_submit_buttons != true}
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
<button type="submit" name="save_mode" value="stay" class="form-submit-button btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
<button type="submit" name="save_mode" value="close" class="form-submit-button btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
{/if}
{if ! empty($close_url)}
<a href="{$close_url}" class="btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
<a href="{$close_url}" class="page-close-button btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
{/if}
</div>
</div>

View File

@@ -50,7 +50,7 @@
{form_field form=$form field='url'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Rewritten URL'}" placeholder="{intl l='Rewriten URL'}" class="form-control">
@@ -64,7 +64,7 @@
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
</label>
<select id="{$label_attr.for}" required="required" name="{$name}" class="form-control">

View File

@@ -4,7 +4,7 @@ The standard description fields, used by many Thelia objects
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value}">
</div>
{/form_field}
@@ -12,7 +12,7 @@ The standard description fields, used by many Thelia objects
{form_field form=$form field='chapo'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
<span class="label-help-block">{intl l="A short description, used when a summary or an introduction is required"}</span>
</label>
@@ -23,7 +23,7 @@ The standard description fields, used by many Thelia objects
{form_field form=$form field='description'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
<span class="label-help-block">{intl l="The detailed description."}</span>
</label>
@@ -34,7 +34,7 @@ The standard description fields, used by many Thelia objects
{form_field form=$form field='postscriptum'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
<span class="label-help-block">{intl l="A short post-description information"}</span>
</label>

View File

@@ -170,32 +170,32 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Language title'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Language title'}">
</div>
{/form_field}
{form_field form=$form field='code'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='ISO Code'}">
</div>
{/form_field}
{form_field form=$form field='locale'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='en_US'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='en_US'}">
</div>
{/form_field}
{form_field form=$form field='date_format'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='d-m-Y'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='d-m-Y'}">
</div>
{/form_field}
{form_field form=$form field='time_format'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='H:i:s'}">
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='H:i:s'}">
</div>
{/form_field}

View File

@@ -34,19 +34,19 @@
{form_field form=$form field='username'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Username'}" autofocus>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Username'}" autofocus>
</div>
</div>
{/form_field}
{form_field form=$form field='password'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
<input type="password" id="{$label_attr.for}" name="{$name}" class="form-control" title="{intl l="{$label}"}" placeholder="{intl l='Password'}">
<input type="password" id="{$label_attr.for}" name="{$name}" class="form-control" title="{$label}" placeholder="{intl l='Password'}">
</div>
</div>
{/form_field}
@@ -54,7 +54,7 @@
{form_field form=$form field='remember_me'}
<div class="checkbox">
<label for="{$label_attr.for}">
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {intl l="{$label}"}
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}" {$attr} {if $options.checked}checked="checked"{/if}/> {$label}
</label>
</div>
{/form_field}

View File

@@ -16,7 +16,7 @@
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/messages'}">{intl l="Mailing templates"}</a></li>
<li>{intl l='Editing mailing template "%name"' name="{$NAME}"}</li>
<li>{intl l='Editing mailing template "%name"' name=$NAME}</li>
</ul>
<div class="row">
@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit mailing template $NAME"}
{intl l='Edit mailing template "%name"' name=$NAME}
</div>
<div class="form-container">
@@ -55,7 +55,7 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
</div>
{/form_field}
@@ -64,21 +64,21 @@
<div class="checkbox {if $error}has-error{/if}">
<label>
<input type="checkbox" name="{$name}" value="1" {if $value == 1}checked="checked"{/if}>
{intl l="{$label}"}
{$label}
</label>
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value}">
</div>
{/form_field}
{form_field form=$form field='subject'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Subject'}" placeholder="{intl l='Subject'}" class="form-control" value="{$value}">
</div>
{/form_field}
@@ -86,7 +86,7 @@
{form_field form=$form field='html_message'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
<span class="label-help-block">{intl l="The mailing template in HTML format."}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
@@ -96,7 +96,7 @@
{form_field form=$form field='text_message'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">
{intl l="{$label}"} :
{$label} :
<span class="label-help-block">{intl l="The mailing template in text-only format."}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
@@ -121,7 +121,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, message ID=$message_id was not found."}
{intl l="Sorry, message ID=%id was not found." id=$message_id}
</div>
</div>
</div>

View File

@@ -127,14 +127,14 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Mailing template name'}" placeholder="{intl l='Mailing template name'}" class="form-control">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
@@ -146,7 +146,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the mailing template purpose in the default language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the mailing template purpose in the default language (%title)" title=$TITLE}</div>
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />

View File

@@ -16,7 +16,7 @@
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/templates'}">{intl l="Templates"}</a></li>
<li>{intl l='Editing template "%name"' name="{$NAME}"}</li>
<li>{intl l='Editing template "%name"' name=$NAME}</li>
</ul>
<div class="row">
@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit template $NAME"}
{intl l='Edit template "%name"' name=$NAME}
</div>
<div class="form-container">
@@ -52,7 +52,7 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Template name'}" placeholder="{intl l='Template name'}" class="form-control">
</div>
{/form_field}
@@ -97,7 +97,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, template ID=$template_id was not found."}
{intl l="Sorry, template ID=%id was not found." id=$template_id}
</div>
</div>
</div>

View File

@@ -133,7 +133,7 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
@@ -141,7 +141,7 @@
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the template name in the default language ($TITLE)"}</div>
<div class="help-block">{intl l="Enter here the template name in the default language (%title)" title=$TITLE}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />

View File

@@ -53,7 +53,7 @@
</div>
{if $item_to_translate == 'mo'}
<div class="col-md-4">
<div class="col-md-4 item-id-selector">
<div class="form-group">
<label class="control-label" for="item_id">{intl l='Select the module you want to translate'}</label>
@@ -66,7 +66,7 @@
</div>
</div>
{else if $item_to_translate == 'fo'}
<div class="col-md-4">
<div class="col-md-4 item-id-selector">
<div class="form-group">
<label class="control-label" for="item_id">{intl l='Select the front-office template you want to translate'}</label>
@@ -79,7 +79,7 @@
</div>
</div>
{else if $item_to_translate == 'bo'}
<div class="col-md-4">
<div class="col-md-4 item-id-selector">
<div class="form-group">
<label class="control-label" for="item_id">{intl l='Select the back-office template you want to translate'}</label>
@@ -92,7 +92,7 @@
</div>
</div>
{else if $item_to_translate == 'pf'}
<div class="col-md-4">
<div class="col-md-4 item-id-selector">
<div class="form-group">
<label class="control-label" for="item_id">{intl l='Select the PDF template you want to translate'}</label>
@@ -111,7 +111,7 @@
<div class="form-group">
<label class="control-label">&nbsp;</label>
<label class="checkbox control-label">
<input type="checkbox" name="view_missing_traductions_only" value="1" {if $view_missing_traductions_only}checked="checked"{/if}> {intl l='View only missing translations'}
<input class="submit-on-change" type="checkbox" name="view_missing_traductions_only" value="1" {if $view_missing_traductions_only}checked="checked"{/if}> {intl l='View only missing translations'}
</label>
</div>
</div>
@@ -121,9 +121,13 @@
{* -- STRINGS TO TRANSLATE --------------------------------------------- *}
{$currfile = false}
{$untranslated = 0}
{$close_last_panel = false}
{foreach $all_strings as $hash => $info}
{$idx = 0}
{foreach $all_strings as $info}
<input type="hidden" id="text_{$idx}" name="text[]" value="{$info.text}" />
{$not_translated = empty($info.translation)}
@@ -151,8 +155,8 @@
{if $currfile !== false}
{* Close current panel *}
</tbody></table>
</div>
</tbody></table></div>
{$close_last_panel = false}
{/if}
{$currfile = $file_names}
@@ -169,33 +173,69 @@
<table class="table table-condensed table-hover">
<tbody>
{$close_last_panel = true}
{/if}
<tr>
<td class="col-md-6">
<span id="{$hash}">{$info.chaine}</span>
{$info.text}
{if $info.dollar}
<div>
<span class="label label-warning">{intl l='Warning'}</span>
{intl l='Il seems that this string contains a Smarty variable ($). If \'s the case, it cannot be transleted properly.'}
{intl l='Il seems that this string contains a Smarty variable (&#36;). If \'s the case, it cannot be transleted properly.'}
</div>
{/if}
</td>
<td class="col-md-6" >
<div class="input-group {if $not_translated}has-error{/if}">
<span class="input-group-addon"><a href="#" data-hash="{$hash}" class="copy-translation" title="{intl l='Copy source text in input field'}"><span class="glyphicon glyphicon-chevron-right"></span></a></span>
<input type="text" class="translation_field form-control" name="{$hash}" value="{$info.translation}" />
<span class="input-group-addon"><a href="#" data-text-num="{$idx}" class="copy-translation" title="{intl l='Copy source text in input field'}"><span class="glyphicon glyphicon-chevron-right"></span></a></span>
<input type="text" id="translation_{$idx}" class="translation_field form-control" name="translation[]" value="{$info.translation}" />
</div>
</td>
</tr>
{else}
{* Text is not displayed, put it in a hidden field *}
<input type="hidden" id="translation_{$idx}" name="translation[]" value="{$info.translation}" />
{/if}
{$idx = $idx + 1}
{/foreach}
</tbody>
</table>
</div> {* panel *}
{if isset($all_strings) }
{if empty($all_strings) }
<div class="alert alert-info">
{intl l='<strong>Did not found any text to translate</strong>. It\'s probably normal. If not, please be sure to use Smarty\'s "intl" function in templates, or the Translator::trans() method in PHP files.'}
</div>
{else if $view_missing_traductions_only == 1 && $currfile == false }
<div class="alert alert-success">
{intl l='<strong>Congratulations</strong>, all text is now translated !'}
</div>
{/if}
{if $close_last_panel}
{* close the last panel *}
</tbody></table></div>
{/if}
{/if}
{if $max_input_vars_warning}
<div class="alert alert-danger">
{intl l='<strong>Cannot translate all fields.</strong> According to your PHP configuration, forms cannot contains more than
%current_max_input_vars input fields, but at least %required_max_input_vars are required. Please change the value of max_input_vars in your PHP configuration
of change the translation file by hand.'
current_max_input_vars=$current_max_input_vars
required_max_input_vars=$required_max_input_vars
}
</div>
{/if}
</form>
</div>
@@ -215,7 +255,8 @@
var translation_changed = false;
$('#item_to_translate').change(function() {
$('#item_id').val('');
$('#item-id').val('');
$('.item-id-selector').hide();
});
$('.submit-on-change').change(function() {
@@ -225,9 +266,9 @@
$('input.translation_field').change(function() { translation_changed = true; });
$('.copy-translation').click(function(ev) {
var hash = $(this).data('hash');
var num = $(this).data('text-num');
$('input[name='+hash+']').val($('#'+hash).html());
$('#translation_' + num).val($('#text_' + num).val());
translation_changed = true;
@@ -244,6 +285,12 @@
}
});
// Intercept language changes, to reload string when changing language
$('.form-submit-button').click(function(ev) {
// For a submit throught the save buttons, do not show the change warning.
translation_changed = false;
});
// Intercept language changes, to reload string when changing language
$('.language-change-button').click(function(ev) {

View File

@@ -61,14 +61,14 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
</div>
{/form_field}
{form_field form=$form field='value'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{intl l='Variable value'}" placeholder="{intl l='Variable value'}" class="form-control">
</div>
{/form_field}
@@ -77,7 +77,7 @@
<div class="checkbox {if $error}has-error{/if}">
<label>
<input type="checkbox" name="{$name}" value="1" {if $value == 1}checked="checked"{/if}>
{intl l="{$label}"}
{$label}
</label>
</div>
{/form_field}
@@ -106,7 +106,7 @@
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, variable ID=$variable_id was not found."}
{intl l="Sorry, variable ID=%id was not found." id=$variable_id}
</div>
</div>
</div>

View File

@@ -163,21 +163,21 @@
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Variable name'}" placeholder="{intl l='Variable name'}" class="form-control">
</div>
{/form_field}
{form_field form=$form field='value'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" value="{$value}" title="{intl l='Variable value'}" placeholder="{intl l='Variable value'}" class="form-control">
</div>
{/form_field}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
{loop type="lang" name="default-lang" default_only="1"}

View File

@@ -1,19 +1,122 @@
<?php
return array(
'404' => '404',
'The page cannot be found' => 'The page cannot be found',
'Account' => 'Account',
'Change Password' => 'Change Password',
'Login Information' => 'Login Information',
'Update Profile' => 'Update Profile',
'Personal Informations' => 'Personal Informations',
'Select Title' => 'Select Title',
'Placeholder firstname' => 'John',
'Placeholder lastname' => 'Doe',
'Placeholder email' => 'johndoe@domain.com',
'Update' => 'Update',
'My Account' => 'My Account',
'Personal Information' => 'Personal Information',
'Change my account information' => 'Change my account information',
'Change my password' => 'Change my password',
'My Address book' => 'My Address book',
'Add a new address' => 'Add a new address',
'My Address Books' => 'My Address Books',
'Address %nb' => 'Address %nb',
'Edit this address' => 'Edit this address',
'Edit' => 'Edit',
'Do you really want to delete this address ?' => 'Do you really want to delete this address ?',
'Remove this address' => 'Remove this address',
'Cancel' => 'Cancel',
'My Orders' => 'My Orders',
'List of orders' => 'List of orders',
'Order Number' => 'Order Number',
'Date' => 'Date',
'Amount' => 'Amount',
'Status' => 'Status',
'View' => 'View',
'View order %ref as pdf document' => 'View order %ref as pdf document',
'Order details' => 'Order details',
'Warning' => 'Warning',
'You don\'t have orders yet.' => 'You don\'t have orders yet.',
'Address Update' => 'Address update',
'missing or invalid data' => 'missing or invalid data',
'Address' => 'Address',
'Placeholder address label' => 'Home, Work office, other',
'Placeholder address1' => '76 Ninth Avenue',
'Placeholder address2' => 'Address',
'Placeholder zipcode' => 'NY 10011',
'Placeholder city' => 'New York',
'Select Country' => 'Select Country',
'Placeholder phone' => 'Phone number',
'Placeholder cellphone' => 'Cellular phone number',
'Add a New Address' => 'Add a new address',
'Create New Address' => 'Create New Address',
'Create' => 'Create',
'Cart' => 'Cart',
'Your Cart' => 'Your Cart',
'Product Name' => 'Product Name',
'Name' => 'Name',
'Unit Price' => 'Unit Price',
'Price' => 'Price',
'Quantity' => 'Quantity',
'Qty' => 'Qty',
'Total' => 'Total',
'Available' => 'Available',
'In Stock' => 'In Stock',
'Out of Stock' => 'Out of stock',
'No.' => 'No.',
'Remove' => 'Remove',
'instead of' => 'instead of',
'Continue Shopping' => 'Continue Shopping',
'Proceed checkout' => 'Proceed checkout',
'You have no items in your shopping cart.' => 'You have no items in your shopping cart.',
'Upsell Products' => 'Upsell Products',
'No products available in this category' => 'No products available in this category',
'Thanks !' => 'Thanks !',
'Thanks for your message, we will contact as soon as possible.' => 'Thanks for your message, we will contact as soon as possible.',
'Contact us' => 'Contact us',
'Send us a message' => 'Send us a message',
'Placeholder contact name' => 'What\'s your name?',
'Placeholder contact email' => 'So I can get back to you.',
'Placeholder contact subject' => 'The subject of your message.',
'Placeholder contact message' => 'And your message...',
'Send' => 'Send',
'View cart' => 'View cart',
'Related' => 'Related',
'Categories' => 'Categories',
'View Cart' => 'View Cart',
'Checkout' => 'Checkout',
'Special Price:' => 'Special Price:',
'Regular Price:' => 'Regular Price:',
'Add to cart' => 'Add to cart',
'View product' => 'View product',
'Item(s)' => 'Item(s)',
'Show' => 'Show',
'per page' => 'per page',
'Sort By' => 'Sort By',
'Position' => 'Position',
'Name ascending' => 'Name ascending',
'Name descending' => 'Name descending',
'Price ascending' => 'Price ascending',
'Price descending' => 'Price descending',
'Rating' => 'Rating',
'View as' => 'View as',
'Grid' => 'Grid',
'List' => 'List',
'Pagination' => 'Pagination',
'Previous' => 'Previous',
'Next' => 'Next',
'Latest' => 'Latest',
'+ View All' => '+ View All',
'Offers' => 'Offers',
'Thelia V2' => 'Thelia V2',
'Skip to content' => 'Skip to content',
'Toggle navigation' => 'Toggle navigation',
'Main Navigation' => 'Main Navigation',
'Log out!' => 'Log out!',
'Register!' => 'Register!',
'Log In!' => 'Log In!',
'Sign In' => 'Sign In',
'Register' => 'Register',
'Cart' => 'Cart',
'View Cart' => 'View Cart',
'Checkout' => 'Checkout',
'You have no items in your shopping cart.' => 'You have no items in your shopping cart.',
'Home' => 'Home',
'Search a product' => 'Search a product',
'Search...' => 'Search...',
@@ -21,10 +124,6 @@ return array (
'Search' => 'Search',
'Language:' => 'Language:',
'Currency:' => 'Currency:',
'Latest' => 'Latest',
'Offers' => 'Offers',
'Special Price:' => 'Special Price:',
'Regular Price:' => 'Regular Price:',
'Free shipping' => 'Free shipping',
'Orders over $50' => 'Orders over $50',
'Secure payment' => 'Secure payment',
@@ -43,70 +142,19 @@ return array (
'Subscribe' => 'Subscribe',
'Contact Us' => 'Contact Us',
'Copyright' => 'Copyright',
'You are here:' => 'You are here:',
'Show' => 'Show',
'per page' => 'per page',
'Sort By' => 'Sort By',
'Name ascending' => 'Name ascending',
'Name descending' => 'Name descending',
'Price ascending' => 'Price ascending',
'Price descending' => 'Price descending',
'View as' => 'View as',
'View product' => 'View product',
'Pagination' => 'Pagination',
'No products available in this category' => 'No products available in this category',
'Categories' => 'Categories',
'Ref.' => 'Ref.',
'Availability' => 'Availability',
'In stock' => 'In stock',
'Out of stock' => 'Out of stock',
'Add to cart' => 'Add to cart',
'Description' => 'Description',
'Additional Info' => 'Additional Info',
'View cart' => 'View cart',
'Continue Shopping' => 'Continue Shopping',
'Upsell Products' => 'Upsell Products',
'Your Cart' => 'Your Cart',
'Billing and delivery' => 'Billing and delivery',
'Check my order' => 'Check my order',
'Product Name' => 'Product Name',
'Name' => 'Name',
'Unit Price' => 'Unit Price',
'Price' => 'Price',
'Quantity' => 'Quantity',
'Qty' => 'Qty',
'Total' => 'Total',
'Tax Inclusive' => 'Tax Inclusive',
'TTC' => 'TTC',
'Available' => 'Available',
'In Stock' => 'In Stock',
'No.' => 'No.',
'Remove' => 'Remove',
'Proceed checkout' => 'Proceed checkout',
'Warning' => 'Warning',
'missing or invalid data' => 'missing or invalid data',
'Do you have an account?' => 'Do you have an account?',
'Forgot your Password?' => 'Forgot your Password?',
'Next' => 'Next',
'Log out!' => 'Log out!',
'My Account' => 'My Account',
'Previous product' => 'Previous product',
'Next product' => 'Next product',
'instead of' => 'instead of',
'Add a new address' => 'Add a new address',
'You are here:' => 'You are here:',
'Billing and delivery' => 'Billing and delivery',
'Check my order' => 'Check my order',
'Newsletter Subscription' => 'Newsletter Subscription',
'You want to subscribe to the newsletter? Please enter your email address below.' => 'You want to subscribe to the newsletter? Please enter your email address below.',
'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.' => 'Thanks for signing up! We\'ll keep you posted whenever we have any new updates.',
'Choose your delivery address' => 'Choose your delivery address',
'Address %nb' => 'Address %nb',
'Edit this address' => 'Edit this address',
'Edit' => 'Edit',
'Remove this address' => 'Remove this address',
'Cancel' => 'Cancel',
'Choose your delivery method' => 'Choose your delivery method',
'Back' => 'Back',
'Next Step' => 'Next Step',
'Delete address' => 'Delete address',
'Do you really want to delete this address ?' => 'Do you really want to delete this address ?',
'No' => 'No',
'Yes' => 'Yes',
'My order' => 'My order',
'Shipping Tax' => 'Shipping Tax',
'You may have a coupon ?' => 'You may have a coupon ?',
'Code :' => 'Code :',
@@ -122,93 +170,26 @@ return array (
'A summary of your order email has been sent to the following address' => 'A summary of your order email has been sent to the following address',
'Your order will be confirmed by us upon receipt of your payment.' => 'Your order will be confirmed by us upon receipt of your payment.',
'Order number' => 'Order number',
'Date' => 'Date',
'Go home' => 'Go home',
'Account' => 'Account',
'Personal Information' => 'Personal Information',
'Change my account information' => 'Change my account information',
'Change my password' => 'Change my password',
'My Address book' => 'My Address book',
'My Address Books' => 'My Address Books',
'My Orders' => 'My Orders',
'List of orders' => 'List of orders',
'Order Number' => 'Order Number',
'Amount' => 'Amount',
'Status' => 'Status',
'View' => 'View',
'View order %ref as pdf document' => 'View order %ref as pdf document',
'Order details' => 'Order details',
'You don\'t have orders yet.' => 'You don\'t have orders yet.',
'Update Profile' => 'Update Profile',
'Personal Informations' => 'Personal Informations',
'Select Title' => 'Select Title',
'Update' => 'Update',
'Change Password' => 'Change Password',
'Login Information' => 'Login Information',
'Create New Address' => 'Create New Address',
'Address' => 'Address',
'Home address' => 'Home address',
'Complementary address' => 'Complementary address',
'Select Country' => 'Select Country',
'Create' => 'Create',
'Related' => 'Related',
'Grid' => 'Grid',
'List' => 'List',
'Next' => 'Next',
'Previous' => 'Previous',
/*
'The page cannot be found' => 'The page cannot be found',
'What\'s your name?' => 'What\'s your name?',
'So I can get back to you.' => 'So I can get back to you.',
'The subject of your message.' => 'The subject of your message.',
'And your message...' => 'And your message...',
'This email already exists.' => 'This email already exists.',
'Address label' => 'Address label',
'Title' => 'Title',
'First Name' => 'First Name',
'Last Name' => 'Last Name',
'Company Name' => 'Company Name',
'Street Address' => 'Street Address',
'Address Line 2' => 'Address Line 2',
'Address Line 3' => 'Address Line 3',
'City' => 'City',
'Zip code' => 'Zip code',
'Country' => 'Country',
'Phone' => 'Phone',
'Cellphone' => 'Cellphone',
'Make this address as my primary address' => 'Make this address as my primary address',
'Full Name' => 'Full Name',
'Your Email Address' => 'Your Email Address',
'Subject' => 'Subject',
'Your Message' => 'Your Message',
'Please enter your email address' => 'Please enter your email address',
'No, I am a new customer.' => 'No, I am a new customer.',
'Yes, I have a password :' => 'Yes, I have a password :',
'Please enter your password' => 'Please enter your password',
'This value should not be blank.' => 'This value should not be blank.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
'This email does not exists' => 'This email does not exists',
'Current Password' => 'Current Password',
'New Password' => 'New Password',
'Password confirmation' => 'Password confirmation',
'Your current password does not match.' => 'Your current password does not match.',
'Password confirmation is not the same as password field.' => 'Password confirmation is not the same as password field.',
'I would like to receive the newsletter or the latest news.' => 'I would like to receive the newsletter or the latest news.',
*/
'Placeholder firstname' => 'John',
'Placeholder lastname' => 'Doe',
'Placeholder email' => 'johndoe@domain.com',
'Placeholder phone' => '',
'Placeholder cellphone' => '',
'Password' => 'Password',
'Password Forgotten' => 'Password Forgotten',
'Please enter your email address below.' => 'Please enter your email address below.',
'You will receive a link to reset your password.' => 'You will receive a link to reset your password.',
'Ref.' => 'Ref.',
'Availability' => 'Availability',
'In stock' => 'In stock',
'Out of stock' => 'Out of stock',
'Description' => 'Description',
'Additional Info' => 'Additional Info',
'Previous product' => 'Previous product',
'Next product' => 'Next product',
'Create New Account' => 'Create New Account',
'Delivery Informations' => 'Delivery Informations',
'Placeholder company' => 'Google',
'Placeholder address1' => '76 Ninth Avenue',
'Placeholder address2' => '',
'Placeholder city' => 'New York',
'Placeholder zipcode' => 'NY 10011',
'Placeholder address label' => 'Home, Work office, other',
'Placeholder contact name' => 'What\'s your name?',
'Placeholder contact email' => 'So I can get back to you.',
'Placeholder contact subject' => 'The subject of your message.',
'Placeholder contact message' => 'And your message...',
)
;
'Sign in' => 'Sign in',
'Search Result for' => 'Search Result for',
'No results found' => 'No results found',
'View all' => 'View all',
'products' => 'products',
'offers' => 'offers',
);