[Kicad-developers] Translation of dialog_bom_help.html

2018-07-07 Thread Константин Барановский
BOM dialog of Eeschema has help button.
It is shows the message with information that contained in
eeschema/dialogs/dialog_bom_help.html and available on english only.
How we can to fix that?
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


[Kicad-developers] Translation of dialog_bom_help.html

2018-07-31 Thread Константин Барановский
Hi!
Now, when the hype around 5.0.0 release is subsided, we can come back to
subject.
Does attached patch is appropriate solution or it must be solved in another
way?

-- Forwarded message -
From: Константин Барановский 
Date: пн, 16 июл. 2018 г. в 13:01
Subject: Re: [Kicad-developers] Translation of dialog_bom_help.html
To: jp charras 
Cc: kicad-developers@lists.launchpad.net <
kicad-developers@lists.launchpad.net>


I noticed that the environment variables config dialog also has html-based
help message. So I changed eeschema/dialogs/dialog_bom.cpp in the same
manear as it done in common/dialogs/dialog_env_var_config.cpp.

сб, 14 июл. 2018 г. в 10:01, jp charras :

> Le 12/07/2018 à 14:59, Simon Richter a écrit :
> > Hi,
> >
> > On 11.07.2018 21:51, Wayne Stambaugh wrote:
> >
> >> This probably should have been done as a cpp string wrapped with the
> >> translation macro _().  I'm not sure there is anything we can do to make
> >> this translatable.  Anyone else have any ideas?
> >
> > We could move the entire text to the user documentation, and make the
> > dialog point at it.
> >
> > If the dialog is unusable without the documentation, then that is a
> > separate problem, but I doubt it's that bad.
> >
> >Simon
>
> It is already in doc:
>
> http://docs.kicad-pcb.org/stable/en/eeschema.html#creating-customized-netlists-and-bom-files
> Of course, this doc could be enhanced (if there is a volunteer to do that)
>
> I am thinking this kind of doc must be in the dialog, because the command
> line needs explanations.
> The user cannot know without help how to create/modify this command line.
>
> In dialog, it can be a basic ASCII text (or using very basic html
> controls) (like in some other
> dialogs).
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
From dd900dfc3f1081048d544a5cf8997785858f999a Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin 
Date: Mon, 16 Jul 2018 12:58:49 +0300
Subject: [PATCH] Help message of BOM dialog is translatable now.

---
 eeschema/CMakeLists.txt   |  17 --
 eeschema/dialogs/dialog_bom.cpp   | 214 ++-
 eeschema/dialogs/dialog_bom_help.html | 286 --
 3 files changed, 208 insertions(+), 309 deletions(-)
 delete mode 100644 eeschema/dialogs/dialog_bom_help.html

diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 819812d07..e1e86ccb5 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -253,23 +253,6 @@ else()
 set( EESCHEMA_RESOURCES eeschema.rc )
 endif()
 
-# Create a C++ compilable string initializer containing html text into a *.h file:
-add_custom_command(
-OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-COMMAND ${CMAKE_COMMAND}
--DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
--DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
--P ${CMAKE_MODULE_PATH}/Html2C.cmake
-DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
-COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-   from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html"
-)
-
-set_source_files_properties( dialogs/dialog_bom.cpp
-PROPERTIES
-OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-)
-
 if( APPLE )
 # setup bundle
 set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns )
diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp
index 106f4751b..4855ec940 100644
--- a/eeschema/dialogs/dialog_bom.cpp
+++ b/eeschema/dialogs/dialog_bom.cpp
@@ -48,10 +48,6 @@
 #define BOM_PLUGINS_KEY wxT("bom_plugins")
 #define BOM_PLUGIN_SELECTED_KEY wxT("bom_plugin_selected")
 
-const char * s_bomHelpInfo =
-#include 
-;
-
 #include 
 
 using namespace T_BOMCFG_T;
@@ -658,11 +654,217 @@ void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event )
 
 void DIALOG_BOM::OnHelp( wxCommandEvent& event )
 {
+wxString msg = _( "1 - Full documentation:" );
+msg << wxT( "" );
+msg << _( "The Eeschema documentation describes this "
+  "intermediate netlist and gives examples." );
+msg << wxT( "" );
+msg << _( "See also " );
+msg << wxT( "https://answers.launchpad.net/kicad/+faq/2265" );
+msg << wxT( "" );
+
+msg << _( "2 - The intermediate Netlist File" );
+msg <

Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-11 Thread Wayne Stambaugh
This probably should have been done as a cpp string wrapped with the
translation macro _().  I'm not sure there is anything we can do to make
this translatable.  Anyone else have any ideas?

On 7/8/2018 1:57 AM, Константин Барановский wrote:
> BOM dialog of Eeschema has help button.
> It is shows the message with information that contained in
> eeschema/dialogs/dialog_bom_help.html and available on english only.
> How we can to fix that?
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-12 Thread Simon Richter
Hi,

On 11.07.2018 21:51, Wayne Stambaugh wrote:

> This probably should have been done as a cpp string wrapped with the
> translation macro _().  I'm not sure there is anything we can do to make
> this translatable.  Anyone else have any ideas?

We could move the entire text to the user documentation, and make the
dialog point at it.

If the dialog is unusable without the documentation, then that is a
separate problem, but I doubt it's that bad.

   Simon



signature.asc
Description: OpenPGP digital signature
___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-12 Thread Wayne Stambaugh
On 7/12/2018 8:59 AM, Simon Richter wrote:
> Hi,
> 
> On 11.07.2018 21:51, Wayne Stambaugh wrote:
> 
>> This probably should have been done as a cpp string wrapped with the
>> translation macro _().  I'm not sure there is anything we can do to make
>> this translatable.  Anyone else have any ideas?
> 
> We could move the entire text to the user documentation, and make the
> dialog point at it.
> 
> If the dialog is unusable without the documentation, then that is a
> separate problem, but I doubt it's that bad.
> 
>Simon

I completely missed the fact the html file is converted to a C string by
Html2C.cmake.  It would be easy enough to modify Html2C.cmake to wrap
the string with the _() macro.  The problem I see is the string (see
generated file eeschema/dialogs/dialog_bom_help_html.h) has a lot of
markup which I'm sure will make life miserable for translators.

We could try Simon's suggestion of moving the html text to the eeschema
user docs and provide a link using the help button.  We would have to
add code to point the help url to the translated version if it exists
but that shouldn't be too difficult (famous last words).  The contents
of the BOM dialog html file do not appear to exist anywhere in the
eeschema user doc.

In the future we should refrain from doing this so that all source
strings and documentation can be translated.

Wayne

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-12 Thread David Godfrey

  
  
Hi Wayne,
Out of interest, if formatted translated text is required in this
  dialogue would  it be easier to change from html to markdown?
  
  At least markdown is fairly easy for a translator to work with,
  although it doesn't provide all of the flexibility of html.


   Regards
  David Godfrey
  SB Tech Services
  mb: +61 437 286 200
  
chat:
  with dcg_mx at
  #sbts:matrix.org
  (Computer)
  #sbts:matrix.org
  (mobile Device)  
  
  

On 12/07/18 22:15, Wayne Stambaugh
  wrote:


  On 7/12/2018 8:59 AM, Simon Richter wrote:

  
Hi,

On 11.07.2018 21:51, Wayne Stambaugh wrote:



  This probably should have been done as a cpp string wrapped with the
translation macro _().  I'm not sure there is anything we can do to make
this translatable.  Anyone else have any ideas?



We could move the entire text to the user documentation, and make the
dialog point at it.

If the dialog is unusable without the documentation, then that is a
separate problem, but I doubt it's that bad.

   Simon

  
  
I completely missed the fact the html file is converted to a C string by
Html2C.cmake.  It would be easy enough to modify Html2C.cmake to wrap
the string with the _() macro.  The problem I see is the string (see
generated file eeschema/dialogs/dialog_bom_help_html.h) has a lot of
markup which I'm sure will make life miserable for translators.

We could try Simon's suggestion of moving the html text to the eeschema
user docs and provide a link using the help button.  We would have to
add code to point the help url to the translated version if it exists
but that shouldn't be too difficult (famous last words).  The contents
of the BOM dialog html file do not appear to exist anywhere in the
eeschema user doc.

In the future we should refrain from doing this so that all source
strings and documentation can be translated.

Wayne

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp





  


___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-13 Thread Константин Барановский
As a some start point, I was simplified
eeschema/dialogs/dialog_bom_help.html as much as possible (with several
fixes).

пт, 13 июл. 2018 г. в 6:40, David Godfrey :

> Hi Wayne,
>
> Out of interest, if formatted translated text is required in this dialogue
> would  it be easier to change from html to markdown?
>
> At least markdown is fairly easy for a translator to work with, although
> it doesn't provide all of the flexibility of html.
> Regards
> David Godfrey
> SB Tech Services
> mb: +61 437 286 200 <+61437286200>
>
> chat: with *dcg_mx* at
> #sbts:matrix.org  (Computer)
> #sbts:matrix.org  (mobile Device)
>
>
> On 12/07/18 22:15, Wayne Stambaugh wrote:
>
> On 7/12/2018 8:59 AM, Simon Richter wrote:
>
> Hi,
>
> On 11.07.2018 21:51, Wayne Stambaugh wrote:
>
>
> This probably should have been done as a cpp string wrapped with the
> translation macro _().  I'm not sure there is anything we can do to make
> this translatable.  Anyone else have any ideas?
>
>
> We could move the entire text to the user documentation, and make the
> dialog point at it.
>
> If the dialog is unusable without the documentation, then that is a
> separate problem, but I doubt it's that bad.
>
>Simon
>
>
> I completely missed the fact the html file is converted to a C string by
> Html2C.cmake.  It would be easy enough to modify Html2C.cmake to wrap
> the string with the _() macro.  The problem I see is the string (see
> generated file eeschema/dialogs/dialog_bom_help_html.h) has a lot of
> markup which I'm sure will make life miserable for translators.
>
> We could try Simon's suggestion of moving the html text to the eeschema
> user docs and provide a link using the help button.  We would have to
> add code to point the help url to the translated version if it exists
> but that shouldn't be too difficult (famous last words).  The contents
> of the BOM dialog html file do not appear to exist anywhere in the
> eeschema user doc.
>
> In the future we should refrain from doing this so that all source
> strings and documentation can be translated.
>
> Wayne
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
From e787b579b7e197f6391be153ba57a298190b20bd Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin 
Date: Fri, 13 Jul 2018 20:09:01 +0300
Subject: [PATCH] Html source of bom help message is simplified.

The file eeschema/dialogs/dialog_bom_help.html was generated from
LibreOffice and has the lot of unnecessary tags.
---
 eeschema/dialogs/dialog_bom_help.html | 555 +-
 1 file changed, 273 insertions(+), 282 deletions(-)

diff --git a/eeschema/dialogs/dialog_bom_help.html b/eeschema/dialogs/dialog_bom_help.html
index cd6169a2c..529d93e42 100644
--- a/eeschema/dialogs/dialog_bom_help.html
+++ b/eeschema/dialogs/dialog_bom_help.html
@@ -1,286 +1,277 @@
-
+
 
-
-	
-	kicad help
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-	
-		@page { margin: 2cm }
-		p { margin-bottom: 0.21cm; color: #00; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto }
-		p.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: en-US }
-		h1 { color: #00 }
-		h1.western { font-family: "Times New Roman", serif }
-		h2 { color: #00 }
-		h2.western { font-family: "Times New Roman", serif; font-size: 20pt }
-		h2.cjk { font-family: "SimSun"; font-size: 14pt }
-		h2.ctl { font-family: "Mangal"; font-size: 14pt }
-		h3 { background: transparent; color: #00 }
-		h3.western { font-family: "Times New Roman", serif; font-size: 16pt; font-style: italic }
-		h3.cjk { font-family: "SimSun" }
-		h3.ctl { font-family: "Mangal" }
-		a:link { color: #004586; text-decoration: none }
-		a.western:link { font-family: "Liberation Sans", sans-serif; so-language: zxx; font-style: italic }
-		a.sdfootnotesym-western { font-family: "DejaVu Serif", serif }
-	
-
-
-1 -
-Full documentation:
-
-The
-Eeschema documentation describes
-this intermediate netlist and gives examplesSee
-also https://answers.launchpad.net/kicad/+faq/2265
-2 - The intermediate Netlist File
-
-BOM
-files (and netlist files) can be created from an Intermediate netlist
-file created by Eeschema.
-
-This
-file uses XML syntax and is called the intermediate netlist. The
-intermediate netlist includes a large amount of data about your board
-and because of this, it can be used with post-processing to create a
-BOM or other reports.
-
-Depending
-on the output (BOM or netlist)

Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-13 Thread Wayne Stambaugh
If the wxHtml widget would support markdown that would work but I don't
think that is the case.  I prefer converting it to markdown and moving
it into the Eeschema user documentation.  It's currently not in the
documentation so that is an issue itself.  It's something we should
definitely take a look at both in terms of the documentation and the
lack of translation.

On 07/12/2018 11:36 PM, David Godfrey wrote:
> Hi Wayne,
> 
> Out of interest, if formatted translated text is required in this
> dialogue would  it be easier to change from html to markdown?
> 
> At least markdown is fairly easy for a translator to work with, although
> it doesn't provide all of the flexibility of html.
> 
> Regards
> David Godfrey
> SB Tech Services
> mb: +61 437 286 200 
> 
> chat: with /dcg_mx/ at
> #sbts:matrix.org  (Computer)
> #sbts:matrix.org  (mobile Device)
> 
> 
> On 12/07/18 22:15, Wayne Stambaugh wrote:
>> On 7/12/2018 8:59 AM, Simon Richter wrote:
>>> Hi,
>>>
>>> On 11.07.2018 21:51, Wayne Stambaugh wrote:
>>>
 This probably should have been done as a cpp string wrapped with the
 translation macro _().  I'm not sure there is anything we can do to make
 this translatable.  Anyone else have any ideas?
>>> We could move the entire text to the user documentation, and make the
>>> dialog point at it.
>>>
>>> If the dialog is unusable without the documentation, then that is a
>>> separate problem, but I doubt it's that bad.
>>>
>>>Simon
>> I completely missed the fact the html file is converted to a C string by
>> Html2C.cmake.  It would be easy enough to modify Html2C.cmake to wrap
>> the string with the _() macro.  The problem I see is the string (see
>> generated file eeschema/dialogs/dialog_bom_help_html.h) has a lot of
>> markup which I'm sure will make life miserable for translators.
>>
>> We could try Simon's suggestion of moving the html text to the eeschema
>> user docs and provide a link using the help button.  We would have to
>> add code to point the help url to the translated version if it exists
>> but that shouldn't be too difficult (famous last words).  The contents
>> of the BOM dialog html file do not appear to exist anywhere in the
>> eeschema user doc.
>>
>> In the future we should refrain from doing this so that all source
>> strings and documentation can be translated.
>>
>> Wayne
>>
>> ___
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
> 
> 
> 
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-13 Thread Nick Østergaard
FWIW The documentation does not use markdown syntax, but asciidoc.
Den fre. 13. jul. 2018 kl. 23.52 skrev Wayne Stambaugh :
>
> If the wxHtml widget would support markdown that would work but I don't
> think that is the case.  I prefer converting it to markdown and moving
> it into the Eeschema user documentation.  It's currently not in the
> documentation so that is an issue itself.  It's something we should
> definitely take a look at both in terms of the documentation and the
> lack of translation.
>
> On 07/12/2018 11:36 PM, David Godfrey wrote:
> > Hi Wayne,
> >
> > Out of interest, if formatted translated text is required in this
> > dialogue would  it be easier to change from html to markdown?
> >
> > At least markdown is fairly easy for a translator to work with, although
> > it doesn't provide all of the flexibility of html.
> >
> > Regards
> > David Godfrey
> > SB Tech Services
> > mb: +61 437 286 200 
> >
> > chat: with /dcg_mx/ at
> > #sbts:matrix.org  (Computer)
> > #sbts:matrix.org  (mobile Device)
> >
> >
> > On 12/07/18 22:15, Wayne Stambaugh wrote:
> >> On 7/12/2018 8:59 AM, Simon Richter wrote:
> >>> Hi,
> >>>
> >>> On 11.07.2018 21:51, Wayne Stambaugh wrote:
> >>>
>  This probably should have been done as a cpp string wrapped with the
>  translation macro _().  I'm not sure there is anything we can do to make
>  this translatable.  Anyone else have any ideas?
> >>> We could move the entire text to the user documentation, and make the
> >>> dialog point at it.
> >>>
> >>> If the dialog is unusable without the documentation, then that is a
> >>> separate problem, but I doubt it's that bad.
> >>>
> >>>Simon
> >> I completely missed the fact the html file is converted to a C string by
> >> Html2C.cmake.  It would be easy enough to modify Html2C.cmake to wrap
> >> the string with the _() macro.  The problem I see is the string (see
> >> generated file eeschema/dialogs/dialog_bom_help_html.h) has a lot of
> >> markup which I'm sure will make life miserable for translators.
> >>
> >> We could try Simon's suggestion of moving the html text to the eeschema
> >> user docs and provide a link using the help button.  We would have to
> >> add code to point the help url to the translated version if it exists
> >> but that shouldn't be too difficult (famous last words).  The contents
> >> of the BOM dialog html file do not appear to exist anywhere in the
> >> eeschema user doc.
> >>
> >> In the future we should refrain from doing this so that all source
> >> strings and documentation can be translated.
> >>
> >> Wayne
> >>
> >> ___
> >> Mailing list: https://launchpad.net/~kicad-developers
> >> Post to : kicad-developers@lists.launchpad.net
> >> Unsubscribe : https://launchpad.net/~kicad-developers
> >> More help   : https://help.launchpad.net/ListHelp
> >>
> >>
> >
> >
> >
> > ___
> > Mailing list: https://launchpad.net/~kicad-developers
> > Post to : kicad-developers@lists.launchpad.net
> > Unsubscribe : https://launchpad.net/~kicad-developers
> > More help   : https://help.launchpad.net/ListHelp
> >
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-13 Thread Carsten Schoenert
Am 13.07.2018 um 23:59 schrieb Nick Østergaard:
> FWIW The documentation does not use markdown syntax, but asciidoc.

Everything other than markdown is better as there are various
(incompatible) markdown engines out there, so please asciidoc or
restructured text.

-- 
Regards
Carsten Schoenert

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-14 Thread jp charras
Le 12/07/2018 à 14:59, Simon Richter a écrit :
> Hi,
> 
> On 11.07.2018 21:51, Wayne Stambaugh wrote:
> 
>> This probably should have been done as a cpp string wrapped with the
>> translation macro _().  I'm not sure there is anything we can do to make
>> this translatable.  Anyone else have any ideas?
> 
> We could move the entire text to the user documentation, and make the
> dialog point at it.
> 
> If the dialog is unusable without the documentation, then that is a
> separate problem, but I doubt it's that bad.
> 
>Simon

It is already in doc:
http://docs.kicad-pcb.org/stable/en/eeschema.html#creating-customized-netlists-and-bom-files
Of course, this doc could be enhanced (if there is a volunteer to do that)

I am thinking this kind of doc must be in the dialog, because the command line 
needs explanations.
The user cannot know without help how to create/modify this command line.

In dialog, it can be a basic ASCII text (or using very basic html controls) 
(like in some other
dialogs).

-- 
Jean-Pierre CHARRAS

___
Mailing list: https://launchpad.net/~kicad-developers
Post to : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


Re: [Kicad-developers] Translation of dialog_bom_help.html

2018-07-16 Thread Константин Барановский
I noticed that the environment variables config dialog also has html-based
help message. So I changed eeschema/dialogs/dialog_bom.cpp in the same
manear as it done in common/dialogs/dialog_env_var_config.cpp.

сб, 14 июл. 2018 г. в 10:01, jp charras :

> Le 12/07/2018 à 14:59, Simon Richter a écrit :
> > Hi,
> >
> > On 11.07.2018 21:51, Wayne Stambaugh wrote:
> >
> >> This probably should have been done as a cpp string wrapped with the
> >> translation macro _().  I'm not sure there is anything we can do to make
> >> this translatable.  Anyone else have any ideas?
> >
> > We could move the entire text to the user documentation, and make the
> > dialog point at it.
> >
> > If the dialog is unusable without the documentation, then that is a
> > separate problem, but I doubt it's that bad.
> >
> >Simon
>
> It is already in doc:
>
> http://docs.kicad-pcb.org/stable/en/eeschema.html#creating-customized-netlists-and-bom-files
> Of course, this doc could be enhanced (if there is a volunteer to do that)
>
> I am thinking this kind of doc must be in the dialog, because the command
> line needs explanations.
> The user cannot know without help how to create/modify this command line.
>
> In dialog, it can be a basic ASCII text (or using very basic html
> controls) (like in some other
> dialogs).
>
> --
> Jean-Pierre CHARRAS
>
> ___
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
From dd900dfc3f1081048d544a5cf8997785858f999a Mon Sep 17 00:00:00 2001
From: Baranovskiy Konstantin 
Date: Mon, 16 Jul 2018 12:58:49 +0300
Subject: [PATCH] Help message of BOM dialog is translatable now.

---
 eeschema/CMakeLists.txt   |  17 --
 eeschema/dialogs/dialog_bom.cpp   | 214 ++-
 eeschema/dialogs/dialog_bom_help.html | 286 --
 3 files changed, 208 insertions(+), 309 deletions(-)
 delete mode 100644 eeschema/dialogs/dialog_bom_help.html

diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 819812d07..e1e86ccb5 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -253,23 +253,6 @@ else()
 set( EESCHEMA_RESOURCES eeschema.rc )
 endif()
 
-# Create a C++ compilable string initializer containing html text into a *.h file:
-add_custom_command(
-OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-COMMAND ${CMAKE_COMMAND}
--DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
--DoutputFile=${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
--P ${CMAKE_MODULE_PATH}/Html2C.cmake
-DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html
-COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-   from ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help.html"
-)
-
-set_source_files_properties( dialogs/dialog_bom.cpp
-PROPERTIES
-OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialogs/dialog_bom_help_html.h
-)
-
 if( APPLE )
 # setup bundle
 set( EESCHEMA_RESOURCES eeschema.icns eeschema_doc.icns )
diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp
index 106f4751b..4855ec940 100644
--- a/eeschema/dialogs/dialog_bom.cpp
+++ b/eeschema/dialogs/dialog_bom.cpp
@@ -48,10 +48,6 @@
 #define BOM_PLUGINS_KEY wxT("bom_plugins")
 #define BOM_PLUGIN_SELECTED_KEY wxT("bom_plugin_selected")
 
-const char * s_bomHelpInfo =
-#include 
-;
-
 #include 
 
 using namespace T_BOMCFG_T;
@@ -658,11 +654,217 @@ void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event )
 
 void DIALOG_BOM::OnHelp( wxCommandEvent& event )
 {
+wxString msg = _( "1 - Full documentation:" );
+msg << wxT( "" );
+msg << _( "The Eeschema documentation describes this "
+  "intermediate netlist and gives examples." );
+msg << wxT( "" );
+msg << _( "See also " );
+msg << wxT( "https://answers.launchpad.net/kicad/+faq/2265" );
+msg << wxT( "" );
+
+msg << _( "2 - The intermediate Netlist File" );
+msg << wxT( "" );
+msg << _( "BOM files (and netlist files) can be created from an "
+  "Intermediate netlist file created by Eeschema." );
+msg << wxT( "" );
+msg << _( "This file uses XML syntax and is called the intermediate "
+  "netlist. The intermediate netlist includes a large amount of "
+  "data about your board and because of this, it can be used with "
+  "post-processing to create a BOM or other reports." );
+msg << wxT( "" );
+msg << _( "Depending on the output (BOM or netlist), different subsets of "
+  "the complete Intermediate Netlist file will be used in the "
+  "post-processing." );
+msg << wxT( "" );
+
+msg << _( "3 - Conversion to a new format" );
+msg << wxT( "" );
+m