Due to a patch (don't know what patch), the welcome page (no nodes are present) is not translateable anymore becasue it's not included in the translation template. Someone split up the string into three parts where the middle part is inserted conditionally. Obviously, this doesn't work as extractor.php doesn't recognize that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ChrisKennedy’s picture

Status: Active » Needs review
FileSize
5.55 KB

Confirmed, this was due to http://drupal.org/node/60358

The attached patch breaks the section into smaller strings that are individually translated, taking html markup out where possible while still providing context to the translators. I confirmed that it doesn't break the English version, but let me know if it is actually good for translators & extractor.php.

kkaefer’s picture

Status: Needs review » Reviewed & tested by the community

Seems good to me. Solves the problem. Small parts are also easier to translate.

The patch that broke this is not #60358. This patch only introduced the new frontpage which was a single translateable string at that time. A later patch split out the first list item which is since included conditionally.

ChrisKennedy’s picture

Ah good call, http://drupal.org/node/93289 was the problem and was much more recently committed. I didn't check the previous issue well enough apparently.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Sorry guys, this was my fault. :(

However, I was told that we should be leaving the

    and
  1. s together, because it adds additional context to the string being translated. But in any case, we can't go changing strings around anymore because we're past RC1 and translation has begun. Therefore, I'd just stick the middle part in a t() so that it can be translated and leave it at that.
webchick’s picture

Bah. That should read "ols" and "lis"

ChrisKennedy’s picture

In this case we can actually strings around as much as want. It doesn't regress any previous translation work because this string wasn't available for translation in the first place. I don't see the benefit to including the <li>'s in the translation, but I'm not a translator so if that's helpful I guess they should be in there.

I do think that breaking up the string is better though -> it makes it less volatile for translations and is easier to debug with all the @variables. You could also re-order it if you wanted to.

ChrisKennedy’s picture

Blegh. "In this case we can actually strings around as much as want." -> "In this case we can actually move strings around as much as we want."

webchick’s picture

No, the rest of the message was translatable before. So it's conceivable I have already translated the precise string:

        <li>
          <strong>Configure your website</strong>
          Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.
        </li>
        <li>
          <strong>Enable additional functionality</strong>
          Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.
        </li>
        <li>
          <strong>Customize your website design</strong>
          To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.
        </li>
        <li>
          <strong>Start posting content</strong>
          Finally, you can <a href="@content">create content</a> for your website. This message will disappear once you have published your first post.
        </li>
      </ol>
      <p>For more information, please refer to the <a href="@help">help section</a>, or the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a>, or view the wide range of <a href="@support">other support options</a> available.</p>

Changing that to instead 5 strings like:

<strong>Start posting content</strong> Finally, you can <a href="@content">create content</a> for your website. This message will disappear once you have published your first post.

and:

<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.

and so on, you will break the translations.

ChrisKennedy’s picture

That's true if you began translating node.module before November 26th (during beta2), but it isn't related to the string freeze. The string freeze didn't begin until December 15th, at which point that section of node.module would not have been available to extractor.module.

webchick’s picture

Status: Needs work » Needs review

Ohhh, wait. I might be wrong because of the conditional part.

In that case, I'll mark it back for review, pending someone working on translations to tell the proper way to solve this.

kkaefer’s picture

Webchick, currently the string is not included in the translation templates. Not even parts of it. ChrisKennedy's solution is preferable IMO (I'm a translator and prefer translating smaller parts instead of huge strings with lots of markup inside).

ChrisKennedy’s picture

One discussion is whether the <li>'s should be included in the translated strings. A point brought up by webchick (hopefully I paraphrase appropriately) in #drupal is that http://drupal.org/node/26139 suggests that we should include them in the strings. My own non-translator thought is that the <li> tags don't help the translators, considering that they don't know what specific number/order they will be, and they would be better abstracted to allow flexibility in markup and ordering.

So, my initial thought it that translators don't need to the <li> hints - but if they are helpful I am fine with keeping them in the translatable strings.

webchick’s picture

Status: Needs review » Reviewed & tested by the community

Yeah, in thinking this over more I think that's fine... the deal with the help text was that the actual entire "train of thought" was "You can: (something in the list of links)" so the big lump of text was needed in order to express the complete sentence.

Setting back to RTBC. Sorry for the de-railing. ;)

drumm’s picture

Status: Reviewed & tested by the community » Needs work

Code style- there should be no space between . and quotes.

kkaefer’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
5.54 KB

Same patch without the whitespace.

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)