Commit Graph

1378 Commits

Author SHA1 Message Date
juha
a5df757d33 LazUtils: Fix comments in AvgLvlTree for TStringToStringTree etc.
git-svn-id: trunk@64327 -
2021-01-04 15:56:26 +00:00
juha
db94cc7a39 LazUtils: Support EUDC to PUA Microsoft mapping in function DBCSToUTF8. Issue #38206, patch from powerpcer.
git-svn-id: trunk@64308 -
2020-12-30 10:27:05 +00:00
juha
9219ea531d Move unit GraphMath from LCL to LazUtils. It has no dependencies to GUI.
git-svn-id: trunk@64303 -
2020-12-29 22:56:40 +00:00
juha
537bc0346a IDE: Map component palette SpeedButtons by comp class type (not name). Use a proper tree map instead of sorted list TFPGMap<>.
git-svn-id: trunk@64229 -
2020-12-18 21:02:22 +00:00
juha
283b70dbac Cleanup, comments.
git-svn-id: trunk@64228 -
2020-12-18 21:02:19 +00:00
martin
569e49e3cb TRefCountedObject, make thread safe
git-svn-id: trunk@64210 -
2020-12-16 14:44:11 +00:00
juha
6813e28eef LazUtils: Move math helper functions from LCLProc to LazUtilities. Deprecate LCLProc versions.
git-svn-id: trunk@64197 -
2020-12-12 11:41:07 +00:00
martin
689df5211a LazUtils: add thread-save map iterator (lock map)
git-svn-id: trunk@64127 -
2020-11-12 12:02:31 +00:00
bart
6fb1bd833b LazUtils: Remove PasWStr unit. It is obsolete since fpc 3.0.
git-svn-id: trunk@64123 -
2020-11-11 17:35:01 +00:00
bart
f47a2a5fd6 LazUtils: Remove tests for FPC versions 2.x.
git-svn-id: trunk@64122 -
2020-11-11 14:03:48 +00:00
juha
618261511d LCL: Remove tests for FPC versions 2.x. Cannot be used anyway.
git-svn-id: trunk@64120 -
2020-11-10 09:50:20 +00:00
juha
039687aae1 LazUtils: Deprecate SpecialCharsToHex. Use LazUtf8.Utf8EscapeControlChars instead. Issue #38029.
git-svn-id: trunk@64103 -
2020-11-04 17:31:46 +00:00
juha
5d89968871 LazUtils: Fix SpecialCharsToHex output to actual hex. Move code to reusable functions ShortDotsLine and BeautifyLineXY. Issue #38029.
git-svn-id: trunk@64102 -
2020-11-03 18:52:30 +00:00
juha
4321fbf6e5 LazUtils: move procedure ReplaceSubstring from LazUTF8 to LazStringUtils.
git-svn-id: trunk@64081 -
2020-10-29 15:45:34 +00:00
bart
5812e23a64 LazUtf8: add some more C-escape strings for the Utf8EscapeControlChars function.
git-svn-id: trunk@64062 -
2020-10-24 10:03:39 +00:00
juha
2a8ddb66b5 IDE, LazUtils: Move unit FileReferenceList to LazUtils package. Order uses sections.
git-svn-id: trunk@64025 -
2020-10-16 12:01:15 +00:00
martin
541228d5ac LazLogger: add dbgsTime (tickcount)
git-svn-id: trunk@64018 -
2020-10-15 18:37:39 +00:00
martin
17edfd4871 LazCollections: add virtual / rename field
git-svn-id: trunk@64016 -
2020-10-15 18:37:36 +00:00
bart
108648506e LazFileUtils: use const parameters in FindAllFiles. Patch by CudaText man. Issue #0037782
git-svn-id: trunk@63989 -
2020-10-10 09:46:50 +00:00
martin
c5e7f1e250 lazcollections: TLazThreadedQueue refactor into threaded/none-threaded part
git-svn-id: trunk@63861 -
2020-09-03 08:21:02 +00:00
martin
144fb11c00 lazcollections: TLazThreadedQueue fix ShutDown
git-svn-id: trunk@63860 -
2020-09-03 08:21:00 +00:00
martin
b2b157269c lazcollections: TLazThreadedQueue fix Grow.
git-svn-id: trunk@63833 -
2020-08-26 19:14:58 +00:00
martin
005fe7208d lazcollections: TLazThreadedQueue, allow subclasses to Lock/Unlock and access queue.
git-svn-id: trunk@63827 -
2020-08-25 17:31:49 +00:00
martin
f89f1c10b4 LazUtils: lazcollections, TLazThreadedQueue fix for 3.2.0
git-svn-id: trunk@63817 -
2020-08-23 20:38:07 +00:00
martin
b61fd4c937 LazCollection: Fix TLazThreadedQueue.Grow / Fix race condition Issue #0037612
git-svn-id: trunk@63811 -
2020-08-22 20:27:15 +00:00
juha
125e794a87 Remove useless test for X <> Nil when using "is" operator.
git-svn-id: trunk@63779 -
2020-08-18 17:35:21 +00:00
ondrej
3a6057e0a3 TUTF8Process: workaround for the poNoConsole->poDetached change. Better hacks for old FPC versions without TProcessClassTemplate. Issue #35991
git-svn-id: trunk@63708 -
2020-08-09 16:23:09 +00:00
juha
1cd6dc6dd4 LazUtils: New units for encoding data tables. Can be used by external code. Issue #36078, patch from CudaText man.
git-svn-id: trunk@63642 -
2020-07-24 11:14:38 +00:00
juha
3d951e3ed7 LazUtils: Don't override TProcess.Execute for TProcessUTF8 starting from FPC 3.2. Issue #35991.
git-svn-id: trunk@63584 -
2020-07-17 07:55:32 +00:00
juha
f18d2348ff LazUtils: Delete very old code for TProcessUTF8 that was needed for FPC 2.x.
git-svn-id: trunk@63563 -
2020-07-14 21:27:48 +00:00
mattias
61c53d6f41 LazUtils/FreeType: Separate FreeType stuff into its own package
git-svn-id: trunk@63558 -
2020-07-14 18:09:17 +00:00
mattias
8ceb09a67b make: changed default darwin lcl platform from carbon to cocoa
git-svn-id: trunk@63551 -
2020-07-13 09:00:41 +00:00
martin
83c04e1ca5 TRttiXMLConfig: store 64bit values
git-svn-id: trunk@63508 -
2020-07-05 01:18:30 +00:00
mattias
9dcd9ee04d updated makefiles
git-svn-id: trunk@63453 -
2020-06-28 11:01:41 +00:00
mattias
2e0d5cd263 lazutils: FindDefaultExecutablePath: fixed using env PATH with quotes
git-svn-id: trunk@63367 -
2020-06-17 09:46:51 +00:00
juha
2013a99dc3 LazUtils: Support KOI8-R, KOI8-U and KOI8-RU codepages in LConvEncoding. Issue #37155, patch from eastorwest.
git-svn-id: trunk@63354 -
2020-06-15 10:10:02 +00:00
juha
4e587ce8f0 LazUtils: Prevent ForceDirectory trying to create directories with empty name. Issue #37133.
git-svn-id: trunk@63327 -
2020-06-08 10:34:28 +00:00
maxim
1207fa4fb3 LazUtils: committed a file which was automatically regenerated as a result of r63211 #8167e0b5e8
git-svn-id: trunk@63213 -
2020-05-22 23:37:51 +00:00
joost
8167e0b5e8 LazUtils: Missing file added to package
git-svn-id: trunk@63211 -
2020-05-22 15:59:26 +00:00
joost
5c8d50b386 FPMake: Regenerated
git-svn-id: trunk@63210 -
2020-05-22 15:11:27 +00:00
juha
60d719d70a LazUtils: Font kerning for LazFreeType. Issue #37058, patch from circular.
git-svn-id: trunk@63145 -
2020-05-13 21:05:37 +00:00
juha
52939a42db LazUtils: Formatting.
git-svn-id: trunk@63140 -
2020-05-12 18:52:11 +00:00
juha
da1e9bb5c1 LazUtils: Initialize LazFreeType variables. Prevent range errors. Issue #37033, patch from circular.
git-svn-id: trunk@63134 -
2020-05-10 18:55:24 +00:00
juha
8946cd3dd1 LazUtils: Allow hints to reveal a bug in TFreeTypeGlyph. Formatting.
git-svn-id: trunk@63130 -
2020-05-09 18:34:49 +00:00
juha
77a9fd307d LazUtils: Rename variable "generic" as "genericP" to not confuse Codetools.
git-svn-id: trunk@63129 -
2020-05-09 18:34:48 +00:00
juha
74b8021cc2 LazUtils: Initialize LazFreeType graphics state correctly. Issue #37033, patch from circular.
git-svn-id: trunk@63128 -
2020-05-09 18:34:47 +00:00
juha
d96645d9ff LazUtils: Fix LazFreeType glyph bounds. Issue #37022, patch from circular.
git-svn-id: trunk@63126 -
2020-05-09 08:05:41 +00:00
juha
8fccfb64ef LazUtils: Do not garble LazFreeType fonts. Issue #37012, patch from circular.
git-svn-id: trunk@63125 -
2020-05-07 20:20:56 +00:00
martin
835023c3e2 LazLogger: Fixed spelling. Issue #0036987
git-svn-id: trunk@63095 -
2020-04-30 12:44:07 +00:00
juha
cbaeca66f0 IDE: Assign also the handler list in BuildModes. Prevents a crash when cancelling project options. Issue #36782.
git-svn-id: trunk@63009 -
2020-04-17 18:39:38 +00:00
juha
9f4231ee15 Components formatting.
git-svn-id: trunk@62925 -
2020-04-10 11:59:05 +00:00
juha
651a6436a2 Support Haiku build. Makefiles are generated from Makefile.fpc files using proper tools. Issue #36316, patch from Alfred.
git-svn-id: trunk@62890 -
2020-04-05 11:35:01 +00:00
wp
dd9be6d9e1 LazUtils/FreeType: Avoid ignoring font files after reading defective one.
git-svn-id: trunk@62804 -
2020-03-24 09:45:08 +00:00
mattias
a472e9ef09 buildintf: split from ideintf
git-svn-id: trunk@62795 -
2020-03-22 11:58:11 +00:00
bart
4ff199e1d7 FileIsText: only exit False if an "illegal" char is found, don't require a NewLine char being present. Resolves #0036679.
git-svn-id: trunk@62787 -
2020-03-21 12:40:35 +00:00
bart
e513f7a26a TFileSearcher: use the new Options parameter for the MaskList.
git-svn-id: trunk@62783 -
2020-03-20 17:59:40 +00:00
bart
a11564b55f Masks: implement the ability to disable the use of sets in the mask.
git-svn-id: trunk@62781 -
2020-03-20 17:33:01 +00:00
juha
f867f60b13 LazUtils: Warn in a comment that function ReadFileToString() does not work with virtual files. Issue #36145.
git-svn-id: trunk@62770 -
2020-03-16 19:51:51 +00:00
ondrej
74fb203f39 LCL: Screen.BeginTempCursor & EndTempCursor
git-svn-id: trunk@62664 -
2020-02-23 06:04:38 +00:00
juha
0961a5797a Turn unit ObjectLists to use generics, move it to Lazutils. Reduce typecasts in TPkgManager by using correct types when possible.
git-svn-id: trunk@62639 -
2020-02-17 12:23:38 +00:00
ondrej
2c8411425b LazUtils: TFileStreamUTF8 = TFileStream: FPC 3.x has full UTF8 support and better exceptions (SFOpenError/SFOpenErrorEx). FileName was redeclared in TFileStreamUTF8
git-svn-id: trunk@62638 -
2020-02-17 09:21:15 +00:00
juha
63cc527b35 LCL: Simplify code dealing with ampersands (&). Remove duplicate code.
git-svn-id: trunk@62493 -
2020-01-04 19:30:01 +00:00
ondrej
6f1497ade1 revert 61976 #ec34c3f2f1:
lazutils: lazutf8: fixed TStringList.LoadFromFile load UTF8 by default
* not needed any more because the latest FPC trunk has TEncoding.Default=SystemEncoding that is UTF-8 in Lazarus/LazUTF8

git-svn-id: trunk@62474 -
2020-01-02 19:05:58 +00:00
juha
2bc8095d8d LazUtils: Fix spelling in LConvEncoding. Issue #36492, patch from CudaText man.
git-svn-id: trunk@62471 -
2019-12-30 13:59:18 +00:00
juha
dd0a4014b6 LazUtils: LConvEncoding fix for CP936 and other DBCS codepages. Issue #36492, patch from CudaText man.
git-svn-id: trunk@62467 -
2019-12-29 23:18:57 +00:00
juha
ec99bd95e2 LCL-GTK2: Move function ComparePChar to LazStringUtils as SamePChar.
git-svn-id: trunk@62464 -
2019-12-29 23:18:51 +00:00
juha
d0ca74aa06 Move functions from IDEProcs to LazFileUtils. Remove unused function MiniMizeName.
git-svn-id: trunk@62444 -
2019-12-25 11:26:25 +00:00
martin
be4d0c5b2e IDE, XmlConfig: Fixed storing properties (rtti), when "stored" incorrectly overwrote Default-instance. Introduced in r61887 #70005fc17a
git-svn-id: trunk@62296 -
2019-11-25 15:19:23 +00:00
ondrej
02aeeee223 laz2_xmlcfg: make GetListItemXPath a class function
git-svn-id: trunk@62248 -
2019-11-16 18:52:19 +00:00
juha
490804cee4 LazUtils: Move function LazIsValidIdent from PackageDependencyIntf (IdeIntf) to LazStringUtils.
git-svn-id: trunk@62133 -
2019-10-27 15:46:04 +00:00
juha
0cb74e2c3c LazUtils: Optimize and use function CompareMethods in LazMethodList unit. Issue #35694, patch from Serge Anvarov.
git-svn-id: trunk@62102 -
2019-10-21 19:16:32 +00:00
martin
57e0e15e0f LazLogger: fixed thread race condition. If the logger is destroyed, and threads have pending sync calls. (only observed with custom created loggers). Fix requires fpc 3.2, see issue #0030567
git-svn-id: trunk@62036 -
2019-10-11 12:07:22 +00:00
juha
7bbe5e6973 LazUtils: Revert part of r61999 #58b76f8a40.
git-svn-id: trunk@62002 -
2019-10-06 13:50:02 +00:00
juha
58b76f8a40 LazUtils: Remove UTF8Encode calls and suppress warnings in winlazfileutils.inc. Issue #35512.
git-svn-id: trunk@61999 -
2019-10-06 08:18:07 +00:00
mattias
ec34c3f2f1 lazutils: lazutf8: fixed TStringList.LoadFromFile load UTF8 by default
git-svn-id: trunk@61976 -
2019-10-04 12:05:40 +00:00
juha
cc40ad8b7f LazUtils: Move encoding page arrays from LConvEncoding to a new .inc file. Issue #36078.
git-svn-id: trunk@61971 -
2019-10-03 18:46:39 +00:00
juha
063096d568 LazUtils: Optimize LConvEncoding a little. Issue #36087, patch from Alexey Tor.
git-svn-id: trunk@61963 -
2019-10-03 18:26:28 +00:00
mattias
f117e5216d lazutils: StrToCmdLineParam: use " as default quote under Windows
git-svn-id: trunk@61912 -
2019-09-23 09:42:25 +00:00
martin
70005fc17a IDE, XmlConfig: Added ability to store published object (TPersistent) properties / Adhere to "stored" value of properties
git-svn-id: trunk@61887 -
2019-09-16 15:15:00 +00:00
martin
bf0028cac1 Try to minimize (NOT a fix) the risks of TProcessUtf8 crashes. Crash introduced in r50595 #d0dace2bf5 for issue #28991 / See also issue #035991
git-svn-id: trunk@61736 -
2019-08-20 22:16:37 +00:00
maxim
bd9bfc01d4 Translations: Turkish translation update by Onur ERÇELEN, bug #35865
git-svn-id: trunk@61612 -
2019-07-21 22:57:16 +00:00
mattias
63594b3af5 lazutils: fixed TFileSearcher initial PathSeparator and paths with spaces
git-svn-id: trunk@61569 -
2019-07-11 14:56:44 +00:00
martin
f5b60972c9 LazDebugger: add operators for log-enable to main unit too.
git-svn-id: trunk@61426 -
2019-06-19 15:26:19 +00:00
maxim
85ba39c0d9 LazUtils, Translations unit: improved TPOFile.Modified property handling: initialize its value in constructor and properly set it when removing an item from .po file
git-svn-id: trunk@61361 -
2019-06-11 22:35:16 +00:00
mattias
0eb446e94a lazutils: SysToUTF8: only UTF8_RTL, issue #35696, from Serge Anvarov
git-svn-id: trunk@61352 -
2019-06-10 16:19:00 +00:00
maxim
9843d887dd LazUtils, Translations unit: improve TPOFile constructors (initialize FAllEntries field only once and invalidate statistics regardless of called constructor)
git-svn-id: trunk@61349 -
2019-06-09 22:20:41 +00:00
maxim
436ce8ff84 LazUtils, Translations unit: when updating an item, ensure that translation is empty in .pot file before checking for it. Allows to always correctly clear item's PreviousID value in .pot file.
git-svn-id: trunk@61343 -
2019-06-08 23:00:57 +00:00
maxim
772f1b8843 LazUtils, Translations unit: correctly remove PreviousID parts even in case when empty translation of an item with fuzzy flag set (and non-empty PreviousID) gets populated with translation suggestion
git-svn-id: trunk@61342 -
2019-06-08 22:17:26 +00:00
maxim
eb107de5ed LazUtils, Translations unit: fixed setting PreviousID parts of newly changed items (do not remove just set up PreviousID anymore)
git-svn-id: trunk@61333 -
2019-06-06 23:39:39 +00:00
maxim
81b06ad0e5 LazUtils, Translations unit: calculate translation statistics based on actual file contents, ignoring any corrections made when reading it
git-svn-id: trunk@61303 -
2019-05-30 23:45:14 +00:00
maxim
fc4ab0cea8 LazUtils (Translations unit), POChecker: Introduced VirtualTranslation property to TPOFileItem. It allows to identify items whose empty translations (actually stored in the file) were replaced by some suggestions. Use it in POChecker in order to avoid false warnings about translation contents not yet present in the file.
git-svn-id: trunk@61302 -
2019-05-30 23:21:49 +00:00
maxim
b04174617e LazUtils (Translations unit), POChecker: Store item's fuzzy flag state as read from file in a separate property. Use it where appropriate. This allows to simplify TPOFile constructors and makes code more clear.
git-svn-id: trunk@61299 -
2019-05-28 23:34:39 +00:00
maxim
c38c503588 LazUtils, Translations unit: Removed TPOFile.CleanUp method. Unneeded PreviousID parts of items are now cleaned up when updating items both in .pot templates and .po translations.
git-svn-id: trunk@61293 -
2019-05-26 23:55:57 +00:00
juha
5b5ad75799 LazUtils: Add OnCompare func for TFreeTypeFont's AVLTree. Prevents adding glyphs many times. Issue #35627.
git-svn-id: trunk@61291 -
2019-05-25 09:36:51 +00:00
maxim
837b7ebe9c LazUtils, Translations unit: always remove Translation and PreviousID parts of items in .pot templates
git-svn-id: trunk@61290 -
2019-05-24 23:39:24 +00:00
maxim
f7571f5012 LazUtils, Translations unit: When copying found translation value to newly added item, do not copy flags from found item.
This can be confusing for translator (in case if e.g. no-object-pascal-format flag is copied) and desyncs flags in translation from flags in base file (this will cause all flags missing in base file to be removed from translation on next regeneration). Moreover, set of these flags can differ depending on translation in case they are copied from different items which have different flags (e.g. in partially translated files).

git-svn-id: trunk@61284 -
2019-05-23 23:30:27 +00:00
maxim
cc4f34a35e LazUtils, Translations unit: Simplified ModifyFlag method. Now we treat space character as a flag delimiter in all cases, thus improving parsing of flags in case of missing comma characters.
git-svn-id: trunk@61283 -
2019-05-23 22:52:31 +00:00
maxim
a620891184 LazUtils, Translations unit: added comment
git-svn-id: trunk@61281 -
2019-05-22 23:13:33 +00:00
maxim
8078feaa66 LazUtils, Translations unit: When setting flags for an item in .po file, omit double quote (") characters in order to avoid regeneration instability. These characters are not meant to be present in flags anyway according to examples in gettext documentation.
git-svn-id: trunk@61279 -
2019-05-22 22:43:57 +00:00
maxim
592a9daf42 LazUtils, Translations unit: ensure uniqueness of flags in .po file items, ignore empty flags
git-svn-id: trunk@61267 -
2019-05-21 23:50:58 +00:00
wp
31de6345cf LazUtils: Use exception class EFreeType instead of general Exception in EasyLazFreeType.
git-svn-id: trunk@61244 -
2019-05-18 23:23:11 +00:00
maxim
e27c505be2 LazUtils, Translations unit: treat items with no-object-pascal-format flag as having correct formatting (never mark them with fuzzy and badformat flags for the formatting reasons)
git-svn-id: trunk@61232 -
2019-05-16 23:05:04 +00:00
maxim
5b72fe1d56 LazUtils, Translations unit: fixed/improved propagation logic of translation items user flags:
In base .pot file (template):
- Newly created item has no user flags.
- Existing updated item has its user flags kept intact.

In translation .po file:
- Newly created item gets user flags copied from base file (all flags missing in base file are removed).
- Existing updated item gets user flags copied from base file (all flags missing in base file are removed except fuzzy flag, whose state is kept).

After copying user flags, object-pascal-format, badformat and fuzzy flags are set automatically for each item (if needed).

This makes flags in translations (.po files) follow the ones from base file (.pot file) when they are added or removed in all cases (even when an item in .pot file gets its last flag deleted).

git-svn-id: trunk@61231 -
2019-05-16 22:49:46 +00:00
maxim
b68407fc52 Translations: regenerated all relevant translation files after r61225 #75a8b1b83c
git-svn-id: trunk@61226 -
2019-05-13 23:21:39 +00:00
maxim
75a8b1b83c LazUtils: .pot/.po file generation and update improvements by Yuriy Sydorov, bug #35543:
- Automatically set the "object-pascal-format" flag for strings containing format chars. It allows tracking of format errors by external tools such as Poedit.
- The "no-object-pascal-format" flag can be specified for a string in the main .pot file if needed.
- It is possible to specify flags in the main .pot file for particular strings and these flags will be preserved and propagated to language specific .po files during the update.
- Fixed delimiter for flags. At least Poedit expects that flags are separated by comma and space, not just comma.
- TPOFileItem.ModifyFlag() can accept the comma separated list of flags and returns true if the Flags property has been modified.

git-svn-id: trunk@61225 -
2019-05-13 23:19:17 +00:00
maxim
117265f357 LazUtils: removed unused stale translation files
git-svn-id: trunk@61224 -
2019-05-13 23:09:38 +00:00
martin
d879259b62 LazLogger: fix wrong override for inherited method
git-svn-id: trunk@61176 -
2019-05-08 12:01:54 +00:00
juha
3470923dd4 LazUtils: Remove incorrect code dealing with strings on Windows, use SysUtils code instead. Issue #35512, patch from Serge Anvarov.
git-svn-id: trunk@61165 -
2019-05-06 14:24:37 +00:00
juha
3df7d8afe5 LCL, LazUtils: Move string manipulation functions from LCLProc to LazStringUtils.
git-svn-id: trunk@61038 -
2019-04-22 09:00:32 +00:00
juha
0487347061 IDE: Allow only valid revision numbers to show in IDE title.
git-svn-id: trunk@61030 -
2019-04-21 14:27:53 +00:00
joost
f1dece9ac8 LazUtils: Fixed handling of default values in TXMLConfigStorage + test
git-svn-id: trunk@60943 -
2019-04-12 18:19:32 +00:00
martin
7f5bb76b42 LazLogger: improve DebulnEnter/Exit, add ability do change indent without logging anything
git-svn-id: trunk@60869 -
2019-04-07 19:48:45 +00:00
juha
d9ac09795b Respect compiler OPT='-v0' by using {$push} and {$pop} in code. Issue #34955.
git-svn-id: trunk@60706 -
2019-03-16 21:17:58 +00:00
juha
c2412a36ab LazUtils: Encode apostrophe to "'" in WriteXMLFile. Issue #34888, patch from akorop.
git-svn-id: trunk@60704 -
2019-03-16 19:37:18 +00:00
mattias
3acfbb4dd2 lazutils: fixed TXMLConfig.IsLegacyList
git-svn-id: trunk@60695 -
2019-03-16 13:48:54 +00:00
juha
5d46a75ff6 IDE: Use a better XML tag format for project etc. info files. Issue #22752, patch from Ondrej.
git-svn-id: trunk@60683 -
2019-03-15 16:15:21 +00:00
mattias
59f5c68e94 lazutils: compwriter virtual methiods
git-svn-id: trunk@60630 -
2019-03-09 12:12:41 +00:00
mattias
672732cd5d lazutils: writerpascal: added option cwpoNoFinalLineBreak
git-svn-id: trunk@60626 -
2019-03-08 23:02:10 +00:00
marcus
25896bdf09 Fixed compilation for non unix after r60621 #5905fbb553
git-svn-id: trunk@60623 -
2019-03-08 16:51:58 +00:00
mattias
5905fbb553 lazutils: SearchFileInPath: added flags sffFile, sffExecutable
git-svn-id: trunk@60621 -
2019-03-08 13:19:10 +00:00
maxim
1a22de281f LazUtils, Translations unit: simplify TPOFile.UpdateStrings method, there is no more particular need in early detection of multilined strings. No functional changes.
git-svn-id: trunk@60574 -
2019-03-03 23:17:22 +00:00
mattias
d4a8763c35 lazutils: fixed SplitCmdLine escape chars
git-svn-id: trunk@60544 -
2019-02-28 20:52:48 +00:00
mattias
adc7b0575c lazutils: fixed PrepareCmdLineOption quote if needed
git-svn-id: trunk@60540 -
2019-02-28 18:24:22 +00:00
martin
9d250edfa3 LazLogger: conditional logging / support And/Or operators for log-groups
git-svn-id: trunk@60516 -
2019-02-26 18:51:47 +00:00
bart
642a3a9b68 LazUtils: change order of new Count parameter in Utf8StringReplace/Utf16StringReplace.
git-svn-id: trunk@60429 -
2019-02-15 15:52:00 +00:00
bart
c452fc00e6 LazUtils: add optional Count parameter to Utf8StringReplace/Utf16StringReplace.
git-svn-id: trunk@60426 -
2019-02-15 13:56:08 +00:00
maxim
7e998b13d9 LazUtils, Translations unit: when reading resource string files, do not escape TAB character with its code representation ('#9'), it is handled just fine both by our translation system and Poedit
git-svn-id: trunk@60411 -
2019-02-12 18:59:48 +00:00
maxim
c1e3ea24a0 LazUtils, Translations unit: when reading PO file, '\t' sequences are converted to TABs (code #9). Now for symmetry TABs are converted back to '\t' when writing PO files.
git-svn-id: trunk@60369 -
2019-02-08 23:45:45 +00:00
michl
a85a3d9e59 LazUtils: Missing TFPImageFreeTypeDrawer.DrawGlyph added. Issue #35032. Patch from Ondrej Pokorny
git-svn-id: trunk@60363 -
2019-02-07 22:41:12 +00:00
michl
2035539759 LazUtils: Fixed wrong offsets in free type font subclips. Issue #35036. Patch from Ondrej Pokorny
git-svn-id: trunk@60362 -
2019-02-07 22:30:29 +00:00
maxim
8d056d676d LCL, LazUtils: do not meddle with trailing lineendings of multiline strings in PO files.
Reasons:
1. PO format does not prohibit multiline strings without trailing lineendings (and e.g. recent versions of Poedit do not complain about them).
2. Now multiline strings in PO files match exactly corresponding resourcestrings.
3. As a consequence of previous point we unbroke loading multiline translations from MO files.

git-svn-id: trunk@60343 -
2019-02-06 00:46:01 +00:00
joost
9ddd2b699c Packager/Lazutils: Re-created fpmake.pp
git-svn-id: trunk@60323 -
2019-02-03 22:22:32 +00:00
martin
211ab886b0 LazLogger: Improve Indent handling with threads. Ensure inc/dec is not overwritten by other threads
git-svn-id: trunk@60267 -
2019-01-31 22:55:20 +00:00
martin
30146193bb LazLogger: Check the callback in a more thread save manner
git-svn-id: trunk@60265 -
2019-01-31 22:24:21 +00:00
martin
131d04802a LazLogger: Init is called from DoDebugLn => make thread save
git-svn-id: trunk@60264 -
2019-01-31 22:06:25 +00:00
martin
4ee1459b01 LazLogger: Optimize indent handling / fix reset indent for DbgOut
git-svn-id: trunk@60263 -
2019-01-31 21:49:14 +00:00
martin
185d63ac35 LazLogger: Optimize indent handling
git-svn-id: trunk@60262 -
2019-01-31 21:44:56 +00:00
martin
720d4c15c5 LazLogger: Move widetset callback into threadsave block
git-svn-id: trunk@60257 -
2019-01-31 14:58:16 +00:00
martin
1513ba0c4c LazLogger: Fix a crash, due to not thread safe.
git-svn-id: trunk@60246 -
2019-01-30 00:53:46 +00:00
maxim
040d1106ac IDE/Packager/LazUtils: factored out PO filename parsing code to a separate procedure and made it dotted filename safe. Now using it in all relevant places, thus reducing code duplication and fixing possible problems with dotted PO filenames.
git-svn-id: trunk@60245 -
2019-01-29 23:04:16 +00:00
martin
a9f2cac891 LazLogger: Comments / Ifdef'ed flush log
git-svn-id: trunk@60244 -
2019-01-29 19:47:46 +00:00
maxim
684c367b8a IDE: changed extension of master PO files (a.k.a. templates) from .po to .pot, adapted IDE, POChecker, updatepofiles tool and localize.bat/.sh scripts.
Reasons:
1. .pot is 'industry standard' extension for PO template files. As a consequence, PO editors can now open our templates 'out of the box' and automate creation of translations.
2. It is now much simpler to detect template files now that dotted unit names are allowed.

git-svn-id: trunk@60208 -
2019-01-24 23:02:37 +00:00
maxim
bc4e1da857 Translations: Polish translation update by Sławomir Niedziela, bug #34788
git-svn-id: trunk@59988 -
2019-01-04 13:58:31 +00:00
mattias
da5ed1026a lazutils: updated fpmake
git-svn-id: trunk@59946 -
2018-12-31 09:58:25 +00:00
joost
3d5be57e48 fcl,lazutils,lclbase,lcl,synedit: Re-generated fpmake.pp files
git-svn-id: trunk@59940 -
2018-12-29 23:13:34 +00:00
joost
21e4fd4e8f lazutils,lclbase,synedit: Some fixes related to r59934 #a2e9341eb3
git-svn-id: trunk@59937 -
2018-12-29 22:28:24 +00:00
joost
a2e9341eb3 lazutils,lclbase,lcl,synedit: Enabled possibility to use fpmake for building these packages
git-svn-id: trunk@59934 -
2018-12-29 17:59:40 +00:00
bart
34803af734 - TFileSearcher: implement property PathSeparator.
- and expose both MaskSeparator and PathSeparator in FindAllFiles()
- expose PathSeparator in FindAllDirectories.
Issue #0034607.

git-svn-id: trunk@59687 -
2018-11-28 17:23:33 +00:00
maxim
c8c7a1723a Translations: Chinese translation update by robsean, bug #34579
git-svn-id: trunk@59617 -
2018-11-22 00:03:32 +00:00
martin
9b6c091763 LazLogger: fixed crash in assign
git-svn-id: trunk@59614 -
2018-11-21 16:52:11 +00:00
martin
fb1109e5cc LazLogger: Small threading optimization
git-svn-id: trunk@59508 -
2018-11-11 14:46:55 +00:00
juha
93fbbb0db7 LazUtils: Add LazUTF8SysUtils with "deprecated" warnings. The unit was renamed earlier.
git-svn-id: trunk@59436 -
2018-11-03 12:45:54 +00:00
juha
07607b4bba LazUtils: Raise exception in UTF8To... functions, controlled by a global boolean. Issue #33686, patch from AlexeyT.
git-svn-id: trunk@59416 -
2018-11-01 08:39:09 +00:00
juha
64a3cced51 LazUtils: Added inlines to some functions in LazUTF8. Issue #34472, patch from AlexeyT.
git-svn-id: trunk@59394 -
2018-10-30 11:04:21 +00:00
mattias
054150bb42 lazutils: some optimizations from Alexey
git-svn-id: trunk@59358 -
2018-10-26 19:26:31 +00:00
mattias
83e2e9a6cd lazutils: fixed ExpandFileNameUTF8 for \\?\
git-svn-id: trunk@59352 -
2018-10-26 08:10:10 +00:00
maxim
2fb99791ef Translations: French translation update by Gilles Vasseur, bug #34403
git-svn-id: trunk@59276 -
2018-10-09 22:50:15 +00:00
maxim
e26f6ff3ca Translations: Hungarian translation update by Péter Gábor, bug #34397
git-svn-id: trunk@59275 -
2018-10-09 22:41:03 +00:00
mattias
f9799efe90 lazutils: less hints
git-svn-id: trunk@59216 -
2018-10-01 15:13:34 +00:00
juha
75d1f28106 LazUtils: Move more functions from FileUtils to LazFileUtilities, deprecate the old ones.
git-svn-id: trunk@59177 -
2018-09-28 12:25:39 +00:00
juha
c9e4614e17 Delete old deprecated methods.
git-svn-id: trunk@59175 -
2018-09-28 11:06:40 +00:00
juha
571647e302 LazUtils: Move ExtractFileNameWithoutExt to LazFileUtils. Rhymes with ExtractFileNameOnly.
git-svn-id: trunk@59169 -
2018-09-26 17:49:27 +00:00
mattias
1f64e2b29d lazutils: deprecated ConvertLineEndings in favor of LineBreaksToSystemLineBreaks
git-svn-id: trunk@59144 -
2018-09-23 10:33:52 +00:00
mattias
f14e40c50d lazutils: removed duplicate code, issue #34320
git-svn-id: trunk@59142 -
2018-09-23 06:42:21 +00:00
bart
70f0e3209a LazUtf8: leftpad escaped characters in Utf8EscapeControlChars if EscapeMode = emPascal. Prevents ambiguity when reading the result.
git-svn-id: trunk@59125 -
2018-09-22 09:57:01 +00:00
mattias
12ce8a3854 set trunk version to 2.1.0
git-svn-id: trunk@59010 -
2018-09-15 19:46:38 +00:00
mattias
c2b0e049ef set trunk version to 2.0.0PreRelease
git-svn-id: trunk@59008 -
2018-09-15 19:41:22 +00:00
maxim
db62862efe LCLTranslator, Translations units: when translating an item, return original value if translation is empty. Idea by Sergey Bulba. Also improved finding master .po file in LCLTranslator. Fixes bug #33095.
git-svn-id: trunk@58976 -
2018-09-13 22:03:54 +00:00
juha
f6dcfb9e4f LazUtils: Add process priority constants for latest FPC. Issue #34184, patch from Do-wan Kim.
git-svn-id: trunk@58806 -
2018-08-31 08:15:05 +00:00
juha
0bb1729bdc Cleanup for utility functions.
git-svn-id: trunk@58786 -
2018-08-27 19:03:21 +00:00
maxim
a351c9f8fe Translations: Brazilian Portuguese translation update by Marcelo B Paula, bug #34139
git-svn-id: trunk@58742 -
2018-08-19 23:08:36 +00:00
juha
416b61b5e3 LazUtils: Make UTF8Process work on Windows with FPC trunk (r39517+). Issue #34048, patch from Pascal Riekenberg
git-svn-id: trunk@58663 -
2018-08-02 09:18:16 +00:00
maxim
368347ca99 Translations: Ukrainian translation update by Olexandr Pylypchuk, bug #34056
git-svn-id: trunk@58659 -
2018-07-31 21:59:47 +00:00
juha
41dc46374f LazUtils: Move string manipulation functions from LazUtilities to LazStringUtils.
git-svn-id: trunk@58634 -
2018-07-25 23:44:54 +00:00
juha
6d3f9bd7a7 LazUtils: Move string manipulation functions from IDEProcs to LazStringUtils.
git-svn-id: trunk@58632 -
2018-07-25 13:39:06 +00:00
juha
5c561fabd8 LazUtils: Add a new unit LazStringUtils. Move 2 functions from Codetools' SourceLog there.
git-svn-id: trunk@58631 -
2018-07-25 13:39:01 +00:00
juha
d43fa548b8 LazUtils: Rename unit LazUTF8SysUtils -> LazSysUtils. It had nothing to do with character encoding.
git-svn-id: trunk@58630 -
2018-07-25 13:38:59 +00:00
maxim
5ed0f55393 LazUtils: regenerated translations and updated Russian translation
git-svn-id: trunk@58626 -
2018-07-24 23:09:26 +00:00
juha
b20cf40349 Use RaiseGDBException from LazTracer unit. Remove similar funcs from IDEProcs and ComponentReg.
git-svn-id: trunk@58622 -
2018-07-24 17:49:21 +00:00
juha
a20ec2d6bc Move functions dealing with command line from IDEProcs to LazFileUtils.
git-svn-id: trunk@58621 -
2018-07-24 17:49:16 +00:00
juha
620bba736b Move functions dealing with path delimiters from IDEProcs to LazFileUtils.
git-svn-id: trunk@58620 -
2018-07-24 17:49:15 +00:00
juha
887cf78963 Move a version of function ProgramDirectory from IDEProcs to FileUtils.ProgramDirectoryWithBundle.
git-svn-id: trunk@58619 -
2018-07-24 17:49:13 +00:00
juha
0500052f06 Move functions CompareCaret and CompareBoolean away from IDEProcs, to LCLProc and LazUtilities respectively.
git-svn-id: trunk@58618 -
2018-07-24 17:49:11 +00:00
mattias
2bbe0a8cc7 updated makefiles
git-svn-id: trunk@58493 -
2018-07-11 23:58:59 +00:00
juha
1366299857 IDE: Reordering and formatting code for recent item lists in unit IdeProcs.
git-svn-id: trunk@58468 -
2018-07-09 08:20:58 +00:00
martin
1f4fa68fab Remove deprecated misspelled methods
git-svn-id: trunk@58436 -
2018-07-03 22:40:28 +00:00
mattias
00112a0fe0 lazutils: removed -vm6058
git-svn-id: trunk@58400 -
2018-06-25 07:05:36 +00:00
mattias
93ff0c9f46 lazutils: ignore fpc 3.1.1 inline warnigns
git-svn-id: trunk@58389 -
2018-06-23 16:02:27 +00:00
maxim
e1e104d7db Translations: Ukrainian translation update by Olexandr Pylypchuk, bug #33876
git-svn-id: trunk@58364 -
2018-06-20 21:58:09 +00:00
mattias
3575d8d0e1 make bigide: added cmdlinedebuggerbase and lazdebuggerlldb
git-svn-id: trunk@58363 -
2018-06-20 21:41:44 +00:00
juha
6ccdb67ff4 LazUtils: Cleanup.
git-svn-id: trunk@58259 -
2018-06-14 09:58:08 +00:00
juha
53ee66450d LazUtils: Move exception and stack trace stuff to new LazTracer. Move function ConvertLineEndings to LazUtilities.
git-svn-id: trunk@58255 -
2018-06-14 09:05:50 +00:00
maxim
c5cc1131d3 LazUtils, IDEIntf: regenerated translations and updated Russian translation
git-svn-id: trunk@58248 -
2018-06-13 22:30:47 +00:00
juha
3574bdfb6d Move debug- & other non-GUI stuff from LCLProc to LazUtilities and LazLogger in package LazUtils.
git-svn-id: trunk@58244 -
2018-06-13 13:59:07 +00:00
juha
962ded835b Remove LCL dependency from unit GraphType and move it to LazUtils package.
git-svn-id: trunk@58241 -
2018-06-13 08:33:10 +00:00
juha
ce916d287c LazUtils: Rename unit ModalResultDef to a Delphi compatible UITypes. Add Message dialog related stuff.
git-svn-id: trunk@58227 -
2018-06-11 10:51:11 +00:00
martin
64399c8ca0 LazLogger: fixed incorrect linked list.
git-svn-id: trunk@58219 -
2018-06-10 21:05:51 +00:00
martin
7a640261d4 LazLogger: prevent exceptions from being passed to the caller
git-svn-id: trunk@58210 -
2018-06-09 16:31:10 +00:00
juha
5f57884ed1 LCL,LazUtils: Move ModalResult and the mr... consts to a new unit in LazUtils. They are used in non-GUI programs, too.
git-svn-id: trunk@58205 -
2018-06-09 14:39:49 +00:00
juha
f440f660a2 Refactor: move CompareMethods to LazMethodList. Keep alias in LCLProc.
git-svn-id: trunk@58204 -
2018-06-09 14:39:36 +00:00
juha
672ece7241 Refactor: Move variable ConsoleVerbosity from MacroIntf to LazUtilities. Rename MergeSort to avoid name clash and confusion.
git-svn-id: trunk@58203 -
2018-06-09 14:39:21 +00:00
martin
b1cde147c4 LazLogger: use thread.queue by default.
git-svn-id: trunk@58198 -
2018-06-08 22:45:18 +00:00
ondrej
f34c00fc64 LazUtils: use LazLoggerBase instead of LazLogger
git-svn-id: trunk@58082 -
2018-06-02 16:38:22 +00:00
ondrej
ab816ccd37 LazLogger: refactoring: move methods from LazLogger to LazLoggerBase
git-svn-id: trunk@58077 -
2018-06-02 15:58:23 +00:00
martin
7c2ae66e6e fixed LazListClasses (shift-able and paged list generics)
git-svn-id: trunk@58051 -
2018-05-29 20:08:00 +00:00
mattias
6deedf42c5 lazutils: fixed result
git-svn-id: trunk@58014 -
2018-05-23 15:27:06 +00:00
maxim
ec056fba9f LazUtils: Translations unit: do not try to initialize FHelperList on every call of TPOFile.UpdateItem. FHelperList is only used in TPOFile.SaveToStrings and initialized there.
git-svn-id: trunk@58005 -
2018-05-22 22:32:45 +00:00
maxim
6d88044e80 LazUtils: Translations unit: minor optimization of TPOFile.UpdateItem
git-svn-id: trunk@58004 -
2018-05-22 22:08:06 +00:00
maxim
00b84fd256 LazUtils: Translations unit: simplified TPOFile.FillItem method
git-svn-id: trunk@57997 -
2018-05-21 22:41:03 +00:00
maxim
78acd67a99 LazUtils: Translations unit: introduced TPOFile.InvalidateStatistics method in order to let user to force statistics recalculation if the need arises.
git-svn-id: trunk@57979 -
2018-05-20 22:27:39 +00:00
maxim
99703bc40b LazUtils: Translations unit: removed historical description from comment in the file header (it mentioned no longer existing files/properties). Complete history is available in SVN.
git-svn-id: trunk@57966 -
2018-05-18 23:03:15 +00:00
maxim
0c938e3691 LazUtils: Translations unit: refactored TPOFile statistics (translated/untranslated/fuzzy counters) calculation:
1) Do not try to calculate statistics while reading/updating PO file. Instead calculate it on first read of Statistics property after file read/update. This simplifies logic, makes it easier to maintain and avoids unnecessary calculations when statisics are not actually needed (basically all cases except POChecker).
2) Grouped statistics fields in one record (all these values are usually needed at the same time).
3) Adapted POChecker to the new interface.

git-svn-id: trunk@57965 -
2018-05-18 22:40:50 +00:00
maxim
36b1e31994 LazUtils: Translations unit: do not count errors in TPOFile class anymore, remove NrErrors property.
Reasons:

1) NrErrors was added for POChecker, but it does not use this property.
2) NrErrors count reflected only formatting errors, but this count has little value without list of strings with these errors.
3) PO file errors/problems are not limited by formatting errors (e.g. there can be master/child PO file string mismatches). Detecting them is out of scope of TPOFile class, so NrErrors count in many cases could be misleading.

git-svn-id: trunk@57948 -
2018-05-16 22:26:59 +00:00
maxim
401c1ad2dd LazUtils: Translations unit: declare FindAllTranslatedPoFiles function in interface
git-svn-id: trunk@57828 -
2018-05-07 22:42:16 +00:00
mattias
3c52bd5001 IDEIntf: added SaveComponentAsPascal
git-svn-id: trunk@57770 -
2018-05-02 22:38:41 +00:00
martin
4a5241032e LazLogger: Thread safety
git-svn-id: trunk@57736 -
2018-04-28 09:54:03 +00:00
wp
dd6ac71206 LazUtils: Undo unintentional change in r57634 #5ce61895bf
git-svn-id: trunk@57651 -
2018-04-13 07:32:03 +00:00
mattias
d43000198c lazutils: compwriterpas: fixed writing bytebool
git-svn-id: trunk@57646 -
2018-04-12 19:32:19 +00:00
wp
5ce61895bf TAChart: Fix TCubicSplineSeries drawing nothing if there are less than 4 data points and the option csoDrawFewPoints is set.
git-svn-id: trunk@57634 -
2018-04-09 17:09:00 +00:00
maxim
20834ad1f1 LazUtils, translations.pas: when collecting translation files for given base PO file take into account only files with exactly matching names, i.e. for 'project1.po' collect 'project1.foo.po', not 'project1foo.po'.
git-svn-id: trunk@57545 -
2018-03-21 22:36:01 +00:00
juha
d6934c9506 LazUtils: Add unit LazVersion. Use it also for LCLVersion. Issue #33418, patch from Zoran Vučenović.
git-svn-id: trunk@57504 -
2018-03-14 08:21:54 +00:00
maxim
5f524f7268 LazUtils: translations.pas unit: removed commented out code for context assigning, it will never be used, especially in CleanUp method
git-svn-id: trunk@57501 -
2018-03-12 21:58:06 +00:00
maxim
9306b45921 LazUtils, IDE: remove all unused PO items at once after processing all LRJ/RST/RSJ files, do not rely on PO item identifier structure. This change simpifies item sync logic and guarantees that master PO file will be in sync with LRJ/RST/RSJ files (previously items with not existing unit part of identifier were not removed from master PO file).
git-svn-id: trunk@57491 -
2018-03-09 22:37:25 +00:00
maxim
64656d67ad LazUtils, translations.pas unit: reverted 57426 #a377818801, it caused removal of
strings which should not be removed

git-svn-id: trunk@57431 -
2018-03-02 14:06:19 +00:00
mattias
9b15983c25 lcl: fixed UCS2LEToUTF8 for 1byte niput, issue #33296
git-svn-id: trunk@57429 -
2018-03-02 11:47:30 +00:00
maxim
a377818801 LazUtils: translations.pas unit: removed "module" list (actually list of units extracted from PO items identifiers) handling logic. It significantly complicated the code and these lists were completely unused.
git-svn-id: trunk@57426 -
2018-02-28 23:30:28 +00:00
maxim
2e579f6b18 LazUtils: translations.pas unit: remove deprecated TPOFile.Add method. There is no point in keeping it, because it is unused and it will need to be modified during FModuleList cleanup, so its behavior will change anyway. TPOFile.FillItem method should be used instead.
git-svn-id: trunk@57425 -
2018-02-28 22:46:51 +00:00
maxim
f23167b458 Translations: Simplified Chinese translation update by robsean, bug #33242
git-svn-id: trunk@57404 -
2018-02-27 23:23:20 +00:00
maxim
3ebd7fc7fb LazUtils: translations.pas unit: always remove old instance of renamed item from PO file. Before this commit we had the following erratic behavior in some cases (e.g. in files with only one resourcestring):
Change identifier of some resourcestring from "a" to "b" => PO file contains both "a" and "b" items, but should contain only "b" one.

git-svn-id: trunk@57382 -
2018-02-26 23:20:12 +00:00
maxim
32888ff513 LazUtils: translations.pas unit: reduced lowercase function calls
git-svn-id: trunk@57367 -
2018-02-24 23:00:57 +00:00
maxim
afe1fc7762 Translations: Ukrainian translation update by Olexandr Pylypchuk, bug #33213
git-svn-id: trunk@57363 -
2018-02-24 21:57:20 +00:00
maxim
62223144ab LazUtils, translations.pas unit: avoid the need to double-regenerate PO files in order to set context correctly when items are changed in the following manner:
"a" -> "c"
"b" -> "c"

Copying fuzzy translations has been disabled because it practically does not help translators and can create potential confusion (some items (like in case above) will appear to have false history, and suggested translation is incorrect anyway). Instead now we guarantee to suggest non-fuzzy translation if it exists.

TPOFile.OriginalList property is removed: it was meant for PoChecker and is not needed by it anymore, its underlying field contents have been changed in order to allow aforementioned changes and most likely will be changed again in near future.

git-svn-id: trunk@57346 -
2018-02-21 23:35:04 +00:00
michl
e34bbc5c6f LCL: Fixed OnKeyUp for special keys when key was handled in OnKeyDown. Issue #33196
git-svn-id: trunk@57331 -
2018-02-19 23:28:20 +00:00
maxim
73a90daa66 LazUtils: fixed TPOFile.FillItem debugln in translations.pas
git-svn-id: trunk@57327 -
2018-02-18 21:42:38 +00:00
mattias
0b8beb57af lcl: fixed typo
git-svn-id: trunk@57320 -
2018-02-17 10:42:53 +00:00
maxim
97eebaa8d9 LazUtils: slightly improved code in translations.pas without changing logic
git-svn-id: trunk@57317 -
2018-02-16 23:02:09 +00:00
maxim
47ca6a4009 LazUtils: removed unused constant from translations.pas
git-svn-id: trunk@57146 -
2018-01-25 00:02:34 +00:00
maxim
768142c2d9 Lazutils: fixed setting fuzzy flags for incorrectly formatted items when translations are regenerated by IDE and introduced Duplicate flag for TPOFileItem (we don't want to use Context for this, because in future it can be set not only for duplicate items)
git-svn-id: trunk@57144 -
2018-01-24 23:54:36 +00:00
maxim
692a019da4 Lazutils: Got rid of separate CheckFormatArguments method and FormatChecked property in TPOFile class. They are useless, because items are already checked for format arguments correctness when CheckFormatArguments is called.
git-svn-id: trunk@57143 -
2018-01-23 23:54:40 +00:00
maxim
f0d23f46c7 Lazutils: deprecated TPOFile.Add method. FillItem should be used from now on.
git-svn-id: trunk@57139 -
2018-01-21 22:48:54 +00:00
maxim
b7f1c99d2b Lazutils: refactored code for adding/updating items in order to remove code duplication (TPOFile.Add method call was always preceded by search for duplicate item). This change introduces FillItem method which effectively renders Add method obsolete.
git-svn-id: trunk@57138 -
2018-01-21 22:35:50 +00:00
maxim
26ce2347a4 LazUtils: when updating existing translation item, copy Flags together with translation if needed, just like we do for newly added item.
git-svn-id: trunk@57016 -
2018-01-08 23:05:59 +00:00
maxim
854d1eceaf LazUtils: when updating existing translation item, copy PreviousID together with translation if needed, just like we do for newly added item.
git-svn-id: trunk@57010 -
2018-01-08 15:22:52 +00:00
maxim
07343847b2 LazUtils: replaced hardcoded literal with constant in translations.pas
git-svn-id: trunk@56988 -
2018-01-06 15:00:32 +00:00
maxim
7c33223dae LazUtils: if existing item being updated has empty translation, search for possible translation variants just like for newly added item. This should allow to avoid the need to do two regenerations of .po files in a row in some cases.
git-svn-id: trunk@56967 -
2018-01-05 15:07:41 +00:00
maxim
375c1edea3 LazUtils: when updating translation item, set FModified only when flags are actually modified.
git-svn-id: trunk@56954 -
2018-01-04 15:41:57 +00:00
maxim
50260ae6a6 LazUtils: when updating translation item, always check for formatting arguments and update flags accordingly, because badformat flags are often removed e.g. by poEdit. This change should allow to avoid the need to do two regenerations of .po files in a row in some cases.
git-svn-id: trunk@56953 -
2018-01-04 14:16:17 +00:00
maxim
3d107d6533 LazUtils: when updating translation item, also correctly set BadFormat flag.
git-svn-id: trunk@56939 -
2018-01-03 16:49:09 +00:00
maxim
edac957379 LazUtils: when updating translation item, change its PreviousID only if it was empty or translation item was not fuzzy before update. This allows to keep for translator's reference PreviousID against which this fuzzy translation was made. It helps when some changes get made to already fuzzy translation item.
git-svn-id: trunk@56938 -
2018-01-03 15:49:21 +00:00
juha
ed1cd9335d LazUtils: Add a new function UTF8ProperCase() to unit LazUTF8.
git-svn-id: trunk@56892 -
2017-12-31 08:49:05 +00:00