? .DS_Store
? make_node_optional_14.patch
? node_decouple_locale_00.patch
? node_decouple_locale_01.patch
? node_decouple_locale_02.patch
? node_decouple_locale_03.patch
? node_decouple_locale_04.patch
? node_decouple_locale_05.patch
? modules/.DS_Store
? sites/.DS_Store
? sites/default/files
? sites/default/settings.php
Index: modules/locale/locale.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.install,v
retrieving revision 1.46
diff -u -p -r1.46 locale.install
--- modules/locale/locale.install 14 Jul 2009 10:22:17 -0000 1.46
+++ modules/locale/locale.install 5 Aug 2009 11:40:40 -0000
@@ -74,10 +74,6 @@ function locale_uninstall() {
variable_del('locale_cache_strings');
variable_del('locale_js_directory');
- foreach (node_type_get_types() as $type => $content_type) {
- $setting = variable_del('language_content_type_' . $type);
- }
-
// Switch back to English: with a $language->language value different from 'en'
// successive calls of t() might result in calling locale(), which in turn might
// try to query the unexisting {locales_source} and {locales_target} tables.
Index: modules/locale/locale.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v
retrieving revision 1.246
diff -u -p -r1.246 locale.module
--- modules/locale/locale.module 2 Aug 2009 15:44:08 -0000 1.246
+++ modules/locale/locale.module 5 Aug 2009 11:40:40 -0000
@@ -277,45 +277,6 @@ function locale_form_path_admin_form_alt
}
/**
- * Implement hook_form_FORM_ID_alter().
- */
-function locale_form_node_type_form_alter(&$form, &$form_state) {
- if (isset($form['identity']['type'])) {
- $form['workflow']['language_content_type'] = array(
- '#type' => 'radios',
- '#title' => t('Multilingual support'),
- '#default_value' => variable_get('language_content_type_' . $form['#node_type']->type, 0),
- '#options' => array(t('Disabled'), t('Enabled')),
- '#description' => t('Enable multilingual support for this content type. If enabled, a language selection field will be added to the editing form, allowing you to select from one of the enabled languages. If disabled, new posts are saved with the default language. Existing content will not be affected by changing this option.', array('!languages' => url('admin/international/language'))),
- );
- }
-}
-
-/**
- * Implement hook_form_alter(). Adds language fields to forms.
- */
-function locale_form_alter(&$form, &$form_state, $form_id) {
- if (isset($form['#id']) && $form['#id'] == 'node-form') {
- if (isset($form['#node']->type) && variable_get('language_content_type_' . $form['#node']->type, 0)) {
- $form['language'] = array(
- '#type' => 'select',
- '#title' => t('Language'),
- '#default_value' => (isset($form['#node']->language) ? $form['#node']->language : ''),
- '#options' => array('' => t('Language neutral')) + locale_language_list('name'),
- );
- }
- // Node type without language selector: assign the default for new nodes
- elseif (!isset($form['#node']->nid)) {
- $default = language_default();
- $form['language'] = array(
- '#type' => 'value',
- '#value' => $default->language
- );
- }
- }
-}
-
-/**
* Implement hook_theme().
*/
function locale_theme() {
Index: modules/locale/locale.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/locale/locale.test,v
retrieving revision 1.33
diff -u -p -r1.33 locale.test
--- modules/locale/locale.test 3 Aug 2009 03:04:33 -0000 1.33
+++ modules/locale/locale.test 5 Aug 2009 11:40:41 -0000
@@ -941,7 +941,7 @@ class LocaleUninstallFunctionalTest exte
variable_set('language_negotiation', LANGUAGE_NEGOTIATION_PATH_DEFAULT);
// Enable multilingual workflow option for articles.
- variable_set('language_content_type_article', 1);
+ variable_set('node_type_language_article', 1);
// Change JavaScript translations directory.
variable_set('locale_js_directory', 'js_translations');
@@ -990,10 +990,6 @@ class LocaleUninstallFunctionalTest exte
$javascript_parsed_count = count(variable_get('javascript_parsed', array()));
$this->assertEqual($javascript_parsed_count, 0, t('JavaScript parsed count: %count', array('%count' => $javascript_parsed_count)));
- // Check multilingual workflow option for articles.
- $multilingual = variable_get('language_content_type_article', 0);
- $this->assertEqual($multilingual, 0, t('Multilingual workflow option: %status', array('%status' => t($multilingual ? 'enabled': 'disabled'))));
-
// Check JavaScript translations directory.
$locale_js_directory = variable_get('locale_js_directory', 'languages');
$this->assertEqual($locale_js_directory, 'languages', t('JavaScript translations directory: %dir', array('%dir' => $locale_js_directory)));
@@ -1216,7 +1212,7 @@ class LocalePathFunctionalTest extends D
}
function setUp() {
- parent::setUp('locale', 'path');
+ parent::setUp('node', 'locale', 'path');
}
/**
@@ -1286,130 +1282,3 @@ class LocalePathFunctionalTest extends D
$this->drupalLogout();
}
}
-/**
- * Functional tests for multilingual support on nodes.
- */
-class LocaleContentFunctionalTest extends DrupalWebTestCase {
- public static function getInfo() {
- return array(
- 'name' => 'Content language settings',
- 'description' => 'Checks you can enable multilingual support on content types and configure a language for a node.',
- 'group' => 'Locale',
- );
- }
-
- function setUp() {
- parent::setUp('locale');
- }
-
- /**
- * Test if a content type can be set to multilingual and language setting is
- * present on node add and edit forms.
- */
- function testContentTypeLanguageConfiguration() {
- global $base_url;
-
- // User to add and remove language.
- $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content types', 'access administration pages'));
- // User to create a node.
- $web_user = $this->drupalCreateUser(array('create page content', 'edit any page content'));
-
- // Add custom language.
- $this->drupalLogin($admin_user);
- // Code for the language.
- $langcode = 'xx';
- // The English name for the language.
- $name = $this->randomName(16);
- // The native name for the language.
- $native = $this->randomName(16);
- // The domain prefix.
- $prefix = $langcode;
- $edit = array(
- 'langcode' => $langcode,
- 'name' => $name,
- 'native' => $native,
- 'prefix' => $prefix,
- 'direction' => '0',
- );
- $this->drupalPost('admin/international/language/add', $edit, t('Add custom language'));
-
- // Add disabled custom language.
- // Code for the language.
- $langcode_disabled = 'xx-yy';
- // The English name for the language.
- $name_disabled = $this->randomName(16);
- // The native name for the language.
- $native_disabled = $this->randomName(16);
- // The domain prefix.
- $prefix_disabled = $langcode_disabled;
- $edit = array(
- 'langcode' => $langcode_disabled,
- 'name' => $name_disabled,
- 'native' => $native_disabled,
- 'prefix' => $prefix_disabled,
- 'direction' => '0',
- );
- $this->drupalPost('admin/international/language/add', $edit, t('Add custom language'));
- // Disable second custom language.
- $path = 'admin/international/language';
- $edit = array(
- 'enabled[' . $langcode_disabled . ']' => FALSE,
- );
- $this->drupalPost($path, $edit, t('Save configuration'));
-
- // Set language negotiation.
- $edit = array(
- 'language_negotiation' => LANGUAGE_NEGOTIATION_PATH_DEFAULT,
- );
- $this->drupalPost('admin/international/language/configure', $edit, t('Save settings'));
-
- // Set page content type to use multilingual support.
- $this->drupalGet('admin/structure/node-type/page');
- $this->assertText(t('Multilingual support'), t('Multilingual support fieldset present on content type configuration form.'));
- $edit = array(
- 'language_content_type' => 1,
- );
- $this->drupalPost('admin/structure/node-type/page', $edit, t('Save content type'));
- $this->assertRaw(t('The content type %type has been updated.', array('%type' => 'Page')), t('Page content type has been updated.'));
- $this->drupalLogout();
-
- // Verify language selection is not present on add article form.
- $this->drupalLogin($web_user);
- $this->drupalGet('node/add/article');
- // Verify language select list is not present.
- $this->assertNoRaw('