Changing SCOOP/STORY with another word ?
| Project: | Drigg |
| Version: | 5.x-1.4 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Hello,
I'm not sure if that is an issue or a support, I first posted in the drigg-code forum, but I don't know where it is most useful to be.
I want to do a website in english but I want to change all occurrences of STORY or SCOOP in my site (at least the user's part, I don't mind about admin) I want all those occurences to be another word, say video, at the moment the only way I've found is to go in drigg module and find all occurences of t() function which contain either story, stories, scoop or scoops and replace with my word.
Since the module will be updated I'll have to change that often.
I activated the locale module in order to translate the words once and for all, but there are no string available when I look in /admin/settings/locale/string/search I can't find any by searching for scoop or story. Same thing when I export the language .POT I've got nothing, it seems this would be useful only if I had another language than english.
So my question is : how could I replace all occurences of story or scoop by another word and not have to do it again each time I want to update the drigg module ?
Cheers,
James

#1
Hi,
I advise against using the locale module. Drigg is already highly unkind to MySql. Having Locale enabled will be yet another burden.
This is what we did for FSDaily:
1) We applied this patch, created by me: http://drupal.org/node/131061#comment-636000 This patch will allow you to define translation strings within your settings.php file. Don't worry about hacking Drupal: this patch is a backport of what will be available in Drupal 6. It's currently the only backport to it.
2) Add this to your settings.php:
$conf['locale_custom_strings_en'] = array('Email this page' => 'Email',
'Email this !type' => 'Email',
'Submit scoop' => 'Submit',
'Look of the "scoop status", which can be "promoted", "archived" or "queued"' => 'Look of the "story status", which can
be "promoted", "archived" or "queued"',
'Look of the "user scoops" voting form' => 'Look of the "user stories" voting form',
'Text to put before the "users scoops" voting form' => 'Text to put before the "users stories" voting form',
'Text to put after the "users scoops" voting form' => 'Text to put after the "users stories" voting form',
'Similar scoops:' => 'Similar stories:',
'No similar scoops found!' => 'No similar stories found!',
'Submitted scoops' => 'Submitted',
'Scoops by ' => 'Stories by ',
'Published scoops' => 'Published',
'Scoop' => 'story',
'Scoops' => 'Stories',
'Scoops submitted' => 'Submitted',
'Best upcoming scoops' => 'Popular upcoming',
'Upcoming scoops' => 'Upcoming',
'Archived scoops' => 'Archived',
'Add new comment' => 'Discuss',
);
Again, this trick will also work for Drupal 6.
This is what Dave did for FSDaily - he hated the word "Scoop" as well...
Bye,
Merc.
#2
#3
Thanks a lot for that also.
#4
This workaround is great, however it doesn't address the issue of the submission form. The submission form still lists the scoops as stories. "Story's title"...etc. Is there an additional line that could be added to the settings.php file?
#5
Hi,
Please have a look at drigg.module, and look for the strings you want to see translated. Then, add them to your settings.php file as explained above.
Please reopen a new bug if some strings are not translatable. However, I doubt that's the case.
Bye,
Merc.
#6
Note:
'Story\'s URL' => 'Video URL','Story\'s title' => 'Video Review Title',
'Story\'s description' => 'Video Review Summary',
Adding this solved the problem.
#7
subscribing
#8
Automatically closed -- issue fixed for two weeks with no activity.