slang-i18n / slang

Type-safe i18n for Dart and Flutter
https://pub.dev/packages/slang
MIT License
474 stars 39 forks source link

option to specify csvSettingsDetector #113

Open deadsoul44 opened 1 year ago

deadsoul44 commented 1 year ago

Motivation I am using a different text delimiter. Slang cannot parse my csv.

Developer Experience There should be an option to specify csvSettingsDetector.

var d = new FirstOccurrenceSettingsDetector(eols: ['\r\n', '\n'], textDelimiters: ['"', "'"]);
new CsvToListConverter(csvSettingsDetector: d);
Tienisto commented 1 year ago

Thanks for this issue!

I think that your solution is good enough to be default as it supports both CRLF and LF, " and '.

Released in v3.5.0.

deadsoul44 commented 1 year ago

Actually, I use a different delimiter and wanted to specify it as a parameter. I checked the changelog, docs, tests and couldn’t see that kind of parameter. I guess you added the above as builtin default values.

Tienisto commented 1 year ago

Alright, sorry. Yep, this is now default. I guess this parameter is missing in the config file.

deadsoul44 commented 1 year ago

Friendly reminder :) This is the only blocking issue to switch from another localization package.