mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Export default localization config to new farm_l10n module.
This commit is contained in:
parent
36a9a0df3e
commit
19cab336a8
5 changed files with 197 additions and 0 deletions
|
@ -47,6 +47,7 @@ function farm_modules() {
|
|||
'farm_sensor' => st('Sensor'),
|
||||
'farm_sensor_listener' => st('Sensor: Listener'),
|
||||
'farm_ledger' => st('Sale and purchase logs (beta)'),
|
||||
'farm_l10n' => st('Localization/translation'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
15
modules/farm/farm_l10n/farm_l10n.features.inc
Normal file
15
modules/farm/farm_l10n/farm_l10n.features.inc
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* farm_l10n.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function farm_l10n_ctools_plugin_api($module = NULL, $api = NULL) {
|
||||
if ($module == "strongarm" && $api == "strongarm") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
}
|
23
modules/farm/farm_l10n/farm_l10n.info
Normal file
23
modules/farm/farm_l10n/farm_l10n.info
Normal file
|
@ -0,0 +1,23 @@
|
|||
name = Farm Localization
|
||||
description = Provides configuration for translating the farmOS UI.
|
||||
core = 7.x
|
||||
package = farmOS
|
||||
dependencies[] = ctools
|
||||
dependencies[] = locale
|
||||
dependencies[] = l10n_update
|
||||
dependencies[] = strongarm
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:2
|
||||
features[variable][] = l10n_update_check_disabled
|
||||
features[variable][] = l10n_update_check_frequency
|
||||
features[variable][] = l10n_update_check_mode
|
||||
features[variable][] = l10n_update_disabled_languages
|
||||
features[variable][] = l10n_update_disabled_projects
|
||||
features[variable][] = l10n_update_download_store
|
||||
features[variable][] = l10n_update_import_mode
|
||||
features[variable][] = l10n_update_rebuild_projects
|
||||
features[variable][] = language_negotiation_language
|
||||
features[variable][] = language_negotiation_language_content
|
||||
features[variable][] = language_negotiation_language_url
|
||||
features[variable][] = language_types
|
||||
features[variable][] = locale_language_providers_weight_language
|
8
modules/farm/farm_l10n/farm_l10n.module
Normal file
8
modules/farm/farm_l10n/farm_l10n.module
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Code for the Farm Localization feature.
|
||||
*/
|
||||
|
||||
include_once 'farm_l10n.features.inc';
|
150
modules/farm/farm_l10n/farm_l10n.strongarm.inc
Normal file
150
modules/farm/farm_l10n/farm_l10n.strongarm.inc
Normal file
|
@ -0,0 +1,150 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* farm_l10n.strongarm.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_strongarm().
|
||||
*/
|
||||
function farm_l10n_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 = 'l10n_update_check_disabled';
|
||||
$strongarm->value = 1;
|
||||
$export['l10n_update_check_disabled'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_check_frequency';
|
||||
$strongarm->value = '7';
|
||||
$export['l10n_update_check_frequency'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_check_mode';
|
||||
$strongarm->value = '3';
|
||||
$export['l10n_update_check_mode'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_disabled_languages';
|
||||
$strongarm->value = array();
|
||||
$export['l10n_update_disabled_languages'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_disabled_projects';
|
||||
$strongarm->value = array();
|
||||
$export['l10n_update_disabled_projects'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_download_store';
|
||||
$strongarm->value = 'sites/all/translations';
|
||||
$export['l10n_update_download_store'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_import_mode';
|
||||
$strongarm->value = '2';
|
||||
$export['l10n_update_import_mode'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'l10n_update_rebuild_projects';
|
||||
$strongarm->value = 1;
|
||||
$export['l10n_update_rebuild_projects'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'language_negotiation_language';
|
||||
$strongarm->value = array(
|
||||
'locale-user' => array(
|
||||
'callbacks' => array(
|
||||
'language' => 'locale_language_from_user',
|
||||
),
|
||||
'file' => 'includes/locale.inc',
|
||||
),
|
||||
'language-default' => array(
|
||||
'callbacks' => array(
|
||||
'language' => 'language_from_default',
|
||||
),
|
||||
),
|
||||
);
|
||||
$export['language_negotiation_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 = 'language_negotiation_language_content';
|
||||
$strongarm->value = array(
|
||||
'locale-interface' => array(
|
||||
'callbacks' => array(
|
||||
'language' => 'locale_language_from_interface',
|
||||
),
|
||||
'file' => 'includes/locale.inc',
|
||||
),
|
||||
);
|
||||
$export['language_negotiation_language_content'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'language_negotiation_language_url';
|
||||
$strongarm->value = array(
|
||||
'locale-url' => array(
|
||||
'callbacks' => array(
|
||||
'language' => 'locale_language_from_url',
|
||||
'switcher' => 'locale_language_switcher_url',
|
||||
'url_rewrite' => 'locale_language_url_rewrite_url',
|
||||
),
|
||||
'file' => 'includes/locale.inc',
|
||||
),
|
||||
'locale-url-fallback' => array(
|
||||
'callbacks' => array(
|
||||
'language' => 'locale_language_url_fallback',
|
||||
),
|
||||
'file' => 'includes/locale.inc',
|
||||
),
|
||||
);
|
||||
$export['language_negotiation_language_url'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'language_types';
|
||||
$strongarm->value = array(
|
||||
'language' => TRUE,
|
||||
'language_content' => FALSE,
|
||||
'language_url' => FALSE,
|
||||
);
|
||||
$export['language_types'] = $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;
|
||||
|
||||
return $export;
|
||||
}
|
Loading…
Reference in a new issue