Re: [Lazarus] TAChart CandleStick Chart

2014-10-08 Thread Kamen Ketev
 
What did you do? Replace the 

tamultiseries.pas in a TAChart of Lazarus 1.2.4?
 
Yes. Ok, I'll try svn. Thank you! 
Regards,
Kamen
 
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Bart
On 10/8/14, Maxim Ganetsky gan...@narod.ru wrote:

 Isn't two listboxes and two pairs of Clear/Unselect buttons too much? It
 is not clear why listbox with master .po files is needed at all?

To make it easier to find a given master po file amogst the clutter of
translated po-files (if you select ($lazarus) folder to scan there
will be 619 translated languagefiles in the second (Child) listbox...

 I think that one treeview (showing master .po files and their children)
 will look much better and will allow to avoid interface clutter.

See my argument above.



Rethinking for a minute...

We could turn this around the other way.
Only have a master po list, with a language selection combobox.
The All Languages wil then act as the Find all translated PO files option.

The disadvantage is that the user cannot see that e.g.
pocheckerconsts.nl.po does not exist, so he gets an errormessage when
hitting the Run button.

 Also I would like to have an option to check arbitrary number of
 selected .po files at once, not just one (useful e.g. to check/show
 statistics for all files of particular language).

Unfortunately the PoFamilies class was never designed to be able to
handle something like that.
It would probably need a rewrite almost from the ground up.
Or set up some collection of PoFamilies, run their separate tests
and collect the aggregate of their logs and statistics somehow.

I can see it would be practical for language maintainers though.

End users never seem to be satisfied G...
All this came from one question: can you write a tool that prevents
exceptions in format() due to wrong translationfiles.
And look where it has taken me...

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Bart
On 10/8/14, Giuliano Colla giuliano.co...@fastwebnet.it wrote:

 (please find here attached the latest version if Italian translation,
 which escaped the big update)

In revision 46454 there is an update from you of the pochecker language file.
Is this one newer?

Q: Do you have commit rights? If so, feel free to commit langage files
for this tool.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Giuliano Colla


Il 08/10/2014 12:14, Bart ha scritto:

[...]

Unfortunately the PoFamilies class was never designed to be able to
handle something like that.
It would probably need a rewrite almost from the ground up.
Or set up some collection of PoFamilies, run their separate tests
and collect the aggregate of their logs and statistics somehow.

I can see it would be practical for language maintainers though.

End users never seem to be satisfied G...
All this came from one question: can you write a tool that prevents
exceptions in format() due to wrong translationfiles.
a LazFormat procedure in LazUtils, which encompasses a sysutils.format 
procedure in a try/except block might have been a simpler solution, 
maybe

And look where it has taken me...


I don't know if an attempt to further extend Pochecker functionality is 
a wise move:
it's been conceived to perform a number of checking tasks, and it does 
its job.


Starting from PoChecker, I've developed, for my personal usage, another 
tool (which I called PoHelper) to assist me in translations: it provides 
me the functions I found useful, picking code around (from the 
Translations unit, from Pochecker units, and elsewhere) and putting it 
together to suit my needs. It includes pretty much all the things Maxim 
requires.
It may be an useful complement to Pochecker, leaving to Pochecker to 
perform its designed tasks, i.e. the final full check before committing.
I was planning to make it available to the Lazarus community, but it's 
still a rough tool, requiring some ironing up to become  of public 
domain. This goes together with a revised Translations unit, taking 
advantage of all Bart's improvements, which should obsolete 
SimplePoFiles, and simplify maintenance, both of Pochecker and of the 
PoHelper to come.


Giuliano

--
Giuliano Colla

Project planning question: when it's 90% done, are we halfway or not yet?


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Bart
On 10/8/14, Bart bartjun...@gmail.com wrote:

 Also I would like to have an option to check arbitrary number of
 selected .po files at once, not just one (useful e.g. to check/show
 statistics for all files of particular language).

My approach to that would probably be:
- Let there be only one list: the one with master po-files
- Give the user the option to select multiple files from thate list
- If user selects All languages then find all translated files, if
user selects a certain (one only please) language then find only the
traslated ones for that language
- Create a list of TPoFamilies (I would create a component for that)
- Run test for each PoFamily in that list
- Aggregate results (log, errorcount, stats)
- Pass on the log and stats to the resultsform

So then you will have the ability to:
- test all translated files of one master po-file
- test all translated files of a set of master po-files
- test translated po-file of a given language of one master po-file
- test translated po-files of a given language of a set of master po-files

I am unwilling to implement something like:
- test (language1, language2 of master1) and (language3, language4 of
master2) etc.

Just test all languages or one.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Bart
On 10/8/14, Giuliano Colla giuliano.co...@fastwebnet.it wrote:

 Il 08/10/2014 12:14, Bart ha scritto:

 All this came from one question: can you write a tool that prevents
 exceptions in format() due to wrong translationfiles.
 a LazFormat procedure in LazUtils, which encompasses a sysutils.format
 procedure in a try/except block might have been a simpler solution,
 maybe

Nice suggestion, but you would only want to use that for
translationstrings, so that would be a huge task to cahnge the Lazarus
codebase..

 I don't know if an attempt to further extend Pochecker functionality is
 a wise move:
 it's been conceived to perform a number of checking tasks, and it does
 its job.

Thank you for that feedback.
See however my last post about some of what Maxim wants.
I think it sounds reasonable.
I also stated what I would not be willing to implement.

 This goes together with a revised Translations unit, taking
 advantage of all Bart's improvements, which should obsolete
 SimplePoFiles, and simplify maintenance, both of Pochecker and of the
 PoHelper to come.

That would be of great help.
There have been updates and fixes to translations that never made it
into SimplePofiles.

I would suggest however to discuss that on devel list first.

One thing I struggled with is the use of PChar instead of strings.
It made it (to me, but that's probably a limitation of my skills)
impossible to have line-info on the PoItem.
That's why I rewrote all of this to use Strings.
The disadvantage of that however is that if a po file is NOT in UTF8,
the current code to then convert the entire PChar buffer to UTF8
cannot be used on a String.
(So, as a result I just cut that part out, after verifying that no po
file of Lazarus uses another encoding (which must be specified in the
file) than utf8)

In the past I have suggested that this part could be cut out, as long
as we require po-files to be in UTF8 encoding always.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] TPQConnection.CreateDB: ENCODING, OWNER, TEMPLATE, LC_CTYPE, TABLESPACE

2014-10-08 Thread silvioprog
Hello,

I need to create a PostgreSQL database from my application. The
TPQConnection.CreateDB works fine, but I need to configure some properties
of my database in your creation.

In pgAdmin, I execute:

CREATE DATABASE myuser
  WITH ENCODING='UTF8'
   OWNER=myowner
   TEMPLATE=template1
   LC_CTYPE='Portuguese_Brazil.1252'
   CONNECTION LIMIT=-1
   TABLESPACE=pg_default;

But, how to create a database with TPQConnection passing the ENCODING,
OWNER, TEMPLATE, LC_CTYPE and TABLESPACE properties?

Thank you!

ps. I tried ExecuteDirect, but: CREATE DATABASE cannot be executed inside
a transaction block.

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TPQConnection.CreateDB: ENCODING, OWNER, TEMPLATE, LC_CTYPE, TABLESPACE

2014-10-08 Thread Michael Van Canneyt



On Wed, 8 Oct 2014, silvioprog wrote:


Hello,

I need to create a PostgreSQL database from my application. The 
TPQConnection.CreateDB works fine, but I need to configure some properties of my
database in your creation.

In pgAdmin, I execute:

CREATE DATABASE myuser
  WITH ENCODING='UTF8'
       OWNER=myowner
       TEMPLATE=template1
       LC_CTYPE='Portuguese_Brazil.1252'
       CONNECTION LIMIT=-1
       TABLESPACE=pg_default;

But, how to create a database with TPQConnection passing the ENCODING, OWNER, 
TEMPLATE, LC_CTYPE and TABLESPACE properties?


Try setting them as 'Name=Value' pairs in the Params property of the connection 
component.

Michael.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Bart
On 10/8/14, Bart bartjun...@gmail.com wrote:

 My approach to that would probably be:
 - Let there be only one list: the one with master po-files
 - Give the user the option to select multiple files from thate list
 - If user selects All languages then find all translated files, if
 user selects a certain (one only please) language then find only the
 traslated ones for that language
 - Create a list of TPoFamilies (I would create a component for that)
 - Run test for each PoFamily in that list
 - Aggregate results (log, errorcount, stats)
 - Pass on the log and stats to the resultsform

 So then you will have the ability to:
 - test all translated files of one master po-file
 - test all translated files of a set of master po-files
 - test translated po-file of a given language of one master po-file
 - test translated po-files of a given language of a set of master po-files

Implemented in r46475.

Please give feedback.

(Some buttons still need AutSize := True, will do that some other time)

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Pochecker (was Fuzzy traslations ignored)

2014-10-08 Thread Maxim Ganetsky

08.10.2014 21:46, Bart пишет:

On 10/8/14, Bart bartjun...@gmail.com wrote:


My approach to that would probably be:
- Let there be only one list: the one with master po-files
- Give the user the option to select multiple files from thate list
- If user selects All languages then find all translated files, if
user selects a certain (one only please) language then find only the
traslated ones for that language
- Create a list of TPoFamilies (I would create a component for that)
- Run test for each PoFamily in that list
- Aggregate results (log, errorcount, stats)
- Pass on the log and stats to the resultsform

So then you will have the ability to:
- test all translated files of one master po-file
- test all translated files of a set of master po-files
- test translated po-file of a given language of one master po-file
- test translated po-files of a given language of a set of master po-files


Implemented in r46475.

Please give feedback.


Works great, thank you very much.

Still some comments ;) :

1. List of removed non-existent files can be quite big, so probably 
should be contained in Memo or something.
2. PoChecker always complains about .po files from debian\po Lazarus 
subdirectory.
3. Message There are no files left to check. is displayd directly 
after message about non-existent files. It will be good to combine them.



(Some buttons still need AutSize := True, will do that some other time)


Please consider using toolbars.

--
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus