Permalink
Browse files

Branching from 6.x-1.7

  • Loading branch information...
Jose Reyero
Jose Reyero committed Oct 9, 2010
0 parents commit 1dd800192dd6ffe6fe9259e4248b6021ef635761
Showing with 14,012 additions and 0 deletions.
  1. +415 −0 CHANGELOG.txt
  2. +40 −0 INSTALL.txt
  3. +30 −0 README.txt
  4. +63 −0 i18n.admin.inc
  5. +7 −0 i18n.info
  6. +121 −0 i18n.install
  7. +17 −0 i18n.js
  8. +966 −0 i18n.module
  9. +277 −0 i18n.pages.inc
  10. +6 −0 i18nblocks/i18nblocks.info
  11. +152 −0 i18nblocks/i18nblocks.install
  12. +293 −0 i18nblocks/i18nblocks.module
  13. +107 −0 i18nblocks/translations/i18nblocks.de.po
  14. +82 −0 i18nblocks/translations/i18nblocks.pot
  15. +124 −0 i18nblocks/translations/i18nblocks.uk.po
  16. +8 −0 i18ncck/i18ncck.info
  17. +17 −0 i18ncck/i18ncck.install
  18. +103 −0 i18ncck/i18ncck.module
  19. +8 −0 i18ncontent/i18ncontent.info
  20. +67 −0 i18ncontent/i18ncontent.install
  21. +219 −0 i18ncontent/i18ncontent.module
  22. +58 −0 i18ncontent/translations/i18ncontent.de.po
  23. +57 −0 i18ncontent/translations/i18ncontent.pot
  24. +67 −0 i18ncontent/translations/i18ncontent.uk.po
  25. +9 −0 i18nmenu/i18nmenu.info
  26. +17 −0 i18nmenu/i18nmenu.install
  27. +456 −0 i18nmenu/i18nmenu.module
  28. +54 −0 i18nmenu/translations/i18nmenu.de.po
  29. +53 −0 i18nmenu/translations/i18nmenu.pot
  30. +71 −0 i18nmenu/translations/i18nmenu.uk.po
  31. +9 −0 i18npoll/i18npoll.info
  32. +170 −0 i18npoll/i18npoll.module
  33. +58 −0 i18npoll/translations/i18npoll.de.po
  34. +57 −0 i18npoll/translations/i18npoll.pot
  35. +7 −0 i18nprofile/i18nprofile.info
  36. +69 −0 i18nprofile/i18nprofile.install
  37. +256 −0 i18nprofile/i18nprofile.module
  38. +42 −0 i18nprofile/translations/i18nprofile.de.po
  39. +41 −0 i18nprofile/translations/i18nprofile.pot
  40. +149 −0 i18nstrings/i18nstrings.admin.inc
  41. +6 −0 i18nstrings/i18nstrings.info
  42. +203 −0 i18nstrings/i18nstrings.install
  43. +1,219 −0 i18nstrings/i18nstrings.module
  44. +150 −0 i18nstrings/translations/i18nstrings.de.po
  45. +116 −0 i18nstrings/translations/i18nstrings.pot
  46. +156 −0 i18nstrings/translations/i18nstrings.uk.po
  47. +23 −0 i18nsync/README.txt
  48. +6 −0 i18nsync/i18nsync.info
  49. +17 −0 i18nsync/i18nsync.install
  50. +588 −0 i18nsync/i18nsync.module
  51. +152 −0 i18nsync/translations/i18nsync.de.po
  52. +147 −0 i18nsync/translations/i18nsync.pot
  53. +159 −0 i18nsync/translations/i18nsync.uk.po
  54. +182 −0 i18ntaxonomy/i18ntaxonomy.admin.inc
  55. +8 −0 i18ntaxonomy/i18ntaxonomy.info
  56. +95 −0 i18ntaxonomy/i18ntaxonomy.install
  57. +16 −0 i18ntaxonomy/i18ntaxonomy.js
  58. +1,100 −0 i18ntaxonomy/i18ntaxonomy.module
  59. +151 −0 i18ntaxonomy/i18ntaxonomy.pages.inc
  60. +190 −0 i18ntaxonomy/translations/i18ntaxonomy.de.po
  61. +180 −0 i18ntaxonomy/translations/i18ntaxonomy.pot
  62. +206 −0 i18ntaxonomy/translations/i18ntaxonomy.uk.po
  63. +294 −0 tests/drupal_i18n_test_case.php
  64. +85 −0 tests/i18n_api.test
  65. +161 −0 tests/i18n_blocks.test
  66. +103 −0 tests/i18n_strings.test
  67. +59 −0 tests/i18n_taxonomy.test
  68. +8 −0 tests/i18n_test.info
  69. +49 −0 tests/i18n_test.module
  70. +285 −0 translations/ca.po
  71. +308 −0 translations/da.po
  72. +327 −0 translations/es.po
  73. +96 −0 translations/fr.po
  74. +81 −0 translations/general.de.po
  75. +90 −0 translations/general.pot
  76. +102 −0 translations/general.uk.po
  77. +327 −0 translations/gl.po
  78. +780 −0 translations/hu.po
  79. +281 −0 translations/i18n.de.po
  80. +230 −0 translations/i18n.pot
  81. +298 −0 translations/i18n.uk.po
  82. +156 −0 translations/it.po

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,40 @@
+// $Id: INSTALL.txt,v 1.21.2.6 2009/08/29 21:08:24 hass Exp $
+********************************************************************
+ D R U P A L M O D U L E
+********************************************************************
+Name: i18n module and translation module
+Author: Jose A. Reyero
+
+********************************************************************
+ This is the 6.x version of i18n module, and works with Drupal 6.x
+********************************************************************
+
+********************************************************************
+Updated documentation will be kept on-line at http://drupal.org/node/133977
+********************************************************************
+
+INSTALLATION:
+============
+
+1. Create folder 'sites/all/modules/i18n' and copy all the modules files, keeping directory structure, to this folder.
+2. If updating, run the update.php script following the standard procedure for Drupal updates.
+
+POST-INSTALLATION/CONFIGURATION:
+============
+- First of all review Drupal language settings and make sure you have chosen the right default language.
+- Enable the needed modules grouped under "Internationalization" package
+- Read the on-line handbook on
+
+IMPORTANT:
+==========
+- This module requires a complex set up, make sure you read the handbook and understand the different options
+- Before creating a support request, do read the handbook: http://drupal.org/node/133977
+
+Additional Support
+==================
+For support, please create a support request for this module's project: http://drupal.org/project/i18n
+
+Support questions by email to the module maintainer will be simply ignored. Use the issue tracker.
+
+====================================================================
+Jose A. Reyero, freelance at reyero dot net, http://www.reyero.net
@@ -0,0 +1,30 @@
+// $Id: README.txt,v 1.18.2.5 2009/11/24 15:53:44 jareyero Exp $
+
+README.txt
+==========
+
+********************************************************************
+This is i18n package 6.x, and works with Drupal 6.x
+********************************************************************
+WARNING: DO READ THE INSTALL FILE AND the ON-LINE HANDBOOK
+********************************************************************
+
+This is a collection of modules providing multilingual features.
+These modules will build onto Drupal 6 core features enabling a full multilingual site
+
+Up to date documentation will be kept on-line at http://drupal.org/node/133977
+
+SimpleTest:
+-----------
+Tests for this module will run on SimpleTest 6.x-2.8 (old version).
+About this see http://drupal.org/node/584596
+
+Additional Support
+=================
+For support, please create a support request for this module's project:
+ http://drupal.org/project/i18n
+
+Support questions by email to the module maintainer will be simply ignored. Use the issue tracker.
+
+====================================================================
+Jose A. Reyero, drupal at reyero dot net, http://www.reyero.net
@@ -0,0 +1,63 @@
+<?php
+// $Id: i18n.admin.inc,v 1.2.2.7 2009/01/21 13:08:35 jareyero Exp $
+
+/**
+ * @file
+ * Extended multilanguage administration and module settings UI.
+ */
+
+/**
+ * Form builder function.
+ *
+ * TO DO: Add exclude paths for content selection
+ * Some options have been removed from previous versions:
+ * - Languages are now taken from locale module unless defined in settings file.
+ * - Language dependent tables are authomatically used if defined in settings file.
+ */
+function i18n_admin_settings() {
+ // Content selection options.
+ $form['selection'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Content selection'),
+ //'#collapsible' => TRUE,
+ //'#collapsed' => TRUE,
+ );
+ $form['selection']['i18n_selection_mode'] = array(
+ '#type' => 'radios',
+ '#title' => t('Content selection mode'),
+ '#default_value' => variable_get('i18n_selection_mode', 'simple'),
+ '#options' => _i18n_selection_mode(),
+ '#description' => t('Determines which content to show depending on the current page language and the default language of the site.'),
+ );
+
+ // Node translation links setting.
+ $form['links'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Content translation links'),
+ );
+ $form['links']['i18n_hide_translation_links'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Hide content translation links'),
+ '#description' => t('Hide the links to translations in content body and teasers. If you choose this option, switching language will only be available from the language switcher block.'),
+ '#default_value' => variable_get('i18n_hide_translation_links', 0),
+ );
+ $form['links']['i18n_translation_switch'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Switch interface for translating'),
+ '#default_value' => variable_get('i18n_translation_switch', 0),
+ '#description' => t('Switch interface language to fit node language when creating or editing a translation. If not checked the interface language will be independent from node language.'),
+ );
+ return system_settings_form($form);
+}
+
+// List of selection modes
+function _i18n_selection_mode() {
+ return array(
+ 'simple' => t('Current language and language neutral.'),
+ 'mixed' => t('Mixed current language (if available) or default language (if not) and language neutral.'),
+ 'default' => t('Only default language and language neutral.'),
+ 'strict' => t('Only current language.'),
+ 'off' => t('All content. No language conditions apply.'),
+ );
+}
+
@@ -0,0 +1,7 @@
+; $Id: i18n.info,v 1.5.2.5 2008/11/16 11:05:19 jareyero Exp $
+name = Internationalization
+description = Extends Drupal support for multilingual features.
+dependencies[] = locale
+dependencies[] = translation
+package = Multilanguage
+core = 6.x
@@ -0,0 +1,121 @@
+<?php
+// $Id: i18n.install,v 1.15.2.9 2009/11/05 18:41:20 jareyero Exp $
+
+/**
+ * @file
+ * Installation file for Internationalization (i18n) module.
+ */
+
+/**
+ * Implementation of hook_schema().
+ */
+function i18n_schema() {
+ $schema['i18n_variable'] = array(
+ 'description' => 'Multilingual variables.',
+ 'fields' => array(
+ 'name' => array(
+ 'description' => 'The name of the variable.',
+ 'type' => 'varchar',
+ 'length' => 128,
+ 'not null' => TRUE,
+ 'default' => ''),
+ 'language' => array(
+ 'description' => 'The language of the variable.',
+ 'type' => 'varchar',
+ 'length' => 12,
+ 'not null' => TRUE,
+ 'default' => ''),
+ 'value' => array(
+ 'description' => 'The value of the variable.',
+ 'type' => 'text',
+ 'not null' => TRUE,
+ 'size' => 'big'),
+ ),
+ 'primary key' => array('name', 'language'),
+ );
+ return $schema;
+}
+
+/**
+ * Set language field in its own table
+ * Do not drop node.language now, just in case
+ * TO-DO: Drop old tables, fields
+ */
+function i18n_install() {
+ // Create database tables
+ drupal_install_schema('i18n');
+ // Set module weight for it to run after core modules
+ db_query("UPDATE {system} SET weight = 10 WHERE name = 'i18n' AND type = 'module'");
+}
+
+function i18n_uninstall() {
+ drupal_uninstall_schema('i18n');
+
+ variable_del('i18n_hide_translation_links');
+ variable_del('i18n_selection_mode');
+ foreach (array_keys(node_get_types()) as $type) {
+ variable_del('i18n_node_'. $type);
+ }
+}
+
+/**
+ * Drupal 6 upgrade. I have started with the wrong numbering, cannot change it now.
+ */
+function i18n_update_9() {
+ // Update content type settings
+ foreach (array_keys(node_get_types()) as $type) {
+ if (variable_get('i18n_node_'. $type, 0)) {
+ variable_set('language_content_type_'. $type, TRANSLATION_ENABLED);
+ }
+ }
+ // General language settings
+ if (variable_get('i18n_browser', 0)) {
+ variable_set('language_negotiation', LANGUAGE_NEGOTIATION_PATH);
+ }
+ else {
+ variable_set('language_negotiation', LANGUAGE_NEGOTIATION_PATH_DEFAULT);
+ }
+ // Set module weight for it to run after core modules
+ $items[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'i18n' AND type = 'module'");
+
+ switch ($GLOBALS['db_type']) {
+ case 'mysql':
+ case 'mysqli':
+ // Move node language and trid into node table
+ $items[] = update_sql("UPDATE {node} n INNER JOIN {i18n_node} i ON n.nid = i.nid SET n.language = i.language, n.tnid = i.trid");
+ // Upgrade tnid's so they match one of the nodes nid's to avoid
+ // future conflicts when translating existing nodes
+ $items[] = update_sql("UPDATE {node} n SET n.tnid = (SELECT MIN(i.nid) FROM {i18n_node} i WHERE i.trid = n.tnid) WHERE n.tnid > 0");
+ break;
+ case 'pgsql':
+ // Move node language and trid into node table
+ $items[] = update_sql("UPDATE {node} SET language = {i18n_node}.language, tnid = {i18n_node}.trid FROM {i18n_node} WHERE {node}.nid = {i18n_node}.nid");
+ // Upgrade tnid's so they match one of the nodes nid's to avoid
+ // future conflicts when translating existing nodes
+ $items[] = update_sql("UPDATE {node} SET tnid = (SELECT MIN(i.nid) FROM {i18n_node} i WHERE i.trid = {node}.tnid) WHERE tnid > 0");
+ }
+
+ return $items;
+}
+
+/**
+ * Drupal 6 clean up. To uncomment after making sure all previous updates work
+ */
+/*
+function i18n_update_10() {
+ // Drop old tables
+ $items[] = update_sql("DROP TABLE {i18n_node}");
+
+ // Delete variables. Most settings will be now handled by Drupal core.
+ variable_del('i18n_allow');
+ variable_del('i18n_browser');
+ variable_del('i18n_content');
+ variable_del('i18n_keep');
+ variable_del('i18n_multi');
+ variable_del('i18n_interface');
+ variable_del('i18n_default');
+ variable_del('i18n_supported_langs');
+ variable_del('i18n_translation_links');
+ variable_del('i18n_translation_node_links');
+ return $items;
+}*/
17 i18n.js
@@ -0,0 +1,17 @@
+// $Id: i18n.js,v 1.1.2.3 2009/01/20 20:35:55 nedjo Exp $
+
+/**
+ * Rewrite autocomplete inputs to pass the language of the node currently being
+ * edited in the path.
+ *
+ * This functionality ensures node autocompletes get suggestions for the node's
+ * language rather than the current interface language.
+ */
+Drupal.behaviors.i18n = function (context) {
+ if (Drupal.settings && Drupal.settings.i18n) {
+ $('form[id^=node-form]', context).find('input.autocomplete[value^=' + Drupal.settings.i18n.interface_path + ']').each(function () {
+ $(this).val($(this).val().replace(Drupal.settings.i18n.interface_path, Drupal.settings.i18n.content_path));
+ });
+ }
+};
+
Oops, something went wrong.

0 comments on commit 1dd8001

Please sign in to comment.