40ants / lisp-project-of-the-day

Here I'll post notes about Quicklisp projects. Also I publish them on Twitter account svetlyak40wt.
http://40ants.com/lisp-project-of-the-day/
BSD 2-Clause "Simplified" License
51 stars 6 forks source link

cl-locale #13

Open utterances-bot opened 4 years ago

utterances-bot commented 4 years ago

cl-locale

https://40ants.com/lisp-project-of-the-day/2020/04/0053-cl-locale.html

vindarel commented 4 years ago

It seems there is no function to extract the strings from source code? That would be a no-go, I don't see myself adding each string to translate in each dictionary file manually. Hope I'm wrong :S

svetlyak40wt commented 4 years ago

README says that in the difference section that the difference from cl-l10n is that cl-l10n does not has the tools to automatically generate localizable files / language files. I made conclusion, that cl-locale does have these tools.

svetlyak40wt commented 4 years ago

But looking through cl-locale's code, I don't see anything related to collection of localizable strings.

svetlyak40wt commented 4 years ago

Asked a question in cl-locale's repo:

https://github.com/fukamachi/cl-locale/issues/4

mdbergmann commented 4 years ago

Gettext based localisation libs have this automated. But I know a lot of frameworks where you have to add the keys and values manually.

There is also https://notabug.org/cage/cl-i18n

vindarel commented 4 years ago

I actually did set up this cl-18n lib last year but I don't remember its advantage or limitation :D I should get back to it in the coming weeks…

mdbergmann commented 4 years ago

I actually did set up this cl-18n lib last year but I don't remember its advantage or limitation :D I should get back to it in the coming weeks…

I've also tried it. But I've run into some trouble which I can't remember what it was. But I have to revisit, because gettext based libs are quite nice.

vindarel commented 4 years ago

I made a quick overview of the changes brought by cage/cl-18n over the Quicklisp one: https://notabug.org/cage/cl-i18n/issues/3

(and erratum: I only tried the QL cl-18n, not Cage's)

mdbergmann commented 4 years ago

Thanks

vindarel commented 4 years ago

I also found this: https://github.com/dkochmanski/translate It doesn't use gettext, it doesn't support pluralization, but it has a convenient function to collect non-translated strings.

mdbergmann commented 4 years ago

Cool. Btw: I'm using cl-i18n in a project now. The gettext part is an alternative in this library. It does implement its own format for files to translate and can also search in the sources to collect them and generate them.