Task 6811 | добавлены строковые переводы в профиль

pull/36/head
parent dc3b95de9e
commit eb4a95e533
  1. 157
      wp-content/themes/cosmopet/global-functions/multilang-functions.php
  2. 8
      wp-content/themes/cosmopet/modules/blog/module-controller.php

@ -1554,4 +1554,161 @@ add_action('init', function () {
pll_register_string('На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'Theme'); pll_register_string('На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'На ваш e-mail <span id="email_current"></span> придет письмо, как только продукт появится в наличии.', 'Theme');
pll_register_string('Продолжить покупки', 'Продолжить покупки', 'Theme'); pll_register_string('Продолжить покупки', 'Продолжить покупки', 'Theme');
pll_register_string('Your cart is empty', 'Your cart is empty', 'Cart'); pll_register_string('Your cart is empty', 'Your cart is empty', 'Cart');
pll_register_string('Feed subscription', 'Feed subscription', 'Profile');
pll_register_string('Weekly food delivery for your pet', 'Weekly food delivery for your pet', 'Profile');
pll_register_string('Get details', 'Get details', 'Profile');
pll_register_string('Name is not set', 'Name is not set', 'Profile');
pll_register_string('Not filled', 'Not filled', 'Profile');
pll_register_string('Email is verified', 'Email is verified', 'Profile');
pll_register_string('Email is not verified', 'Email is not verified', 'Profile');
pll_register_string('Verify', 'Verify', 'Theme');
pll_register_string('Email with verification link is sent to your email.', 'Email with verification link is sent to your email.', 'Profile');
pll_register_string('example@example.com', 'example@example.com', 'Profile');
pll_register_string('Link email', 'Link email', 'Profile');
pll_register_string('Linked accounts', 'Linked accounts', 'Profile');
pll_register_string('Edit', 'Edit', 'Profile');
pll_register_string('Logout', 'Logout', 'Profile');
pll_register_string('Add a pet', 'Add a pet', 'Profile');
pll_register_string('Phone', 'Phone', 'Profile');
pll_register_string('Email', 'Email', 'Profile');
pll_register_string('Order from', 'Order from', 'Profile');
pll_register_string('Summary', 'Summary', 'Profile');
pll_register_string('Delivery address', 'Delivery address', 'Profile');
pll_register_string('CDEK shipping point', 'CDEK shipping point', 'Profile');
pll_register_string('Track order', 'Track order', 'Profile');
pll_register_string('Order details', 'Order details', 'Profile');
pll_register_string('No orders yet', 'No orders yet', 'Profile');
pll_register_string('Catalog', 'Catalog', 'Profile');
pll_register_string('Subscription №', 'Подписка №', 'Profile');
pll_register_string('Status', 'Статус', 'Profile');
pll_register_string('Subscription date', 'Дата подписки', 'Profile');
pll_register_string('Last order date', 'Дата последнего заказа', 'Profile');
pll_register_string('Next payment', 'Следующий платеж', 'Profile');
pll_register_string('Payment method', 'Способ оплаты', 'Profile');
pll_register_string('Products:', 'Товары:', 'Profile');
pll_register_string('Total', 'Сумма', 'Profile');
pll_register_string('month', 'месяц', 'Profile');
pll_register_string('Delivery', 'Доставка', 'Profile');
pll_register_string('Free', 'Бесплатно', 'Profile');
pll_register_string('Amount', 'Итого', 'Profile');
pll_register_string('Shipping:', 'Доставка:', 'Profile');
pll_register_string('Delivery address', 'Адрес доставки', 'Profile');
pll_register_string('Start typing address', 'Начните вводить адрес', 'Profile');
pll_register_string('Invalid address entered', 'Адрес введен неверно', 'Profile');
pll_register_string('Delivery comment', 'Комментарий для доставки', 'Profile');
pll_register_string('For delivery service', 'Для службы доставки', 'Profile');
pll_register_string('Invalid comment entered', 'Комментарий введен неверно', 'Profile');
pll_register_string('Save', 'Сохранить', 'Profile');
pll_register_string('Cancel subscription', 'Отменить подписку', 'Profile');
pll_register_string('Subscription not found.', 'Подписка не найдена.', 'Profile');
pll_register_string('Subscription from', 'Подписка от', 'Profile');
pll_register_string('Amount:', 'Сумма:', 'Profile');
pll_register_string('Next payment:', 'Следующий платеж:', 'Profile');
pll_register_string('Subscription details', 'Детали подписки', 'Profile');
pll_register_string('Details not available', 'Детали недоступны', 'Profile');
pll_register_string('You have no active subscriptions.', 'У вас нет активных подписок.', 'Profile');
pll_register_string('Add a pet', 'Добавить питомца', 'Profile');
pll_register_string('Animal type', 'Вид животного', 'Profile');
pll_register_string('Cat', 'Кошка', 'Profile');
pll_register_string('Dog', 'Собака', 'Profile');
pll_register_string('Sterilized', 'Стерелизован', 'Profile');
pll_register_string('Yes', 'Да', 'Profile');
pll_register_string('No', 'Нет', 'Profile');
pll_register_string('Name', 'Имя', 'Profile');
pll_register_string('Pet name', 'Имя питомца', 'Profile');
pll_register_string('Breed', 'Порода', 'Profile');
pll_register_string('Your pet breed', 'Порода вашего питомца', 'Profile');
pll_register_string('Your pet gender', 'Пол вашего питомца', 'Profile');
pll_register_string('Boy', 'Мальчик', 'Profile');
pll_register_string('Girl', 'Девочка', 'Profile');
pll_register_string('Activity level', 'Вид активности', 'Profile');
pll_register_string('Select from list', 'Выберите из списка', 'Profile');
pll_register_string('Low', 'Низкая', 'Profile');
pll_register_string('Medium', 'Средняя', 'Profile');
pll_register_string('High', 'Высокая', 'Profile');
pll_register_string('Weight', 'Вес', 'Profile');
pll_register_string('Pet age', 'Возраст питомца', 'Profile');
pll_register_string('Approximate', 'Примерный', 'Profile');
pll_register_string('Exact', 'Точный', 'Profile');
pll_register_string('Kitten', 'Малыш', 'Profile');
pll_register_string('(from 0 to 1 year)', '(от 0 до 1 года)', 'Profile');
pll_register_string('Adult', 'Взрослый', 'Profile');
pll_register_string('(from 1 to 7 years)', '(от 1 года до 7 лет)', 'Profile');
pll_register_string('Senior', 'Пожилой', 'Profile');
pll_register_string('(from 7 to 12 years)', '(от 7 до 12 лет)', 'Profile');
pll_register_string('Aging', 'Стареющий', 'Profile');
pll_register_string('(from 12 years and up)', '(от 12 лет и старше)', 'Profile');
pll_register_string('Day', 'День', 'Profile');
pll_register_string('DD', 'ДД', 'Profile');
pll_register_string('Month', 'Месяц', 'Profile');
pll_register_string('Year', 'Год', 'Profile');
pll_register_string('YYYY', 'ГГГГ', 'Profile');
pll_register_string('Add', 'Добавить', 'Profile');
pll_register_string('Feed subscription', 'Feed subscription', 'Profile');
pll_register_string('Weekly food delivery for your pet', 'Weekly food delivery for your pet', 'Profile');
pll_register_string('Get details', 'Get details', 'Profile');
pll_register_string('Order from', 'Order from', 'Profile');
pll_register_string('Summary', 'Summary', 'Profile');
pll_register_string('Delivery address', 'Delivery address', 'Profile');
pll_register_string('CDEK shipping point', 'CDEK shipping point', 'Profile');
pll_register_string('Track order', 'Track order', 'Profile');
pll_register_string('Order details', 'Order details', 'Profile');
pll_register_string('No orders yet', 'No orders yet', 'Profile');
pll_register_string('Catalog', 'Catalog', 'Profile');
pll_register_string('Subscription for food', 'Подписка на корм', 'Profile');
pll_register_string('I want to try first!', 'Хочу попробовать первым!', 'Profile');
pll_register_string('I want to be first!', 'Хочу быть первым!', 'Profile');
pll_register_string('Edit my data', 'Изменить мои данные', 'Profile');
pll_register_string('First name', 'Имя', 'Profile');
pll_register_string('Your name', 'Ваше имя', 'Profile');
pll_register_string('First name is invalid', 'Имя введено неверно', 'Profile');
pll_register_string('Last name', 'Фамилия', 'Profile');
pll_register_string('Your last name', 'Ваша фамилия', 'Profile');
pll_register_string('Last name is invalid', 'Фамилия введена неверно', 'Profile');
pll_register_string('Phone', 'Телефон', 'Profile');
pll_register_string('Phone is invalid', 'Номер введён неверно', 'Profile');
pll_register_string('Save', 'Сохранить', 'Profile');
pll_register_string('Cancel', 'Отмена', 'Profile');
pll_register_string('Breed', 'Breed', 'Profile');
pll_register_string('Weight', 'Weight', 'Profile');
pll_register_string('from 0,5 kg to 1,5 kg', 'from 0,5 kg to 1,5 kg', 'Profile');
pll_register_string('from 1.5 to 3 kg', 'from 1.5 to 3 kg', 'Profile');
pll_register_string('from 3 to 5 kg', 'from 3 to 5 kg', 'Profile');
pll_register_string('from 5 to 8 kg', 'from 5 to 8 kg', 'Profile');
pll_register_string('from 8 to 11 kg', 'from 8 to 11 kg', 'Profile');
pll_register_string('from 11 to 15 kg', 'from 11 to 15 kg', 'Profile');
pll_register_string('from 15 to 20 kg', 'from 15 to 20 kg', 'Profile');
pll_register_string('from 20 to 25 kg', 'from 20 to 25 kg', 'Profile');
pll_register_string('from 25 to 35 kg', 'from 25 to 35 kg', 'Profile');
pll_register_string('More than 35 kg', 'More than 35 kg', 'Profile');
pll_register_string('Age', 'Age', 'Profile');
pll_register_string('Adult (from 1 year to 7 years)', 'Adult (from 1 year to 7 years)', 'Profile');
pll_register_string('Elderly (from 7 to 12 years)', 'Elderly (from 7 to 12 years)', 'Profile');
pll_register_string('Aging (12 years and older)', 'Aging (12 years and older)', 'Profile');
pll_register_string('Baby (from 0 to 1 year)', 'Baby (from 0 to 1 year)', 'Profile');
pll_register_string('Birthday', 'Birthday', 'Profile');
pll_register_string('Activity', 'Activity', 'Profile');
pll_register_string('Low', 'Low', 'Profile');
pll_register_string('Moderate', 'Moderate', 'Profile');
pll_register_string('High', 'High', 'Profile');
pll_register_string('Sterilized', 'Sterilized', 'Profile');
pll_register_string('Edit', 'Edit', 'Profile');
}); });

@ -14,19 +14,19 @@ class BlogPost extends \Timber\Post
} }
public function get_author_name() public function get_author_name()
{ {
if (get_field('post_author', $this->ID)){ if (get_field('post_author_name', $this->ID)){
return get_the_title(get_field('post_author', $this->ID)); return get_the_title(get_field('post_author_name', $this->ID));
} }
return false; return false;
} }
public function get_author_img() public function get_author_img()
{ {
$id = get_field('post_author', $this->ID); $id = get_field('post_author_name', $this->ID);
return get_the_post_thumbnail_url( $id, 'thumbnail' ); return get_the_post_thumbnail_url( $id, 'thumbnail' );
} }
public function get_author_link() public function get_author_link()
{ {
$id = get_field('post_author', $this->ID); $id = get_field('post_author_name', $this->ID);
if ($id) { if ($id) {
return get_permalink($id); return get_permalink($id);
} }

Loading…
Cancel
Save