easy_localization_loader icon indicating copy to clipboard operation
easy_localization_loader copied to clipboard

[Suggestion] Explanation for CSV format

Open jbt-cii opened this issue 4 years ago • 2 comments

Hello,

Thank you for your package, it is very helpful.

I make a suggestion: it would be nice to explain a little bit some things about the CSV format (and maybe for others formats).

I made several tests to understand what it was possible to do with CSV format.

So I know now that CSV works only:

  • with only comma separator (semicolon or other separator are not accepted)

  • with non-printable control character CRLF (Carriadge Return and Line Feed) and not only LF (Line Feed)

  • with a specific header : str,en_US,fr_FR, and so on

  • with or without double quotes

  • the key can be a keyword or simply the english version... we can mix the 2 ways, for instance:

"str","en_US","fr_FR" "button to change the language into french","button to change the language into french","bouton pour passer l'application en langue anglaise" "form.error.client_user.not_valid","please enter a valid user","merci de saisir un utilisateur valide"

  • and when we change a translation, we need to rebuild the whole application

Personally, with each modification, I redo a sort on the CSV file according to the key to reorder everything in alphabetical order to identify possible duplicates. Do not forget to put the header back in the 1st line afterwards.

jbt-cii avatar Feb 24 '21 08:02 jbt-cii

I agree, at least a CRLF instead of LF warning would be appreciated.

jakubkrapiec avatar May 18 '21 16:05 jakubkrapiec

More information is always welcome, but I found that the example app has some files, including a csv.

Folder: https://github.com/aissat/easy_localization/tree/master/example/resources/langs

ben-xD avatar Feb 13 '22 17:02 ben-xD