@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | batch_set($batch); |
| 72 | 72 | // Set a batch to update configuration as well. |
| 73 | 73 | if ($batch = locale_config_batch_update_components($options, $langcodes)) { |
| 74 | - $batch['file'] = drupal_get_path('module', 'df_tools_translation') . '/df_tools_translation.batch.inc'; |
|
| 74 | + $batch['file'] = drupal_get_path('module', 'df_tools_translation').'/df_tools_translation.batch.inc'; |
|
| 75 | 75 | batch_set($batch); |
| 76 | 76 | } |
| 77 | 77 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | // Import each file. |
| 99 | 99 | foreach ($langcodes as $langcode) { |
| 100 | - $filepath = DRUPAL_ROOT . '/' . $path . '/translations/' . $langcode . '.po'; |
|
| 100 | + $filepath = DRUPAL_ROOT.'/'.$path.'/translations/'.$langcode.'.po'; |
|
| 101 | 101 | if (file_exists($filepath)) { |
| 102 | 102 | \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); |
| 103 | 103 | \Drupal::moduleHandler()->loadInclude('locale', 'translation.inc'); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | ]); |
| 112 | 112 | |
| 113 | 113 | $original_file = (object) [ |
| 114 | - 'filename' => $langcode . '.po', |
|
| 114 | + 'filename' => $langcode.'.po', |
|
| 115 | 115 | 'uri' => $filepath |
| 116 | 116 | ]; |
| 117 | 117 | $file = locale_translate_file_attach_properties($original_file, $options); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $path = \Drupal::service('path.current')->getPath(); |
| 131 | 131 | $language = $variables['language']->getId(); |
| 132 | 132 | $alias = \Drupal::service('path_alias.manager')->getAliasByPath($path, $language); |
| 133 | - $url = Url::fromUri('internal:/' . $alias); |
|
| 133 | + $url = Url::fromUri('internal:/'.$alias); |
|
| 134 | 134 | $name = t($variables['language']->getName()); |
| 135 | 135 | $link = Link::fromTextAndUrl($name, $url)->toString(); |
| 136 | 136 | $variables['language_current_link'] = $link; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | if ($langcode == 'en') { |
| 159 | 159 | $langcode = ''; |
| 160 | 160 | } |
| 161 | - $url = Url::fromUri('base:/' . $langcode . $alias); |
|
| 161 | + $url = Url::fromUri('base:/'.$langcode.$alias); |
|
| 162 | 162 | $current_name = t($language->getName()); |
| 163 | 163 | $links[] = Link::fromTextAndUrl($current_name, $url)->toString(); |
| 164 | 164 | } |