public void generate(PropertiesConverter parser, String sourcePath, String targetPath) {

		File dir = new File(sourcePath);
		File[] files = dir.listFiles();
		if (files != null) {
			for (File file : files) {

				Matcher matcher = propertiesFilesMatcher.getMatcher(file.getName());

				while (matcher.find()) {

					System.out.println("\n------------------------------------------");
					String jsonMessages = parser.process(file);
					if (parser.hasErrors()) {
						throw new RuntimeException("Parsing file: " + file.getName());
					}

					String fileName = matcher.group(propertiesFilesMatcher.getFileNameGroupIndex());
					String languagePostfix = matcher.group(propertiesFilesMatcher.getLanguageGroupIndex());
					String path = targetPath + '/' + fileName + '_' + languagePostfix + ".json";

					writeResult(jsonMessages, path);
				}
			}
		}
	}