void Configuration::parseRules(INI& ini) {
	Section* rules =  ini.getSection(L"rules");
	std::vector<std::wstring>& keys = rules->getKeys();
	std::vector<std::wstring>& values = rules->getValues();

	for (unsigned int i = 0 ; i < keys.size() ; i++) {
		File f(values[i]);
		f.expand();
		this->rules.push_back(Rule(keys[i], f.path()));
	}
}
void Configuration::parseTranslations(INI& ini) {
	File profile(L"%{CSIDL_PROFILE}");
	Section* rules =  ini.getSection(L"translation");
	std::vector<std::wstring>& keys = rules->getKeys();
	std::vector<std::wstring>& values = rules->getValues();
	profile.expand();

	for (unsigned int i = 0 ; i < keys.size() ; i++) {
		File f(values[i]);
		std::wstring path;
		f.expand();

		path = f.path();
		if (path.find(profile.path()) == 0)
			path.erase(0, profile.path().length() + 1);

		this->trans.add(keys[i], path);
	}
}