Home > SDL Trados, SDL Trados Studio 2014, SDL Trados Studio 2015, Uncategorized > Studio 2014/2015 SP2 messing with spacing/line breaks in php files

Studio 2014/2015 SP2 messing with spacing/line breaks in php files

I tried both versions and the result was files that threw errors when testing on the server.
When I opened them with a text editor I could see that there were very important spacing/line break differences in the code. Is there any way to instruct Studio not to mess up with spacing/white space in php files?

For example this:

<?php require('test_drive.php'); ?>


<footer>

<div class="wrapper">

<div class="column half left">
					ARGOATV.BG &copy; <?=date('Y')?>. ALL RIGHTS RESERVED.
				</div>

				

<div class="column half right social"> 
				    <a href="http://facebook.com/Argoatvbg" title="Facebook page" target="_blank"><img src="<?=$site_url?>/img/facebook.png" alt="Facebook" /></a>
				    <a href="https://twitter.com/ArgoBulgaria" title="Twitter profile" target="_blank"><img src="<?=$site_url?>/img/twitter.png" alt="Twitter" /></a>
				    <a href="http://www.youtube.com/user/ArgoBulgaria" title="YouTube channel" target="_blank"><img src="<?=$site_url?>/img/youtube.png" alt="YouTube" /></a>
				</div>

			</div>

		<!-- .wrapper -->
		</footer>

	</section>

		<!-- #content -->



			



	<script src="<?=$site_url?>/js/jquery.min.js" defer="defer"></script>
	<script src="<?=$site_url?>/js/jquery.fancybox.js" defer="defer"></script>
	<script src="<?=$site_url?>/js/custom.js" defer="defer"></script>

</body>
</html>

Turned into:

<?php require('test_drive.php'); ?>
<footer>

<div class="wrapper">

<div class="column half left">ARGOATV.BG &copy; <?=date('Y')?>. ΜΕ ΕΠΙΦΥΛΑΞΗ ΚΑΘΕ ΝΟΜΙΜΟΥ ΔΙΚΑΙΩΜΑΤΟΣ.</div>

				

<div class="column half right social"><a href="http://facebook.com/Argoatvbg" title="Σελίδα Facebook" target="_blank"><img src="<?=$site_url?>/img/facebook.png" alt="Facebook" /></a> <a href="https://twitter.com/ArgoBulgaria" title="Προφίλ Twitter" target="_blank"><img src="<?=$site_url?>/img/twitter.png" alt="Twitter" /></a> <a href="http://www.youtube.com/user/ArgoBulgaria" title="Κανάλι YouTube" target="_blank"><img src="<?=$site_url?>/img/youtube.png" alt="YouTube" /></a></div>

			</div>

		<!-- .wrapper --></footer>

	</section>

		<!-- #content --><script src="<?=$site_url?>/js/jquery.min.js" defer="defer"></script>
	<script src="<?=$site_url?>/js/jquery.fancybox.js" defer="defer"></script>
	<script src="<?=$site_url?>/js/custom.js" defer="defer"></script>

</body>
</html>

The solution to this is first to find out which file type is used to parse your file. Then, you change the settings for that file type and reimport (after deleting the old files).
whitespace-studio-0 whitespace-studio

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: