benjypng / logseq-datenlp-plugin

MIT License
74 stars 6 forks source link

Additional languages? #9

Closed georgd closed 2 years ago

georgd commented 2 years ago

How are the languages implemented? Is it very difficult to add more? I’d like to use it in German.

If it’s necessary for adding the language to do some translation work, I’m ready to help.

benjypng commented 2 years ago

You can try following the instructions here, and put "de". E.g. in your logseq-datenlp-plugin.json file:

{
    "lang": "de"
}
georgd commented 2 years ago

Sorry, that doesn't work. Perhaps the code in parseDates.tsx prevents it?

 ​    ​if​ ​(​lang​ ​===​ ​'fr'​ ​||​ ​lang​ ​===​ ​'ja'​ ​||​ ​lang​ ​===​ ​'nl'​ ​||​ ​lang​ ​===​ ​'en'​)​ ​{
benjypng commented 2 years ago

Ah, apologies forgot to add in the partially supported languages.

Please update to v3.8.4 and try again.

georgd commented 2 years ago

Great, thanks! It works now. Could you please tell me in how far these languages are only partially supported?

benjypng commented 2 years ago

I have actually no idea! I don't speak German so I can't test. Perhaps maybe some linguistic styles within the German language are not supported? I'm not sure.

On Tue, Feb 15, 2022 at 4:35 PM Georg Mayr-Duffner @.***> wrote:

Great, thanks! It works now. Could you please tell me in how far these languages are only partially supported?

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-datenlp-plugin/issues/9#issuecomment-1039999403, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGI7GDH6ZBDS2RFUWGLU3IF57ANCNFSM5OMVXZOQ . You are receiving this because you commented.Message ID: @.***>

georgd commented 2 years ago

OK, found out it’s chrone-node where DE is missing some parts that are present in the fully supported ones. But the basic parsing is fine.

benjypng commented 2 years ago

I see! Feel free to do PRs for chrono-node and it's merged, I'll update the dependency version on the plugin as well.

natrius commented 1 year ago

Is it possible to use english and german at the same time?