Commit Graph

1407 Commits

Author SHA1 Message Date
Maxim Ganetsky
1652b4acf1 Translations: Turkish translation update by Onur ERÇELEN, issue #40106 2023-02-02 23:52:31 +03:00
Bart
e19b8a86f9 Masks: cosmetic: indentation. 2023-01-15 11:44:06 +01:00
Bart
7b8159908e Masks: remove TWindowsMaskList.MatchesWindowsMask. It should never have been there, since it does not resolve a backwards compatibility issue (there never existed a TWindowsMaskList before). 2023-01-14 19:16:59 +01:00
Bart
408f319004 Masks: introduce the possibility for a MaskListClass factory. 2023-01-14 13:56:19 +01:00
Bart
3b1bba21ff Masks: rename TMask.Compile to TMask.PrepareCompile and make it set fMaskIsCompiled to False.
TMaskUTF8.Compile is now the base method for compiling the mask.
Add a comment about fMaskIsCompiled.
Reasons:
- TMask.Compile did not really compile anything.
- fMaskIsCompiled should only be set to True if (real) compilation of the mask is succesfull
2023-01-10 12:52:45 +01:00
Bart
0ae37a906c LConvEncoding: add EncodingCP865. Patch by Alexey Torgashin. Issue #40041. 2022-12-17 18:30:06 +01:00
Maxim Ganetsky
a5c527068c LazUtils: Mark PO translation string as badly formatted when original string does not have argument errors and translation has them. Allows to catch more formatting errors, e. g. when original contains %s%s and translation contains s%s%s% (note the order of 's' and '%' in translation). 2022-12-08 04:11:26 +03:00
Maxim Ganetsky
045ba029e3 LazUtils: Rewritten comparison of formatting arguments of translations (in PO files). Now formatting arguments are compared in their entirety (including index, width and precision).
The reasons are:

0. Working with arguments is very prone to typos.
1. Removing index of arguments in translation can lead to exceptions.
2. Adding index to arguments in translation can lead to incorrect argument selection if e. g. '*' usage in arguments and relation of indexed and non-indexed arguments are not properly considered. Validating all this is a big complicated mess which should better be avoided.
3. Allowing to change width/precision can lead to incorrect argument rendering.

This means that swapping indexes is now effectively forbidden. This is not expected to create any unavoidable problems for translators, though. In any case such issues can better be solved by changing resource strings instead on a case by case basis.

This change allowed to spot many missed argument mismatches in different languages.
2022-12-08 03:30:03 +03:00
Juha
20d2044bb4 LazUtils: In UTF8CompareLatinTextFast, use AnsiCompareText instead of WideCompareText. 2022-12-02 22:45:14 +02:00
Bart
46e8e195a9 LazUtf8: fix UTF8CompareLatinTextFast to be consistent with Utf8CompareText, when comparing lower ASCII values. Issue #40014 2022-11-25 17:26:14 +01:00
Bart
c67c745669 LazUtf8: honour CaseSensitive in TStringListUTF8Fast.DoCompareText. 2022-11-23 14:23:20 +01:00
mattias
6671244b72 updated makefiles, fixed compile fpdebug with fpc 3.2.2 2022-11-13 13:23:46 +01:00
wp_xyz
969ac2a4bf LazUtils/GraphMath: Avoid separate calculation of sin() and cos() of the same angle in several functions. Related to issue #39983. 2022-11-02 23:21:44 +01:00
Juha
4c6414f837 LazUtils: Support time formatting with 12-hour clock on Windows. Issue #39977, patch by foxpas. 2022-11-02 19:11:36 +02:00
wp_xyz
182091e424 LazUtils/GraphMath: Optimize RotatePoint(). 2022-11-01 23:30:52 +01:00
Martin
9885e6c62c LazUtils: fix compilation of objects descended from TRefCountedObject (don't change function signature with IFDEF) 2022-09-08 22:52:08 +02:00
Martin
20a05aea86 LazLogger: fix parsing parameters (handling "=") / Issue #39812 2022-08-07 23:20:22 +02:00
Martin
131d1062df Debugger: allow calling SysVarToLStr for variants (via user defined type-names) 2022-06-23 13:54:18 +02:00
Juha
f737b23e7c LazUtils: Add 4 encodings: ISO-8859-3, -4, -7, -13 to LConvEncoding. Issue #39806, patch by Alexey Torgashin. 2022-06-20 12:28:17 +03:00
Juha
3bea109b57 LazUtils: Add encoding ISO-8859-10 to LConvEncoding. Issue #39800, patch by Alexey Torgashin. 2022-06-20 09:59:08 +03:00
Martin
4e97ffa45f LazUtils: TXMLConfig fixed crash with uninitialized result value. (If "CreateNodes" is false, and [] value is not cached) 2022-06-15 13:12:28 +02:00
Juha
7dfdebb389 LazUtils: Fix a recently introduced bug in LConvEncoding. Issue #39795, patch by Alexey Torgashin. 2022-06-13 23:31:50 +03:00
Juha
4b08ccf47b LazUtils: Add encoding ISO-8859-5 to LConvEncoding. Issue #39795, patch by Alexey Torgashin. 2022-06-13 19:46:22 +03:00
Juha
7cd0c6804d LazUtils: Add encoding ISO-8859-16 to LConvEncoding. Issue #39794, patch by Alexey Torgashin. 2022-06-12 18:50:23 +03:00
Juha
262fe00e31 LazUtils: Add ISO-8859-9 and ISO-8859-14 to the supported encoding list. Issue #39785, patch by Don Siders. 2022-06-08 11:52:12 +03:00
Juha
573be15eaf LazUtils: Add function ISO_8859_14ToUTF8 also to interface section. Issue #39784. 2022-06-07 23:08:33 +03:00
Juha
494fa2abc8 LazUtils: Add encoding ISO-8859-14 to LConvEncoding. Issue #39784, patch by Alexey Torgashin. 2022-06-07 13:00:43 +03:00
mattias
9e762cde89 udpated makefiles 2022-05-29 19:34:19 +02:00
Martin
a68a32a9b5 LazLogger: added missing stackdump with log-group 2022-05-12 21:19:34 +02:00
Juha
76f7524436 LazUtils: In UCS2BEToUTF8 and UCS2LEToUTF8 skip little/big endian BOM. Merge request !88 by Zaher Dirkey. 2022-04-16 12:41:31 +03:00
mattias
0f871f2237 lazutils: clean up 2022-04-11 09:43:22 +02:00
Martin
e2f9ae2c04 LazXmlConfig: Write/Read Set/Enum according to PTypeInfo 2022-03-24 00:39:04 +01:00
wp_xyz
201075cbd8 LCL: Make procedure RotateRect() (local to customlabel.inc) publicly available in GraphMath. 2022-03-13 15:41:48 +01:00
Juha
014d3b3a9f LazUtils: Add ISO-8859-9 encoding to LConvEncoding. Issue #39659, patch by Alexey Torgashin. 2022-03-03 16:14:29 +02:00
Juha
c805ff750d Move FreeType license file from LazUtils to FreeType directory. Issue #39657. 2022-02-25 12:24:58 +02:00
mattias
17614c2ea5 lazutils: updated fpmake 2022-02-24 12:57:34 +01:00
mattias
26c9421318 updated Makefiles 2022-02-24 12:55:45 +01:00
Mattias Gaertner
900cfcb27e Merge branch 'lazutils_dep_fcl-image_remove' into 'main'
Removing the dependency of the LazUtils package on the fcl-image package

See merge request freepascal.org/lazarus/lazarus!63
2022-02-24 11:53:51 +00:00
Juha
28dc8193a3 LazUtils: Add a helper function RenderHTML2Text for class THTML2TextRenderer. 2022-02-06 12:38:47 +02:00
Sergey Larin
8a185d4e79 Removing the dependency of the LazUtils package on the fcl-image package 2022-01-26 16:33:00 +03:00
Juha
b7d8333fd9 LazUtils: Prevent a zombie process with openDocument and openURL. Issue #35527. 2022-01-23 02:46:53 +02:00
Bart
4b313d25b3 LazUtf8: optimize Utf8StringReplace. Issue ##39576. Do NOT merge to 2.2 fixes! 2022-01-22 18:32:41 +01:00
Bart
24bb2eb1a4 LazUtf8: small optimization of Utf8EscapeControlChars. 2022-01-22 14:55:25 +01:00
Bart
0ff1e5d2a7 LazUtf8: pass language string parameters as const. Patch by Alexey Torgashin. Issue ##39577 2022-01-22 14:25:35 +01:00
Bart
242f0ac056 LazUtf8: faster implementation Utf8EscapeControlChars based upon idea by Alexey Torgashin. Issue #39573. 2022-01-19 15:38:43 +01:00
mattias
f97a493801 updated makefiles 2022-01-16 21:42:24 +01:00
Martin
fb84c05582 LazCollections: compiler warnings 2022-01-09 01:17:24 +01:00
Bart
9b61164125 LazUtils: Masks: move the logic of #a9457c2f2bd1412ef2c8ed9dc7e468eff6453bf4 to CompileAnyCharOrNone. 2022-01-02 13:20:37 +01:00
Bart
a9457c2f2b LazUtils: Masks: if mocSet, mocRange of mocAnyCharOrNone is enabled an unescaped '[' must always start such a construct and cannot be a literal. 2022-01-01 13:20:42 +01:00
Martin
7a876814d5 LazLogger: fix getting command line param. To not return include "=" from --debug-enable=foo. Issue #39520 2021-12-29 17:08:38 +01:00