I've just used a pretty nice translation service, but it is exports results as a .zip file with several translations as .csv files.
My target translation should look like one combined .csv file with a bunch of different columns.
Transforming them manually everytime would be an incredibly tedious chore, so, that's where this little app comes in handy.
- First time app is run, it is gonna create settings file
settings.json(Almost all settings are pretty self-descriptive, only note thatInputFileSearchis using wildcards to find file andKeyColumnNameis column name for output file). - The second time app is run, it is gonna start parsing found
.zipfile. - Then it is starting parsing languages from file names in archive like
*.[lang].csv. - After that, it is extracting each file and parsing content. Here's the expected input table, make sure to specify correct column indexes in the settings:
| [KEY] | ... | [VALUE] |
|---|---|---|
| [KEY] | ... | [VALUE] |
- All parsed files than are combined into one big translation table. Here's the output format, where
Keycolumn name can be specified in settings:
| Key | Language 1 | ... | Language N |
|---|---|---|---|
| [KEY] | [VALUE] | ... | [VALUE] |
- And finally the file is saved in the directory, where app was executed from. Output file name can be set up through settings.
Pretty sure nobody will be viewing this repo, but if you do, feel free to do whatever you want with this code, no licenses whatsoever.
Just created this lil app to help me in my personal project and uploaded here to not lose it.
(c) tshmofen