WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • New Russian translation
  • Print
Pages: [1]   Go Down

Author Topic: New Russian translation  (Read 4734 times)

Offline Klimentiy

  • Posts: 12
New Russian translation
« on: January 22, 2016, 12:06:12 AM »
Hello!
I have completed the translation in Russian.

Fixed check Russian characters in the file save_form.php

Code: [Select]
// Check the textfields
foreach ($_POST as $field => $value) {
if ($field != 'pay_methods') {
$field  = strip_tags($field);
$value  = strip_tags($value);

if (strpos($field, 'company') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ0-9'.$add_chars.' +&-]{0,50}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_NAME'];
}
}

if (strpos($field, 'first_name') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ'.$add_chars.'. -]{1,50}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_NAME'];
}
}

if (strpos($field, 'last_name') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ'.$add_chars.' \'-]{1,50}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_NAME'];
}
}

if (strpos($field, 'cust_tax_no') !== false &&
strpos($setting_tax_group, $setting_shop_country) !== false) {
include('check_vat.php');
$value = trim($value);
if (!check_vat($value, $setting_tax_group)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_CUST_TAX_NO'];
}
}

if (strpos($field, 'street') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ0-9.'.$add_chars.', -]{1,50}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_STREET'];
}
}

if (strpos($field, 'city') !== false) {
if (!preg_match('#[а-яёА-Яa-zA-ZЁ.'.$add_chars.' -]{1,50}#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_CITY'];
}
}

if (strpos($field, 'state') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ0-9.'.$add_chars.' -]{1,50}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_STATE'];
}
}

if (strpos($field, 'country') !== false) {
if (!preg_match('#^[а-яёА-Яa-zA-ZЁ]{2}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_COUNTRY'];
}
}

if (strpos($field, 'email') !== false) {
if (!preg_match('#^.+@.+\..+$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_EMAIL'];
}
}

if (strpos($field, 'zip') !== false) {
if (!preg_match('#^[A-Za-z0-9 -]{4,10}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_ZIP'];
}
}

if (strpos($field, 'phone') !== false) {
if (!preg_match('#^[0-9)(xX +.-/]{7,20}$#', $value)) {
$error_bg[] = $field;
$errors[]   = htmlspecialchars($value, ENT_QUOTES).' '.$MOD_BAKERY['ERR_INVAL_PHONE'];
}
}

$$field = strip_tags(trim($value));
}
}
Logged

freeSbee

  • Guest
Re: New Russian translation
« Reply #1 on: January 22, 2016, 03:38:37 PM »
Hi Klimentiy

Thanks a lot for translating Bakery! I will include your language file in the next release.

Regards Christoph
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • New Russian translation
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2