Back to LanguageTool Homepage - Privacy - Imprint

[pt] Portuguese rule contribution/discussion


(Marco A.G.Pinto) #101

Yes, I am using prereform :slight_smile:


(Tiago F. Santos) #102

Tested moments ago in another Linux system. It seems that my LibreOffice installation is corrupted since the "NO_VERB" error appears on this system in all variants (pt-PT pos-AO included), using the public daily build.
No bug report needed.
Somehow, deleting my LO profile doesn't seem to solve this issue. Time to wipe the system again.


(Marco A.G.Pinto) #103

@tiagosantos

Hello Tiago,

There are some issues with the dash suggestion:
1) In dates using the format: YYYY-MM-DD (2017-08-17)
2) In postal codes: "2746-501 Queluz"

See the screenshot:

I tested with the daily.

Could you have a look at it?

Thanks!

Kind regards,


(Tiago F. Santos) #104

Good afternoon, Marco,

I have not accounted for a non Portuguese date and time formats (https://en.wikipedia.org/wiki/Date_format_by_country), but I believe this is easy enough to deal with. Note that using this format, you will still have problems with YYYY-MM records, and you will have to actually disable the rule, since it would interfere with YYYY-YY shortened date range detection.

Postal codes like XXXX-XXX are bit trickier because they are ambiguous with B.C. date range (e.g. 1001-999 B.C.), but I believe this can be also managed. Note that for checklists, and databases you will have always plenty of warnings. For example in formal writing you would need to write "Requisição de sessões" or "Início de fisioterapia", but in a schedule that is usual simplification.

Since you are in closer contact with the LibreOffice team, are there any advances regarding the API requested changes? Having a readable italics code would also help in the "e-mail" situation.

Regards


(Marco A.G.Pinto) #105

Tiago, I have filed tons of bug/enhancement requests for LibreOffice in Bugzilla.

I was kind of adding developers to Cc, but then they told me to stop doing that because someone would eventually pick the reports.

This means I post requests there but the people in charge of each are different, so I don't know who to ask.

:frowning:


(Tiago F. Santos) #106

Both fixed on git now. Please confirm with tonight's snapshot release.


(Marco A.G.Pinto) #107

Thanks, I will try tonight :slight_smile:

Kind regards,


(Marco A.G.Pinto) #108

@tiagosantos

I have just tried it.

It no longer flags dates and postal codes, but now it doesn't suggest to use a medium dash for them (it accepts hyphens).

Could you just do this little enhancement and also port it to the English locale?

:slight_smile:

If you don't port it to English, Mike Unwalla will take long to do it, just like it happened with my previous EN suggestions.

Thank you very much!

Kind regards from your friend,


(Tiago F. Santos) #109

Is this a problem? No sure what you mean.

Added. I only tested with testrules, so it needs further testing.


(Marco A.G.Pinto) #110

@tiagosantos

2017–08–18 (medium dashes)
2017-08-18 (hyphens)

2746–501 Queluz (medium dashes)
2746-501 Queluz (hyphens)

Shouldn't it suggest the medium dashes?

Thanks!

Kind regards,


(Tiago F. Santos) #111

No, but it is solved, right?

What I couldn't gather is: is there any missing exception in dates or postal codes that you are referring to?


(Marco A.G.Pinto) #112

@tiagosantos

It is solved, but for weeks/months that I have been using medium dashes in the postal code, dates and years.

(c) 2001–2004 blah blah

Have I been doing it wrong? :frowning:

Now I no longer know how to write them :frowning:


(Tiago F. Santos) #113

Don't worry about it. It is typography and you can say it is your personal style.
But, to be more accurate, as the message indicates, the half-dash (n-dash), should only be used to indicate numerical ranges or time ranges.

I will try to come up with a more explicit message. Suggestions are welcome.

This is correct. It is a date range (time period, from XX to YY <=> XX–YY with an n-dash)


(Marco A.G.Pinto) #114

@tiagosantos

Ahhh... I thought the n-dash was to be used all over, except on hyphenated words and in the start of sentences and middle of sentences.

Maybe the LT suggestion should state the ranges text:
"the half-dash (n-dash), should only be used to indicate numerical ranges or time ranges. "
(and just use this text in the English version).

This would make it clear to everyone :slight_smile:

Ahhh.. right now I am about to replace all occurrences in the medical process document.

I have all medical documents scanned and inserted into that ODT, an ~300 MB ODT at the moment (it takes long to edit it, since this machine only has 4 GB RAM).


(Marco A.G.Pinto) #115

@tiagosantos

The rule I created yesterday produced some hits which is good.

I have taken it from the "prontuário de português".

I have at least three prontuários at the moment.

I have also bought a couple or so of British English, but I am involved on too many projects and lack the time.


(Tiago F. Santos) #116

In gedit|Notepad++ do a search for
(\d+?)–(\d+?)–(\d+)
replace
\1-\2-\3
All dates will be hiphenated instantly.
Next time I push to git, I will put those string changes as well. When I was making the rule, I thought on saying "gamas temporais" but I thought that this could be misinterpreted.

Libreoffice also allows regexps. The codes change a bit:
$1-$2-$3

Don't forget to backup, just in case.


(Tiago F. Santos) #117

That means it is useful. That corpus is far from perfect.


(Marco A.G.Pinto) #118

@tiagosantos

"Em intervalos numéricos/tempo, deve usar o meio-travessão".

I was testing the latest snapshot and it still doesn't explain the dash rule.

Could you add some text to the suggestion, like the one above?

Thanks!


(Tiago F. Santos) #119

I change the message string, but indeed the short message is still not very clear. That alsoapplies to so many other rules.
I will add your string to the short message, but it would be great to have a review of the remaining ones.
The tricky part with them is that they have to be very concise but clear enough.

Can you check if there are any other rules with too vague short messages? I noticed that many 'crase' rules suffer from the same issue, so, checking which ones need a longer explanation, and writing new strings would be great.


(Marco A.G.Pinto) #120

I am testing it on the field.

Next week I will open my thesis to check from start to end with the latest snapshot of that day.