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
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
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
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
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
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
6810c626df
LazUtils: Change "Character" to "Codepoint" in LazUTF8 function names to be more accurate and to avoid confusion.
...
git-svn-id: trunk@56692 -
2017-12-11 19:44:22 +00:00
mattias
673bc11392
lcl: gtk2: less hints
...
git-svn-id: trunk@54270 -
2017-02-25 12:26:50 +00:00
juha
09de77223d
LazUtils: Fix the package name in file headers.
...
git-svn-id: trunk@53753 -
2016-12-21 22:35:14 +00:00
juha
2329f266ed
Move Translations unit from LCL to LazUtils.
...
git-svn-id: trunk@53740 -
2016-12-20 22:32:43 +00:00