Integrate message catalog creation into build process.

master
Torsten Paul 2014-01-09 19:34:42 +01:00
parent e07d1d0320
commit 54a6f2addb
6 changed files with 254 additions and 252 deletions

1
.gitignore vendored
View File

@ -14,6 +14,7 @@ parser_yacc.h
/OpenSCAD.app
*/#*#
/po/*/*/*.mo
/po/POTFILES
/nbproject
/openscad
/tests/openscad_nogui

View File

@ -485,17 +485,23 @@ isEmpty(PREFIX):PREFIX = /usr/local
target.path = $$PREFIX/bin/
INSTALLS += target
LINGUAS = $$cat(po/LINGUAS)
!isEmpty(LOCALE_PREFIX): DEFINES += LOCALE_PREFIX=\'\"$$LOCALE_PREFIX\"\'
isEmpty(LOCALE_PREFIX): LOCALE_PREFIX = $$PREFIX/share/openscad/locale
# Run translation update scripts as last step after linking the target
QMAKE_POST_LINK += ./scripts/generate-potfiles.sh > po/POTFILES ; ./scripts/translation-update.sh
# Create install targets for the languages defined in LINGUAS
LINGUAS = $$cat(po/LINGUAS)
for(language, LINGUAS) {
catalog = po/$$language/LC_MESSAGES/openscad.mo
exists($$catalog) {
translation_path = translation_$${language}.path
translation_files = translation_$${language}.files
translation_depends = translation_$${language}.depends
$$translation_path = $$LOCALE_PREFIX/$$language/LC_MESSAGES/
$$translation_files = $$catalog
$$translation_depends = po/$${language}.po
INSTALLS += translation_$$language
}
}

View File

@ -1,77 +0,0 @@
# see doc/translation.txt
# ui_xxxx.h files created by qt's uic when make is run.
# if you add new .ui files, add their .h counterpart here
objects/ui_AboutDialog.h
objects/ui_OpenCSGWarningDialog.h
objects/ui_ProgressWidget.h
objects/ui_MainWindow.h
objects/ui_Preferences.h
# C++ files
src/AppleEvents.cc
src/builtin.cc
src/cgaladv.cc
src/cgaladv_minkowski2.cc
src/CGALCache.cc
src/CGALEvaluator.cc
src/CGAL_Nef_polyhedron.cc
src/CGAL_Nef_polyhedron_DxfData.cc
src/CGALRenderer.cc
src/cgalutils.cc
src/cgalworker.cc
src/color.cc
src/context.cc
src/control.cc
src/csgops.cc
src/csgterm.cc
src/CSGTermEvaluator.cc
src/csgtermnormalizer.cc
src/dxfdata.cc
src/dxfdim.cc
src/dxftess.cc
src/dxftess-cgal.cc
src/dxftess-glu.cc
src/editor.cc
src/export.cc
src/expr.cc
src/func.cc
src/glview.cc
src/handle_dep.cc
src/highlighter.cc
src/import.cc
src/linalg.cc
src/linearextrude.cc
src/mainwin.cc
src/mathc99.cc
src/ModuleCache.cc
src/module.cc
src/node.cc
src/nodedumper.cc
src/OpenCSGRenderer.cc
src/OpenCSGWarningDialog.cc
src/openscad.cc
src/parsersettings.cc
src/PolySetCache.cc
src/polyset.cc
src/PolySetCGALEvaluator.cc
src/PolySetEvaluator.cc
src/Preferences.cc
src/primitives.cc
src/printutils.cc
src/progress.cc
src/ProgressWidget.cc
src/projection.cc
src/render.cc
src/renderer.cc
src/rendersettings.cc
src/rotateextrude.cc
src/stl-utils.cc
src/surface.cc
src/svg.cc
src/ThrownTogetherRenderer.cc
src/transform.cc
src/traverser.cc
src/Tree.cc
src/value.cc
src/version_check.cc

View File

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OpenSCAD 2014.01.06\n"
"Project-Id-Version: OpenSCAD 2014.01.09\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-01-06 21:45+0100\n"
"POT-Creation-Date: 2014-01-09 19:02+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -21,44 +21,6 @@ msgstr ""
msgid "About OpenSCAD"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:86
msgid "OpenGL Warning"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:87
msgid ""
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/"
"REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css"
"\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Lucida Grande'; font-size:13pt; "
"font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></"
"p></body></html>"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:92
msgid "Enable OpenCSG"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:93
msgid "Show this message again"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:94 objects/ui_MainWindow.h:558
msgid "Close"
msgstr ""
#: objects/ui_ProgressWidget.h:72
msgid "Form"
msgstr ""
#: objects/ui_ProgressWidget.h:73
msgid "%v / %m"
msgstr ""
#: objects/ui_MainWindow.h:470
msgid "MainWindow"
msgstr ""
@ -411,6 +373,10 @@ msgstr ""
msgid "Export as DXF..."
msgstr ""
#: objects/ui_MainWindow.h:558 objects/ui_OpenCSGWarningDialog.h:94
msgid "Close"
msgstr ""
#: objects/ui_MainWindow.h:559
msgid "Ctrl+W"
msgstr ""
@ -515,6 +481,32 @@ msgstr ""
msgid "&Help"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:86
msgid "OpenGL Warning"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:87
msgid ""
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/"
"REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css"
"\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'Lucida Grande'; font-size:13pt; "
"font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; "
"margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></"
"p></body></html>"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:92
msgid "Enable OpenCSG"
msgstr ""
#: objects/ui_OpenCSGWarningDialog.h:93
msgid "Show this message again"
msgstr ""
#: objects/ui_Preferences.h:515
msgid "3D View"
msgstr ""
@ -623,6 +615,53 @@ msgstr ""
msgid "toolBar"
msgstr ""
#: objects/ui_ProgressWidget.h:72
msgid "Form"
msgstr ""
#: objects/ui_ProgressWidget.h:73
msgid "%v / %m"
msgstr ""
#: src/AboutDialog.h:16
msgid "About OpenSCAD "
msgstr ""
#: src/cache.h:181
msgid "Trimming cache: %1% (%2% bytes)"
msgstr ""
#: src/CGAL_Nef3_workaround.h:255
msgid "ERROR: CGAL NefPolyhedron Triangulation failed"
msgstr ""
#: src/CsgInfo.h:48
msgid "Error: CSG generation failed! (no top level object found)"
msgstr ""
#: src/CsgInfo.h:53 src/mainwin.cc:821
msgid "Compiling design (CSG Products normalization)..."
msgstr ""
#: src/CsgInfo.h:60 src/mainwin.cc:868
#, c-format
msgid "Normalized CSG tree has %d elements"
msgstr ""
#: src/CsgInfo.h:64 src/mainwin.cc:833
msgid "WARNING: CSG normalization resulted in an empty tree"
msgstr ""
#: src/CsgInfo.h:69
#, c-format
msgid "Compiling highlights (%i CSG Trees)..."
msgstr ""
#: src/CsgInfo.h:79
#, c-format
msgid "Compiling background (%i CSG Trees)..."
msgstr ""
#: src/cgaladv_minkowski2.cc:43
msgid " vertices:"
msgstr ""
@ -745,7 +784,7 @@ msgstr ""
msgid "ERROR: CGAL NefPolyhedron->Polyhedron conversion failed."
msgstr ""
#: src/CGAL_Nef_polyhedron.cc:114
#: src/CGAL_Nef_polyhedron.cc:114 src/PlatformUtils.cc:19
#, c-format
msgid "ERROR: %s"
msgstr ""
@ -808,21 +847,21 @@ msgstr ""
msgid "ModuleContext %p (%p) for %s inst (%p)"
msgstr ""
#: src/context.cc:158
#: src/context.cc:158 src/evalcontext.cc:40
#, c-format
msgid "Context: %p (%p)"
msgstr ""
#: src/context.cc:159
#: src/context.cc:159 src/evalcontext.cc:41 src/modcontext.cc:148
#, c-format
msgid " document path: %s"
msgstr ""
#: src/context.cc:163
#: src/context.cc:163 src/evalcontext.cc:57 src/modcontext.cc:152
msgid " module args:"
msgstr ""
#: src/context.cc:170
#: src/context.cc:170 src/modcontext.cc:159
msgid " vars:"
msgstr ""
@ -863,7 +902,7 @@ msgstr ""
msgid "WARNING: Bad range parameter for children: too many elements (%lu)."
msgstr ""
#: src/csgtermnormalizer.cc:21 src/csgtermnormalizer.cc:53
#: src/csgtermnormalizer.cc:21 src/csgtermnormalizer.cc:69
#, c-format
msgid ""
"WARNING: Normalized tree is growing past %d elements. Aborting "
@ -944,6 +983,19 @@ msgstr ""
msgid "GLU tesselation error %s"
msgstr ""
#: src/evalcontext.cc:38
#, c-format
msgid "EvalContext %p (%p) for %s inst (%p)"
msgstr ""
#: src/evalcontext.cc:43
msgid " eval args:"
msgstr ""
#: src/evalcontext.cc:48
msgid " children:"
msgstr ""
#: src/export.cc:48
msgid "ERROR: CGAL NefPolyhedron->Polyhedron conversion failed"
msgstr ""
@ -957,6 +1009,22 @@ msgstr ""
msgid "CGAL unknown error in CGAL_Nef_polyhedron3::convert_to_Polyhedron()"
msgstr ""
#: src/feature.cc:21
msgid "Enable the <code>concat()</code> function."
msgstr ""
#: src/feature.cc:60
#, c-format
msgid "WARNING: Ignoring request to enable unknown feature '%s'."
msgstr ""
#: src/fileutils.cc:25
#, c-format
msgid ""
"WARNING: Imported file (%s) found in document root instead of relative to "
"the importing module. This behavior is deprecated"
msgstr ""
#: src/func.cc:503 src/func.cc:536
#, c-format
msgid " WARNING: search term not found: \"%s\""
@ -984,79 +1052,6 @@ msgid ""
"stack"
msgstr ""
#: src/glview.cc:149
#, c-format
msgid "GLEW Error: %s\n"
msgstr ""
#: src/glview.cc:161
#, c-format
msgid ""
"GLEW version %s\n"
"OpenGL version %s\n"
"%s (%s)\n"
"\n"
"RGBA(%d%d%d%d), depth(%d), stencil(%d)\n"
"Extensions:\n"
"%s\n"
msgstr ""
#: src/glview.cc:304
#, c-format
msgid ""
"OpenGL Program Linker Error:\n"
"%.*s"
msgstr ""
#: src/glview.cc:310
#, c-format
msgid ""
"OpenGL Program Link OK:\n"
"%.*s"
msgstr ""
#: src/glview.cc:315
#, c-format
msgid ""
"OpenGL Program Validation results:\n"
"%.*s"
msgstr ""
#: src/glview.cc:329
msgid ""
"Warning: You may experience OpenCSG rendering errors.\n"
"\n"
msgstr ""
#: src/glview.cc:332
msgid ""
"Warning: Missing OpenGL capabilities for OpenCSG - OpenCSG has been "
"disabled.\n"
"\n"
msgstr ""
#: src/glview.cc:335
msgid ""
"It is highly recommended to use OpenSCAD on a system with OpenGL 2.0 or "
"later.\n"
"Your renderer information is as follows:\n"
msgstr ""
#: src/glview.cc:339
#, c-format
msgid ""
"GLEW version %s\n"
"%s (%s)\n"
"OpenGL version %s\n"
msgstr ""
#: src/glview.cc:537
#, c-format
msgid ""
"Viewport: translate = [ %.2f %.2f %.2f ], rotate = [ %.2f %.2f %.2f ], "
"distance = %.2f"
msgstr ""
#: src/handle_dep.cc:36
#, c-format
msgid "Can't open dependencies file `%s' for writing!\n"
@ -1161,14 +1156,6 @@ msgstr ""
msgid "CSG generation cancelled."
msgstr ""
#: src/mainwin.cc:821
msgid "Compiling design (CSG Products normalization)..."
msgstr ""
#: src/mainwin.cc:833
msgid "WARNING: CSG normalization resulted in an empty tree"
msgstr ""
#: src/mainwin.cc:839
#, c-format
msgid "Compiling highlights (%d CSG Trees)..."
@ -1188,11 +1175,6 @@ msgstr ""
msgid "WARNING: OpenCSG rendering has been disabled."
msgstr ""
#: src/mainwin.cc:868
#, c-format
msgid "Normalized CSG tree has %d elements"
msgstr ""
#: src/mainwin.cc:878
msgid "CSG generation finished."
msgstr ""
@ -1447,9 +1429,9 @@ msgid "No filename specified. %s export aborted."
msgstr ""
#: src/mainwin.cc:1471 src/mainwin.cc:1524 src/mainwin.cc:1557
#: src/openscad.cc:292 src/openscad.cc:304 src/openscad.cc:322
#: src/openscad.cc:373 src/openscad.cc:392 src/openscad.cc:407
#: src/openscad.cc:418
#: src/openscad.cc:316 src/openscad.cc:328 src/openscad.cc:346
#: src/openscad.cc:397 src/openscad.cc:416 src/openscad.cc:431
#: src/openscad.cc:442
#, c-format
msgid "Can't open file \"%s\" for export"
msgstr ""
@ -1541,6 +1523,33 @@ msgid ""
"Do you want to save your changes?"
msgstr ""
#: src/modcontext.cc:100
#, c-format
msgid "WARNING: Experimental builtin function '%s' is not enabled."
msgstr ""
#: src/modcontext.cc:113
#, c-format
msgid "WARNING: Experimental builtin module '%s' is not enabled."
msgstr ""
#: src/modcontext.cc:118
#, c-format
msgid ""
"DEPRECATED: The %s() module will be removed in future releases. Use %s() "
"instead."
msgstr ""
#: src/modcontext.cc:145
#, c-format
msgid "ModuleContext %p (%p) for %s inst (%p) "
msgstr ""
#: src/modcontext.cc:147
#, c-format
msgid "ModuleContext: %p (%p)"
msgstr ""
#: src/ModuleCache.cc:70
#, c-format
msgid "Recompiling cached library: %s (%s)"
@ -1594,147 +1603,152 @@ msgstr ""
msgid "Can't create OpenGL OffscreenView. Code: %i. Exiting.\n"
msgstr ""
#: src/openscad.cc:160
#: src/openscad.cc:182
msgid "Camera setup requires either 7 numbers for Gimbal Camera\n"
msgstr ""
#: src/openscad.cc:161
#: src/openscad.cc:183
msgid "or 6 numbers for Vector Camera\n"
msgstr ""
#: src/openscad.cc:177
#: src/openscad.cc:199
msgid "projection needs to be 'o' or 'p' for ortho or perspective\n"
msgstr ""
#: src/openscad.cc:188
#: src/openscad.cc:210
msgid "Need 2 numbers for imgsize\n"
msgstr ""
#: src/openscad.cc:236
#, c-format
msgid "Unknown suffix for output file %s\n"
msgstr ""
#: src/openscad.cc:260
#, c-format
msgid "Unknown suffix for output file %s\n"
msgstr ""
#: src/openscad.cc:284
#, c-format
msgid "Can't open input file '%s'!\n"
msgstr ""
#: src/openscad.cc:269
#: src/openscad.cc:293
#, c-format
msgid "Can't parse file '%s'!\n"
msgstr ""
#: src/openscad.cc:351
#: src/openscad.cc:375
#, c-format
msgid "Output file:%s\n"
msgstr ""
#: src/openscad.cc:352
#: src/openscad.cc:376
msgid "Sorry, don't know how to write deps for that file type. Exiting\n"
msgstr ""
#: src/openscad.cc:357
#: src/openscad.cc:381
msgid "error writing deps"
msgstr ""
#: src/openscad.cc:364 src/openscad.cc:383
#: src/openscad.cc:388 src/openscad.cc:407
msgid "Current top level object is not a 3D object.\n"
msgstr ""
#: src/openscad.cc:368 src/openscad.cc:387
#: src/openscad.cc:392 src/openscad.cc:411
msgid "Object isn't a valid 2-manifold! Modify your design.\n"
msgstr ""
#: src/openscad.cc:402
#: src/openscad.cc:426
msgid "Current top level object is not a 2D object.\n"
msgstr ""
#: src/openscad.cc:584
#: src/openscad.cc:591
msgid "Allowed options"
msgstr ""
#: src/openscad.cc:586
#: src/openscad.cc:593
msgid "help message"
msgstr ""
#: src/openscad.cc:587
#: src/openscad.cc:594
msgid "print the version"
msgstr ""
#: src/openscad.cc:588
#: src/openscad.cc:595
msgid "print information about the building process"
msgstr ""
#: src/openscad.cc:589
#: src/openscad.cc:596
msgid "if exporting a png image, do a full CGAL render"
msgstr ""
#: src/openscad.cc:590
#: src/openscad.cc:597
msgid ""
"if exporting a png image, do an OpenCSG(default) or ThrownTogether preview"
msgstr ""
#: src/openscad.cc:591
#: src/openscad.cc:598
msgid "parameters for camera when exporting png"
msgstr ""
#: src/openscad.cc:592
#: src/openscad.cc:599
msgid "=width,height for exporting png"
msgstr ""
#: src/openscad.cc:593
#: src/openscad.cc:600
msgid "(o)rtho or (p)erspective when exporting png"
msgstr ""
#: src/openscad.cc:594
#: src/openscad.cc:601
msgid "out-file"
msgstr ""
#: src/openscad.cc:595
#: src/openscad.cc:602
msgid "stl-file"
msgstr ""
#: src/openscad.cc:596
#: src/openscad.cc:603
msgid "dxf-file"
msgstr ""
#: src/openscad.cc:597
#: src/openscad.cc:604
msgid "deps-file"
msgstr ""
#: src/openscad.cc:598
#: src/openscad.cc:605
msgid "makefile"
msgstr ""
#: src/openscad.cc:599
#: src/openscad.cc:606
msgid "var=val"
msgstr ""
#: src/openscad.cc:600
#: src/openscad.cc:607
msgid "enable experimental features"
msgstr ""
#: src/openscad.cc:602
#: src/openscad.cc:609
msgid "Hidden options"
msgstr ""
#: src/openscad.cc:604
#: src/openscad.cc:611
msgid "input file"
msgstr ""
#: src/openscad.cc:638
#: src/openscad.cc:645
msgid "DEPRECATED: The -s option is deprecated. Use -o instead.\n"
msgstr ""
#: src/openscad.cc:643
#: src/openscad.cc:650
msgid "DEPRECATED: The -x option is deprecated. Use -o instead.\n"
msgstr ""
#: src/openscad.cc:700
#: src/openscad.cc:707
msgid "Requested GUI mode but can't open display!\n"
msgstr ""
#: src/PlatformUtils.cc:16
#, c-format
msgid "ERROR: Cannot create %s"
msgstr ""
#: src/PolySetCache.cc:24
#, c-format
msgid "PolySets in cache: %d"
@ -1889,6 +1903,48 @@ msgstr ""
msgid "ERROR: Unable to convert point at index %d to a vec2 of numbers"
msgstr ""
#: src/QGLView.cc:105
msgid ""
"\n"
"Using QGLWidget\n"
"\n"
msgstr ""
#: src/QGLView.cc:122
msgid ""
"Warning: You may experience OpenCSG rendering errors.\n"
"\n"
msgstr ""
#: src/QGLView.cc:125
msgid ""
"Warning: Missing OpenGL capabilities for OpenCSG - OpenCSG has been "
"disabled.\n"
"\n"
msgstr ""
#: src/QGLView.cc:128
msgid ""
"It is highly recommended to use OpenSCAD on a system with OpenGL 2.0 or "
"later.\n"
"Your renderer information is as follows:\n"
msgstr ""
#: src/QGLView.cc:132
#, c-format
msgid ""
"GLEW version %s\n"
"%s (%s)\n"
"OpenGL version %s\n"
msgstr ""
#: src/QGLView.cc:163
#, c-format
msgid ""
"Viewport: translate = [ %.2f %.2f %.2f ], rotate = [ %.2f %.2f %.2f ], "
"distance = %.2f"
msgstr ""
#: src/rotateextrude.cc:72
msgid ""
"DEPRECATED: Support for reading files in rotate_extrude will be removed in "

16
scripts/generate-potfiles.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
#
# Generate list of files for translation. The output is saved to po/POTFILES
# which is needed for the xgettext call.
for ui in src/*.ui
do
UI="${ui#src/}"
UI="${UI%.ui}"
echo "objects/ui_$UI.h"
done
for src in src/*.h src/*.cc
do
echo $src
done

View File

@ -14,7 +14,7 @@ updatepot()
OPTS=$OPTS' --package-version='$VER
OPTS=$OPTS' --default-domain=openscad'
OPTS=$OPTS' --keyword=_'
OPTS=$OPTS' --files-from=./po/POTFILES.in'
OPTS=$OPTS' --files-from=./po/POTFILES'
cmd="${GETTEXT_PATH}xgettext "$OPTS' -o ./po/openscad.pot'
echo $cmd
$cmd