Closed (fixed)
Project:
Drush
Component:
PM (dl, en, up ...)
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
6 Oct 2009 at 14:27 UTC
Updated:
5 Dec 2010 at 16:40 UTC
When installing a module through the web interface, Drupal automatically imports the language files (.po) that exist for the currently enabled languages. Drush skips this process, so when you use it to build a non-English website you end up with a mostly untranslated interface.
Comments
Comment #1
moshe weitzman commentedUpgrading to critical for next release. At minimum, should work for D7. D6 would be very nice ... Help wanted.
Comment #2
floretan commentedRight now I've been doing a drupal_execute() to add a language after everything is built, which loads all available translations for that language, but it's just a workaround...
It'd be nice if the locale import code wasn't so batch-oriented. Right now system.module calls
module_invoke('locale', 'system_update' ...when enabling a module or a theme, which starts a batch. I'm guessing the way to deal with this is to call our own locale update function when enabling a module or theme.Comment #3
moshe weitzman commentedComment #4
moshe weitzman commentedI tried this out for D7 and it works! We already do a drupal_form_submit() [new name for drupal_execute] on the modules page and in D7, the batch proceeds in non-progressive mode.
Would be nice to solve this for D6 but I think it will be painful in terms of code duplication.
Comment #5
moshe weitzman commentedI just added a --locale option to installsite command. It now imports translations at install time.
Comment #6
floretan commentedJust tested it on a French project. Works as expected. Thank you!
Comment #8
nhck commentedHello, I ran the following command with July 2nd HEAD:
drush en auto_nodetitle fieldgroup filefield imagefield number content_profile content_profile_tokens content_profile_registration profile_migrate logintoboggan sharedemail weightand it didn't import any translations for those modules.
Comment #9
moshe weitzman commented@Neils - you were using D7?
Comment #10
nhck commentedI am using D6
Comment #11
moritzz commentedThere seams to exist, however, a workaround for D6: You can explicitly force the import of language files of a certain module:
Good Luck,
Moritz
Comment #12
nhck commentedToday I did:
and this happend:
So there must be somekind of import..
Comment #13
moritzz commentedHuh? I'm quite sure, language files of Poll weren't imported on:
What version of drush do you use?
Comment #14
David Stosik commentedSubscribing.
Any news about this issue, on D6 ?
Comment #15
Marvine commentedThanks for :
drush php-eval "locale_system_update(array('poll')); drush_backend_batch_process();"
It works like a charm !
Comment #16
ceooph commentedSubscribe
Comment #17
jonhattanI've made some tests and it works for drupal 6 as long as po files are in
translations/in the .module directory; but it's needed to clear some cache.Comment #18
jonhattanIt seems I did already had cache poisoned with untranslated strings. Testing with a fresh downloaded project just works.
Other note: translations are only imported when project is installed (first time you enable it). You need to uninstall before enabling again to trigger the import routine. Perhaps that was the case for @nhck in #10.
Didn't say: I did test in drupal 6.