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

issue/2853 Fixed csv delimiter detection on translate import #2857

Merged
merged 3 commits into from
Aug 24, 2020
Merged

Conversation

oliverfoster
Copy link
Member

@oliverfoster oliverfoster commented Jul 31, 2020

#2853
translate:import delimiter detection was broken when the first value to import contained slashes (html usually).

"articles/a-05/title/","<div>a-05</div>"
"articles/a-10/title/","a-10"
"articles/a-15/title/","a-15"
"articles/a-15/_trickle/_button/startText/","Continue"
"articles/a-20/title/","a-20"

Changed

  • Now detects delimiters only when none is specified at the command line --csvDelimiter=','
  • Now only supports the detection of the delimiters , ; | tab and space
  • Will now error if csv delimiter isn't specified and cannot be detected

Notes

  • Still exports with comma as the default delimiter

Regexp test: /^[^,;\t| \n\r]+/"{0,1}[,;\t| ]{1}/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link

@lc-alexanderbenesch lc-alexanderbenesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀👍

@moloko moloko merged commit 3bc68f8 into master Aug 24, 2020
@moloko moloko deleted the issue/2853 branch August 24, 2020 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CVS delimiter detection is wrong on importing csv language files
5 participants