Index: /CKLangTool/trunk/_dev/build.xml
===================================================================
--- /CKLangTool/trunk/_dev/build.xml	(revision 7080)
+++ /CKLangTool/trunk/_dev/build.xml	(revision 7081)
@@ -27,4 +27,5 @@
 			<arg value="${source.dir}/includes/cklangtool.js" />
 			<arg value="${source.dir}/includes/ckjpformat.js" />
+			<arg value="${source.dir}/includes/ckpoformat.js" />
 			<arg value="${source.dir}/includes/io.js" />
 			<classpath>
@@ -37,4 +38,5 @@
 		<copy file="${source.dir}/includes/cklangtool/includes/cklangtool.class" tofile="${build.dir}/cklangtool/includes/cklangtool.class" overwrite="true" />
 		<copy file="${source.dir}/includes/cklangtool/includes/ckjpformat.class" tofile="${build.dir}/cklangtool/includes/ckjpformat.class" overwrite="true" />
+		<copy file="${source.dir}/includes/cklangtool/includes/ckpoformat.class" tofile="${build.dir}/cklangtool/includes/ckpoformat.class" overwrite="true" />
 		<copy file="${source.dir}/includes/cklangtool/includes/io.class" tofile="${build.dir}/cklangtool/includes/io.class" overwrite="true" />
 		<copy file="${source.dir}/cklangtool/langtool.class" tofile="${build.dir}/cklangtool/langtool.class" overwrite="true" />
Index: /CKLangTool/trunk/_source/includes/ckjpformat.js
===================================================================
--- /CKLangTool/trunk/_source/includes/ckjpformat.js	(revision 7080)
+++ /CKLangTool/trunk/_source/includes/ckjpformat.js	(revision 7081)
@@ -1,4 +1,4 @@
 /*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
@@ -11,11 +11,4 @@
 	{
 	};
-
-	/**
-	 * Language code of currently processed file (taken from
-	 * CKEDITOR.lang['code']).
-	 */
-	var languageCode;
-	var fileOverviewBlock;
 
 	function printObject( prefix, o )
@@ -39,70 +32,18 @@
 	function processFile( file )
 	{
-		var licenseInfo = "# Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r\n# For licensing, see LICENSE.html or http://ckeditor.com/license\r\n\r\n";
-		
-		fileHeader = getFileOverview( file.getAbsolutePath() ).replace( /\{.*?\}/g, '' ).replace( /@fileOverview/g, '' ).replace(/\s*(\/)?\s*(\*)+(\/)?/g , '').replace(/\s+/g, ' ');
-		
+		var date = new Date(),
+			licenseInfo = "# Copyright (c) 2003-" + date.getFullYear() + ", CKSource - Frederico Knabben. All rights reserved.\r\n# For licensing, see LICENSE.html or http://ckeditor.com/license\r\n\r\n";
+
 		var result = CKLANGTOOL.loadLanguageFile( file );
-		
+		var fileInfo = CKLANGTOOL.analyzeLanguageFile( file );
+		fileHeader = fileInfo.fileOverviewBlock.replace( /\{.*?\}/g, '' ).replace( /@fileOverview/g, '' ).replace(/\s*(\/)?\s*(\*)+(\/)?/g , '').replace(/\s+/g, ' ');
+
 		return licenseInfo + '#' + fileHeader + '\r\n\r\n' + printObject( '', result.translation );
 	}
 
-	var regexLib =
-	{
-		inlineComment :Pattern.compile( "^\\s*\\/\\/" ),
-		blockCommentStart :Pattern.compile( "\\/\\*" ),
-		blockCommentEnd :Pattern.compile( "\\*\\/" ),
-		fileOverview :Pattern.compile( " @fileOverview" ),
-	};
-	
 	/**
 	 * Returns an array with missing keys (already marked as //MISSING).
 	 */
-	function getFileOverview( file )
-	{
-		fileOverviewBlock = '/**\n* @fileOverview \n*/';
 
-		var inBlockComment = false;
-		var blockComment = [];
-		var matcher, line;
-		var lines = CKLANGTOOL.io.readFileIntoArray( file );
-
-		for ( var j = 0 ; j < lines.length ; j++ )
-		{
-			line = lines[ j ];
-			if ( !inBlockComment )
-			{
-				matcher = regexLib.inlineComment.matcher( line );
-				if ( matcher.find() )
-					continue;
-
-				matcher = regexLib.blockCommentStart.matcher( line );
-				if ( matcher.find() )
-				{
-					inBlockComment = true;
-					blockComment.push( line );
-					continue;
-				}
-			}
-			else
-			{
-				blockComment.push( line );
-
-				matcher = regexLib.blockCommentEnd.matcher( line );
-				if ( matcher.find() )
-				{
-					inBlockComment = false;
-
-					matcher = regexLib.fileOverview.matcher( blockComment.join( "" ) );
-					if ( matcher.find() )
-						fileOverviewBlock = blockComment.join( "\n" );
-					blockComment = [];
-				}
-			}
-		}
-
-		return fileOverviewBlock;
-	}
-	
 	CKLANGTOOL.jpformat.prototype =
 	{
Index: /CKLangTool/trunk/_source/includes/cklangtool.js
===================================================================
--- /CKLangTool/trunk/_source/includes/cklangtool.js	(revision 7080)
+++ /CKLangTool/trunk/_source/includes/cklangtool.js	(revision 7081)
@@ -1,4 +1,4 @@
 /*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
@@ -11,5 +11,5 @@
 	languageDir : "",
 	templateFile : "",
-	operation : "default",
+	format : "json",
 	/**
 	 * Holds the content of en.js language file where strings are replaced with
@@ -149,8 +149,7 @@
 	 * Returns an array with missing keys (already marked as //MISSING).
 	 */
-	function analyzeLanguageFile( file )
-	{
-		fileOverviewBlock = '/**\n* @fileOverview \n*/';
-
+	CKLANGTOOL.analyzeLanguageFile = function( file )
+	{
+		var fileOverview = '/**\n* @fileOverview \n*/';
 		var key = "ckeditor_translation";
 		var out =
@@ -245,5 +244,5 @@
 					if ( matcher.find() )
 					{
-						fileOverviewBlock = blockComment.join( "\n" );
+						fileOverview = blockComment.join( "\n" );
 					}
 					blockComment = [];
@@ -252,6 +251,6 @@
 		}
 
-		return out;
-	}
+		return { missingKeys : out, fileOverviewBlock : fileOverview };
+	};
 
 	/**
@@ -267,5 +266,5 @@
 	 * description)
 	 */
-	function createTemplate( file )
+	CKLANGTOOL.translator.createTemplate = function( file )
 	{
 		var key = "ckeditor_translation";
@@ -428,5 +427,5 @@
 	 * translation[common][textfield]
 	 */
-	function getTranslation( translation, translationKey )
+	CKLANGTOOL.translator.getTranslation = function( translation, translationKey )
 	{
 		var dotPos;
@@ -491,5 +490,4 @@
 	function processFile( file )
 	{
-		var missingKeys = analyzeLanguageFile( file );
 		var matchResult, replacement, translationKey;
 		var string = CKLANGTOOL.template;
@@ -498,5 +496,8 @@
 		var result = CKLANGTOOL.loadLanguageFile( file );
 		var translation = result.translation;
-
+		var fileInformation = CKLANGTOOL.analyzeLanguageFile( file ),
+			missingKeys = fileInformation.missingKeys;
+
+		fileOverviewBlock = fileInformation.fileOverviewBlock;
 		languageCode = result.languageCode;
 
@@ -508,5 +509,5 @@
 			 */
 			translationKey = matchResult.group( 0 ).slice( 22, -1 );
-			replacement = getTranslation( translation, translationKey );
+			replacement = CKLANGTOOL.translator.getTranslation( translation, translationKey );
 
 			/*
@@ -519,5 +520,5 @@
 				 * FoldersTitle : '[MISSING_TRANSLATION]Folders',
 				 */
-				replacement = "[MISSING_TRANSLATION]" + getTranslation( CKLANGTOOL.englishTranslation, translationKey );
+				replacement = "[MISSING_TRANSLATION]" + CKLANGTOOL.translator.getTranslation( CKLANGTOOL.englishTranslation, translationKey );
 				string = (string.substring( 0, matchResult.start() ) + replacement + string.substring( matchResult.end() ));
 
@@ -577,5 +578,5 @@
 		run : function()
 		{
-			CKLANGTOOL.template = createTemplate( CKLANGTOOL.templateFile );
+			CKLANGTOOL.template = CKLANGTOOL.translator.createTemplate( CKLANGTOOL.templateFile );
 			var result = CKLANGTOOL.loadLanguageFile( CKLANGTOOL.templateFile ); 
 			CKLANGTOOL.englishTranslation = result.translation; 
@@ -617,5 +618,6 @@
 			}
 
-			var header = "Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r\nFor licensing, see LICENSE.html or http://ckeditor.com/license\r\n\r\n";
+			var date = new Date(),
+				header = "Copyright (c) 2003-" + date.getFullYear() + ", CKSource - Frederico Knabben. All rights reserved.\r\nFor licensing, see LICENSE.html or http://ckeditor.com/license\r\n\r\n";
 
 			languages.sort();
Index: /CKLangTool/trunk/_source/includes/ckpoformat.js
===================================================================
--- /CKLangTool/trunk/_source/includes/ckpoformat.js	(revision 7081)
+++ /CKLangTool/trunk/_source/includes/ckpoformat.js	(revision 7081)
@@ -0,0 +1,164 @@
+/*
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+importPackage( java.util.regex );
+
+( function()
+{
+	/*
+	 * An array with missing keys in current translation.
+	 */
+	var missingKeys;
+
+	CKLANGTOOL.poformat = function()
+	{
+		return {
+			run : function()
+			{
+				var children = CKLANGTOOL.languageDir.list();
+				var file, poFile;
+				var foundFiles = false;
+
+				metaInformation = loadMetaInformation();
+
+				for ( var i = 0 ; i < children.length ; i++ )
+				{
+					if ( CKLANGTOOL.io.getExtension( children[ i ] ) != "js" || children[ i ].indexOf( '_' ) == 0 )
+						continue;
+
+					file = new File( CKLANGTOOL.languageDir, children[ i ] );
+					if ( file.isFile() )
+					{
+						poFile =  new File( CKLANGTOOL.destinationDir, children[i].replaceAll( '.js', '.po' ) );
+						print( "Processing " + file.getAbsolutePath() );
+
+						CKLANGTOOL.io.saveFile( poFile, processFile(file), false );
+						foundFiles = true;
+					}
+				}
+
+				if ( !foundFiles )
+				{
+					print( "WARNING: language files not found." );
+				}
+
+				print( "Process completed." );
+			}
+		};
+	};
+
+	/**
+	 * Meta file stores an extra information about each string (context, user friendly description).
+	 * The format is:
+	 * fieldId = information
+	 * 
+	 * Sample entry:
+	 * link.noUrl = Error message shown to the user when URL field is empty.
+	 */
+	function loadMetaInformation()
+	{
+		if (!CKLANGTOOL.metafilePath)
+			return {};
+
+		var lines = CKLANGTOOL.io.readFileIntoArray(CKLANGTOOL.metafilePath);
+		var meta = {};
+
+		for ( var j = 0 ; j < lines.length ; j++ )
+		{
+			var line = lines[ j ];
+			if ( match = line.match( /^\s*([a-z0-9_.]+)\s*=\s*(.*)\s*$/i ) )
+			{
+				meta[match[1]] = match[2];
+			}
+		}
+		return meta;
+	}
+
+	function printObject( prefix, o )
+	{
+		var result = [];
+
+		for ( var key in o )
+		{
+			var entry = o[ key ],
+				entryName = prefix ? ( prefix + '.' + key ) : key;
+
+			if ( typeof entry == 'object' )
+				result.push( printObject( entryName, entry ) );
+			else
+				result.push( poEntry( entryName, entry ) );
+		}
+		
+		return result.join( '' );
+	}
+
+	function msgstrEscape( str )
+	{
+		return str.replace( /"/g, '\\"' ).replace( /\r\n|\n/g, '\\n"$&"' );
+	}
+
+	/**
+	 *  Generate a PO translation entry with the following schematic structure:
+	 *	whte-space
+	 *	# translator-comments
+	 *	#.extracted-comments
+	 *	#:reference...
+	 *	#,flag...
+	 *	#|msgid previous-untranslated-string
+	 *	msid untranslated-string
+	 *	msstr translated-string
+	 *
+	 * @param {String} id The untranslated string part.
+	 * @param {String} str The translated-string part.
+	 * @param {String} [ comment1, comment2... ] Translator comments.
+	 */
+	function poEntry( id, str, comment )
+	{
+		var entry = [];
+		var comments = Array.prototype.slice.call( arguments, 2 );
+		for ( var i = 0; i < comments.length; i++ )
+			entry.push( comments[ i ] );
+		if ( metaInformation[id] )
+			entry.push( '#. ' + metaInformation[id] );
+		if ( missingKeys[id] ) {
+			str = "";
+		}
+		entry.push( 'msgid "' + id + '"', 'msgstr "' + msgstrEscape( str ) + '"', '\n' );
+		return entry.join( '\n' );
+	}
+
+	function poHeader()
+	{
+		return [
+		'"Project-Id-Version: CKEditor\\n"',
+		'"Report-Msgid-Bugs-To: http://dev.ckeditor.com/newticket\\n"',
+		'"POT-Creation-Date: 2011-05-31 00:00+0000\\n"',
+		'"PO-Revision-Date: 2011-05-31 00:30+0000\\n"',
+		'"Last-Translator: CKEditor\\n"',
+		'"Language-Team: CKEditor translation team\\n"',
+		'"MIME-Version: 1.0\\n"',
+		'"Content-Type: text/plain; charset=UTF-8\\n"',
+		'"Content-Transfer-Encoding: 8bit\\n"',
+		'"Language: en\\n"',
+		'"Plural-Forms: nplurals=2; plural=(n != 1)\\n"',
+		'\n'
+		].join( '\n' );
+	}
+	
+	function processFile( file )
+	{
+		// License Info
+		var fileInfo = CKLANGTOOL.analyzeLanguageFile( file );
+		var date = new Date(),
+			license = '# Copyright (c) 2003-' + date.getFullYear() + ', CKSource - Frederico Knabben. All rights reserved.\n# For licensing, see LICENSE.html or http://ckeditor.com/license';
+		var overview = '#' + fileInfo.fileOverviewBlock.replace( /\{.*?\}/g, '' ).replace( /@fileOverview/g, '' ).replace(/\s*(\/)?\s*(\*)+(\/)?/g , '').replace(/\s+/g, ' ');
+
+		missingKeys = fileInfo.missingKeys;
+
+		var language = CKLANGTOOL.loadLanguageFile( file );
+		return poEntry( '', '', license, overview ) + poHeader() + printObject( '', language.translation );
+	}
+
+})();
Index: /CKLangTool/trunk/_source/includes/io.js
===================================================================
--- /CKLangTool/trunk/_source/includes/io.js	(revision 7080)
+++ /CKLangTool/trunk/_source/includes/io.js	(revision 7081)
@@ -1,4 +1,4 @@
 /*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/_source/langtool.js
===================================================================
--- /CKLangTool/trunk/_source/langtool.js	(revision 7080)
+++ /CKLangTool/trunk/_source/langtool.js	(revision 7081)
@@ -1,4 +1,4 @@
 /*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
  */
@@ -54,16 +54,21 @@
 CKLANGTOOL.isCompiled = isCompiled;
 CKLANGTOOL.load( 'cklangtool.includes.ckjpformat' );
+CKLANGTOOL.load( 'cklangtool.includes.ckpoformat' );
 CKLANGTOOL.load( 'cklangtool.includes.io' );
 
 if ( !arguments[0] || arguments[0] == '-help' || arguments[0] == '/?' )
-	error( 'Usage: ' + command + ' lang_dir [-jpformat=dest_dir]'
+	error( 'Usage: ' + command + ' lang_dir [-jpformat=dest_dir]|[-poformat=dest_dir] [-metafile=path]'
 			+ '\n\n CKLangTool corrects translation files and creates report about missing translations.'
-			+ '\n\n -jpformat  Convert files to java properties format and save them in dest_dir.\n' );
+			+ '\n\n -jpformat  Convert files to java properties format and save them in dest_dir'
+			+ '\n\n -poformat  Convert files to GNU gettext PO format and save them in dest_dir.'
+			+ '\n\n -metafile  Path to meta file (used only in conjuction with -poformat).'
+			+ '\n' );
 
 for ( var i = 0 ; i < arguments.length ; i++ )
 {
-	if ( arguments[i].indexOf( "-jpformat=" ) != -1 )
+	var arg = arguments[i], match;
+	if ( match = arg.match( /^-(\w+format)=(.*?)$/ ) )
 	{
-		var destDir = arguments[i].substring( arguments[i].indexOf( "=" ) + 1 );
+		var destDir = match[ 2 ];
 		CKLANGTOOL.destinationDir = new File( destDir );
 		if ( CKLANGTOOL.destinationDir.exists() )
@@ -71,5 +76,12 @@
 		else
 			CKLANGTOOL.destinationDir.mkdir();
-		CKLANGTOOL.operation = "jpformat";
+		CKLANGTOOL.format = match[ 1 ];
+	}
+	if ( match = arg.match( /^-metafile=(.*?)$/ ) )
+	{
+		var metafilePath = match[ 1 ];
+		CKLANGTOOL.metafilePath = new File( metafilePath );
+		if ( !CKLANGTOOL.metafilePath.exists() )
+			error( 'Meta file does not exist: ' + CKLANGTOOL.metafilePath.getAbsolutePath() );
 	}
 }
@@ -99,13 +111,15 @@
 	try
 	{
-		if ( CKLANGTOOL.operation == "jpformat" )
-		{
-			var jpformat = new CKLANGTOOL.jpformat();
-			jpformat.run();
-		}
-		else
+		if ( CKLANGTOOL.format == "json" )
 		{
 			var translator = new CKLANGTOOL.translator();
 			translator.run();
+
+		}
+		// Convert or sync languages files from other format.
+		else
+		{
+			var format = new CKLANGTOOL[ CKLANGTOOL.format ]();
+			format.run();
 		}
 	}
Index: /CKLangTool/trunk/test/_assets/jpformat/de.js
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/de.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/de.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/jpformat/de.txt.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/de.txt.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/de.txt.correct.txt	(revision 7081)
@@ -1,3 +1,3 @@
-# Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 # For licensing, see LICENSE.html or http://ckeditor.com/license
 
Index: /CKLangTool/trunk/test/_assets/jpformat/en.js
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/en.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/en.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/jpformat/en.txt.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/en.txt.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/en.txt.correct.txt	(revision 7081)
@@ -1,3 +1,3 @@
-# Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 # For licensing, see LICENSE.html or http://ckeditor.com/license
 
Index: /CKLangTool/trunk/test/_assets/jpformat/pl.js
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/pl.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/pl.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/jpformat/pl.txt.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/jpformat/pl.txt.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/jpformat/pl.txt.correct.txt	(revision 7081)
@@ -1,3 +1,3 @@
-# Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 # For licensing, see LICENSE.html or http://ckeditor.com/license
 
Index: /CKLangTool/trunk/test/_assets/poformat/de.js
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/de.js	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/de.js	(revision 7081)
@@ -0,0 +1,82 @@
+﻿/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+/**
+ * @fileOverview Defines the {@link CKEDITOR.lang} object, for the
+ * German language.
+ */
+
+/**#@+
+   @type String
+   @example
+*/
+
+/**
+ * Constains the dictionary of language entries.
+ * @namespace
+ */
+CKEDITOR.lang['de'] =
+{
+	/**
+	 * The language reading direction. Possible values are "rtl" for
+	 * Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
+	 * languages (like English).
+	 * @default 'ltr'
+	 */
+	dir : 'ltr',
+
+	/*
+	 * Screenreader titles. Please note that screenreaders are not always capable
+	 * of reading non-English words. So be careful while translating it.
+	 */
+	editorTitle		: 'Rich text editor, %1', // MISSING
+
+	// Toolbar buttons without dialogs.
+	source			: 'Quellcode',
+	newPage			: 'Neue Seite',
+	save			: 'Speichern',
+	preview			: 'Vorschau',
+
+	// Common messages and labels.
+	common :
+	{
+		browseServer	: 'Server durchsuchen',
+		url				: 'Bildauswahl',
+		protocol		: 'Protokoll',
+		confirmCancel	: 'Some of the options have been changed. Are you sure to close the dialog?' // MISSING
+	},
+
+	// Link dialog.
+	link :
+	{
+		toolbar		: 'Link einfügen/editieren',		// IE6 BUG: A title called "Link" in an <A> tag would invalidate its padding!!
+		noAnchors		: '(keine Anker im Dokument vorhanden)',
+		noUrl			: 'Bitte geben Sie die Link-URL an',
+		noEmail			: 'Bitte geben Sie e-Mail Adresse an'
+	},
+
+	// Table Dialog
+	table :
+	{
+		toolbar		: 'Tabelle',
+
+		cell :
+		{
+			menu			: 'Zelle',
+			insertBefore	: 'Zelle davor einfügen',
+		},
+
+		row :
+		{
+			menu			: 'Zeile',
+		},
+	},
+
+	// Button Dialog.
+	button :
+	{
+		typeRst		: 'Zurücksetzen'
+	},
+};
Index: /CKLangTool/trunk/test/_assets/poformat/de.po.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/de.po.correct.txt	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/de.po.correct.txt	(revision 7081)
@@ -0,0 +1,77 @@
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
+# For licensing, see LICENSE.html or http://ckeditor.com/license
+# Defines the object, for the German language.
+msgid ""
+msgstr ""
+
+"Project-Id-Version: CKEditor\n"
+"Report-Msgid-Bugs-To: http://dev.ckeditor.com/newticket\n"
+"POT-Creation-Date: 2011-05-31 00:00+0000\n"
+"PO-Revision-Date: 2011-05-31 00:30+0000\n"
+"Last-Translator: CKEditor\n"
+"Language-Team: CKEditor translation team\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+msgid "dir"
+msgstr "ltr"
+
+msgid "editorTitle"
+msgstr ""
+
+msgid "source"
+msgstr "Quellcode"
+
+msgid "newPage"
+msgstr "Neue Seite"
+
+msgid "save"
+msgstr "Speichern"
+
+msgid "preview"
+msgstr "Vorschau"
+
+msgid "common.browseServer"
+msgstr "Server durchsuchen"
+
+msgid "common.url"
+msgstr "Bildauswahl"
+
+msgid "common.protocol"
+msgstr "Protokoll"
+
+msgid "common.confirmCancel"
+msgstr ""
+
+msgid "link.toolbar"
+msgstr "Link einfügen/editieren"
+
+msgid "link.noAnchors"
+msgstr "(keine Anker im Dokument vorhanden)"
+
+#. Error message shown to the user when URL field is empty.
+msgid "link.noUrl"
+msgstr "Bitte geben Sie die Link-URL an"
+
+msgid "link.noEmail"
+msgstr "Bitte geben Sie e-Mail Adresse an"
+
+msgid "table.toolbar"
+msgstr "Tabelle"
+
+msgid "table.cell.menu"
+msgstr "Zelle"
+
+#. Label for the context menu item.
+msgid "table.cell.insertBefore"
+msgstr "Zelle davor einfügen"
+
+msgid "table.row.menu"
+msgstr "Zeile"
+
+msgid "button.typeRst"
+msgstr "Zurücksetzen"
+
Index: /CKLangTool/trunk/test/_assets/poformat/en.js
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/en.js	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/en.js	(revision 7081)
@@ -0,0 +1,89 @@
+﻿/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+/**
+ * @fileOverview Defines the {@link CKEDITOR.lang} object, for the English
+ *		language. This is the base file for all translations.
+ */
+
+/**#@+
+   @type String
+   @example
+*/
+
+/**
+ * Constains the dictionary of language entries.
+ * @namespace
+ */
+CKEDITOR.lang['en'] =
+{
+	/**
+	 * The language reading direction. Possible values are "rtl" for
+	 * Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
+	 * languages (like English).
+	 * @default 'ltr'
+	 */
+	dir : 'ltr',
+
+	/*
+	 * Screenreader titles. Please note that screenreaders are not always capable
+	 * of reading non-English words. So be careful while translating it.
+	 */
+	editorTitle		: 'Rich text editor, %1',
+
+	// Toolbar buttons without dialogs.
+	source			: 'Source',
+	newPage			: 'New Page',
+	save			: 'Save',
+	preview			: 'Preview',
+
+	// Common messages and labels.
+	common :
+	{
+		browseServer	: 'Browser Server',
+		url				: 'URL',
+		protocol		: 'Protocol',
+		confirmCancel	: 'Some of the options have been changed. Are you sure to close the dialog?'
+	},
+
+	// Special char dialog.
+	specialChar		:
+	{
+		toolbar		: 'Insert Special Character',
+		title		: 'Select Special Character'
+	},
+
+	// Link dialog.
+	link :
+	{
+		toolbar		: 'Link\u200b',		// IE6 BUG: A title called "Link" in an <A> tag would invalidate its padding!!
+		noAnchors		: '(No anchors available in the document)',
+		noUrl			: 'Please type the link URL',
+		noEmail			: 'Please type the e-mail address'
+	},
+
+	// Table Dialog
+	table :
+	{
+		toolbar		: 'Table',
+
+		cell :
+		{
+			menu			: 'Cell',
+			insertBefore	: 'Insert Cell Before',
+		},
+
+		row :
+		{
+			menu			: 'Row',
+		},
+	},
+
+	// Button Dialog.
+	button :
+	{
+		typeRst		: 'Reset'
+	},
+};
Index: /CKLangTool/trunk/test/_assets/poformat/en.po.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/en.po.correct.txt	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/en.po.correct.txt	(revision 7081)
@@ -0,0 +1,83 @@
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
+# For licensing, see LICENSE.html or http://ckeditor.com/license
+# Defines the object, for the English language. This is the base file for all translations.
+msgid ""
+msgstr ""
+
+"Project-Id-Version: CKEditor\n"
+"Report-Msgid-Bugs-To: http://dev.ckeditor.com/newticket\n"
+"POT-Creation-Date: 2011-05-31 00:00+0000\n"
+"PO-Revision-Date: 2011-05-31 00:30+0000\n"
+"Last-Translator: CKEditor\n"
+"Language-Team: CKEditor translation team\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+msgid "dir"
+msgstr "ltr"
+
+msgid "editorTitle"
+msgstr "Rich text editor, %1"
+
+msgid "source"
+msgstr "Source"
+
+msgid "newPage"
+msgstr "New Page"
+
+msgid "save"
+msgstr "Save"
+
+msgid "preview"
+msgstr "Preview"
+
+msgid "common.browseServer"
+msgstr "Browser Server"
+
+msgid "common.url"
+msgstr "URL"
+
+msgid "common.protocol"
+msgstr "Protocol"
+
+msgid "common.confirmCancel"
+msgstr "Some of the options have been changed. Are you sure to close the dialog?"
+
+msgid "specialChar.toolbar"
+msgstr "Insert Special Character"
+
+msgid "specialChar.title"
+msgstr "Select Special Character"
+
+msgid "link.toolbar"
+msgstr "Link​"
+
+msgid "link.noAnchors"
+msgstr "(No anchors available in the document)"
+
+#. Error message shown to the user when URL field is empty.
+msgid "link.noUrl"
+msgstr "Please type the link URL"
+
+msgid "link.noEmail"
+msgstr "Please type the e-mail address"
+
+msgid "table.toolbar"
+msgstr "Table"
+
+msgid "table.cell.menu"
+msgstr "Cell"
+
+#. Label for the context menu item.
+msgid "table.cell.insertBefore"
+msgstr "Insert Cell Before"
+
+msgid "table.row.menu"
+msgstr "Row"
+
+msgid "button.typeRst"
+msgstr "Reset"
+
Index: /CKLangTool/trunk/test/_assets/poformat/meta.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/meta.txt	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/meta.txt	(revision 7081)
@@ -0,0 +1,6 @@
+# Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+# For licensing, see LICENSE.html or http://ckeditor.com/license
+# Helper file with additional comments for translators.
+
+link.noUrl = Error message shown to the user when URL field is empty.
+table.cell.insertBefore = Label for the context menu item.
Index: /CKLangTool/trunk/test/_assets/poformat/pl.js
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/pl.js	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/pl.js	(revision 7081)
@@ -0,0 +1,83 @@
+﻿/*
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+/**
+ * @fileOverview Defines the {@link CKEDITOR.lang} object, for the
+ * Polish language.
+ */
+
+/**#@+
+   @type String
+   @example
+*/
+
+/**
+ * Constains the dictionary of language entries.
+ * @namespace
+ */
+CKEDITOR.lang['pl'] =
+{
+	/**
+	 * The language reading direction. Possible values are "rtl" for
+	 * Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
+	 * languages (like English).
+	 * @default 'ltr'
+	 */
+	dir : 'ltr',
+
+	// Toolbar buttons without dialogs.
+	source			: 'Źródło dokumentu',
+	newPage			: 'Nowa strona',
+	save			: 'Zapisz',
+	preview			: 'Podgląd',
+
+	// Common messages and labels.
+	common :
+	{
+		browseServer	: 'Przeglądaj',
+		url				: 'Adres URL',
+		protocol		: 'Protokół',
+		confirmCancel	: 'Some of the options have been changed. Are you sure to close the dialog?' // MISSING
+	},
+
+	// Special char dialog.
+	specialChar		:
+	{
+		toolbar		: 'Wstaw znak specjalny',
+		title		: 'Wybierz znak specjalny'
+	},
+
+	// Link dialog.
+	link :
+	{
+		toolbar		: 'Wstaw/edytuj hiperłącze',		// IE6 BUG: A title called "Link" in an <A> tag would invalidate its padding!!
+		noAnchors		: '(W dokumencie nie zdefiniowano żadnych etykiet)',
+		noUrl			: 'Podaj adres URL',
+		noEmail			: 'Podaj adres e-mail'
+	},
+
+	// Table Dialog
+	table :
+	{
+		toolbar		: 'Tabela',
+
+		cell :
+		{
+			menu			: 'Komórka',
+			insertBefore	: 'Wstaw komórkę z lewej',
+		},
+
+		row :
+		{
+			menu			: 'Row', // MISSING
+		},
+	},
+
+	// Button Dialog.
+	button :
+	{
+		typeRst		: 'Wyzeruj'
+	},
+};
Index: /CKLangTool/trunk/test/_assets/poformat/pl.po.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/poformat/pl.po.correct.txt	(revision 7081)
+++ /CKLangTool/trunk/test/_assets/poformat/pl.po.correct.txt	(revision 7081)
@@ -0,0 +1,80 @@
+# Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
+# For licensing, see LICENSE.html or http://ckeditor.com/license
+# Defines the object, for the Polish language.
+msgid ""
+msgstr ""
+
+"Project-Id-Version: CKEditor\n"
+"Report-Msgid-Bugs-To: http://dev.ckeditor.com/newticket\n"
+"POT-Creation-Date: 2011-05-31 00:00+0000\n"
+"PO-Revision-Date: 2011-05-31 00:30+0000\n"
+"Last-Translator: CKEditor\n"
+"Language-Team: CKEditor translation team\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+msgid "dir"
+msgstr "ltr"
+
+msgid "source"
+msgstr "Źródło dokumentu"
+
+msgid "newPage"
+msgstr "Nowa strona"
+
+msgid "save"
+msgstr "Zapisz"
+
+msgid "preview"
+msgstr "Podgląd"
+
+msgid "common.browseServer"
+msgstr "Przeglądaj"
+
+msgid "common.url"
+msgstr "Adres URL"
+
+msgid "common.protocol"
+msgstr "Protokół"
+
+msgid "common.confirmCancel"
+msgstr ""
+
+msgid "specialChar.toolbar"
+msgstr "Wstaw znak specjalny"
+
+msgid "specialChar.title"
+msgstr "Wybierz znak specjalny"
+
+msgid "link.toolbar"
+msgstr "Wstaw/edytuj hiperłącze"
+
+msgid "link.noAnchors"
+msgstr "(W dokumencie nie zdefiniowano żadnych etykiet)"
+
+#. Error message shown to the user when URL field is empty.
+msgid "link.noUrl"
+msgstr "Podaj adres URL"
+
+msgid "link.noEmail"
+msgstr "Podaj adres e-mail"
+
+msgid "table.toolbar"
+msgstr "Tabela"
+
+msgid "table.cell.menu"
+msgstr "Komórka"
+
+#. Label for the context menu item.
+msgid "table.cell.insertBefore"
+msgstr "Wstaw komórkę z lewej"
+
+msgid "table.row.menu"
+msgstr ""
+
+msgid "button.typeRst"
+msgstr "Wyzeruj"
+
Index: /CKLangTool/trunk/test/_assets/translator/_translationstatus.txt.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/_translationstatus.txt.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/_translationstatus.txt.correct.txt	(revision 7081)
@@ -1,3 +1,3 @@
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 
Index: /CKLangTool/trunk/test/_assets/translator/ar.js
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/ar.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/ar.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/ar.js.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/ar.js.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/ar.js.correct.txt	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/de.js
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/de.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/de.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/de.js.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/de.js.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/de.js.correct.txt	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/en.js
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/en.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/en.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/pl.js
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/pl.js	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/pl.js	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/_assets/translator/pl.js.correct.txt
===================================================================
--- /CKLangTool/trunk/test/_assets/translator/pl.js.correct.txt	(revision 7080)
+++ /CKLangTool/trunk/test/_assets/translator/pl.js.correct.txt	(revision 7081)
@@ -1,4 +1,4 @@
 ﻿/*
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+Copyright (c) 2003-__CURRENT_YEAR__, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
Index: /CKLangTool/trunk/test/test.js
===================================================================
--- /CKLangTool/trunk/test/test.js	(revision 7080)
+++ /CKLangTool/trunk/test/test.js	(revision 7081)
@@ -6,11 +6,8 @@
 ( function()
 {
-	var translator = new CKLANGTOOL.translator();
-	var jpformat = new CKLANGTOOL.jpformat();
-
 	// Run tests.
 	var passCount = 0, failCount = 0;
+	CKLANGTOOL.metafilePath = '_assets/poformat/meta.txt';
 
-	
 	function deleteDirectory( path )
 	{
@@ -94,5 +91,5 @@
 			error( "Can't create temp directory: " + tempDir );
 
-		var tests = [ 'jpformat', 'jpformat/out', 'translator' ];
+		var tests = [ 'poformat', 'poformat/out', 'jpformat', 'jpformat/out', 'translator' ];
 
 		for ( var i = 0 ; i < tests.length ; i++ )
@@ -117,4 +114,5 @@
 				copyFile( new File( dir, dirList[i] ), new File( CKLANGTOOL.languageDir, dirList[i] ) );
 
+		var translator = new CKLANGTOOL.translator();
 		translator.run();
 
@@ -131,17 +129,19 @@
 			tempFile = new File( 'tmp/' + name + '/' + testName );
 			correctFile = new File( 'tmp/' + name + '/' + testName + '.correct.txt' );
-			
-			assertEquals( CKLANGTOOL.io.readFile( correctFile ), CKLANGTOOL.io.readFile( tempFile ));
+
+			var date = new Date(),
+				fullYear = date.getFullYear();
+			assertEquals( CKLANGTOOL.io.readFile( correctFile ).replace( /__CURRENT_YEAR__/g, fullYear ), CKLANGTOOL.io.readFile( tempFile ));
 		}
 	}
 	
-	function testJpformat()
+	function testFormat( format )
 	{
-		CKLANGTOOL.languageDir = new File( 'tmp/jpformat' );
-		CKLANGTOOL.destinationDir = new File( 'tmp/jpformat/out' );
-		CKLANGTOOL.templateFile = new File( 'tmp/jpformat', 'en.js' );
+		var tmpDir = 'tmp/' + format + 'format';
+		CKLANGTOOL.languageDir = new File( tmpDir );
+		CKLANGTOOL.destinationDir = new File( tmpDir + '/out' );
+		CKLANGTOOL.templateFile = new File( tmpDir, 'en.js' );
 		
-		var name = 'jpformat';
-		var dir = new File( '_assets/jpformat' );
+		var dir = new File( '_assets/' + format + 'format' );
 		var dirList = dir.list();
 		
@@ -152,5 +152,6 @@
 		}
 
-		jpformat.run();
+		var formatter = new CKLANGTOOL[format + 'format']();
+		formatter.run();
 
 		dirList = CKLANGTOOL.languageDir.list();
@@ -164,8 +165,10 @@
 			testName = dirList[i].replace( ".correct.txt", "" );
 
-			tempFile = new File( 'tmp/jpformat/out/' + testName );
-			correctFile = new File( 'tmp/jpformat/' + testName + '.correct.txt' );
+			tempFile = new File( tmpDir + '/out/', testName );
+			correctFile = new File( tmpDir, testName + '.correct.txt' );
 			
-			assertEquals( CKLANGTOOL.io.readFile( correctFile ), CKLANGTOOL.io.readFile( tempFile ));
+			var date = new Date(),
+				fullYear = date.getFullYear();
+			assertEquals( CKLANGTOOL.io.readFile( correctFile ).replace( /__CURRENT_YEAR__/g, fullYear ), CKLANGTOOL.io.readFile( tempFile ));
 		}
 	}
@@ -173,5 +176,6 @@
 	prepareTempDirs();
 	testTranslator();
-	testJpformat();
+	testFormat('po');
+	testFormat('jp');
 
 	print( '' );
