2016-01-30 9:55 GMT+01:00 Marcin Miłkowski <list-addr...@wp.pl>:

>
> Why not simply port some of the code that we have for listing all
> categories of rules -- or even write up a small piece of Java code to
> create a resource file that would be used to create a localized dialog
> for a given language? This seems the easiest option. A more complex
> option is to port most of the whole settings dialog.
>

The list of all rules is too large to be manageable, and every language has
different needs. I would like to have a customizable form for every
language and not to redo it for every user interface (LibreOffice,
stand-alone, web, MS Word...).

My preferred approach would be to write a "configuration program" (in
HTML/JavaScript), with a custom form for every language. This program would
generate output(s) that can be used everywhere (stand-alone LT,
command-line LT, LibreOffice, LT server, any LT client...). What do you
think?  Could we plan how to do it?

This solution is not perfect. If we want access to the full list of rules
in every language from LT, then we have to do it in Java.

I also noticed that the code looks at the beginning of the paragraph to
> set the language, which was Polish in my case, but the first visible
> character was English, and the whole paragraph was English. In other
> words, something went south when checking. I had to mark the whole page
> as English and it worked perfectly but MS Word checks were fine before...
>

LanguageTool gets the language definition from MS Word at the paragraph
level. Then the MS Word language code is mapped to an ISO code here [1]. I
didn't find a better way to do this. There are still a lot of missing
languages, but English and Polish are there. I will complete or rewrite
this method.

If the paragraph has mixed languages or the language is not in the mapping
method, then the default language in LT settings is used.

As for mixed paragraphs, we could try to split the sentences (but we don't
do this in LibreOffice) or we could try to use the language defined at the
start of the paragraph (instead of the default language).

[1]
https://github.com/jaumeortola/languagetool-msword10-addin/blob/master/languagetool-msword10-addin/ThisAddIn.cs#L262



> What about a Mac version? Is it much more difficult? I know that the
> plugin code changed a lot between Word version but maybe the latest
> versions could be supported?
>

We use the VSTO framework and I'm afraid this is only for Windows. Probably
something similiar can be written in Visual Basic for Mac.

Regards,
Jaume
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to