Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FacilitatorApp MY insert empty string in splitgps #53

Closed
wants to merge 1 commit into from

Conversation

esmeetewinkel
Copy link
Collaborator

@esmeetewinkel esmeetewinkel commented Oct 23, 2023

Running

py app/scripts/prepare_for_translation.py app\config_files\plh_facilitator_my_settings.json

only works correctly when the proposed changes are made to plh_facilitator_my_settings.json, that is, the SplitGroups each contain two items. Otherwise, I get the error

Traceback (most recent call last):
  File "C:\Users\Esmee\Documents\GitHub\idems_translation\app\scripts\prepare_for_translation.py", line 40, in <module>
    main()
  File "C:\Users\Esmee\Documents\GitHub\idems_translation\app\scripts\prepare_for_translation.py", line 26, in main
    dest_path = group_info[1]
IndexError: list index out of range
image

@edmoss345 Could you see if you can fix this in the prepare_for_translation.py script?
If yes, we can undo the changes in my commit.
If no, we can just merge this as is because this does provide a work-around.

@edmoss345
Copy link
Collaborator

@esmeetewinkel , having reminded myself what is going on here, the reason that SplitGroups expects pairs of values is that In SplitGroups the first entry in the list is the name of the file where all of the translated text is collected, the second entry in the list is the folder in which that file is stored. I'm assuming that if you don't want to provide the folder information, then you just want all the POT files to be exported direct to the 'ReadyForTranslation" folder. They will all go into an 'en' file by default.

The workaround you have is ok, but I will just make a quick modification to the code so that if we don't provide a folder location then nothing will crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants