blob: 615d14e8c5f4273386fbe243e6ab5224e18a8685 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001#ifndef LOCALIZE_H
2#define LOCALIZE_H
3
4#include "XLIFFFile.h"
5
6#include <map>
7#include <string>
8
9using namespace std;
10
11struct Reject
12{
13 string file;
14 string name;
15 string comment;
16};
17
18struct Settings
19{
20 string id;
21 string oldVersion;
22 string currentVersion;
23 vector<string> apps;
24 vector<Reject> reject;
25};
26
27int read_settings(const string& filename, map<string,Settings>* result, const string& rootDir);
28string translated_file_name(const string& file, const string& locale);
29bool keep_this_trans_unit(const string& file, const TransUnit& unit, void* cookie);
30int validate_config(const string& settingsFile, const map<string,Settings>& settings,
31 const string& configs);
32int validate_configs(const string& settingsFile, const map<string,Settings>& settings,
33 const vector<string>& configs);
34int select_files(vector<string> *resFiles, const string& config,
35 const map<string,Settings>& settings, const string& rootDir);
36int select_files(vector<vector<string> > *allResFiles, const vector<string>& configs,
37 const map<string,Settings>& settings, const string& rootDir);
38
39
40#endif // LOCALIZE_H