Hi bengtan,

I want to provide an german translation and thereby give something back. Thanks again for your amazingly helpul module.

Using the template extractor brought up the following


    * Invalid menu 'title' definition found in composite_menu(). Title and description keys of the menu array should be literal strings. In composite.module on line 200. Read more at http://drupal.org/node/323101
    * Invalid menu 'title' definition found in composite_menu(). Title and description keys of the menu array should be literal strings. In composite.module on line 212. Read more at http://drupal.org/node/323101

Could you fix this and create a dev release so that I can extract a propper translation template?

Comments

bengtan’s picture

Status: Active » Fixed

Hi,

Those two menu title typo's are fixed and committed. The patch file is:

http://drupalcode.org/viewvc/drupal/contributions/modules/composite/comp...

and the -dev release should be available shortly.

Thank you.

dddave’s picture

Thx! I am going to work on it after the week end.

btw: Those hideous spelling errors in my opening post are related to the late hours and my german is much better. ;)

dddave’s picture

Status: Fixed » Needs review
StatusFileSize
new14.55 KB

Here it comes. Some testing by other native speakers before inclusion would be nice but I think I got it pretty well.

Note:

During import of the .po file for testing both translations of the strings and were skipped due to "invalid html". Any suggestions?

bengtan’s picture

Hi,

I downloaded your file and renamed it into a subdirectory translations ie. .../composite/translations/de.po and then used the Locale module to enabled German (using the page .../admin/settings/language/add).

Drupal then automatically imported the translations for any modules it could find, including your translation file.

I didn't get any 'invalid html' messages and everything seemed to work fine.

So, I don't really know about the 'invalid html' message, but am willing to investigate further if you can tell me how you can reproduce it.

Also, I haven't used the D6.x multilingual features before so I might have done something wrong or differently from you?

dddave’s picture

Oddly I did not notice that the two strings were stripped out in my post above. <hidden> and <none> are the problematic strings. Maybe there isn't a problem when Drupal imports them automatically. I imported them via i18n's import function and both strings were skipped. Normally Drupal should handle the import automatically when your module is enabled so I guess it won't be a problem. However both strings are pretty much selfexplanatory even to people with very little english skills. So even if both strings are skipped that shouldn't be a big problem.

bengtan’s picture


Hmm ... actually, your attachment from comment #3 does include translations for <none> and <hidden>:

#: composite.pages.inc:147
#: composite.module:402
msgid "<none>"
msgstr "<keines>"

#: modules/content/composite_cck.module:157
msgid "<Hidden>"
msgstr "<Verborgen>"

So, I'm still a bit confused here.

Just a thought, could it be your translations editor (if you are using one) which is choking on <none> and <hidden> by thinking they are html tags? 
bengtan’s picture

StatusFileSize
new14.61 KB

On a separate matter, a colleague/acquaintance of mine who runs a German website with ProsePoint/Drupal had a look at your translations, and came back with some changes which I have attached.

Please have a look at it and pick the changes you'd like. If you could post back a merged version of the two, that would be very helpful.

(Unfortunately, since I don't know German, that's all I can do :)

Thank you.

dddave’s picture

I am using poedit which should be fine with such things. Don't know where Drupal filters come into play during manual import...

Apart from some good catches of typos and such the second translation makes one basic decision and therefore differs from mine. As a general rule German translations should avoid direct addressing by translating "you..." constructions with "Sie...". Instead we should use passive constructions (reference: http://code.google.com/p/drupal-de/wiki/Hinweise ). I think the reason for this is that the english "you" can be translated into the formal "Sie" or the informal "Du". This is a decision the module (to be more precise: the translator) should not make for the individual user. For Drupal core exist to different translations, one formal and the other informal. So using "Sie" kind of conflicts with users of the informal version.

However passive constructions tend to sound cheesy, clumsy or technical and when they cannot be used the "Sie"-translation is recommended. I am going to think about it and upload a modified .po file.

bengtan’s picture

A post in two parts:

Part A

> Don't know where Drupal filters come into play during manual import...

I looked deeper. It turns out that if you manually do an import of a po file (at .../admin/build/translate/import), Drupal checks the translations through locale_string_is_safe() which disallows unknown HTML tags (See http://drupal.org/node/353908#comment-1233548 for an example). Hence the strings <keines> and <Verborgen> are being caught and skipped over.

It seems that an automatic importation of module translations doesn't do this check.

To complicate matters, popular modules such as Views and CCK also provide translations such as <Keine>. Manually importing translation files from those modules also triggers the message '... translation strings were skipped because they contain disallowed HTML.'

What is the solution? Depends on the Drupal policy. However, I don't know what it is (if there is a policy to cover this case), so we'll have to ask a Drupal core maintainer to find out.

For now, however, I'd suggest we leave the translations <keines> and <Verborgen> in the .po file just like Views and CCK does.

Part B:

> the second translation makes one basic decision and therefore differs from mine.

This is outside my experience and I'm happy to defer to you. So if you pick out the updates you think are appropriate and merge them into your original po file, I'll incorporate them into the module.

(Maybe look at how CCK and Views does this for German, if you have time?).

bengtan’s picture

Posted an issue to the drupal queue for some clarification. See #703142: Policy for translating strings such as <none>?

dddave’s picture

StatusFileSize
new14.6 KB

Sorry for the delay. I corrected some spelling errors, left in all the good catches but decided to change one of the new formulations back to a passive construction. This should be good to go.

bengtan’s picture

Status: Needs review » Fixed

Committed to cvs (http://drupal.org/cvs?commit=335838) and will be incorporated into the next release, whenever that is.

Let me know if you need a -dev snapshot otherwise I'll presume you're happy patching your own site.

Thank you.

dddave’s picture

Glad I could help. Enjoy your module on a daily basis.

No need for a dev at least from my perspective.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.