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

Update CSV generation to handle form titles with translations #3735

Open
esurface opened this issue Oct 2, 2024 · 0 comments
Open

Update CSV generation to handle form titles with translations #3735

esurface opened this issue Oct 2, 2024 · 0 comments

Comments

@esurface
Copy link
Contributor

esurface commented Oct 2, 2024

A project with translations in the form title hit an error when generating CSVs.

Image

The special characters are not the issue, the CSV generation code handles those, but the length in this case is too long for the javascript file system.

2024-10-02T17:55:37.688Z ERROR /tangerine/server/src/scripts/generate-csv-data-set/generate-csv-data-set.js:51:11 Error when exec-ing generate-csv: Error: Command failed: cd /tangerine/server/src/scripts/generate-csv/ && ./bin.js group-d4ffd76e-3cd7-490a-a43f-7930e907e671-reporting form-8e017ebb-1266-40fc-ba10-daf902069b38 "/csv/ECN_Survey-_t-lang_en_Annex_E__Household_Baseline_Survey_Instrument___t-lang__t-lang_amh_አባሪ_ሠ፡_የቤት_ለቤት_የዳሰሳ_ጥናት_መረጃ_መሰብሰቢያ_ቅጽ___t-lang__t-lang_orm_Dabalata_E__Meeshaa_Qorannoo_Bu’uuraa_Abbaa_War-1727891737344.csv" 50 0 '' ''
[Error: ENAMETOOLONG: name too long, open '/csv/ECN_Survey-_t-lang_en_Annex_E__Household_Baseline_Survey_Instrument___t-lang__t-lang_amh_አባሪ_ሠ፡_የቤት_ለቤት_የዳሰሳ_ጥናት_መረጃ_መሰብሰቢያ_ቅጽ___t-lang__t-lang_orm_Dabalata_E__Meeshaa_Qorannoo_Bu’uuraa_Abbaa_War-1727891737344.csv'] {
  errno: -36,
  code: 'ENAMETOOLONG',
  syscall: 'open',
  path: '/csv/ECN_Survey-_t-lang_en_Annex_E__Household_Baseline_Survey_Instrument___t-lang__t-lang_amh_አባሪ_ሠ፡_የቤት_ለቤት_የዳሰሳ_ጥናት_መረጃ_መሰብሰቢያ_ቅጽ___t-lang__t-lang_orm_Dabalata_E__Meeshaa_Qorannoo_Bu’uuraa_Abbaa_War-1727891737344.csv'
}

Options

  1. Strip the form title down to 60 chars
  2. Use the form id instead of the form title
  3. If translation tags exist, use the english translation (what if there is no english?)
  4. In the form definition, change how translations are handled --> For example, have "formTile" and "formTitleTranslations" as attributes.
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

When branches are created from issues, their pull requests are automatically linked.

1 participant