Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add translation function #22

Open
wants to merge 3 commits into
base: 7.x-1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions recline.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
// Converts line endings in either format to unix format.
data = data.replace(/(\r\n|\n|\r)/gm,"\n");
dataset = new recline.Model.Dataset({
records: recline.Backend.CSV.parse(data, options)
records: recline.Backend.CSV.parseCSV(data, options)
});
dataset.fetch();
views = createExplorer(dataset, state, dataExplorerSettings);
Expand Down Expand Up @@ -132,7 +132,7 @@
views.push(
{
id: 'grid',
label: 'Grid',
label: Drupal.t('Grid'),
view: new recline.View.SlickGrid({
model: dataset
})
Expand All @@ -152,7 +152,7 @@
views.push(
{
id: 'graph',
label: 'Graph',
label: Drupal.t('Graph'),
view: new recline.View.Graph({
model: dataset,
state: state
Expand All @@ -164,7 +164,7 @@
views.push(
{
id: 'map',
label: 'Map',
label: Drupal.t('Map'),
view: new recline.View.Map({
model: dataset
})
Expand Down Expand Up @@ -307,7 +307,7 @@
if(!$control.length){
$form = $('.form-stacked');
$checkboxDiv = $('<div class="checkbox"></div>').appendTo($form);
$label = $('<label />', { 'for': 'prevent-label-overlapping', text: 'Resize graph to prevent label overlapping' }).appendTo($checkboxDiv);
$label = $('<label />', { 'for': 'prevent-label-overlapping', text: Drupal.t('Resize graph to prevent label overlapping') }).appendTo($checkboxDiv);
$label.prepend($('<input />', { type: 'checkbox', id: 'prevent-label-overlapping', value: '' }));
$control = $('#prevent-label-overlapping');
$control.on('change', function(){
Expand Down
17 changes: 4 additions & 13 deletions recline.field.inc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function recline_field_widget_form(&$form, &$form_state, $field, $instance, $lan
$delimiter = isset($elements[$delta]['#default_value']['delimiter']) ? $elements[$delta]['#default_value']['delimiter'] : FALSE;

$elements[$delta]['delimiter'] = array(
'#title' => 'Delimiter',
'#title' => t('Delimiter'),
'#description' => t('Select delimiter for file if applicable.'),
'#type' => 'select',
'#options' => recline_delimiters(),
Expand Down Expand Up @@ -451,19 +451,10 @@ function recline_default_formatter_output($variables) {
}
$recline = '';

libraries_load('lodash');
libraries_load('backbone');
$recline = libraries_load('recline');
libraries_load('csv');
libraries_load('mustache');
libraries_load('moment');
libraries_load('slickgrid');
libraries_load('leaflet');

libraries_load('flot');
libraries_load('deep_diff');
libraries_load('recline_deeplink');
libraries_load('leaflet_markercluster');
$recline_deeplink = libraries_load('recline_deeplink');
$leaflet_markercluster = libraries_load('leaflet_markercluster');
$deep_diff = libraries_load('deep_diff');

if (isset($variables['item']['grid']) &&
isset($variables['item']['graph']) &&
Expand Down