Some translation issues

patchak - November 2, 2007 - 08:57
Project:MySite
Version:5.x-2.15
Component:- Translation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

agentrickard - November 2, 2007 - 14:09

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?

#2

patchak - November 3, 2007 - 14:53

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

#3

agentrickard - November 3, 2007 - 15:44

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?

#4

patchak - November 3, 2007 - 15:49

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

#5

agentrickard - November 3, 2007 - 16:36

#6

agentrickard - November 4, 2007 - 15:56
Status:active» patch (reviewed & tested by the community)

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.

AttachmentSize
string.patch5.98 KB

#7

agentrickard - November 4, 2007 - 16:02
Version:5.x-2.9» 5.x-2.15
Category:support request» bug report

Please let me know if I missed anything.

#8

patchak - November 4, 2007 - 19:18

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.

AttachmentSize
cre.txt6.79 KB

#9

agentrickard - November 4, 2007 - 22:57

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.

#10

patchak - November 5, 2007 - 08:06

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....

#11

patchak - November 18, 2007 - 12:21

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

#12

agentrickard - November 18, 2007 - 15:52

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?

#13

patchak - November 18, 2007 - 16:40

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

#14

agentrickard - November 19, 2007 - 00:00

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>';

#15

patchak - November 28, 2007 - 08:05

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

#16

patchak - November 28, 2007 - 08:49

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

#17

agentrickard - November 28, 2007 - 15:36

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

#18

patchak - December 15, 2007 - 14:46

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

#19

agentrickard - December 15, 2007 - 16:46

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).

#20

patchak - December 16, 2007 - 12:30

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

#21

agentrickard - December 16, 2007 - 18:18

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.

#22

patchak - December 16, 2007 - 22:48

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?

#23

agentrickard - December 17, 2007 - 01:55

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

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

#24

agentrickard - February 8, 2008 - 01:09
Status:patch (reviewed & tested by the community)» closed

#25

patchak - February 15, 2008 - 16:40
Status:closed» active

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

Thanks, patchak

#26

agentrickard - February 15, 2008 - 16:50
Status:active» closed

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

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

 
 

Drupal is a registered trademark of Dries Buytaert.