I want to make a custom translation. Actually I want to show the (English source) of column E of the translations csv plus the translated term (column F) together. In my case it is a combination of English and Chinese so practically I want to see "Sales 销售“ for the 'Sales' Module for example
I have a python script that should do that (combining column E and column F of the Chinese language .csv) that looks like this
filename = sys.argv
with open(filename, 'rb') as f:
rows = list(csv.reader(f))
for row in rows:
if row != row:
row = ' '.join((row, row))
with open('chinese_english_combined.csv', 'wb') as f:
writer = csv.writer(f)
this worked with an older v7 but now trying to combine languages in v8 I get an error
Traceback (most recent call last):
File "combineLanguages.py", line 9, in <module>
if row != row:
IndexError: list index out of range
EDIT: I did not write the script myself and I don't know python, that's why I'm asking here
"List index out of range" means that either column 5 or 6 (the counting starts at 0 for the first column) is not filled in correctly, or might even be missing. Make sure that the csv file you are feeding your script is exactly equal to the one you use in verison 7. That means that it should have the exact same columns, in the exact same order and has at least one row.
If you can confirm that is the case, make sure the 5th and 6th columns at least contain some value.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 10/7/14, 5:39 AM|
|Seen: 909 times|
|Last updated: 3/16/15, 8:10 AM|