Description: There's no good default for the LanguageTool "Base URL" setting, and users don't know what to add there. Steps to Reproduce: 1. Got to Tools -> Options -> Language Settings -> LanguageTool Server Settings. 2. Click "Enable LanguageTool". Actual Results: There's no useful default for the "Base URL", and users don't know what to add there. Expected Results: "https://api.languagetool.org/v2" would be a good default. Reproducible: Always User Profile Reset: No Additional Info: n/a
Created attachment 181881 [details] screenshot of empty settings for LanguageTool
I am not sure we could recommend some specific tool in the UI itself. However, more information can be provided in the Help page, which today is missing. Clicking the Help button in the dialog you mentioned will land in [1] which has not been written yet. [1] https://help.libreoffice.org/7.4/en-US/text/shared/05/err_html.html?System=UNIX&DbPAR=WRITER&HID=cui/ui/langtoolconfigpage/OptLangToolPage We could possibly list a few options and provide more information in the help page.
I don't think a feature that requires the user to read the help pages and copy configuration values from there has a good usability. If you're not happy with one specific default, you could change the UI to let the user choose between a server on the internet and a local server, like our browser add-on does. I'll attach a screenshot of that.
Created attachment 181886 [details] server settings as used in the LT browser add-on
@Heiko, how do you think we should deal with this issue in the new LanguageTool feature? The help page surely needs to be written, but should we also provide a default in the UI ?
If there is no sane alternative for now to what Daniel proposes I think setting this default is convenient. Alternatively we could insert it as hint text, although many users might not understand the difference between the truly entered value and the grayed out tip. So my take is to follow Daniels proposal.
We discussed this topic at the ESC. Using the default URL is a convenience feature and we should follow Daniel's suggestion. Furthermore, I recommend to add to URL and API key a placeholder text like "Leave this field empty to access the free version". Code pointer: * cui/uiconfig/ui/langtoolconfigpage.ui * cui/source/options/optlanguagetool.cxx, set_placeholder_text()
Created attachment 183389 [details] Screenshot of the patched dialog I created a patch to set the placeholder text in this dialog (see attached image). Let me know if this is OK. The patch is available for review at: https://gerrit.libreoffice.org/c/core/+/142197
BTW just now I noticed that I added the URL as "placeholder" text as well. Let me know if I should change it to regular text.
(In reply to Rafael Lima from comment #9) > BTW just now I noticed that I added the URL as "placeholder" text as well. I like it visually but the text is actually empty and get_text() will not return the placeholder. Could be easily solved by "if isEmpty()". Or maybe I'm wrong. Have you check the functionality?
(In reply to Heiko Tietze from comment #10) > I like it visually but the text is actually empty and get_text() will not > return the placeholder. Could be easily solved by "if isEmpty()". Or maybe > I'm wrong. Have you check the functionality? I changed the design a bit. Now the dialog works as follows: 1) The first time the user enables the tool via the checkbox, the default URL is added as real text (not as placeholder text) 2) If the user deletes the URL, a placeholder text says "Leave this field empty to use the default URL"; Hence, if no URL is set the default URL is used 3) If a different URL is defined, then it is the one saved and used by the tool
Rafael Lima committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/2c8a760a18501acaa6e4ff2a2dee76b0bad275f1 tdf#150494 LanguageTool: Add placeholder text with default value info It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/7c6c58197a84cf22789ca3dc97e863390c31a2f9 Related: tdf#150494 add placeholder text to the REST protocol field It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/a32c563fdddf7aa7211df830c037fbb4daf41ae0 Related: tdf#150494 add placeholder text to the REST protocol field It will be available in 7.6.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.