More translatable Strings

4 replies [Last post]
lowskilla
Offline
Joined: 03/16/2010
Status: 
Answered

Hi,

I noticed, that not all Strings are translateable at the moment. I would love to see these Strings translatable in the next version :)

- Publishing Plan
- €X to publish for Y days
- Expires in X days

Edit:

I think most of the titles beginning at line 78 (function ms_paypublish_menu() ) are not translateable, too

Edit2:

I found these untranslateable Strings, too:

-Add days to your content:
-Days (when adding days to existing ad)

Sincerely,

Dominik

Leighton Whiting
Offline
Joined: 06/02/2009
Thanks for pointing those

Thanks for pointing those out, I'll be sure to include those in the upcoming Pay to Publish 4.0 release. I've been working on it for the past couple of weeks, and it is getting close now :)

Sincerely,
Leighton Whiting

PS Drupal doesn't need the hook_menu titles and descriptions to be passed through the t() function. They are passed through it automatically by Drupal :)

lowskilla
Offline
Joined: 03/16/2010
Thanks for your quick

Thanks for your quick response!

What would be the workaround for the now used version? I could of course translate it "hard", so i could just replace all nontranslateable strings in the source, but I think this is not the best idea ;)

What about just do all these Strings into a t()function? Would this solve my issue?

And the hook_menu titles: I am not able to translate these Strings via the Drupal Translation Web-Interface. Is this a known Drupal Bug? How can I solve this issue?

So much thanks for your answer,

Dominik

Leighton Whiting
Offline
Joined: 06/02/2009
Dominik, I'm not sure how to

Dominik,
I'm not sure how to translate the menu titles with the Interface... But I do know that Drupal best practice calls for not passing menu titles and descriptions through the t() function, so they don't get translated twice.

For now, you can rewrite those strings with the t() function. Here's an example of what I did:

$output = t('!amount to publish for !days days.', array(
'!amount' => ms_core_format_money($plan->amount),
'!days' => $plan->expire_days,
));

Hopefully that is enough to get you started. I am going to really try and have Pay to Publish 4 ready this week.

Sincerely,
Leighton Whiting

lowskilla
Offline
Joined: 03/16/2010
Thanks for your reply! I

Thanks for your reply!

I really love your support, thanks a lot!

Twitter Feed