Add automatically generated files needed for translations.

These help files are created from the .md source files and contain I18n strings,
but do not exist if kicad is not built from sources.
However they are needed by translators.
This commit is contained in:
jean-pierre charras 2020-01-29 18:47:06 +01:00
parent 3d0b3a51f3
commit 5d5363396c
8 changed files with 207 additions and 7 deletions

6
.gitignore vendored
View File

@ -17,16 +17,10 @@ eeschema/cmp_library_lexer.h
eeschema/cmp_library_keywords.*
eeschema/dialogs/dialog_bom_cfg_keywords.cpp
eeschema/dialogs/dialog_bom_cfg_lexer.h
eeschema/dialogs/dialog_bom_help_md.h
eeschema/template_fieldnames_keywords.*
eeschema/template_fieldnames_lexer.h
pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h
pcb_calculator/attenuators/bridget_tee_formula.h
pcb_calculator/attenuators/pi_formula.h
pcb_calculator/attenuators/splitter_formula.h
pcb_calculator/attenuators/tee_formula.h
pcb_calculator/tracks_width_versus_current_formula.h
Makefile
CMakeCache.txt
auto_renamed_to_cpp

View File

@ -5,7 +5,7 @@
file( READ ${inputFile} buffer )
file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake from an .md file\n" )
file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake from the .md file\n" )
#Remark: strings can contain semicolon. a semicolon is a separation in cmake.
#so, to avoid stripping semicolon in variables we have to quote them

View File

@ -0,0 +1,145 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "# 1 - Full documentation\n"
"\n"
"The Eeschema documentation (*eeschema.html*) describes this intermediate netlist and gives examples(chapter ***creating customized netlists and bom files***).\n"
"\n"
"# 2 - The intermediate Netlist File\n"
"\n"
"BOM files (and netlist files) can be created from an *Intermediate netlist file* created by Eeschema.\n"
"\n"
"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.\n"
"\n"
"Depending on the output (BOM or netlist), different subsets of the complete Intermediate Netlist file will be used in the post-processing.\n"
"\n"
"# 3 - Conversion to a new format\n"
"\n"
"By applying a post-processing filter to the Intermediate netlist file you can generate foreign netlist files as well as BOM files. Because this conversion is a text to text transformation, this post-processing filter can be written using *Python*, *XSLT*, or any other tool capable of taking XML as input.\n"
"\n"
"XSLT itself is a XML language suitable for XML transformations. There is a free program called `xsltproc` that you can download and install. The `xsltproc` program can be used to read the Intermediate XML netlist input file, apply a style-sheet to transform the input, and save the results in an output file. Use of `xsltproc` requires a style-sheet file using XSLT conventions. The full conversion process is handled by Eeschema, after it is configured once to run `xsltproc` in a specific way.\n"
"\n"
"A Python script is somewhat more easy to create.\n"
"\n"
"# 4 - Initialization of the dialog window\n"
"\n"
"You should add a new plugin (a script) in the plugin list by clicking on the Add Plugin button.\n"
"\n"
"## 4.1 - Plugin Configuration Parameters\n"
"\n"
"The Eeschema plug-in configuration dialog requires the following information:\n"
"\n"
" * The title: for instance, the name of the netlist format.\n"
" * The command line to launch the converter (usually a script).\n"
"\n"
"***Note (Windows only):***\n"
"*By default, the command line runs with hidden console window and output is redirected to \"Plugin info\" field. To show the window of the running command, set the checkbox \"Show console window\".*\n"
"\n"
"Once you click on the generate button the following will happen:\n"
"\n"
"1. Eeschema creates an intermediate netlist file \\*.xml, for instance `test.xml`.\n"
"2. Eeschema runs the script from the command line to create the final output file.\n"
"\n"
"## 4.2 - Generate netlist files with the command line\n"
"\n"
"Assuming we are using the program `xsltproc.exe` to apply the sheet style to the intermediate file, `xsltproc.exe` is executed with the following command.\n"
"\n"
"```\n"
"xsltproc.exe -o <output filename> <style-sheet filename> <input XML file to convert>\n"
"```\n"
"\n"
"On Windows the command line is the following.\n"
"\n"
"```\n"
"f:/kicad/bin/xsltproc.exe -o \"%O\" f:/kicad/bin/plugins/myconverter.xsl \"%I\"\n"
"```\n"
"\n"
"On Linux the command becomes as following.\n"
"\n"
"```\n"
"xsltproc -o \"%O\" /usr/local/kicad/bin/plugins/myconverter .xsl \"%I\"\n"
"```\n"
"where `myconverter.xsl` is the style-sheet that you are applying.\n"
"\n"
"Do not forget the double quotes around the file names, this allows them to have spaces after the substitution by Eeschema.\n"
"\n"
"If a Python script is used, the command line is something like (depending on the Python script):\n"
"\n"
"```\n"
"python f:/kicad/bin/plugins/bom-in-python/myconverter.py \"%I\" \"%O\"\n"
"```\n"
"\n"
"or\n"
"\n"
"```\n"
"python /usr/local/kicad/bin/plugins/bom-in-python/myconverter .xsl \"%I\" \"%O\"\n"
"```\n"
"\n"
"The command line format accepts parameters for filenames. The supported formatting parameters are:\n"
"\n"
" * `%B`: base filename of selected output file, minus path and extension.\n"
" * `%P`: project directory, without name and without trailing '/'.\n"
" * `%I`: complete filename and path of the temporary input file\n"
"(the intermediate net file).\n"
" * `%O`: complete filename and path (but without extension) of the user\n"
"chosen output file.\n"
"\n"
"`%I` will be replaced by the actual intermediate file name (usually the full root sheet filename with extension \".xml\").\n"
"`%O` will be replaced by the actual output file name (the full root sheet filename minus extension).\n"
"`%B` will be replaced by the actual output short file name (the short root sheet filename minus extension).\n"
"`%P` will be replaced by the actual current project path.\n"
"\n"
"## 4.3 - Command line format:\n"
"\n"
"### 4.3.1 - Remark:\n"
"\n"
"Most of time, the created file must have an extension, depending on its type.\n"
"Therefore you have to add to the option ***%O*** the right file extension.\n"
"\n"
"For instance:\n"
"\n"
" * **%O.csv** to create a .csv file (comma separated value file).\n"
" * **%O.htm** to create a .html file.\n"
" * **%O.bom** to create a .bom file.\n"
"\n"
"### 4.3.2 Example for xsltproc:\n"
"\n"
"The command line format for xsltproc is the following:\n"
"\n"
"```\n"
"<path of xsltproc> xsltproc <xsltproc parameters>\n"
"```\n"
"\n"
"On Windows:\n"
"```\n"
"f:/kicad/bin/xsltproc.exe -o \"%O.bom\" f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl \"%I\"\n"
"```\n"
"\n"
"On Linux:\n"
"```\n"
"xsltproc -o \"%O.bom\" /usr/local/kicad/bin/plugins/netlist_form_pads-pcb.xsl \"%I\"\n"
"```\n"
"\n"
"The above examples assume `xsltproc` is installed on your PC under Windows and xsl files located in `<path_to_kicad>/kicad/bin/plugins/`.\n"
"\n"
"\n"
"### 4.3.3 Example for Python scripts:\n"
"\n"
"Assuming python is installed on your PC, and python scripts are located in\n"
"\n"
" `<path_to_kicad>/kicad/bin/plugins/bom-in-python/`,\n"
"\n"
"the command line format for python is something like:\n"
"\n"
"```\n"
"python <script file name> <input filename> <output filename>\n"
"```\n"
"\n"
"On Windows:\n"
"```\n"
"python.exe f:/kicad/bin/plugins/bom-in-python/my_python_script.py \"%I\" \"%O.html\"\n"
"```\n"
"\n"
"On Linux:\n"
"```\n"
"python /usr/local/kicad/bin/plugins/bom-in-python/my_python_script.py \"%I\" \"%O.csv\"\n"
"```\n"
"" );

View File

@ -0,0 +1,10 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "### Bridged tee attenuator:\n"
"__Zin__ desired input impedance in &#x2126;<br>\n"
"__Zout__ desired output impedance<br>\n"
"__Z<sub>0</sub> = Zin = Zout__<br><br>\n"
"\n"
"* __a__ attenuation in dB\n"
"* __L = 10<sup>a/20</sup>__ (the loss)<br><br>\n"
"* ___R1 = Z<sub>0</sub> \\* (L - 1)___\n"
"* ___R2 = Z<sub>0</sub> / (L - 1)___" );

View File

@ -0,0 +1,12 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "## Pi attenuator\n"
"__Zin__ desired input impedance in &#x2126;<br>\n"
"__Zout__ desired output impedance<br>\n"
"__Zin = Zout__<br><br>\n"
"\n"
"* __a__ attenuation in dB\n"
"* __L = 10<sup>a/20</sup>__ (the loss)\n"
"* __A = (L + 1)/(L - 1)__<br><br>\n"
"* ___R2 = (L- 1)/2 \\* &radic; ( (Zin \\* Zout) / L)___\n"
"* ___R1 = 1/( A/Zin - 1/R2 )___\n"
"* ___R3 = 1/ (A/Zout - 1/R2 )___" );

View File

@ -0,0 +1,9 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "## Splitted attenuator\n"
"### Attenuation is 6dB\n"
"___Z<sub>in</sub>___ desired input impedance in &#x2126;<br>\n"
"___Z<sub>out</sub>___ desired output impedance in &#x2126;<br>\n"
"___Z<sub>in</sub> = Z<sub>out</sub>___\n"
"\n"
"___R1 = R2 = R3 = Z<sub>out</sub>/3___\n"
"" );

View File

@ -0,0 +1,13 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "## Tee attenuator\n"
"__Zin__ desired input impedance in &#x2126;<br>\n"
"__Zout__ desired output impedance<br>\n"
"__Zin = Zout__<br><br>\n"
"\n"
"* __a__ attenuation in dB\n"
"* __L = 10<sup>a/20</sup>__ (the loss)\n"
"* ___A = (L + 1)/(L - 1)___<br><br>\n"
"* ___R2 = 2&radic;(L \\* Z<sub>in</sub> \\* Z<sub>out</sub> )/(L - 1)___\n"
"* ___R1 = Z<sub>in</sub> \\* A - R2___\n"
"* ___R3 = Z<sub>out</sub> \\* A - R2___\n"
"" );

View File

@ -0,0 +1,17 @@
// Do not edit this file, it is autogenerated by CMake from the .md file
_HKI( "If you specify the maximum current, then the trace widths will be calculated to suit.\n"
"\n"
"If you specify one of the trace widths, the maximum current it can handle will be calculated. The width for the other trace to also handle this current will then be calculated.\n"
"\n"
"The controlling value is shown in bold.\n"
"\n"
"The calculations are valid for currents up to 35A (external) or 17.5A (internal), temperature rises up to 100 deg C, and widths of up to 400mil (10mm).\n"
"\n"
"The formula, from IPC 2221, is\n"
"<center>__I = K * dT<sup>0.44</sup> * (W*H)<sup>0.725</sup>__</center>\n"
"where: \n"
"__I__ = maximum current in amps \n"
"__dt__ = temperature rise above ambient in deg C \n"
"__W,H__ = width and thickness in mils \n"
"__K__ = 0.024 for internal traces or 0.048 for external traces\n"
"" );