Hey there,

I tried to translate everything in the mysite module but it seems that some text is maybe not in t() strings?? here are the strings that drupal cannot seem to find and that are not available in the .po files either.

Left région

Right region

back next

configure item

remove item

move item up

move item down

Thanks for any help on this issue,
Alexis

CommentFileSizeAuthor
#8 cre.txt6.79 KBpatchak
#6 string.patch5.98 KBagentrickard

Comments

agentrickard’s picture

I haven't distributed PO files in over 6 months and don't intend to. Also, current release is 5.x.2.15.

Can you tell me where these strings occur?

patchak’s picture

Yeah sorry about the release version in the issue, I'm indeed using the latest version. These strings are little tooltips that appear when you "hover" over the icons to position content on the page. Also, there are the links on the pager that do not seem to be 'translatable'...

Thanks,
Alexis

agentrickard’s picture

Found 'em. These are in theme_ functions in the bottom of mysite.module.

I don't suppose you can roll a patch against 5.x.2.15 for these?

patchak’s picture

Humm well I would but I never did a patch. What would I need to do? Just add the strings into T()'s ??

agentrickard’s picture

agentrickard’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new5.98 KB

OK, I fixed a handful of strings in the theme functions. The 'left' region strings are coming from the Layout files.

Issue for translators: the 'left' 'right' portion of the string is in the layout file. The 'region' portion was in mysite.module, so I fixed that, too.

Attached patch has been applied to 5-2 and HEAD branches.

agentrickard’s picture

Version: 5.x-2.9 » 5.x-2.15
Category: support » bug

Please let me know if I missed anything.

patchak’s picture

StatusFileSize
new6.79 KB

weird issue here after patching the mysite module...

It seems I have problems with a plugin for the CRE module I'm using on my test install... I tried to translate some things directly in the plugin, so maybe that's why it created an issue?

I attached the plugin to this message so you can see if there is something wrong with it related to the changes you just made.

agentrickard’s picture

They shouldn't be related. All I did was add some t() wrappers.

Check the cre include against Drupal's code style standards. It could be (though I doubt it) a problem related to the final ?>, which is not required.

patchak’s picture

Yes you are right this is not related to this issue, I can't add any content on that install, so it's another issue I have to figure out what went wrong when uploading the plugins....

patchak’s picture

Hey there, just a question:

How could I just remove the work region from the module in the 'content' section? Cause now the 'right region' string is actually separated in two strings. 'right' and 'region'.

The problem is that in french you cannot just say 'droite' and 'région', that does not make sense. I would have to change the whole string to something différent like 'région de droite' or something similar. Or I could just remove the 'region' part of that string. Where could I do that?

Thanks,
Patchak

agentrickard’s picture

The patch above should fix this issue. These changes, specifically:

-          $output .= '<h5 class="mysite-divider">'. $layout['regions'][$key] .' '. t('region') .'</h5>';
+          $output .= '<h5 class="mysite-divider">'. t('!name region', array('!name' => $layout['regions'][$key])) .'</h5>';

This puts 'right region' into one translation string. Does this not solve the problem?

patchak’s picture

well not really because in french you cannot say "droite région" it's just not something that can be said. The whole string would have to be replaced to something like " région de droite", for example.

Patchak

agentrickard’s picture

Yes. I understand that part. But can't you translate the string that way since it is now a single string instead of two strings? Or simply return a NULL string?

Put another way, what do you need this line to be?

+          $output .= '<h5 class="mysite-divider">'. t('!name region', array('!name' => $layout['regions'][$key])) .'</h5>';
patchak’s picture

Just a last comment about the translation issue... it seems that I can't translate two strings.... 'Add content' does not seem to be inclosed into t() string and also Organize Content does not seem to be in a t() as well..

I can try to add them into the module myself, but I guess it would be better to have it into the next release.
Thanks,
Patchak

ps. there are the last two remaining strings to translate I think

patchak’s picture

I think I actually still need to apply that patch... maybe it was already covered in there, and also I'm gonna see what'up with that right region thing. I will report back as soon as I have a minute to test it.

thanks
patchak

agentrickard’s picture

I missed 'Organize Content' in the patch, but cannot find the 'Add Content' string. what line?

patchak’s picture

Hey there,

The Add Content string is at line 773.

There is also 'Click to expand/collapse. Click and drag to sort.' That does not seem possible to translate at the moment.

Not sure if that query is in your module tho...

thanks

agentrickard’s picture

You are using an old release. The first occurrence of Add Content is on line 843 and is wrapped in t().

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/mysite/mysi...

The phrase "Click to expand/collapse. Click and drag to sort" appears on line 78 of mysite.js and must be translated in the file itself (at least until Drupal 6).

patchak’s picture

I have certain issues with the translations again. Seems like a cache issue. For example I updated to the latest mysite version and now I see the '!name region' string, and I also translated it, but I still can't see it appear on the content edit page for mysite page.

I tried to truncate the cache page and the page_cache table, without seeing changes on the actual mysite page. I also have this issue with other translations on mysite and with some changes I made in types plugin. For example I removed some prefixes and suffixes on some type plugins and they still show on the mysite page. Is there any more cache tables I need to truncate when I do changes on mysite?

I did not activate the mysite cache, so not sure what would be the issue here? Any ideas? Thanks

agentrickard’s picture

I have a guess. When you updated to the new module version, did you remove the old version entirely? Or did you rename the old module and leave it in your modules directory?

If you do that, Drupal may continue to use the old version of the module, which explains this behavior.

patchak’s picture

No the behaviour was the same before I updated the site. Maybe there is something in the block cache? Does mysite write some things in the block cache?

agentrickard’s picture

No, the only thing in the block cache would be the mysite block.

Sorry, but I don't know much about translations.

agentrickard’s picture

Status: Reviewed & tested by the community » Closed (fixed)
patchak’s picture

Status: Closed (fixed) » Active

Hey there, as the patch in #14 been applied to any release??

Thanks, patchak

agentrickard’s picture

Status: Active » Closed (fixed)

Yes. http://drupal.org/node/188714#comment-620564

So it is active in versions after 5.x.2.15.