created translations feature
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function translations_ctools_plugin_api($module = NULL, $api = NULL) {
|
||||
if ($module == "strongarm" && $api == "strongarm") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
}
|
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.language.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_locale_default_languages().
|
||||
*/
|
||||
function translations_locale_default_languages() {
|
||||
$languages = array();
|
||||
|
||||
// Exported language: cs.
|
||||
$languages['cs'] = array(
|
||||
'language' => 'cs',
|
||||
'name' => 'Czech',
|
||||
'native' => 'Čeština',
|
||||
'direction' => 0,
|
||||
'enabled' => 1,
|
||||
'plurals' => 3,
|
||||
'formula' => '(((($n%10)==1)&&(($n%100)!=11))?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2))',
|
||||
'domain' => '',
|
||||
'prefix' => 'cs',
|
||||
'weight' => 0,
|
||||
);
|
||||
// Exported language: en.
|
||||
$languages['en'] = array(
|
||||
'language' => 'en',
|
||||
'name' => 'English',
|
||||
'native' => 'English',
|
||||
'direction' => 0,
|
||||
'enabled' => 1,
|
||||
'plurals' => 0,
|
||||
'formula' => '',
|
||||
'domain' => '',
|
||||
'prefix' => 'en',
|
||||
'weight' => -10,
|
||||
);
|
||||
// Exported language: fr.
|
||||
$languages['fr'] = array(
|
||||
'language' => 'fr',
|
||||
'name' => 'French',
|
||||
'native' => 'Français',
|
||||
'direction' => 0,
|
||||
'enabled' => 1,
|
||||
'plurals' => 2,
|
||||
'formula' => '($n>1)',
|
||||
'domain' => '',
|
||||
'prefix' => 'fr',
|
||||
'weight' => -9,
|
||||
);
|
||||
// Exported language: zh-hans.
|
||||
$languages['zh-hans'] = array(
|
||||
'language' => 'zh-hans',
|
||||
'name' => 'Chinese, Simplified',
|
||||
'native' => '简体中文',
|
||||
'direction' => 0,
|
||||
'enabled' => 1,
|
||||
'plurals' => 2,
|
||||
'formula' => '($n!=1)',
|
||||
'domain' => '',
|
||||
'prefix' => 'zh-hans',
|
||||
'weight' => 0,
|
||||
);
|
||||
return $languages;
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.translations_cs.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_translations_cs_defaults().
|
||||
*/
|
||||
function translations_translations_cs_defaults() {
|
||||
$translations = array();
|
||||
$translatables = array();
|
||||
return $translations;
|
||||
}
|
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.translations_fr.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_translations_fr_defaults().
|
||||
*/
|
||||
function translations_translations_fr_defaults() {
|
||||
$translations = array();
|
||||
$translatables = array();
|
||||
$translations['fr:default']['4194d8cbfbfed42d6fd00145134d1c78'] = array(
|
||||
'source' => 'Lost my password',
|
||||
'context' => '',
|
||||
'location' => '/fr',
|
||||
'translation' => 'J\'ai perdu mon mot de passe',
|
||||
'plid' => 0,
|
||||
'plural' => 0,
|
||||
);
|
||||
$translatables[] = t('Lost my password', array(), array('context' => ''));
|
||||
$translations['fr:default']['43e6ee9cfc1d52719df78e10c6c0cd64'] = array(
|
||||
'source' => 'Member access',
|
||||
'context' => '',
|
||||
'location' => '/fr',
|
||||
'translation' => 'Accès membre',
|
||||
'plid' => 0,
|
||||
'plural' => 0,
|
||||
);
|
||||
$translatables[] = t('Member access', array(), array('context' => ''));
|
||||
$translations['fr:default']['4a401353fd71b0c461fe419a6431f1e9'] = array(
|
||||
'source' => '<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ',
|
||||
'context' => '',
|
||||
'location' => '/fr/materio_search_api_ajax/actuality/1?keys=',
|
||||
'translation' => '<strong>Oups!</strong></br> Pour accéder aux informations collectées par matériO sur les milliers de producteurs de matières émergentes, il vous est nécessaire d\'adhérer a matériO.',
|
||||
'plid' => 0,
|
||||
'plural' => 0,
|
||||
);
|
||||
$translatables[] = t('<strong>Oops!</strong></br> In order to access information matériO collected about thousands of manufacturers of emerging materials, you need to be part of materiO... ', array(), array('context' => ''));
|
||||
$translations['fr:default']['daef5b384f5a22ebfbbb89feefc76c81'] = array(
|
||||
'source' => 'Pursue',
|
||||
'context' => '',
|
||||
'location' => '/fr/form/adh-sion',
|
||||
'translation' => 'Poursuivre',
|
||||
'plid' => 0,
|
||||
'plural' => 0,
|
||||
);
|
||||
$translatables[] = t('Pursue', array(), array('context' => ''));
|
||||
$translations['fr:default']['dd1ba1872df91985ed1ca4cde2dfe669'] = array(
|
||||
'source' => 'News',
|
||||
'context' => '',
|
||||
'location' => '/fr/admin/structure/features/cleanup/clear',
|
||||
'translation' => 'Brèves',
|
||||
'plid' => 0,
|
||||
'plural' => 0,
|
||||
);
|
||||
$translatables[] = t('News', array(), array('context' => ''));
|
||||
return $translations;
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.translations_zh_hans.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_translations_zh_hans_defaults().
|
||||
*/
|
||||
function translations_translations_zh_hans_defaults() {
|
||||
$translations = array();
|
||||
$translatables = array();
|
||||
return $translations;
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.features.user_permission.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_user_default_permissions().
|
||||
*/
|
||||
function translations_user_default_permissions() {
|
||||
$permissions = array();
|
||||
|
||||
// Exported permission: 'administer languages'.
|
||||
$permissions['administer languages'] = array(
|
||||
'name' => 'administer languages',
|
||||
'roles' => array(
|
||||
'root' => 'root',
|
||||
),
|
||||
'module' => 'locale',
|
||||
);
|
||||
|
||||
// Exported permission: 'translate interface'.
|
||||
$permissions['translate interface'] = array(
|
||||
'name' => 'translate interface',
|
||||
'roles' => array(
|
||||
'administrator' => 'administrator',
|
||||
'root' => 'root',
|
||||
),
|
||||
'module' => 'locale',
|
||||
);
|
||||
|
||||
return $permissions;
|
||||
}
|
55
sites/all/modules/features/translations/translations.info
Normal file
55
sites/all/modules/features/translations/translations.info
Normal file
@@ -0,0 +1,55 @@
|
||||
name = Translations
|
||||
core = 7.x
|
||||
package = Materio
|
||||
dependencies[] = ctools
|
||||
dependencies[] = features
|
||||
dependencies[] = features_translations
|
||||
dependencies[] = locale
|
||||
dependencies[] = strongarm
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:2
|
||||
features[language][] = cs
|
||||
features[language][] = en
|
||||
features[language][] = fr
|
||||
features[language][] = zh-hans
|
||||
features[translations_cs][] = cs:blocks
|
||||
features[translations_cs][] = cs:default
|
||||
features[translations_cs][] = cs:field
|
||||
features[translations_cs][] = cs:menu
|
||||
features[translations_cs][] = cs:metatag
|
||||
features[translations_cs][] = cs:node
|
||||
features[translations_cs][] = cs:profile2
|
||||
features[translations_cs][] = cs:rules
|
||||
features[translations_cs][] = cs:uc_attribute
|
||||
features[translations_cs][] = cs:uc_order_status
|
||||
features[translations_cs][] = cs:webform
|
||||
features[translations_fr][] = fr:blocks
|
||||
features[translations_fr][] = fr:default
|
||||
features[translations_fr][] = fr:field
|
||||
features[translations_fr][] = fr:menu
|
||||
features[translations_fr][] = fr:metatag
|
||||
features[translations_fr][] = fr:node
|
||||
features[translations_fr][] = fr:profile2
|
||||
features[translations_fr][] = fr:rules
|
||||
features[translations_fr][] = fr:uc_attribute
|
||||
features[translations_fr][] = fr:uc_order_status
|
||||
features[translations_fr][] = fr:webform
|
||||
features[translations_zh_hans][] = zh_hans:blocks
|
||||
features[translations_zh_hans][] = zh_hans:default
|
||||
features[translations_zh_hans][] = zh_hans:field
|
||||
features[translations_zh_hans][] = zh_hans:menu
|
||||
features[translations_zh_hans][] = zh_hans:metatag
|
||||
features[translations_zh_hans][] = zh_hans:node
|
||||
features[translations_zh_hans][] = zh_hans:profile2
|
||||
features[translations_zh_hans][] = zh_hans:rules
|
||||
features[translations_zh_hans][] = zh_hans:uc_attribute
|
||||
features[translations_zh_hans][] = zh_hans:uc_order_status
|
||||
features[translations_zh_hans][] = zh_hans:webform
|
||||
features[user_permission][] = administer languages
|
||||
features[user_permission][] = translate interface
|
||||
features[variable][] = i18n_node_translation_switch
|
||||
features[variable][] = locale_field_language_fallback
|
||||
features[variable][] = locale_language_negotiation_url_part
|
||||
features[variable][] = locale_language_providers_weight_language
|
||||
features[variable][] = taxonomy_csv_locale_custom
|
||||
project path = sites/all/modules/features
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Code for the Translations feature.
|
||||
*/
|
||||
|
||||
include_once 'translations.features.inc';
|
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* translations.strongarm.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_strongarm().
|
||||
*/
|
||||
function translations_strongarm() {
|
||||
$export = array();
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'i18n_node_translation_switch';
|
||||
$strongarm->value = 1;
|
||||
$export['i18n_node_translation_switch'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'locale_field_language_fallback';
|
||||
$strongarm->value = 1;
|
||||
$export['locale_field_language_fallback'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'locale_language_negotiation_url_part';
|
||||
$strongarm->value = '0';
|
||||
$export['locale_language_negotiation_url_part'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'locale_language_providers_weight_language';
|
||||
$strongarm->value = array(
|
||||
'locale-url' => '-8',
|
||||
'locale-session' => '-6',
|
||||
'locale-user' => '-4',
|
||||
'locale-browser' => '-2',
|
||||
'language-default' => '10',
|
||||
);
|
||||
$export['locale_language_providers_weight_language'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'taxonomy_csv_locale_custom';
|
||||
$strongarm->value = '';
|
||||
$export['taxonomy_csv_locale_custom'] = $strongarm;
|
||||
|
||||
return $export;
|
||||
}
|
Reference in New Issue
Block a user