Maxim Ganetsky
ddbcec7bcc
LCL, LCLTranslator: Do not check if a property has a setter before even attempting to read what it is and thus ignoring classes (with translatable properties) returned by properties without setters. Check if a property setter is present only just before actually writing to it.
...
Fixes translation of TLabeledEdit.EditLabel.Caption (EditLabel is a property without setter there).
It was a regression after commit 36c7ef29ed
which fixed issue #35202 .
2023-10-13 02:36:37 +03:00
Maxim Ganetsky
b949b1d54f
LCLTranslator: clean up
2023-06-15 03:04:09 +03:00
Juha
74446557f6
Remove old deprecated functions and units.
2023-06-15 02:35:52 +03:00
Maxim Ganetsky
9c8663e0f6
LCL, LCLTranslator: when searching for translation files, use properly extracted language code (do not assume that it has fixed two-symbol length)
2023-06-12 16:29:08 +03:00
Maxim Ganetsky
e21408456e
LCL: migrated LCLTranslator to using GetLanguageID function from Translations unit
2023-06-12 04:11:45 +03:00
Maxim Ganetsky
d8f4c3990b
LCL, LCLTranslator: When finding language ID, don't always explicitly analyze LANG variable, let LazGetLanguageIDs procedure do its job instead.
...
LazGetLanguageIDs will look at LANG on Linux/Unix just fine (and in correct order, see issue #37937 ), and on Windows this is non-standard location and thus using it can potentially lead to unexpected results.
2023-06-06 02:57:21 +03:00
Maxim Ganetsky
e7b16e08e4
LazUtils: improved newly added language ID trimming procedure name (LazGetTrimmedLanguageID -> LazTrimLanguageID) in order to signify that it only transforms passed ID value
2023-06-02 02:03:46 +03:00
Maxim Ganetsky
42bcafe228
LazUtils, LCL: Trim encoding from found language ID if it presents there (e. g. ru_RU.utf8) in order to always correctly load translation files like project1.ru_RU.po. Based on patch by ACTom, merge request !182 .
2023-06-01 18:22:30 +03:00
Maxim Ganetsky
d85e87e54f
LCL: Added convenience TranslateUnitResourceStringsEx wrapper to LCLTranslator.
...
It allows to no longer include Translations unit in addition to LCLTranslator if user wants to translate some additional unit.
'Ex' suffix allows to avoid name collision with similar functions in Translations unit.
2022-07-29 02:58:50 +03:00
wp_xyz
282e47bb8a
Revert unintentionally committed files
2022-05-24 15:38:36 +02:00
wp_xyz
afa0c12e15
Examples/FontEnum: Fix selection of italic fonts ( https://forum.lazarus.freepascal.org/index.php/topic,59444.msg443180 ).
2022-05-24 15:35:00 +02:00
maxim
5e5045ebd1
LCLTranslator: small refactor, ensured setting SetDefaultLang and TranslateLCLResourceStrings results to empty values on exceptions
...
git-svn-id: trunk@61615 -
2019-07-22 22:14:25 +00:00
maxim
14ccbadf1f
LCLTranslator: removed superfluous exception handling from FindLocaleFileName function
...
git-svn-id: trunk@61611 -
2019-07-21 22:35:23 +00:00
maxim
da14845df3
LCL: fixed license header in lcltranslator.pas file and removed license header from defaulttranslator.pas file (it has no copyrightable code)
...
git-svn-id: trunk@61606 -
2019-07-19 23:09:25 +00:00
maxim
b516684cc1
LCLTranslator: search for master PO (.pot) file in user specified directory too, just like we do for regular PO files
...
git-svn-id: trunk@61605 -
2019-07-19 22:50:06 +00:00
maxim
06630d0699
LCLTranslator: reduced duplicate code in FindLocaleFileName function (no functional changes)
...
git-svn-id: trunk@61604 -
2019-07-19 22:19:26 +00:00
maxim
1e1a161608
LCLTranslator: updated comments
...
git-svn-id: trunk@61603 -
2019-07-19 12:31:07 +00:00
maxim
bd30dff893
LCLTranslator: made TranslateLCLResourceStrings return found language for symmetry with SetDefaultLang
...
git-svn-id: trunk@61602 -
2019-07-18 22:41:43 +00:00
maxim
4f92041356
LCLTranslator: Made SetDefaultLang return found language (aka 'default language') and deprecated separate GetDefaultLang function. This change reduces global variable usage and allows to save (or not to save) found language separately for each FindLocaleFileName function call.
...
git-svn-id: trunk@61599 -
2019-07-17 23:54:56 +00:00
maxim
4d435d832b
LCLTranslator: simplified FindLocaleFileName function by removing GetLocaleFileName nested function from it (no functional changes)
...
git-svn-id: trunk@61591 -
2019-07-14 23:24:44 +00:00
maxim
28f83647db
LCLTranslator: factored out language finding code to a separate procedure (no functional changes)
...
git-svn-id: trunk@61590 -
2019-07-14 23:10:57 +00:00
maxim
787897eba2
LCLTranslator: make GetDefaultLang function result independent of LCL translation presence. Now it depends only on presence of interface translation. This behavior makes sense in cases when interface translation present and LCL one missing, or the other way round.
...
git-svn-id: trunk@61543 -
2019-07-07 23:22:34 +00:00
maxim
df6ff313ed
LCLTranslator: factored out LCL resource string translation code to a separate procedure TranslateLCLResourceStrings
...
git-svn-id: trunk@61541 -
2019-07-05 23:00:13 +00:00
maxim
d6391d9421
LCLTranslator: optimized commandline parameters handling code a bit (no functional changes)
...
git-svn-id: trunk@61057 -
2019-04-25 22:48:45 +00:00
maxim
ccf03e0d2a
LCLTranslator: also allow "--lang=<lang>" commandline parameter in addition to "-l <lang>" and "--lang <lang>", bug #35432
...
git-svn-id: trunk@61041 -
2019-04-23 23:59:48 +00:00
jesus
36c7ef29ed
LCL, fix DBgrid does not accept translations in main form only, issue #35202
...
git-svn-id: trunk@60667 -
2019-03-14 16:34:02 +00:00
maxim
e6e840a2e6
LCLTranslator: Correctly initialize original string value when translating it. Fixes translation of form elements via MO files. Before it worked only when SetDefaultLang procedure was called in unit initialization section, now it does not matter where/when SetDefaultLang is called.
...
git-svn-id: trunk@60595 -
2019-03-05 23:25:38 +00:00
maxim
a949be0aee
LCLTranslator: formatting
...
git-svn-id: trunk@60463 -
2019-02-19 23:11:44 +00:00
maxim
67732946ce
LCLTranslator: search for LCL strings both in PO and MO format regardless of format of found project translation (also simplifies logic)
...
git-svn-id: trunk@60462 -
2019-02-19 22:55:19 +00:00
maxim
d2bd729d29
LCLTranslator: adapted search procedure to the fact that master files now have .pot extension
...
git-svn-id: trunk@60417 -
2019-02-13 22:30:24 +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
maxim
e7188b6683
LCLTranslator: Normalize lineendings of multilined strings when searching for translations in MO files. Fixes loading of translations of multilined strings from MO files.
...
git-svn-id: trunk@60268 -
2019-01-31 23:23:19 +00:00
maxim
114df2b6b6
LCLTranslator: allow to optionally specify the name of translation file. Based on patch by Alfred, bug #34836 . As SetDefaultLang signature is changed (in order to not force users specify 'obscure' ForceUpdate parameter if they want to set translation name), adapted DefaultTranslator unit to these changes.
...
git-svn-id: trunk@60097 -
2019-01-17 00:08:03 +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
maxim
a16d3e7cf9
LCL, LCLTranslator: reduced scope of variable, hint from Werner, bug #34181
...
git-svn-id: trunk@58791 -
2018-08-27 23:19:49 +00:00
mattias
a7d82ae9eb
lcl: translations: fixed getting duplicate msg from .mo file, issue #33173
...
git-svn-id: trunk@57321 -
2018-02-17 10:44:33 +00:00
mattias
c56672a0e9
lcl: lcltranslator: FindLocaleFileName: fixed checking if dir is absolute
...
git-svn-id: trunk@57318 -
2018-02-17 10:40:22 +00:00
mattias
faa58c53b1
lcl: lcltranslator: use typeinfo instead of type name
...
git-svn-id: trunk@56124 -
2017-10-18 12:00:30 +00:00
mattias
136dc9b9aa
lcl: lcltranslator: fixed using property path, instead of subcomponent names, subcomponents names can be empty, same as IDE
...
git-svn-id: trunk@56121 -
2017-10-18 09:24:33 +00:00
mattias
d37434a214
lcl: lcltranslator: skip components without name
...
git-svn-id: trunk@56120 -
2017-10-18 09:03:52 +00:00
mattias
feb16f7063
lcl: lcltranslator: fixed translating only TTranslateString properties
...
git-svn-id: trunk@56119 -
2017-10-18 08:50:38 +00:00
joost
1de2cbf586
general: Updated address of the Free Software Foundation in copyright messages
...
git-svn-id: trunk@54031 -
2017-01-29 21:04:32 +00:00
juha
cfd390c5c5
Order uses sections some more.
...
git-svn-id: trunk@53741 -
2016-12-20 22:32:52 +00:00
juha
a714a91311
LCL: Move TLCLPlatform and related non-GUI code to a new unit to be used without GUI.
...
Organize uses-sections by package so that dependencies can be easier seen.
git-svn-id: trunk@53711 -
2016-12-17 22:58:08 +00:00
wp
7f8864e5b6
LCLTranslator: Fix FindLocaleFilename failing if optional directory is absolute or ends with a path delimiter.
...
git-svn-id: trunk@52527 -
2016-06-19 22:19:27 +00:00
mattias
cf00069fb2
LCL: lcltranslator: when switching language call datamodules too, bug #28946 , patch from fbiazi
...
git-svn-id: trunk@50204 -
2015-11-02 21:47:06 +00:00
juha
06ac76f560
LazUtils, unit FileUtil: Disable conditionally LazUtf8 and LazFileUtils wrapper functions. For testing define NoLazUTF8Wrappers and build Lazarus.
...
git-svn-id: trunk@49494 -
2015-07-04 23:08:00 +00:00
mattias
7bfd7e12cc
LCL: TPOTranslator constructor with TPOFile, patch #27616 from Simon Ameis
...
git-svn-id: trunk@48161 -
2015-03-07 10:14:36 +00:00
mattias
c2545d0502
LCL: translator: comments and published GetDefaultLang, issue #27440 , from wp
...
git-svn-id: trunk@47683 -
2015-02-10 15:59:42 +00:00
juha
abf9a845da
Deprecate wrappers for LazUTF8 functions in LCLProc.
...
git-svn-id: trunk@47604 -
2015-02-06 18:25:31 +00:00