Почему «Локо» не распознает эти струны?Php

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Почему «Локо» не распознает эти струны?

Сообщение Anonymous »

У меня есть динамический текст, который Loco Translate не распознает. Я сам добавил текст в файл плагина, скачанный из репозитория WordPress. Я провел несколько различных тестов; Для краткости я приведу здесь только два.
Это первый, который я попробовал:

Код: Выделить всё

// We rendered the requested dynamic title.

echo '';
echo sprintf(
/* translators: 1: cantidad de productos, 2: lista de alérgenos */
/* translators: %$s: Number of products found */
_n(
'This is the %1$s product without %2$s',
'These are the %1$s products without %2$s',
$count,
'product-search-for-woocommerce'
),
'[b]' . (int) $count . '[/b]',
'' . esc_html($list_text) . ''
);
echo '';
echo '';
Он не распознает этот

Код: Выделить всё

 // 1. We prepared the text to be translated in isolation so that Loco could see it clearly.

$texto_singular = 'This is the %1$s product without %2$s';

$texto_plural = 'These are the %1$s products without %2$s';

// 2. We obtain the translation (using the $count variable for the plural)

$mensaje_traducido = _n( $texto_singular, $texto_plural, (int) $count, 'product-search-for-woocommerce' );

// 3. We render safely

echo '';

echo sprintf(

$mensaje_traducido,

'[b]' . (int) $count . '[/b]',

'' . esc_html( $list_text ) . ''

);

echo '';
Он тоже не распознает этот.
Что я делаю не так?

Подробнее здесь: https://stackoverflow.com/questions/798 ... se-strings
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»