Characters left: -text, residing in the JS of this module can't be translated.
A big nono if everything on site is translated, except for that:)

To fix this, I suggest the text be sent as setting wrapped in t() instead, something like..

drupal_add_js(array('maxlength' => array('infoText' => t('Characters left:))), array('type' => 'setting'));

And in js do something like..

counterText: Drupal.settings.maxlength.infoText + '@remaining',

Thankyou! :)

Comments

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

You probably have some problems with the js translation feature of drupal. This feature allows you to translate any kind of strinsg to drupal. This is used in the maxlength.js file, so you might check admin/report/status

farald’s picture

Category: bug » support

Oh, well, Ive learned something new today, how JS actually handles t().
You are perfectly right.

Though I cannot understand why this string won't show up in the translate string interface. There have been no problems with any other translations. Its is a big site in production, with only one untranslated string, so this is somewhat weird.

All statuses are OK, no problems reported.

farald’s picture

Seems like the first text is untranslatable, but the second text works.

First string doesn't go into locale, even when using console.log().

dawehner’s picture

This is the actual text:

      counterText: Drupal.t('Content limited to @limit characters, remaining: <strong>@remaining</strong>'),
cedewey’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (works as designed)

We are only maintaining the Drupal 7 version of the module for critical security fixes, so I'm marking this Closed (works as designed). Thank you everyone for working on this issue. If you do want to maintain the Drupal 7 version, do reach out. We'd be happy to bring you on board as a maintainer.

I also encourage you, if you haven't already, to upgrade your site to Drupal 8/9. We are actively maintaining that version and you would enjoy all of the other features of the latest version of Drupal.