fix(wpmc 1.0.1): remove __() from labels (no translations, fixes WP 6.7 notice)
Replace all __('...', 'wp-multi-city') calls in CPT, taxonomy, ACF field group,
and options page label arrays with literal Russian strings. The plugin ships no
.mo translation files, so wrapping labels in __() was YAGNI and triggered the
WP 6.7+ _load_textdomain_just_in_time notice.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -25,15 +25,15 @@ final class FieldGroup
|
||||
'fields' => [
|
||||
[
|
||||
'key' => self::REPEATER_KEY,
|
||||
'label' => __('Подстановки по городам', 'wp-multi-city'),
|
||||
'label' => 'Подстановки по городам',
|
||||
'name' => 'list_shortcode',
|
||||
'type' => 'repeater',
|
||||
'layout' => 'table',
|
||||
'button_label' => __('Добавить город', 'wp-multi-city'),
|
||||
'button_label' => 'Добавить город',
|
||||
'sub_fields' => [
|
||||
[
|
||||
'key' => 'field_wpmc_list_shortcode_town',
|
||||
'label' => __('Город', 'wp-multi-city'),
|
||||
'label' => 'Город',
|
||||
'name' => 'town',
|
||||
'type' => 'taxonomy',
|
||||
'taxonomy' => 'town',
|
||||
@@ -45,7 +45,7 @@ final class FieldGroup
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_list_shortcode_text',
|
||||
'label' => __('Значение', 'wp-multi-city'),
|
||||
'label' => 'Значение',
|
||||
'name' => 'text',
|
||||
'type' => 'textarea',
|
||||
'rows' => 4,
|
||||
|
||||
@@ -35,7 +35,7 @@ final class OptionsPage
|
||||
'fields' => [
|
||||
[
|
||||
'key' => 'field_wpmc_main_town_slug',
|
||||
'label' => __('Главный город (без префикса URL)', 'wp-multi-city'),
|
||||
'label' => 'Главный город (без префикса URL)',
|
||||
'name' => 'main_town_slug',
|
||||
'type' => 'taxonomy',
|
||||
'taxonomy' => 'town',
|
||||
@@ -47,7 +47,7 @@ final class OptionsPage
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_index_town_alt',
|
||||
'label' => __('Главная для других городов', 'wp-multi-city'),
|
||||
'label' => 'Главная для других городов',
|
||||
'name' => 'index_town_alt',
|
||||
'type' => 'post_object',
|
||||
'post_type' => ['page'],
|
||||
@@ -57,15 +57,15 @@ final class OptionsPage
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_page_unic',
|
||||
'label' => __('Клоны страниц', 'wp-multi-city'),
|
||||
'label' => 'Клоны страниц',
|
||||
'name' => 'page_unic',
|
||||
'type' => 'repeater',
|
||||
'layout' => 'table',
|
||||
'button_label' => __('Добавить клон', 'wp-multi-city'),
|
||||
'button_label' => 'Добавить клон',
|
||||
'sub_fields' => [
|
||||
[
|
||||
'key' => 'field_wpmc_page_unic_page_old',
|
||||
'label' => __('Оригинал', 'wp-multi-city'),
|
||||
'label' => 'Оригинал',
|
||||
'name' => 'page_old',
|
||||
'type' => 'post_object',
|
||||
'post_type' => ['page'],
|
||||
@@ -75,7 +75,7 @@ final class OptionsPage
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_page_unic_page_new',
|
||||
'label' => __('Клон', 'wp-multi-city'),
|
||||
'label' => 'Клон',
|
||||
'name' => 'page_new',
|
||||
'type' => 'post_object',
|
||||
'post_type' => ['page'],
|
||||
@@ -85,7 +85,7 @@ final class OptionsPage
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_page_unic_town',
|
||||
'label' => __('Город', 'wp-multi-city'),
|
||||
'label' => 'Город',
|
||||
'name' => 'town',
|
||||
'type' => 'taxonomy',
|
||||
'taxonomy' => 'town',
|
||||
@@ -99,18 +99,18 @@ final class OptionsPage
|
||||
],
|
||||
[
|
||||
'key' => 'field_wpmc_page_no_rep',
|
||||
'label' => __('Исключения из роутинга', 'wp-multi-city'),
|
||||
'label' => 'Исключения из роутинга',
|
||||
'name' => 'page_no_rep',
|
||||
'type' => 'repeater',
|
||||
'layout' => 'table',
|
||||
'button_label' => __('Добавить исключение', 'wp-multi-city'),
|
||||
'button_label' => 'Добавить исключение',
|
||||
'sub_fields' => [
|
||||
[
|
||||
'key' => 'field_wpmc_page_no_rep_link',
|
||||
'label' => __('Путь', 'wp-multi-city'),
|
||||
'label' => 'Путь',
|
||||
'name' => 'link',
|
||||
'type' => 'text',
|
||||
'instructions' => __('Префикс URL, например /privacy/', 'wp-multi-city'),
|
||||
'instructions' => 'Префикс URL, например /privacy/',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
@@ -16,16 +16,16 @@ final class PostType
|
||||
{
|
||||
register_post_type(self::SLUG, [
|
||||
'labels' => [
|
||||
'name' => __('Шорткоды', 'wp-multi-city'),
|
||||
'singular_name' => __('Шорткод', 'wp-multi-city'),
|
||||
'menu_name' => __('Шорткоды', 'wp-multi-city'),
|
||||
'add_new' => __('Добавить', 'wp-multi-city'),
|
||||
'add_new_item' => __('Добавить шорткод', 'wp-multi-city'),
|
||||
'edit_item' => __('Редактировать', 'wp-multi-city'),
|
||||
'new_item' => __('Новый', 'wp-multi-city'),
|
||||
'view_item' => __('Смотреть', 'wp-multi-city'),
|
||||
'search_items' => __('Поиск', 'wp-multi-city'),
|
||||
'not_found' => __('Не найдено', 'wp-multi-city'),
|
||||
'name' => 'Шорткоды',
|
||||
'singular_name' => 'Шорткод',
|
||||
'menu_name' => 'Шорткоды',
|
||||
'add_new' => 'Добавить',
|
||||
'add_new_item' => 'Добавить шорткод',
|
||||
'edit_item' => 'Редактировать',
|
||||
'new_item' => 'Новый',
|
||||
'view_item' => 'Смотреть',
|
||||
'search_items' => 'Поиск',
|
||||
'not_found' => 'Не найдено',
|
||||
],
|
||||
'public' => false,
|
||||
'exclude_from_search' => true,
|
||||
|
||||
@@ -16,10 +16,10 @@ final class Taxonomy
|
||||
{
|
||||
register_taxonomy(self::SLUG, [PostType::SLUG], [
|
||||
'labels' => [
|
||||
'name' => __('Города', 'wp-multi-city'),
|
||||
'singular_name' => __('Город', 'wp-multi-city'),
|
||||
'menu_name' => __('Города', 'wp-multi-city'),
|
||||
'add_new_item' => __('Добавить', 'wp-multi-city'),
|
||||
'name' => 'Города',
|
||||
'singular_name' => 'Город',
|
||||
'menu_name' => 'Города',
|
||||
'add_new_item' => 'Добавить',
|
||||
],
|
||||
'public' => false,
|
||||
'publicly_queryable' => false,
|
||||
|
||||
Reference in New Issue
Block a user